[MERGE] Forward port of saas-11.3 to 12.0 up to d8072d54ac
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 <em>%s</em> <b>cancelled</b>.") % (backorder_pick.name))
|
||||
pick_id.message_post(body=_("Back order <em>%s</em> <b>cancelled</b>.") % (",".join([b.name or '' for b in backorder_pick])))
|
||||
|
||||
def process(self):
|
||||
self._process()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user