diff --git a/addons/account/models/account.py b/addons/account/models/account.py index b98390b8d04..8cd3943d9a1 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -661,6 +661,14 @@ class AccountTax(models.Model): recs = self.browse(cr, uid, ids, context=context) return recs.compute_all(price_unit, currency, quantity, product, partner) + @api.model + def _fix_tax_included_price(self, price, prod_taxes, line_taxes): + """Subtract tax amount from price when corresponding "price included" taxes do not apply""" + # FIXME get currency in param? + incl_tax = prod_taxes.filtered(lambda tax: tax.id not in line_taxes and tax.price_include) + if incl_tax: + return incl_tax.compute_all(price)['total_excluded'] + return price class AccountOperationTemplate(models.Model): _name = "account.operation.template" diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 34932b7c1a3..e84961a2657 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -559,7 +559,7 @@ class AccountInvoice(models.Model): if self.currency_id != company_currency: currency = self.currency_id.with_context(date=self.date_invoice or fields.Date.context_today(self)) line['currency_id'] = currency.id - line['amount_currency'] = line['price'] + line['amount_currency'] = currency.round(line['price']) line['price'] = currency.compute(line['price'], company_currency) else: line['currency_id'] = False diff --git a/addons/account/static/src/js/account_reconciliation_widgets.js b/addons/account/static/src/js/account_reconciliation_widgets.js index b3ad4ee874d..b705b3ddb00 100644 --- a/addons/account/static/src/js/account_reconciliation_widgets.js +++ b/addons/account/static/src/js/account_reconciliation_widgets.js @@ -1832,9 +1832,11 @@ var bankStatementReconciliationLine = abstractReconciliationLine.extend({ changePartnerClickHandler: function() { var self = this; + var partner_name = self.st_line.partner_name; $.when(self.changePartner(false)).then(function(){ self.$(".change_partner_container").show(); self.$(".partner_name").hide(); + self.$(".change_partner_container").find("input").attr("placeholder", partner_name); self.change_partner_field.$dropdown.trigger("click"); }); }, diff --git a/addons/account/views/partner_view.xml b/addons/account/views/partner_view.xml index fc257fa2433..8f590996464 100644 --- a/addons/account/views/partner_view.xml +++ b/addons/account/views/partner_view.xml @@ -39,11 +39,11 @@ - +
- + diff --git a/addons/auth_signup/views/auth_signup_login.xml b/addons/auth_signup/views/auth_signup_login.xml index 8e63c143cbd..fb201c98d81 100644 --- a/addons/auth_signup/views/auth_signup_login.xml +++ b/addons/auth_signup/views/auth_signup_login.xml @@ -39,7 +39,9 @@