[FIX] analytic: insert analytic lines in spreadsheet

How to reproduce:
* Install Accounting and Documents
* Accounting > Configuration > Settings > check Analytic Accounting
* Accounting > Accounting > Analytic Items
* Cogs > Spreadsheet > Insert List

Issue:
The header in the spreadsheet displays errors.

closes odoo/odoo#141230

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
This commit is contained in:
william-andre
2023-11-06 15:36:59 +00:00
parent d6bd6d5eec
commit b6c108e775
+1
View File
@@ -128,6 +128,7 @@ class AccountAnalyticLine(models.Model):
account_filter_node.addnext(E.filter(name=fname, context=f"{{'group_by': '{fname}'}}"))
return arch, view
@api.model
def fields_get(self, allfields=None, attributes=None):
fields = super().fields_get(allfields, attributes)
if self.env['account.analytic.plan'].check_access_rights('read', raise_exception=False):