-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][IMP] choose between brand or company values in layout #201
base: 16.0
Are you sure you want to change the base?
[16.0][IMP] choose between brand or company values in layout #201
Conversation
Hi @sbejaoui, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional test! :+1
Thanks for this fix!
"primary_color", | ||
"secondary_color", | ||
"layout_background", | ||
"layout_background_image", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually some fields are still not overridden.
'report_header'
'company_details'
'report_layout_id'
To elaborate.
The error is gone. A report is generated. But it is rather a mixture of the report set on the company level and the brand level.
The colors are a mixture of both settings.
The tag line/header is not filled with the "brand" one.
Background image not working.
The adress still show the company adress. Instead of the adress of the Brand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oopsie part of this bug is actually fixed in #195
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bosd
Can you mark this as resolved to allow merging again ?
@OCA/brand-maintainers Can someone approve this PR ? Please...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bosd
Can you mark this as resolved to allow merging again ?
@OCA/brand-maintainers Can someone approve this PR ? Please...
Yeah, I could do that. But it is actually not resolved. So maybe better fix the functionality before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delayed review; I’ve been quite busy lately.
I understand the issue we’re trying to address here, but I have some concerns about the user experience.
IMO, we should continue adding fields to the brand model and let it evolve in line with how odoo evolves the company model. The purpose of this repository is to make the layout branded, and this solution may prevent us from noticing new fields added in each version that could break the layout.
For instance, in v16, the field is_company_detail_empty
was introduced. With the proposed solution, this field would return True if it’s empty in the company object, even if the user filled it at the brand level. This issue would go unnoticed, and users might not understand why the brand details are not visible.
To summarize, I suggest keeping things as they are. During each migration, we can easily identify the layout changes introduced by odoo as they will inevitably breaks the layout, allowing us to address them appropriately.
Thank you for taking the time to review this. I appreciate your feedback and would like to address your concerns.
To summarize, this PR proactively addresses conflicts during both migrations and modules installation, reducing bugs and maintenance effort while providing a more robust and user-friendly experience. |
@Kev-Roche Can you (or ocabot) please rebase, So we can test it against the latest code on a fresh runboat? |
@OCA-git-bot I know we're not friends... But here goes nothing.. /ocabot rebase |
Sorry @bosd you are not allowed to rebase. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
5368442
to
5e809c3
Compare
Done ! |
Thanks, To keep you guys no longer waiting. here is my initial response. This following fields are still not made brand specific.
Later i will test more. Thinking out loud. Would it be possible to just inherit the whole company model with all of its fields? |
Functional test on local system in combination with account brand. The only branded item changed in the report was the logo. Steps to reproduce. install account_brand set brand policy to optional For completeness my test company settings: Result: untested: paperformat |
"primary_color", | ||
"secondary_color", | ||
"layout_background", | ||
"layout_background_image", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"layout_background_image", | |
"layout_background_image", | |
"company_details", |
This is fixes one of the not overriden fields.
Hi @bosd, @sbejaoui and @Kev-Roche This PR is a replacement for #180 which was opened to fix #167 and #179. Odoo native behavior is about configuring a report layout for each company. To add some context, one of my customer is a corporate group that is manufacturing and selling products mainly in France, UK, USA and Canada. Those products are sold under 4 different brands. So, there are 4 brands used in 5 companies. Now, I'm aware this subset could seem arbitrary, as already explained in comments of the original PR (see #180 (comment) and further comments) I hope this comment will help going forward on that PR and stay open to all your thoughts and advice. |
@metaminux Aha, We are using it for manufacturers / subcontractors. They have one facility and produce for different brands / entity.
Yes, That would allow usage for both of our uses cases.
It would be a good addition to update the docs with this new functionality.
Here the subset of fields to override is strict. In it's current form, with only the minor subset included. It is changing the behaviour of the module. |
Inspired of #180 and could replace it.
Here a way to select and use brand fields on reports and avoid the missing field error if a module add a new field on res.company