物料需求计划管理
This commit is contained in:
@@ -30,7 +30,7 @@ class SfProductionDemandPlan(models.Model):
|
||||
('50', '待下达生产'),
|
||||
('60', '已下达'),
|
||||
('100', '取消'),
|
||||
], string='状态', compute='_compute_status', store=True, readonly=False)
|
||||
], string='状态', default='30', compute='_compute_status', store=True)
|
||||
demand_plan_id = fields.Many2one(comodel_name="sf.demand.plan",
|
||||
string="物料需求", readonly=True)
|
||||
sale_order_id = fields.Many2one(comodel_name="sale.order",
|
||||
@@ -85,8 +85,7 @@ class SfProductionDemandPlan(models.Model):
|
||||
order_state = fields.Selection(
|
||||
string='订单状态',
|
||||
related='sale_order_line_id.state')
|
||||
route_id = fields.Many2one('stock.route', string='路线', related='sale_order_line_id.route_id', store=True)
|
||||
route_ids = fields.Many2many('stock.route', 'stock_route_demand_plan', 'demand_plan_id', 'route_id', '路线',
|
||||
route_ids = fields.Many2many('stock.route', 'stock_route_demand_plan', 'demand_plan_id', 'route_id', '库存路线',
|
||||
domain=[('demand_plan_selectable', '=', True)], compute='_compute_route_ids',
|
||||
store=True)
|
||||
contract_date = fields.Date('合同日期', related='sale_order_id.contract_date')
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<field name="part_name"/>
|
||||
<field name="part_number"/>
|
||||
<field name="is_incoming_material"/>
|
||||
<field name="supply_method"/>
|
||||
<field name="supply_method" attrs="{'readonly': [('status', '!=', '30')]}"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="deadline_of_delivery"/>
|
||||
<field name="inventory_quantity_auto_apply"/>
|
||||
@@ -38,7 +38,7 @@
|
||||
<field name="sale_order_id" optional="hide"/>
|
||||
<field name="sale_order_line_number" optional="hide"/>
|
||||
<field name="order_state"/>
|
||||
<field name="route_ids" widget="many2many_tags" optional="hide" readonly="0"
|
||||
<field name="route_ids" widget="many2many_tags" optional="hide"
|
||||
context="{'demand_plan_search_stock_route_id': id}"/>
|
||||
<field name="contract_date"/>
|
||||
<field name="date_order"/>
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
<field name="line_ids">
|
||||
<tree editable="bottom" delete="false">
|
||||
<field name="status"/>
|
||||
<field name="supply_method"/>
|
||||
<!--field name="库存路线"/>-->
|
||||
<field name="supply_method" attrs="{'readonly': [('status', '!=', '30')]}"/>
|
||||
<field name="route_ids" widget="many2many_tags" optional="hide"/>
|
||||
<!--<field name="需求位置"/>-->
|
||||
<!--<field name="bom"/>-->
|
||||
<field name="plan_uom_qty"/>
|
||||
|
||||
Reference in New Issue
Block a user