[18.0] web_company_color: Add button to reset colors to default.#3448
[18.0] web_company_color: Add button to reset colors to default.#3448javiermatos wants to merge 3 commits intoOCA:18.0from
Conversation
hbrunn
left a comment
There was a problem hiding this comment.
note you should call your PRs [$version] $module: $something, and also follow the Odoo git guidelines for the commit message
Co-authored-by: Holger Brunn <mail@hunki-enterprises.com>
2d2003b to
34e8906
Compare
34e8906 to
2247c95
Compare
|
Thank you for your feedback @hbrunn , and for the link to the Odoo git guidelines. I have applied your changes and a few more that were required after it. I have written a better commit message for my last commit but not sure how to fix the rest. |
hbrunn
left a comment
There was a problem hiding this comment.
thanks for the followup
not sure how to fix the rest.
what do yo mean here? You should squash your commits anyways, and you can rewrite the commit message while doing so: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
| return result | ||
|
|
||
| def button_reset_colors(self): | ||
| self.ensure_one() |
There was a problem hiding this comment.
you don't need this, please remove
| def write(self, values): | ||
| if not self.env.context.get("ignore_company_color", False): | ||
| fields_to_check = ( | ||
| "company_colors", |
There was a problem hiding this comment.
haha, I had already my changes from #3484 in mind when suggesting my change. Those two PRs will conflict now, if you could review that one to get it merged, you can rebase your code and remove this part
Implements a reset to default button for web_company_color, as once a color is set, the UI does not let you reset it in order to keep using the original Odoo colors.