[14.0][FIX] sale_commission_product_criteria: address same label warning#669
[14.0][FIX] sale_commission_product_criteria: address same label warning#669HekkiMelody wants to merge 1 commit intoOCA:14.0from
Conversation
|
Hi @PicchiSeba, @ilyasProgrammer, @renda-dev, @aleuffre, |
|
Pre-commit failure addressed in #670 |
| commission_type = fields.Selection( | ||
| [("fixed", "Fixed"), ("percentage", "Percentage")], | ||
| string="Type", |
There was a problem hiding this comment.
Before this change both commission_type and commission are labeled Commission Type.
After this change commission_type is labeled Type and commission is labeled Commission Type.
I think the new behavior is just as confusing as the old one.
Maybe the real problem is a few lines above:
commission_id = fields.Many2one(
"sale.commission",
string="Commission Type",why don't we:
- label
commission_idasCommission - label
commission_typeasCommission Type
?
This would also be aligned with 18.0, see
commission/sale_commission_oca_product_criteria/models/commission.py
Lines 73 to 78 in 2fefe98
commission/sale_commission_oca_product_criteria/models/commission.py
Lines 120 to 125 in 2fefe98
In order to achieve this result, we can just remove string from both fields, or change Commission Type to Commission as it is in 18.0.
What do you think?
There was a problem hiding this comment.
Removed string attribute from both fields (fewer lines of code is always good!) to adhere to the same nomenclature as v18.
Thank you for the suggestion.
297b85d to
eb07d9e
Compare
| commission_type = fields.Selection( | ||
| [("fixed", "Fixed"), ("percentage", "Percentage")], | ||
| string="Type", |
eb07d9e to
babd78c
Compare
|
Rebased to include #670. |
|
This PR has the |
Fixes the following warning