8000 [16.0] brand_external_report_layout : can't be used in multi-company context and conflicts with other modules · Issue #179 · OCA/brand · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[16.0] brand_external_report_layout : can't be used in multi-company context and conflicts with other modules #179
Open
@metaminux

Description

@metaminux

Module

brand_external_report_layout

Describe the bug

  • the model brand.document.layout is defining company_details (and should define is_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 a res.brand object in reports, so every module inheriting company to add information in reports is conflicting (for example, l10n_ca from Odoo with account_fiscal_country_id and l10n_ca_pst fields)

To Reproduce

16.0:

Steps to reproduce the behavior:

  1. Create a new database with brand_external_report_layout installed and demo data
  2. Go to settings and set a specific document layout for first company (this should set the company details by default)
  3. Set the company with Brand use level = optional
  4. Switch company and do the same for the second company, with another layout
  5. 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...)
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0