product-attribute icon indicating copy to clipboard operation
product-attribute copied to clipboard

[17.0][ADD] product_total_weight: New module product_total_weight

Open peluko00 opened this issue 1 year ago • 6 comments

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

peluko00 avatar Dec 04 '24 12:12 peluko00

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.

peluko00 avatar Dec 04 '24 15:12 peluko00

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 ?

legalsylvain avatar Dec 05 '24 15:12 legalsylvain

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!

peluko00 avatar Dec 05 '24 15:12 peluko00

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 ?

peluko00 avatar Dec 09 '24 11:12 peluko00

I've just added a new field total_weight in stock_move pivot view. Can you review again please @legalsylvain

peluko00 avatar Feb 27 '25 09:02 peluko00

Sorry for ping @simahawk , it's ready for merge?

peluko00 avatar Apr 11 '25 11:04 peluko00

Sorry for ping directly @pedrobaeza, it's ready for merge?

peluko00 avatar Aug 22 '25 05:08 peluko00

@legalsylvain should confirm.

pedrobaeza avatar Aug 22 '25 06:08 pedrobaeza

Can you merge please @legalsylvain?

peluko00 avatar Aug 25 '25 13:08 peluko00

/ocabot merge nobump

legalsylvain avatar Aug 25 '25 13:08 legalsylvain

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.

OCA-git-bot avatar Aug 25 '25 13:08 OCA-git-bot

Congratulations, your PR was merged at a4f60224f4de84c8c746872244b6dc79da606ae1. Thanks a lot for contributing to OCA. ❤️

OCA-git-bot avatar Aug 25 '25 13:08 OCA-git-bot