Merge branch 'feature/制造、采购、工单优化' into feature/采购、外协优化
This commit is contained in:
@@ -282,7 +282,7 @@ class RePurchaseOrder(models.Model):
|
|||||||
store=True)
|
store=True)
|
||||||
|
|
||||||
purchase_type = fields.Selection(
|
purchase_type = fields.Selection(
|
||||||
[('standard', '标准采购'), ('consignment', '委外加工'), ('outsourcing', '工序外协'), ('outside', '外购订单')],
|
[('standard', '标准采购'), ('consignment', '工序外协'), ('outsourcing', '委外加工'), ('outside', '外购订单')],
|
||||||
string='采购类型', default='standard', store=True, compute='_compute_purchase_type')
|
string='采购类型', default='standard', store=True, compute='_compute_purchase_type')
|
||||||
|
|
||||||
origin_sale_id = fields.Many2one('sale.order', string='销售订单号', compute='_compute_origin_sale_id')
|
origin_sale_id = fields.Many2one('sale.order', string='销售订单号', compute='_compute_origin_sale_id')
|
||||||
@@ -300,7 +300,7 @@ class RePurchaseOrder(models.Model):
|
|||||||
break
|
break
|
||||||
elif order_line.supply_method == 'outsourcing':
|
elif order_line.supply_method == 'outsourcing':
|
||||||
if order_line.product_id.id in product_list:
|
if order_line.product_id.id in product_list:
|
||||||
purchase.purchase_type = 'consignment'
|
purchase.purchase_type = 'outsourcing'
|
||||||
break
|
break
|
||||||
|
|
||||||
@api.depends('order_line.move_dest_ids.group_id.mrp_production_ids',
|
@api.depends('order_line.move_dest_ids.group_id.mrp_production_ids',
|
||||||
@@ -369,7 +369,7 @@ class RePurchaseOrder(models.Model):
|
|||||||
'partner_id': server_template.seller_ids[0].partner_id.id,
|
'partner_id': server_template.seller_ids[0].partner_id.id,
|
||||||
'origin': production.name,
|
'origin': production.name,
|
||||||
'state': 'draft',
|
'state': 'draft',
|
||||||
'purchase_type': 'outsourcing',
|
'purchase_type': 'consignment',
|
||||||
'order_line': server_product_process})
|
'order_line': server_product_process})
|
||||||
pp.purchase_id = [(6, 0, [purchase_order.id])]
|
pp.purchase_id = [(6, 0, [purchase_order.id])]
|
||||||
# self.env.cr.commit()
|
# self.env.cr.commit()
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
<attribute name="optional">hide</attribute>
|
<attribute name="optional">hide</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="after">
|
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="after">
|
||||||
<field name="part_name" optional="hide"/>
|
<field name="part_name" optional="show"/>
|
||||||
<!-- <field name="part_number" optional="show"/>-->
|
<!-- <field name="part_number" optional="show"/>-->
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='date_order']" position="attributes">
|
<xpath expr="//field[@name='date_order']" position="attributes">
|
||||||
|
|||||||
Reference in New Issue
Block a user