OCA / stock-logistics-barcode

https://odoo-community.org/psc-teams/logistics-18
GNU Affero General Public License v3.0
158 stars 326 forks source link

[IMP][16.0] barcodes_generator_product : various improvments #522

Closed legalsylvain closed 1 year ago

legalsylvain commented 1 year ago

Note to reviewers : better to review commit by commit.

image

image

Before :

image

After :

image

flalexg commented 1 year ago

Hello @legalsylvain. I've been using this module and I detected an error. Taking advantage of the fact that you are improving this module, I will tell you about the error and see if it can be solved here or it is better to open an issue with the fix.

In the product_template file we inherit the create function. In line 59 a result |= template is made. The thing is that if we try to make a copy of a product, by having the copy function the decorator @api.returns('self', lambda value: value.id). As you can see in the attached image, by returning multiple records in the create, we make the copy function not work. I don't know what would be the most effective way to solve this. What do you think?

Captura desde 2023-06-15 18-19-16

legalsylvain commented 1 year ago

Hi @flalexg.

Could you take a look on the last commit https://github.com/OCA/stock-logistics-barcode/pull/522/commits/67dab9d43cff37e2220ec76cbe2dd27d41f919de, and realize test ?

thanks for your feedback.

flalexg commented 1 year ago

Hi @legalsylvain, functional test OK now! Thank you!

PaulGoubert commented 1 year ago

Hi @all. Thnak you @flalexg for reporting this issue, and @legalsylvain for the fix

bealdav commented 1 year ago

Thanks @legalsylvain I confirm than this fix remove a bug on copy record (product.template) at least.

I don't know how we get that. But it solve it

legalsylvain commented 1 year ago

/ocabot merge major

OCA-git-bot commented 1 year ago

On my way to merge this fine PR! Prepared branch 16.0-ocabot-merge-pr-522-by-legalsylvain-bump-major, awaiting test results.

OCA-git-bot commented 1 year ago

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