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

[17.0][MIG] account_invoice_inter_company #595

Merged

Conversation

cuongnmtm
Copy link

@cuongnmtm cuongnmtm commented Mar 15, 2024

Note:

The test test_confirm_invoice_with_product_and_shared_catalog is failed.
The reason is that Odoo v17 now has a check_company=True attribute on the product_id field of the account.move.line, which was not present in v16.

Although the "Common Product Catalog" feature of this module seems appealing, in order to make it work, we need to bypass the Odoo check_company attribute. This makes the feature less appealing and we should consider removing it from the module. Instead, users can remove the company value on some products to make them shared products, which is a normal procedure for inter-company.

=> I will remove the "Common Product Catalog" option.

@cuongnmtm cuongnmtm force-pushed the 17.0-mig-account_invoice_inter_company branch from e02a9f5 to 17b5222 Compare March 15, 2024 11:10
@cuongnmtm cuongnmtm mentioned this pull request Mar 15, 2024
14 tasks
@cuongnmtm cuongnmtm force-pushed the 17.0-mig-account_invoice_inter_company branch from 17b5222 to 92f1a19 Compare March 15, 2024 13:48
@cuongnmtm
Copy link
Author

The test test_confirm_invoice_with_product_and_shared_catalog is failed.
The reason is that Odoo v17 now has a check_company=True attribute on the product_id field of the account.move.line, which was not present in v16.

Although the "Common Product Catalog" feature of this module seems appealing, in order to make it work, we need to bypass the Odoo check_company attribute. This makes the feature less appealing and we should consider removing it from the module. Instead, users can remove the company value on some products to make them shared products, which is a normal procedure for inter-company.

@cuongnmtm cuongnmtm force-pushed the 17.0-mig-account_invoice_inter_company branch 3 times, most recently from 0ca9b12 to ccb595e Compare March 26, 2024 12:17
@cuongnmtm cuongnmtm requested a review from tien-ld March 26, 2024 13:58
@cuongnmtm cuongnmtm force-pushed the 17.0-mig-account_invoice_inter_company branch from ccb595e to 0b2bae4 Compare March 26, 2024 14:04
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 28, 2024
@pomazanbohdan
Copy link

pomazanbohdan commented Aug 1, 2024

@cuongnmtm
Would you be so kind as to repeat the note to the bot?

/ocabot migration account_invoice_inter_company

@cuongnmtm
Copy link
Author

/ocabot migration account_invoice_inter_company

@OCA-git-bot
Copy link
Contributor

Sorry @cuongnmtm you are not allowed to mark the addon tobe migrated.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

@pedrobaeza pedrobaeza removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 1, 2024
@pedrobaeza
Copy link
Member

/ocabot migration account_invoice_inter_company

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Aug 1, 2024
@pomazanbohdan
Copy link

@pedrobaeza
pls help #604 #605

@pedrobaeza
Copy link
Member

That PRs don't have the guarantee of having a correct CI.

https://github.com/OCA/maintainer-tools/wiki/Use-temporary-reference%28s%29-to-another-pull-request%28s%29

@cuongnmtm
Copy link
Author

That PRs don't have the guarantee of having a correct CI.

https://github.com/OCA/maintainer-tools/wiki/Use-temporary-reference%28s%29-to-another-pull-request%28s%29

I will check it. Thanks.

* [10.0]Migrate account_invoice_inter_company module to v10

* refactor code for play onchange method

* active demo datas and fix account_invoice.py, res_config.py, README.rst file

* extract the search domain of users from the _check_intercompany_product method

* fix test

* fix test and update french translation

* rename openerp to odoo

* fix test_flake8 and fix views after David's comment

* add oca_dependencies.txt

* fix bare except

* improve action_cancel method

* fix chart_template_id in tests

* fix transfer_account_id in tests

* fix chart_template_id for company B in tests

* improve tests

* fix tests taking into account the base_multi_company module

* fix tests and contributors after lasley's comment

* improve tests

* fix account_invoice.py after mourad's comment

* fix tests after lasley's comment

* fix transfer account template in demo data

* increases test coverage

* improve action_invoice_open method after astirpe's comment

* fix value for chart_template_id in tests
@carolinafernandez-tecnativa

@cuongnmtm Hi, could you please rebase and squash administrative commits ?
So i can take a look.

Thanks!

@cuongnmtm cuongnmtm force-pushed the 17.0-mig-account_invoice_inter_company branch from 0b2bae4 to 5d5fa21 Compare August 10, 2024 08:17
yajo and others added 2 commits August 10, 2024 15:22
This demo data is quite dangerous by design, since it creates compenies, accounts, decides the companies country, etc. All of that by hand.

In a tested integration environment, this fails when installing account-related addons due to companies not having a chart of accounts.

The fix is simple: remove this from demo data and leave it just as test data.
… in invoice lines (OCA#111)

* Add product mapping in roadmap
* Allow creation of invoice lines without products
ChrisOForgeFlow and others added 14 commits August 10, 2024 15:26
This commit reuses the same form for the same invoice,
thus eliminating the creation overhead. It also does the
same with the invoice lines, generating one and changing
its values each time. This change increases the speed
drastically when validating them.
We need to check the access right of the product not the line
This avoids getting a "No Chart of Account Template has been defined !" error on fresh database install
Currently translated at 100.0% (30 of 30 strings)

Translation: multi-company-16.0/multi-company-16.0-account_invoice_inter_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-account_invoice_inter_company/es/
Currently translated at 100.0% (30 of 30 strings)

Translation: multi-company-16.0/multi-company-16.0-account_invoice_inter_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-account_invoice_inter_company/es_AR/
from eligible companies in `_find_company_from_invoice_partner`
Currently translated at 36.6% (11 of 30 strings)

Translation: multi-company-16.0/multi-company-16.0-account_invoice_inter_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-account_invoice_inter_company/it/
@cuongnmtm cuongnmtm force-pushed the 17.0-mig-account_invoice_inter_company branch 2 times, most recently from 67f8aef to 558f907 Compare August 10, 2024 08:29
@cuongnmtm
Copy link
Author

@carolinafernandez-tecnativa I rebased, and squashed administrative commits.

Copy link

Choose a reason for hiding this comment

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

Functional review LGTM :) Thanks
There are still some administrative commits such as git oca bot that should be squashed.
ping @pedrobaeza

@cuongnmtm cuongnmtm force-pushed the 17.0-mig-account_invoice_inter_company branch from 558f907 to de949d1 Compare August 16, 2024 10:32
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-595-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 69afa1c into OCA:17.0 Aug 30, 2024
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@cuongnmtm cuongnmtm deleted the 17.0-mig-account_invoice_inter_company branch August 31, 2024 08:04
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.