From 5fe5618b7e99c8af8c7d54b1900a25537ec78c00 Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Thu, 24 Mar 2016 10:52:38 +0100 Subject: [PATCH 1/2] [FIX] point_of_sale: make invoices use the fiscal position on pos.order We have to ensure that the invoices generated through the POS always reuse whatever fiscal position is set on the pos.order. Both in the front- and backend a user can change the fiscal position to be different from what is set on the customer of the order. opw-668155 --- addons/point_of_sale/point_of_sale.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 04805dc75e0..73ee1e53318 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -1132,6 +1132,7 @@ class pos_order(osv.osv): } invoice = inv_ref.new(cr, uid, inv) invoice._onchange_partner_id() + invoice.fiscal_position_id = order.fiscal_position_id inv = invoice._convert_to_write(invoice._cache) if not inv.get('account_id', None): From 5ab43773cb7c9d45556d407d6598a1111723ce15 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 24 Mar 2016 15:54:54 +0100 Subject: [PATCH 2/2] [FIX] ir.qweb: can't edit t-field content if modified by inherit xpath --- openerp/addons/base/ir/ir_qweb.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openerp/addons/base/ir/ir_qweb.py b/openerp/addons/base/ir/ir_qweb.py index e7776161737..467d839a6cb 100644 --- a/openerp/addons/base/ir/ir_qweb.py +++ b/openerp/addons/base/ir/ir_qweb.py @@ -264,6 +264,13 @@ class QWeb(orm.AbstractModel): else: _logger.warning("@t-debug in template '%s' is only available in --dev mode" % qwebcontext['__template__']) + # remove branding attributes from inherit + if element.attrib.get('data-oe-id') and [key for key in element.attrib.keys() if key.startswith("t-")]: + element.attrib.pop("data-oe-id", False) + element.attrib.pop("data-oe-xpath", False) + element.attrib.pop("data-oe-model", False) + element.attrib.pop("data-oe-field", False) + for (attribute_name, attribute_value) in element.attrib.iteritems(): attribute_name = unicode(attribute_name) if attribute_name == "groups":