制造和销售里的产品的筛选器,胚料的生成新增是否为业务平台新建字段,匹配bom修改为只能匹配手动建的bom
This commit is contained in:
@@ -37,7 +37,7 @@ class ResProductTemplate(models.Model):
|
||||
single_manufacturing = fields.Boolean(string="单个制造")
|
||||
upload_model_file = fields.Many2many('ir.attachment', 'upload_model_file_attachment_ref', string='上传模型文件')
|
||||
model_code = fields.Char('模型编码')
|
||||
is_bfm = fields.Boolean('业务平台是否自动创建产品', default=False)
|
||||
is_bfm = fields.Boolean('业务平台是否自动创建', default=False)
|
||||
|
||||
def _get_volume_uom_id_from_ir_config_parameter(self):
|
||||
product_length_in_feet_param = self.env['ir.config_parameter'].sudo().get_param('product.volume_in_cubic_feet')
|
||||
@@ -152,6 +152,7 @@ class ResProductTemplate(models.Model):
|
||||
'list_price': item['price'],
|
||||
'materials_id': materials_id.id,
|
||||
'materials_type_id': materials_type_id.id,
|
||||
'is_bfm': True,
|
||||
# 'route_ids': self._get_routes(route_type),
|
||||
# 'categ_id': self.env.ref('sf_dlm.product_category_embryo_sf').id,
|
||||
# 'model_surface_process_id': self.env['sf.production.process'].search(
|
||||
@@ -255,7 +256,7 @@ class ResMrpBom(models.Model):
|
||||
embryo_has = self.env['product.product'].search(
|
||||
[('categ_id.type', '=', '胚料'), ('materials_type_id', '=', product.materials_type_id.id),
|
||||
('length', '>', product.length), ('width', '>', product.width),
|
||||
('height', '>', product.height)
|
||||
('height', '>', product.height), ('is_bfm', '=', False)
|
||||
],
|
||||
limit=1,
|
||||
order='volume desc'
|
||||
|
||||
@@ -127,16 +127,16 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_product_template_search_view_sf" model="ir.ui.view">
|
||||
<field name="name">mrp.product.template.search</field>
|
||||
<record id="product_template_search_view_sf" model="ir.ui.view">
|
||||
<field name="name">product.template.search</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_product_template_search_view"/>
|
||||
<field name="inherit_id" ref="product.product_template_search_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='consumable']" position="after">
|
||||
<!-- <separator/>-->
|
||||
<!-- <filter name="categ_idss" string="产品类别"-->
|
||||
<!-- domain="[('categ_id.type', 'in', ['成品', '胚料','原材料'])]"/>-->
|
||||
<filter string="胚料" name="embryo" domain="[('categ_id.type', '=', '胚料')]"/>
|
||||
<separator/>
|
||||
<filter name="finish_product" string="成品" domain="[('categ_id.type','=','成品')]"/>
|
||||
<filter name="embryo" string="胚料" domain="[('categ_id.type','=','胚料')]"/>
|
||||
<filter name="raw_bom" string="原材料" domain="[('categ_id.type','=','原材料')]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user