给坯料模板增加按订单补给
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
'author': 'fox',
|
'author': 'fox',
|
||||||
'website': '',
|
'website': '',
|
||||||
'category': '',
|
'category': '',
|
||||||
'depends': ['product', 'sf_dlm', 'sale_stock', 'sf_sale'],
|
'depends': ['sf_dlm', 'sale_stock', 'sf_sale'],
|
||||||
"data": [
|
"data": [
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'data/stock_routes.xml',
|
'data/stock_routes.xml',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="0">
|
<data noupdate="1">
|
||||||
<record id="product_template_manual_processing" model="product.template">
|
<record id="product_template_manual_processing" model="product.template">
|
||||||
<field name="name">人工线下加工模板</field>
|
<field name="name">人工线下加工模板</field>
|
||||||
<field name="active" eval="False"/>
|
<field name="active" eval="False"/>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<field name="company_id" ref="base.main_company"/>
|
<field name="company_id" ref="base.main_company"/>
|
||||||
<field name="single_manufacturing">true</field>
|
<field name="single_manufacturing">true</field>
|
||||||
<field name="tracking">serial</field>
|
<field name="tracking">serial</field>
|
||||||
<field name="categ_type">成品</field>
|
<!-- <field name="categ_type">成品</field> -->
|
||||||
<field name="is_manual_processing">true</field>
|
<field name="is_manual_processing">true</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||||
<field name="company_id" ref="base.main_company"/>
|
<field name="company_id" ref="base.main_company"/>
|
||||||
<field name="categ_type">成品</field>
|
<!-- <field name="categ_type">成品</field> -->
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="product_template_outsourcing" model="product.template">
|
<record id="product_template_outsourcing" model="product.template">
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||||
<field name="company_id" ref="base.main_company"/>
|
<field name="company_id" ref="base.main_company"/>
|
||||||
<field name="categ_type">成品</field>
|
<!-- <field name="categ_type">成品</field> -->
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="product_template_default" model="product.template">
|
<record id="product_template_default" model="product.template">
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||||
<field name="company_id" ref="base.main_company"/>
|
<field name="company_id" ref="base.main_company"/>
|
||||||
<field name="categ_type">成品</field>
|
<!-- <field name="categ_type">成品</field> -->
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- 供应商信息(业务平台),由于数据是python创建,只能指定ID -->
|
<!-- 供应商信息(业务平台),由于数据是python创建,只能指定ID -->
|
||||||
@@ -79,12 +79,20 @@
|
|||||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||||
<field name="company_id" ref="base.main_company"/>
|
<field name="company_id" ref="base.main_company"/>
|
||||||
<field name="categ_type">坯料</field>
|
<!-- <field name="categ_type">坯料</field> -->
|
||||||
<field name="seller_ids" eval="[ref('jikimo_sale_multiple_supply_methods.product_supplierinfo_bfm')]"/>
|
<field name="seller_ids" eval="[ref('jikimo_sale_multiple_supply_methods.product_supplierinfo_bfm')]"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="sf_dlm.product_embryo_sf_self_machining" model="product.product">
|
<record id="sf_dlm.product_embryo_sf_self_machining" model="product.product">
|
||||||
<field name="is_manual_processing">true</field>
|
<field name="is_manual_processing">true</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="sf_dlm.product_embryo_sf_self_machining" model="product.product">
|
||||||
|
<field name="route_ids" eval="[(4, ref('mrp_subcontracting.route_resupply_subcontractor_mto'))]"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="sf_dlm.product_embryo_sf_purchase" model="product.product">
|
||||||
|
<field name="route_ids" eval="[(4, ref('mrp_subcontracting.route_resupply_subcontractor_mto'))]"/>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
""",
|
""",
|
||||||
'category': 'sf',
|
'category': 'sf',
|
||||||
'website': 'https://www.sf.jikimo.com',
|
'website': 'https://www.sf.jikimo.com',
|
||||||
'depends': ['sf_base', 'sf_maintenance', 'web_widget_model_viewer', 'sf_warehouse','jikimo_attachment_viewer', 'jikimo_sale_multiple_supply_methods'],
|
'depends': ['sf_base', 'sf_maintenance', 'web_widget_model_viewer', 'sf_warehouse','jikimo_attachment_viewer'],
|
||||||
'data': [
|
'data': [
|
||||||
'data/stock_data.xml',
|
'data/stock_data.xml',
|
||||||
'data/empty_racks_data.xml',
|
'data/empty_racks_data.xml',
|
||||||
|
|||||||
@@ -1300,17 +1300,17 @@ class MrpProduction(models.Model):
|
|||||||
return production_values_str
|
return production_values_str
|
||||||
|
|
||||||
# 增加制造订单类型
|
# 增加制造订单类型
|
||||||
production_type = fields.Selection(
|
# production_type = fields.Selection(
|
||||||
[('自动化产线加工', '自动化产线加工'), ('人工线下加工', '人工线下加工')],
|
# [('自动化产线加工', '自动化产线加工'), ('人工线下加工', '人工线下加工')],
|
||||||
string='制造类型',
|
# string='制造类型',
|
||||||
compute='_compute_production_type',
|
# compute='_compute_production_type',
|
||||||
store=True
|
# store=True
|
||||||
)
|
# )
|
||||||
|
|
||||||
@api.depends('product_id.is_manual_processing')
|
# @api.depends('product_id.is_manual_processing')
|
||||||
def _compute_production_type(self):
|
# def _compute_production_type(self):
|
||||||
for production in self:
|
# for production in self:
|
||||||
production.production_type = '自动化产线加工' if not production.product_id.is_manual_processing else '人工线下加工'
|
# production.production_type = '自动化产线加工' if not production.product_id.is_manual_processing else '人工线下加工'
|
||||||
|
|
||||||
|
|
||||||
class sf_detection_result(models.Model):
|
class sf_detection_result(models.Model):
|
||||||
|
|||||||
@@ -35,10 +35,10 @@
|
|||||||
<field name="reservation_state" optional="hide" decoration-danger="reservation_state == 'confirmed'"
|
<field name="reservation_state" optional="hide" decoration-danger="reservation_state == 'confirmed'"
|
||||||
decoration-success="reservation_state == 'assigned'"/>
|
decoration-success="reservation_state == 'assigned'"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='state']" position="before">
|
<!-- <xpath expr="//field[@name='state']" position="before">
|
||||||
<field name="production_type" widget="badge" decoration-warning="production_type == '人工线下加工'"
|
<field name="production_type" widget="badge" decoration-warning="production_type == '人工线下加工'"
|
||||||
decoration-success="production_type == '自动化产线加工'" optional="show"/>
|
decoration-success="production_type == '自动化产线加工'" optional="show"/>
|
||||||
</xpath>
|
</xpath> -->
|
||||||
<xpath expr="//field[@name='activity_ids']" position="replace">
|
<xpath expr="//field[@name='activity_ids']" position="replace">
|
||||||
<field name="activity_ids" string="下一个活动" widget="list_activity" optional="hide"/>
|
<field name="activity_ids" string="下一个活动" widget="list_activity" optional="hide"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//sheet//group//group//div[3]" position="after">
|
<xpath expr="//sheet//group//group//div[3]" position="after">
|
||||||
<field name="production_type" readonly="1"/>
|
<!-- <field name="production_type" readonly="1"/> -->
|
||||||
<field name="manual_quotation" readonly="1"/>
|
<field name="manual_quotation" readonly="1"/>
|
||||||
<field name="programming_no" readonly="1"/>
|
<field name="programming_no" readonly="1"/>
|
||||||
<field name="programming_state" readonly="1"
|
<field name="programming_state" readonly="1"
|
||||||
|
|||||||
@@ -417,12 +417,12 @@ class sf_production_plan(models.Model):
|
|||||||
raise UserError(e)
|
raise UserError(e)
|
||||||
|
|
||||||
# 增加制造订单类型
|
# 增加制造订单类型
|
||||||
production_type = fields.Selection(
|
# production_type = fields.Selection(
|
||||||
[('自动化产线加工', '自动化产线加工'), ('人工线下加工', '人工线下加工')],
|
# [('自动化产线加工', '自动化产线加工'), ('人工线下加工', '人工线下加工')],
|
||||||
string='制造类型',
|
# string='制造类型',
|
||||||
related='production_id.production_type',
|
# related='production_id.production_type',
|
||||||
store=True
|
# store=True
|
||||||
)
|
# )
|
||||||
|
|
||||||
|
|
||||||
# 机台作业计划
|
# 机台作业计划
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<field name="production_line_id"/>
|
<field name="production_line_id"/>
|
||||||
<field name="date_planned_start"/>
|
<field name="date_planned_start"/>
|
||||||
<field name="date_planned_finished"/>
|
<field name="date_planned_finished"/>
|
||||||
<field name="production_type" widget="badge" decoration-warning="production_type == '人工线下加工'" decoration-success="production_type == '自动化产线加工'"/>
|
<!-- <field name="production_type" widget="badge" decoration-warning="production_type == '人工线下加工'" decoration-success="production_type == '自动化产线加工'"/> -->
|
||||||
<field name="actual_start_time" optional='hide'/>
|
<field name="actual_start_time" optional='hide'/>
|
||||||
<field name="actual_end_time" optional='hide'/>
|
<field name="actual_end_time" optional='hide'/>
|
||||||
<field name="actual_process_time" optional='hide'/>
|
<field name="actual_process_time" optional='hide'/>
|
||||||
|
|||||||
Reference in New Issue
Block a user