From 45a179d93c3d28e51a1f1dc01fa34ad7667cab3e Mon Sep 17 00:00:00 2001 From: Tony Gu Date: Sat, 28 Apr 2018 09:50:53 +0800 Subject: [PATCH 1/2] [FIX] mrp: Unrelated product_template and product_product on the same BOM Before this fix, we can create a Bom with both product_id and product_tmpl_id filled where the product_id is not a variant of the product_tmpl_id. This is unlogical and will be even trickier when the user is not able to see the variant field on the BOM. This fix puts the product_id back to False when the product_tmpl_id is changed. --- addons/mrp/models/mrp_bom.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/mrp/models/mrp_bom.py b/addons/mrp/models/mrp_bom.py index ec90c55d020..031e4f20e27 100644 --- a/addons/mrp/models/mrp_bom.py +++ b/addons/mrp/models/mrp_bom.py @@ -81,6 +81,8 @@ class MrpBom(models.Model): def onchange_product_tmpl_id(self): if self.product_tmpl_id: self.product_uom_id = self.product_tmpl_id.uom_id.id + if self.product_id.product_tmpl_id != self.product_tmpl_id: + self.product_id = False @api.onchange('routing_id') def onchange_routing_id(self): From 50ee813153b7642b348bfa08890cfaeade8c5631 Mon Sep 17 00:00:00 2001 From: Tony Gu Date: Sat, 28 Apr 2018 11:05:59 +0800 Subject: [PATCH 2/2] [CLA] add signed cla Shine IT --- doc/cla/corporate/shine-it.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/cla/corporate/shine-it.md diff --git a/doc/cla/corporate/shine-it.md b/doc/cla/corporate/shine-it.md new file mode 100644 index 00000000000..975f9d885f4 --- /dev/null +++ b/doc/cla/corporate/shine-it.md @@ -0,0 +1,17 @@ +China, 2018-04-28 + +Shine IT agrees to the terms of the Odoo Corporate Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Tony Gu tony@openerp.cn https://github.com/digitalsatori + +List of contributors: +Tony Gu tony@openerp.cn https://github.com/digitalsatori +Joshua Jan joshua@openerp.cn https://github.com/joshuajan +Xiao Guo xerxes@openerp.cn https://github.com/xerxesnoPT +