Skip to content

[18.0][MIG][PATCH] contract #7

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

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

[18.0][MIG][PATCH] contract #7

wants to merge 174 commits into from

Conversation

CRogos
Copy link

@CRogos CRogos commented May 22, 2025

waiting OCA#1136

unknown and others added 30 commits April 7, 2025 16:16
* Translations
* Access rules
* README
* Currency for created invoices.
*  #START# and #END# set correctly
* Some conventions
…company environment

Now when working on multy company environmets the server action creates
invioices with accounts belong to correct company based on contract company.
* Tests added
* Filters added.
* Add _id/_ids in old property fields
* Translations
Add template functionality for contracts
* Add a default date in the instance that an analytic account doesn’t exist (templates) - fixes OCA#68
* [IMP][9.0] contract: Add report + send by mail

* Update translation and rename contract report

* Changes requested and translation updated
Update contract template lines handling to fix OCA#80, and fix OCA#59 OCA#100
…ht in headers

**Be totally deterministic about which views to use**

Having a primary view that is not explicitly declared to be uses and w/o priority
makes Odoo to choose between one of them randomly (well, not exactly, but kind of),
so we put here which views to use.

I have also put tree view as primary and put a large priority for not being
selected on other actions that don't have this explicit views.

A friendly name in views is also assigned.

**Improvements in tests**

* Use SavepointCase for making the setup only once for all tests
* Make them inheritable, creating a base class with only the setup,
  so that it can be inherited without the need of executing all tests
  contained here each time you inherit it, and adding other class
  in the same module that inherits from the base class that actually
  performs the tests.
* Removed duplicated test method
…ata (OCA#130)

* [FIX+IMP] contract: Improve usability and don't fail on wrong data

* Cron create invoices masked for avoiding silent errors
* New constraints for assuring data consistency
* UI helps for entering consistent data
* Spanish translation
* Remove double company_id field on form
* Correct domain attribute in field journal_id

Original domain includes unknown value company_id. Throws error when selecting the journal.

* Corregidos errores detectados por Lint

* Refactoring, DRY

* [FIX] Add missing field company_id to account_analytic_contract

* Small refactoring for company_id field
…orrect references in the contract report

* company_id was empty because an onchange, not inheritance nor visibility
* Added multi-company group to company_id fields
* Added multi-company access rule to contract templates
* Fix double %% in XML dates that was causing an error
* When creating a contract, recurring_invoices is set by default
* [IMP] Add computed dates from/to period invoiced (OCA#140)
* [IMP] Improve partner contract smartbutton
* [FIX] Onchange contract template raise error
* [FIX] Invalid pricelist name
If you have contract lines with automatic price and your pricelist
contains different prices per quantity, the price is not changed
when computing quantity.

This PR fixes this.
aliciagaarzo and others added 28 commits April 23, 2025 10:03
Translated using Weblate (French)

Currently translated at 100.0% (314 of 314 strings)

Translation: contract-16.0/contract-16.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract/fr/
On the migration to v16, the primary layout view was incorrectly
removed. It's needed because of 2 reasons:

- It's referenced in the following template doing a t-call. Well, this
  one can be avoided calling the new layout upstream template, but...
- This layout is done for placing some extra content (the modifications
  table), as part of the layout that is not shown in the chatter for
  avoiding noise.

We recreate this template inheriting the new layout template, and
adapting it properly.

TT45646
…ot per line

If we manage the contract at header level, we must set the end date and last invoice
date there, otherwise data will be inconsistent.

TT48273

Translated using Weblate (Italian)

Currently translated at 85.7% (270 of 315 strings)

Translation: contract-16.0/contract-16.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract/it/
[UPD] Update contract.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/

Translated using Weblate (Italian)

Currently translated at 100.0% (314 of 314 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/it/
Translated using Weblate (Spanish)

Currently translated at 100.0% (314 of 314 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/es/

Translated using Weblate (Italian)

Currently translated at 100.0% (314 of 314 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/it/

Translated using Weblate (Italian)

Currently translated at 100.0% (314 of 314 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/it/

Translated using Weblate (Swedish)

Currently translated at 100.0% (314 of 314 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/sv/

[UPD] Update contract.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/

Translated using Weblate (Italian)

Currently translated at 100.0% (313 of 313 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/it/
Fix ValueError: Deprecated usage of 'default_res_id', should use 'default_res_ids'.

Translated using Weblate (Spanish)

Currently translated at 100.0% (313 of 313 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/es/

[BOT] post-merge updates

Translated using Weblate (Italian)

Currently translated at 100.0% (313 of 313 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/it/

[UPD] Update contract.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/

[BOT] post-merge updates

Translated using Weblate (Italian)

Currently translated at 100.0% (314 of 314 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/it/

Translated using Weblate (Italian)

Currently translated at 100.0% (314 of 314 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/it/
…nual invoices

[UPD] Update contract.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/

Translated using Weblate (Italian)

Currently translated at 100.0% (315 of 315 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/it/

Translated using Weblate (Finnish)

Currently translated at 66.0% (208 of 315 strings)

Translation: contract-17.0/contract-17.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract/fi/
[FIX] contract: Set fixed date to check test correctly.

We need to set a fixed date for teststest_check_month_name_marker to check against
the month of the date we are set (otherwise it would check against the month of today).
Related to OCA#1153
Fixes OCA#1160

Use the month number to set the text of the month and avoid problems according
to the language defined in locale.
As it was, the text to translate is not correctly extracted, so it's
not translated, creating a mix of languages, as `_creation_message`
is returning a translated sentence.

We take also the opportunity to change the way the sentence is built
for having as translatable only the "by contract" words, to avoid
possible errors in translations due to the placeholders.
- use Command
- mark _update_recurring_next_date deprecated
- use list instead of tree
@CRogos CRogos force-pushed the 18.0-mig-contract-oca branch from cf09bee to 6d0eaba Compare May 22, 2025 09:21
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.