diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py
index 03e2ea03f57..0dddb10c03c 100644
--- a/addons/account/models/account_bank_statement.py
+++ b/addons/account/models/account_bank_statement.py
@@ -257,6 +257,8 @@ class AccountBankStatement(models.Model):
def button_journal_entries(self):
context = dict(self._context or {})
context['journal_id'] = self.journal_id.id
+ aml = self.env['account.move.line'].search([('statement_id', 'in', self.ids)])
+ aml |= aml.mapped('move_id').mapped('line_ids')
return {
'name': _('Journal Items'),
'view_type': 'form',
@@ -264,7 +266,7 @@ class AccountBankStatement(models.Model):
'res_model': 'account.move.line',
'view_id': False,
'type': 'ir.actions.act_window',
- 'domain': [('statement_id', 'in', self.ids)],
+ 'domain': [('id', 'in', aml.ids)],
'context': context,
}
diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index d4ea16b6677..e295bab8fa7 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -1311,15 +1311,17 @@ class AccountInvoiceTax(models.Model):
for invoice in self.mapped('invoice_id'):
tax_grouped[invoice.id] = invoice.get_taxes_values()
for tax in self:
- key = self.env['account.tax'].browse(tax.tax_id.id).get_grouping_key({
- 'tax_id': tax.tax_id.id,
- 'account_id': tax.account_id.id,
- 'account_analytic_id': tax.account_analytic_id.id,
- })
- if tax.invoice_id and key in tax_grouped[tax.invoice_id.id]:
- tax.base = tax_grouped[tax.invoice_id.id][key]['base']
- else:
- _logger.warning('Tax Base Amount not computable probably due to a change in an underlying tax (%s).', tax.tax_id.name)
+ tax.base = 0.0
+ if tax.tax_id:
+ key = tax.tax_id.get_grouping_key({
+ 'tax_id': tax.tax_id.id,
+ 'account_id': tax.account_id.id,
+ 'account_analytic_id': tax.account_analytic_id.id,
+ })
+ if tax.invoice_id and key in tax_grouped[tax.invoice_id.id]:
+ tax.base = tax_grouped[tax.invoice_id.id][key]['base']
+ else:
+ _logger.warning('Tax Base Amount not computable probably due to a change in an underlying tax (%s).', tax.tax_id.name)
invoice_id = fields.Many2one('account.invoice', string='Invoice', ondelete='cascade', index=True)
name = fields.Char(string='Tax Description', required=True)
diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py
index 70e79867d20..e723c984709 100644
--- a/addons/account/report/account_invoice_report.py
+++ b/addons/account/report/account_invoice_report.py
@@ -45,7 +45,7 @@ class AccountInvoiceReport(models.Model):
user_currency_price_total = fields.Float(string="Total Without Tax", compute='_compute_amounts_in_user_currency', digits=0)
price_average = fields.Float(string='Average Price', readonly=True, group_operator="avg")
user_currency_price_average = fields.Float(string="Average Price", compute='_compute_amounts_in_user_currency', digits=0)
- currency_rate = fields.Float(string='Currency Rate', readonly=True)
+ currency_rate = fields.Float(string='Currency Rate', readonly=True, group_operator="avg")
nbr = fields.Integer(string='# of Lines', readonly=True) # TDE FIXME master: rename into nbr_lines
type = fields.Selection([
('out_invoice', 'Customer Invoice'),
diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml
index ea70b164070..7e3b12b469f 100644
--- a/addons/account/views/account_invoice_view.xml
+++ b/addons/account/views/account_invoice_view.xml
@@ -135,8 +135,8 @@
Use in conjunction with contracts to calculate your monthly revenue for multi-month contracts.
- Install Now diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index e560e2419b7..b56bad7bbe1 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -427,7 +427,7 @@ class AccountAssetDepreciationLine(models.Model): move_check = fields.Boolean(compute='_get_move_check', string='Posted', track_visibility='always', store=True) @api.one - @api.depends('move_id') + @api.depends('move_id', 'asset_id.account_move_ids') def _get_move_check(self): self.move_check = bool(self.move_id) diff --git a/addons/l10n_in/l10n_in_standard_tax_template.xml b/addons/l10n_in/l10n_in_standard_tax_template.xml index 03c239bb4c8..5680f5cf782 100644 --- a/addons/l10n_in/l10n_in_standard_tax_template.xml +++ b/addons/l10n_in/l10n_in_standard_tax_template.xml @@ -607,7 +607,7 @@