Skip to content
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

[16.0] IMP account_product_fiscal_classification : recover classification (or create on the fly) if not set #441

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

legalsylvain
Copy link
Contributor

Supersed #435

@bealdav, could you review this one ?

Note : once approved, we should squash all the commits before merging.

thanks !

@legalsylvain
Copy link
Contributor Author

@bealdav, @mourad-ehm : could you take a look on this one ?

@bealdav
Copy link
Member

bealdav commented Jul 4, 2024

Note : once approved, we should squash all the commits before merging.

Squash by author ?

@legalsylvain
Copy link
Contributor Author

Thanks for your review !

Did you tested or just reviewed ? thanks !

Squash by author ?

Not sure it makes sense. we made a lots of contradictory changes, so I'd be more in favor of squashing in 1 commit.

@bealdav
Copy link
Member

bealdav commented Jul 4, 2024

I've just made code review.

Ok for squash

Copy link

@mourad-ehm mourad-ehm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code review

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

- In a context of product creation, if classification is not provided (in import context for exemple),
  link the products to an existing classification, if the taxes match an existing one.
  If no classification match, try to create a new classification, based on the product fiscal settings.
  (It will fail if user is not member of Accountant group that can create / write on fiscal classifications)
- In a context of product update, apply same logic, linking to existing classification, or creating new classification

This will fix current limitation if account_product_fiscal_classification and pos_sale (for exemple) is installed,
there is an error when making an update, because loading data / demo is failing for the time being if the fields
taxes_id or supplier_taxes_id is defined. See for exemple : pos_sale.default_downpayment_product that contains
{'taxes_id': '[(5,)]'} write.
@legalsylvain
Copy link
Contributor Author

Thanks for your review !

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-441-by-legalsylvain-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f2919ce into OCA:16.0 Jul 4, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants