Open
Description
Module
brand_external_report_layout
Describe the bug
- the model
brand.document.layout
is definingcompany_details
(and should defineis_company_details_empty
also, as declared in [16.0][BUG][brand_external_report_layout] is_company_details_empty missing #167 ) so it's not possible to use the same brand for different companies - the
company
Qweb variable is replaced by ares.brand
object in reports, so every module inheriting company to add information in reports is conflicting (for example,l10n_ca
from Odoo withaccount_fiscal_country_id
andl10n_ca_pst
fields)
To Reproduce
16.0:
Steps to reproduce the behavior:
- Create a new database with
brand_external_report_layout
installed and demo data - Go to settings and set a specific document layout for first company (this should set the
company details
by default) - Set the company with
Brand use level
=optional
- Switch company and do the same for the second company, with another layout
- Create a brand and set its document layout (for the moment, [16.0][BUG][brand_external_report_layout] is_company_details_empty missing #167 is preventing to go further...)
- From now on, every sale, invoice, etc. that will use this brand will have the same address (company/brand details) for both companies
Expected behavior
I think only "style" fields should be overridden by brands.
Additional context
I'll propose a PR that keeps the original company object and temporarily modify it with data from brand then go back to original after the report is generated.