-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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][ADD] web_widget_product_label_section_and_note: New module to unify … #3009
[16.0][ADD] web_widget_product_label_section_and_note: New module to unify … #3009
Conversation
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 review on runboat. Looks perfectly great.
thanks for your work.
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.
Note : it looks like there is a change in the PDF.
Native : display name on PDF
Now :
- if product_id and NOT name : display product_id
- if product_id and name : display both
It is maybe a regression if user dont want to display the product_id field.
Sorry, but I don't understand your comment. This code is not related to printing PDFs; it's more related to when the user prints the screen using the native browser options (Ctrl + P). Could you please clarify what you're saying? Thanks a lot. |
Hard to explain : Without the module, in Odoo : Related PDF : See, the third line, when we overwrite the name ("label") field, we can remove the product name product code, and the line displayed only contains "With replacement" text. User can totally customize the text of the invoice. Now, install the module, and add a new "with replacement line". With the module, in Odoo : Related PDF : As you can see, the fourth line, contains the name and the code of the product, and it is not possible to hide it. Full customization is not possible anymore. please ping me if I'm not clear. thanks ! |
@legalsylvain Thanks for explaining it to me. I tested it in V18, and the result is the same. So, as this is a backport, the behavior is as expected. I think it can be reported to Odoo instead. What do you think? (I understand that in V16, it is not the expected behavior.) cc @pedrobaeza |
Hi @carlos-lopez-tecnativa. First thanks for the comparison with V18 version. I checked also on a fresh V18 fresh database.
On another note. thanks a lot for this backport ! It's a very great improvment of V18 version, and it's great to have it available on V16 version. The invoice form view is very lighter. |
a5b5cdb
to
ff43074
Compare
@legalsylvain I added a note in the |
Ouch, indeed that's a big limitation of 18.0 (and by extension, of this widget in 16.0). I have opened an issue in Odoo to gather their opinion on this: Meanwhile, what do you think about the design solution I have proposed in it? @carlos-lopez-tecnativa I think it can be doable adding the interface and touching the method that computes the displayed name, isn't it? In that case, we may include it in this widget for 16/17, and on 18, if Odoo doesn't perform any change, extract just this part in a module to be plugged to the core widget. |
ff43074
to
7aa7851
Compare
@legalsylvain @pedrobaeza |
"website": "https://github.com/OCA/web", | ||
"depends": [ | ||
"web", | ||
"account", |
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.
This shouldn't depend on account
. This have to be just the widget.
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.
This dependency is necessary because the base component is created in the account
module, please see:
https://github.com/odoo/odoo/tree/16.0/addons/account/static/src/components/section_and_note_fields_backend
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.
OK, understood.
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.
OK about the border. That awful anti-ergonomic theme... Nothing is needed to be done for this thing. Only the other problem about the product name not being showed remains. |
Then it shouldn't be the contrary: if I see the icon |
Ok, I understand your point. My logic was to reflect the action the user will perform, not the current state. |
7aa7851
to
b21e41d
Compare
@pedrobaeza I updated the icon to reflect the current state. Please review again. Thanks in advance. |
b21e41d
to
2c56620
Compare
…the product and name into a single column.
2c56620
to
39b5f39
Compare
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.
Thank you.
/ocabot merge nobump
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at a93a516. Thanks a lot for contributing to OCA. ❤️ |
I hadn't read that this theme could upset some people. Anyway, that said, the fact that this module is installed by default on the OCA runboat of one of the most popular repo (OCA/web) is irrelevant, as it disturbs the understanding of PR reviewers. (as it did for you just now). A solution might be to move this module to a new repo, OCA/web-themes? That way, it wouldn't disrupt the existing repo. After all, there is such a dedicated repo for odoo (https://github.com/odoo/design-themes) Let me know ! |
Yes, it can be a solution. I say anti-ergonomics, because your sight suffers when you have more things in the screen, although being just grey lines. That's why Odoo, when removing the edit view, removed these lines. Having them and using Odoo constantly with this modification may lead to tired eyesight and similar. Another thing that leads to this is to write all in upper (like contact names and/or product names), but this is something of content, not of the base system, and it's a constant fight with users. |
…the product and name into a single column.
Backport of functionality present in V18.
TT51520
@Tecnativa @pedrobaeza @chienandalu could you please review this