[17.0][ADD] product_total_weight: New module product_total_weight
This module adds a field in different views associated to product to see how many kilograms are depending of the weight field thats appears on inventory tab of product form.
cc https://github.com/APSL 164365 @miquelalzanillas @lbarry-apsl @javierobcn @mpascuall @BernatObrador @ppyczko please review
Hi. Thanks for sharing your module.
Change Proposal : I think the name should be better "product_total_weight".
Request Changes :
- you should handle conversion in all computation. for the time being, if you have a quant with 1 gram and a quant with 1 kilo, the total displayed is 2 kilo. That is wrong.
- you should not hardcode "kg" in the name, as it is possible to use odoo with other anglo saxon unit system. (See odoo core option).
Thanks for the anottations, i refactor the code but i can't undestand what do you want to do when i want to show the uom units in the tree views.
Thanks for the anottations, i refactor the code but i can't undestand what do you want to do when i want to show the uom units in the tree views.
I think you should not display it. If you really want, you can simply add a new column, with this field "weight_uom_name". What do you think ?
Thanks for the anottations, i refactor the code but i can't undestand what do you want to do when i want to show the uom units in the tree views.
I think you should not display it. If you really want, you can simply add a new column, with this field "weight_uom_name". What do you think ?
Not necessary in my opinion. Can you review again please @legalsylvain. Thanks!
two minors comments. otherwise LGTM. Note : I just saw that the module was using product_weight from product_logistics_uom. i don't use this module, so I'm not totally sure how to handle this new weight_uom_id.
I let other people reviewing this part.
thanks for the changes.
Yes, the module depends of product_logistics_uom because you have option to choose the uom_id of the product on logistics section. Changes done. Thanks! It's ready for merge @legalsylvain ?
I've just added a new field total_weight in stock_move pivot view. Can you review again please @legalsylvain
Sorry for ping @simahawk , it's ready for merge?
Sorry for ping directly @pedrobaeza, it's ready for merge?
@legalsylvain should confirm.
Can you merge please @legalsylvain?
/ocabot merge nobump
What a great day to merge this nice PR. Let's do it! Prepared branch 17.0-ocabot-merge-pr-1799-by-legalsylvain-bump-nobump, awaiting test results.
Congratulations, your PR was merged at a4f60224f4de84c8c746872244b6dc79da606ae1. Thanks a lot for contributing to OCA. ❤️