Accept Merge Request #1629: (feature/采购、外协优化 -> develop)

Merge Request: 1、采购单的采购类型优化,外协优化

Created By: @禹翔辉
Reviewed By: @胡尧
Approved By: @胡尧 
Accepted By: @禹翔辉
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1629?initial=true
This commit is contained in:
禹翔辉
2024-12-23 17:15:43 +08:00
committed by Coding
2 changed files with 4 additions and 4 deletions

View File

@@ -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()

View File

@@ -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">