修改销售,采购,制造,仓库产品设置产品类型为默认分组

This commit is contained in:
hujiaying
2024-09-13 10:15:26 +08:00
parent 4f9ac16a07
commit 6ad2fa80f1
8 changed files with 37 additions and 10 deletions

View File

@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<odoo> <odoo>
<data> <data>
<record id="mrp.product_template_action" model="ir.actions.act_window">
<field name="context">
{"search_default_categ_id":1,"search_default_consumable": 1, 'default_detailed_type': 'product'}
</field>
</record>
<record model="ir.ui.view" id="view_sale_product_template_form_inherit_sf"> <record model="ir.ui.view" id="view_sale_product_template_form_inherit_sf">
<field name="name">product.template.form.inherit.sf</field> <field name="name">product.template.form.inherit.sf</field>
<field name="model">product.template</field> <field name="model">product.template</field>
@@ -88,7 +93,8 @@
</div> </div>
<field name="model_volume" string="体积[mm³]"/> <field name="model_volume" string="体积[mm³]"/>
<field name="product_model_type_id" string="模型类型"/> <field name="product_model_type_id" string="模型类型"/>
<field name="model_processing_panel" placeholder="例如R,U" string="加工面板" readonly="1"/> <field name="model_processing_panel" placeholder="例如R,U" string="加工面板"
readonly="1"/>
<field name="model_machining_precision"/> <field name="model_machining_precision"/>
<field name="model_process_parameters_ids" string="表面工艺参数" <field name="model_process_parameters_ids" string="表面工艺参数"
widget="many2many_tags" widget="many2many_tags"

View File

@@ -43,7 +43,7 @@
<label for="default_capacity"/> <label for="default_capacity"/>
<div class="o_row"> <div class="o_row">
<field name="default_capacity" string="产线日产能"/> <field name="default_capacity" string="产线日产能"/>
</div> </div>
</xpath> </xpath>
<xpath expr="//field[@name='default_capacity'][last()]" position="before"> <xpath expr="//field[@name='default_capacity'][last()]" position="before">

View File

@@ -184,5 +184,10 @@
</xpath> </xpath>
</field> </field>
</record> </record>
<record id="purchase.product_normal_action_puchased" model="ir.actions.act_window">
<field name="context">
{"search_default_categ_id":1,"search_default_filter_to_purchase":1, "purchase_product_template": 1}
</field>
</record>
</data> </data>
</odoo> </odoo>

View File

@@ -225,5 +225,10 @@
</field> </field>
</field> </field>
</record> </record>
<record id="sale.product_template_action" model="ir.actions.act_window">
<field name="context">{"search_default_categ_id":1,
"search_default_filter_to_sell":1,"sale_multi_pricelist_product_template": 1}
</field>
</record>
</data> </data>
</odoo> </odoo>

View File

@@ -3,7 +3,7 @@
'name': "sf_stock", 'name': "sf_stock",
'summary': """ 'summary': """
处理代发货业务""", 处理仓库 -代发货业务""",
'description': """ 'description': """
Long description of module's purpose Long description of module's purpose
@@ -25,6 +25,7 @@
'data': [ 'data': [
# 'security/ir.model.access.csv', # 'security/ir.model.access.csv',
'views/stock_picking.xml', 'views/stock_picking.xml',
'views/stock_product_template.xml'
], ],
# only loaded in demonstration mode # only loaded in demonstration mode
'demo': [ 'demo': [

View File

@@ -13,8 +13,6 @@ _logger = logging.getLogger(__name__)
class StockPicking(models.Model): class StockPicking(models.Model):
_inherit = 'stock.picking' _inherit = 'stock.picking'
cancel_backorder_ids = fields.Boolean(default=False, string='是否取消后置单据')
# 重写验证下发发货到bfm # 重写验证下发发货到bfm
def button_validate(self): def button_validate(self):
info = super(StockPicking, self).button_validate() info = super(StockPicking, self).button_validate()

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo> <odoo>
<data> <data>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="stock.product_template_action_product" model="ir.actions.act_window">
<field name="context">
{"search_default_categ_id":1,"search_default_consumable": 1, 'default_detailed_type': 'product'}
</field>
</record>
</data>
</odoo>