Accept Merge Request #1863: (feature/制造功能优化 -> develop)
Merge Request: Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造功能优化 Created By: @马广威 Accepted By: @马广威 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1863?initial=true
This commit is contained in:
@@ -270,10 +270,10 @@ class MrpProduction(models.Model):
|
|||||||
('成品', '成品'),
|
('成品', '成品'),
|
||||||
('坯料', '坯料'),
|
('坯料', '坯料'),
|
||||||
('其他', '其他')
|
('其他', '其他')
|
||||||
], string='产品类型', default='成品')
|
], string='产品类型', compute='_compute_production_product_type')
|
||||||
|
|
||||||
@api.onchange('product_id')
|
@api.depends('product_id')
|
||||||
def onchange_product_id(self):
|
def _compute_production_product_type(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
if record.product_id.categ_id.name == '成品':
|
if record.product_id.categ_id.name == '成品':
|
||||||
record.production_product_type = '成品'
|
record.production_product_type = '成品'
|
||||||
|
|||||||
@@ -118,11 +118,11 @@
|
|||||||
<field name="production_type" readonly="1"/>
|
<field name="production_type" readonly="1"/>
|
||||||
<field name="production_product_type" invisible="1"/>
|
<field name="production_product_type" invisible="1"/>
|
||||||
<field name="manual_quotation" readonly="1"
|
<field name="manual_quotation" readonly="1"
|
||||||
attrs="{'invisible': [('production_type', 'not in', ['自动化产线加工', '人工线下加工']), ('production_product_type', '!=', '成品')]}"/>
|
attrs="{'invisible': ['|', ('production_type', 'not in', ['自动化产线加工', '人工线下加工']), ('production_product_type', '!=', '成品')]}"/>
|
||||||
<field name="programming_no" readonly="1"
|
<field name="programming_no" readonly="1"
|
||||||
attrs="{'invisible': [('production_type', 'not in', ['自动化产线加工', '人工线下加工']), ('production_product_type', '!=', '成品')]}"/>
|
attrs="{'invisible': ['|', ('production_type', 'not in', ['自动化产线加工', '人工线下加工']), ('production_product_type', '!=', '成品')]}"/>
|
||||||
<field name="programming_state" readonly="1"
|
<field name="programming_state" readonly="1"
|
||||||
attrs="{'invisible': [('production_type', 'not in', ['自动化产线加工', '人工线下加工']), ('production_product_type', '!=', '成品')]}"
|
attrs="{'invisible': ['|', ('production_type', 'not in', ['自动化产线加工', '人工线下加工']), ('production_product_type', '!=', '成品')]}"
|
||||||
decoration-success="programming_state == '已编程'"
|
decoration-success="programming_state == '已编程'"
|
||||||
decoration-warning="programming_state =='编程中'"
|
decoration-warning="programming_state =='编程中'"
|
||||||
decoration-danger="programming_state =='已编程未下发'"/>
|
decoration-danger="programming_state =='已编程未下发'"/>
|
||||||
@@ -417,7 +417,7 @@
|
|||||||
<span class="o_stat_text">子MO</span>
|
<span class="o_stat_text">子MO</span>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//sheet//notebook//page[last()]" position="after">
|
<xpath expr="//sheet//notebook//page[last()]" position="after">
|
||||||
<page string="编程记录" attrs="{'invisible': [('production_type', 'not in', ['自动化产线加工', '人工线下加工']), ('production_product_type', '!=', '成品')]}">
|
<page string="编程记录" attrs="{'invisible': ['|', ('production_type', 'not in', ['自动化产线加工', '人工线下加工']), ('production_product_type', '!=', '成品')]}">
|
||||||
<field name="production_type" invisible="1"/>
|
<field name="production_type" invisible="1"/>
|
||||||
<field name="production_product_type" invisible="1"/>
|
<field name="production_product_type" invisible="1"/>
|
||||||
<field name="programming_record_ids" widget="one2many" attrs="{'readonly': [('id', '!=', False)]}">
|
<field name="programming_record_ids" widget="one2many" attrs="{'readonly': [('id', '!=', False)]}">
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ class SFSaleOrderCancelLine(models.TransientModel):
|
|||||||
'sequence': sequence,
|
'sequence': sequence,
|
||||||
'category': '制造',
|
'category': '制造',
|
||||||
'doc_name': '工单',
|
'doc_name': '工单',
|
||||||
'doc_number': f'{mo.name}-{workorder.name}',
|
'doc_number': f'{mo.name}-{workorder.processing_panel}-{workorder.name}' if workorder.processing_panel else f'{mo.name}-{workorder.name}',
|
||||||
'line_number': g,
|
'line_number': g,
|
||||||
'operation_type': '',
|
'operation_type': '',
|
||||||
'product_name': f'[{mo.product_id.default_code}] {mo.product_id.name}',
|
'product_name': f'[{mo.product_id.default_code}] {mo.product_id.name}',
|
||||||
|
|||||||
Reference in New Issue
Block a user