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