diff --git a/addons/account/i18n/zh_TW.po b/addons/account/i18n/zh_TW.po index 6117b52ca0d..b373077de16 100644 --- a/addons/account/i18n/zh_TW.po +++ b/addons/account/i18n/zh_TW.po @@ -6353,7 +6353,7 @@ msgstr "允許客戶線上支付" #: selection:account.account.type,internal_group:0 #: model_terms:ir.ui.view,arch_db:account.view_account_search msgid "Liability" -msgstr "負債" +msgstr "負債與業主權益" #. module: account #: model:ir.model.fields,field_description:account.field_account_invoice_report__nbr diff --git a/addons/account_voucher/models/account_voucher.py b/addons/account_voucher/models/account_voucher.py index 2217b782178..dcfa881ac7e 100644 --- a/addons/account_voucher/models/account_voucher.py +++ b/addons/account_voucher/models/account_voucher.py @@ -353,14 +353,19 @@ class AccountVoucher(models.Model): temp['amount_currency'] = company_cur._convert(tax_vals['amount'], current_cur, line.company_id, self.account_date or fields.Date.today(), round=True) self.env['account.move.line'].create(temp) - self.env['account.move.line'].create(move_line) # When global rounding is activated, we must wait until all tax lines are computed to # merge them. if tax_calculation_rounding_method == 'round_globally': + # _apply_taxes modifies the dict move_line in place to account for included/excluded taxes tax_lines_vals += self.env['account.move.line'].with_context(round=False)._apply_taxes( move_line, move_line.get('debit', 0.0) - move_line.get('credit', 0.0) ) + # rounding False means the move_line's amount are not rounded + currency = self.env['res.currency'].browse(company_currency) + move_line['debit'] = currency.round(move_line['debit']) + move_line['credit'] = currency.round(move_line['credit']) + self.env['account.move.line'].create(move_line) # When round globally is set, we merge the tax lines if tax_calculation_rounding_method == 'round_globally': diff --git a/addons/mass_mailing/controllers/main.py b/addons/mass_mailing/controllers/main.py index 18b8a814dac..30eaf30c8d6 100644 --- a/addons/mass_mailing/controllers/main.py +++ b/addons/mass_mailing/controllers/main.py @@ -22,7 +22,7 @@ class MassMailController(http.Controller): model_display = mailing.mailing_model_id.display_name blacklist_entry._message_log(description + " ({})".format(model_display)) - @http.route(['/unsubscribe_from_list'], type='http', website=True, multilang=False, auth='public') + @http.route(['/unsubscribe_from_list'], type='http', website=True, multilang=False, auth='public', sitemap=False) def unsubscribe_placeholder_link(self, **post): """Dummy route so placeholder is not prefixed by language, MUST have multilang=False""" raise werkzeug.exceptions.NotFound() diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py index 8b4585b9393..ebe7aef0cc5 100644 --- a/addons/payment/controllers/portal.py +++ b/addons/payment/controllers/portal.py @@ -272,7 +272,7 @@ class WebsitePayment(http.Controller): tx_id = int(kw.get('tx_id', 0)) if tx_id: tx = request.env['payment.transaction'].browse(tx_id) - if tx.state == 'done': + if tx.state in ['done', 'authorized']: status = 'success' message = tx.acquirer_id.done_msg elif tx.state == 'pending': diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py index 5f583ec0682..259f24775c2 100644 --- a/addons/stock/models/product.py +++ b/addons/stock/models/product.py @@ -460,7 +460,8 @@ class ProductTemplate(models.Model): @api.depends( 'product_variant_ids', - 'product_variant_ids.stock_quant_ids', + 'product_variant_ids.stock_move_ids.product_qty', + 'product_variant_ids.stock_move_ids.state', ) def _compute_quantities(self): res = self._compute_quantities_dict() diff --git a/addons/stock/wizard/stock_backorder_confirmation.py b/addons/stock/wizard/stock_backorder_confirmation.py index 7319cdb123e..bdb8269f7cf 100644 --- a/addons/stock/wizard/stock_backorder_confirmation.py +++ b/addons/stock/wizard/stock_backorder_confirmation.py @@ -25,7 +25,7 @@ class StockBackorderConfirmation(models.TransientModel): for pick_id in self.pick_ids: backorder_pick = self.env['stock.picking'].search([('backorder_id', '=', pick_id.id)]) backorder_pick.action_cancel() - pick_id.message_post(body=_("Back order %s cancelled.") % (backorder_pick.name)) + pick_id.message_post(body=_("Back order %s cancelled.") % (",".join([b.name or '' for b in backorder_pick]))) def process(self): self._process() diff --git a/addons/website_sale/models/website.py b/addons/website_sale/models/website.py index 77bcedbfee5..5f07d94efcc 100644 --- a/addons/website_sale/models/website.py +++ b/addons/website_sale/models/website.py @@ -317,7 +317,7 @@ class Website(models.Model): if code_pricelist: pricelist_id = code_pricelist.id update_pricelist = True - elif code is not None and sale_order.pricelist_id.code: + elif code is not None and sale_order.pricelist_id.code and code != sale_order.pricelist_id.code: # code is not None when user removes code and click on "Apply" pricelist_id = partner.property_product_pricelist.id update_pricelist = True