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

[18.0][MIG] account_invoice_inter_company #757

Open
wants to merge 81 commits into
base: 18.0
Choose a base branch
from

Conversation

HviorForgeFlow
Copy link
Member

@HviorForgeFlow HviorForgeFlow commented Jan 20, 2025

chafique-delli and others added 30 commits January 20, 2025 22:15
* [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
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
…rity

`password_security` asks by default for some minimal rules in the password. If it happens to be installed before this module, in an integration environment, it cannot be loaded.

It's just demo data, so I just use a longer password here.
* intercompany_invoice_user_id
* company_share_product (restored from previous versions)
Currently translated at 89.3% (25 of 28 strings)

Translation: multi-company-13.0/multi-company-13.0-account_invoice_inter_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-13-0/multi-company-13-0-account_invoice_inter_company/zh_CN/
If suitable (being non company specific data), analytic information (account and
tags) is moved from source to destination invoice.
Do creation in batch for increasing performance and avoid code to fail in case of
existing invoice line.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: multi-company-13.0/multi-company-13.0-account_invoice_inter_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-13-0/multi-company-13-0-account_invoice_inter_company/
florian-dacosta and others added 22 commits January 20, 2025 22:15
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: multi-company-17.0/multi-company-17.0-account_invoice_inter_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-17-0/multi-company-17-0-account_invoice_inter_company/
Currently translated at 100.0% (27 of 27 strings)

Translation: multi-company-17.0/multi-company-17.0-account_invoice_inter_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-17-0/multi-company-17-0-account_invoice_inter_company/it/
Currently translated at 100.0% (27 of 27 strings)

Translation: multi-company-17.0/multi-company-17.0-account_invoice_inter_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-17-0/multi-company-17-0-account_invoice_inter_company/es_AR/
@JordiMForgeFlow
Copy link
Contributor

@HviorForgeFlow code + functional review LGTM, I am just missing this PR: #631

… intercompany invoicing

This commit adds a new setting called intercompany_invoicing that allows the user to activate or deactivate the intercompany invoicing. When positing an intercompany invoice, if one of the companies have the setting disabled, the other invoice will not be automatically created.
@HviorForgeFlow HviorForgeFlow force-pushed the 18.0-mig-account_invoice_inter_company branch from 1b1a300 to a57e342 Compare January 22, 2025 14:50
@florian-dacosta
Copy link
Contributor

Hello @HviorForgeFlow Could you cherry-pick commit from this PR please ? #765

It has been merged on v16.

…t in case the source invoice is the supplier one
@bguillot
Copy link
Contributor

bguillot commented Feb 6, 2025

Hello @HviorForgeFlow, an other pull request has been merged in the version 16 here #766

The pull request in v17 will be merged soon #769

Can you add it to your migration ? Thanks !

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

Successfully merging this pull request may close these issues.