Accept Merge Request #1762: (feature/customer_supply -> develop)

Merge Request: 隐藏欠单

Created By: @廖丹龙
Reviewed By: @胡尧
Approved By: @胡尧 
Accepted By: @胡尧
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1762#mr-1762-review-218183
This commit is contained in:
胡尧
2025-01-15 08:43:31 +08:00
committed by Coding
2 changed files with 4 additions and 1 deletions

View File

@@ -1537,7 +1537,7 @@ class MrpProduction(models.Model):
product_id = self.env['product.product'].browse(vals['product_id'])
is_self_process = product_id.materials_type_id and product_id.materials_type_id.gain_way and product_id.materials_type_id.gain_way != '自加工'
is_customer_provided = product_id.is_customer_provided
if not is_custemer_group_id.get(is_customer_provided):
if not is_custemer_group_id.get(is_customer_provided) and is_self_process:
is_custemer_group_id[is_customer_provided] = self.env["procurement.group"].create({'name': vals.get('name')}).id
# if not (is_first_customer or is_first_not_customer) and is_self_process:
# is_first = True

View File

@@ -85,6 +85,9 @@
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_view_mrp_production_backorders']" position="attributes">
<attribute name="attrs">{'invisible': True}</attribute>
</xpath>
<xpath expr="//header//button[last()]" position="after">
<button name="action_apply_programming" type="object" string="申请编程" class="oe_highlight"
attrs="{'invisible': ['|', ('state', 'not in', ['confirmed', 'pending_cam']), ('programming_state', '!=', '已编程')]}"