OCA / sale-reporting

GNU Affero General Public License v3.0
47 stars 187 forks source link

[FIX] product_sold_by_delivery_week: work with lower permissions #252

Closed yajo closed 6 months ago

yajo commented 6 months ago

A user with basic stock and sale permissions couldn't validate a picking because it meant writing a field into the product. Now that write is issued with sudo().

I refactored a bit the tests. They were testing very weird scenarios that would never happen in the real world. And, what's more interesting, they were not testing the real world scenarios.

I lowered the permissions in tests, to make sure that the module works with the basic permissions.

Finally, I also changed some spelling mistakes that I simply could not help but change.

@moduon MT-5114

OCA-git-bot commented 6 months ago

Hi @chienandalu, some modules you are maintaining are being modified, check this out!

yajo commented 6 months ago

Thanks everyone.

/ocabot merge patch

OCA-git-bot commented 6 months ago

This PR looks fantastic, let's merge it! Prepared branch 16.0-ocabot-merge-pr-252-by-yajo-bump-patch, awaiting test results.

OCA-git-bot commented 6 months ago

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