-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
[12.0][REF] purchase_landed_cost: Rename variables #901
[12.0][REF] purchase_landed_cost: Rename variables #901
Conversation
2e0dd2b
to
f438055
Compare
If you do this, you need to include migration scripts using |
@pedrobaeza Yes it will be done if these changes are approved. |
@pedrobaeza I've just added the migration scripts. However I hope the rest of the PR is good to be reviewed now. |
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.
make sense. Code review / no test.
I see 2 renamings incorrect, putting |
@pedrobaeza ok i've done a very small PR for the flake8 problems : #907 About this name for the Cost Distribution Expenses i thought I've changed them to Thank you very much! |
cd599a1
to
ea19066
Compare
ea19066
to
544269f
Compare
This commit aim to : 1. Avoid confusion between product's `standard_price` (which will be mod ified by clicking on 'Update Cost') and the sought-after "product's Landed Cost" 2. Avoid confusion between the words 'price', 'expenses' and 'cost'. Following the idea that : Cost = Price + Expenses Thus, the following changes were made : - delete `product_price_unit` (a **related** field to stock move's `price_unit`) - rename `standard_price_old` into `product_price_unit` (a **calculated** field which give stock move's `price_unit`) - rename `standar_price_new` into `landed_cost_unit` (and reset it to zero when the Cost Distribution calculation is canceled) - rename `total_amount` into `product_price_amount` - rename `cost_ratio` into `expense_unit`
544269f
to
f030d35
Compare
@pedrobaeza now Travis is green on this PR too and I corrected the plural in Hope it looks good for you now ! Let me know if there is anything more I can do to be able to merge this PR. |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
This PR is linked with #897 where I opened suggestions to improve purchase_landed_cost.
Here, the objective is to :
standard_price
(which will be modified by clicking on 'Update Cost') and the sought-after "product's Landed Cost"Cost = Price + Expenses
Thus, the following changes were made :
product_price_unit
(a related field to stock move'sprice_unit
)standard_price_old
intoproduct_price_unit
(a calculatedfield which give stock move's
price_unit
)standard_price_new
intolanded_cost_unit
(and reset it tozero when the Cost Distribution calculation is canceled)
total_amount
intoproduct_price_amount
cost_ratio
intoexpense_unit
The question I ask myself right now is if it will be useful to add two more fields :
standard_price_old
which would be the real "old product's standard_price before the stock_move"standard_price_new
which would be the real "new updated product's standard_price after clicking on 'Update Cost' "These two fields may be interesting, but it might be difficult to display them on the same o2m tree view which already have 9 columns :