diff --git a/sf_base/__manifest__.py b/sf_base/__manifest__.py index 4a493cd2..77165cde 100644 --- a/sf_base/__manifest__.py +++ b/sf_base/__manifest__.py @@ -10,7 +10,7 @@ """, 'category': 'YZ', 'website': 'https://www.sf.jikimo.com', - 'depends': ['account', 'base', 'mrp', 'sf_bpm_api'], + 'depends': ['account', 'base', 'mrp'], 'data': [ 'security/group_security.xml', 'security/ir.model.access.csv', diff --git a/sf_base/views/menu_view.xml b/sf_base/views/menu_view.xml index e9a5876a..66550d05 100644 --- a/sf_base/views/menu_view.xml +++ b/sf_base/views/menu_view.xml @@ -91,13 +91,13 @@ sequence="1" action="mrs_processing_technology"/> - + + + + + + + ', product.model_long), ('embryo_width', '>', product.model_width), + ('embryo_height', '>', product.model_height)], + limit=1, + order="volume desc" + ) + vals = { + 'bom_id': self.id, + 'product_id': embryo.id, + 'product_qty': 1, + 'product_uom_id': 1 + } + return self.env['mrp.bom.line'].create(vals) diff --git a/sf_bpm_api/models/sale_order.py b/sf_bpm_api/models/sale_order.py index dd2b2ac1..1618a4e3 100644 --- a/sf_bpm_api/models/sale_order.py +++ b/sf_bpm_api/models/sale_order.py @@ -27,7 +27,7 @@ class ReSaleOrder(models.Model): vals = { 'order_id': self.id, 'product_id': product.id, - 'name': '%s/%s/%s/%s/%s' % (item['model_long'], item['model_width'], item['model_height'], item['model_volume'], product.materials_id.name), + 'name': '%s/%s/%s/%s/%s' % (item['model_long'], item['model_width'], item['model_height'], item['model_volume'], product.model_materials_id.name), 'price_unit': item['price'], 'product_uom_qty': item['number'] } diff --git a/sf_bpm_api/views/product_template_view.xml b/sf_bpm_api/views/product_template_view.xml index d68f2039..406330e3 100644 --- a/sf_bpm_api/views/product_template_view.xml +++ b/sf_bpm_api/views/product_template_view.xml @@ -10,18 +10,59 @@ - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + product.category.form.inherit.sf + product.category + + + + +