Skip to content

[19.0][FIX] contract_sale_generation: correct chatter message - #1565

Open
RaphaelVicini wants to merge 70 commits into
OCA:19.0from
acsone:19.0-mig-rvi-contract_sale_generation
Open

RaphaelVicini wants to merge 70 commits into
OCA:19.0from
acsone:19.0-mig-rvi-contract_sale_generation

Conversation

@RaphaelVicini

Copy link
Copy Markdown
Contributor

Based on #1485

angelmoya and others added 30 commits October 19, 2026 16:35
…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

* [FIX] contract_sale_generation: Adapt tests to upstream contract
* Change the method called in the view
* Complete the create_invoice method
* Bump version + authoring
* Correct bad call of method
  Small Documentation
* Add super call in python test
* FIX bad field names causing bad quantities in sale.order.line
Currently translated at 100.0% (10 of 10 strings)

Translation: contract-10.0/contract-10.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_sale_generation/gl/
Currently translated at 100.0% (10 of 10 strings)

Translation: contract-10.0/contract-10.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_sale_generation/de/
Currently translated at 100.0% (10 of 10 strings)

Translation: contract-10.0/contract-10.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_sale_generation/fi/
Currently translated at 100.0% (15 of 15 strings)

Translation: contract-12.0/contract-12.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract_sale_generation/pt_BR/
Currently translated at 100.0% (15 of 15 strings)

Translation: contract-12.0/contract-12.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract_sale_generation/fr/
….order.line

The product UOM qty was not correctly set on the Sale Order Line
During the creation of a recurring Order from a Contract, the given quantity on the Contract Line was not correctly set on the created Sale Order Line.
Use the generation_type field defined now in contract base module.

Improve tests
…fter generation on contract level

As in contract module, recompute recurring_next_date after sale generation on contract level
oca-ci and others added 25 commits October 19, 2026 16:35
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-16.0/contract-16.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_sale_generation/
Currently translated at 100.0% (15 of 15 strings)

Translation: contract-16.0/contract-16.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_sale_generation/es/
Currently translated at 100.0% (15 of 15 strings)

Translation: contract-16.0/contract-16.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_sale_generation/nl/
Currently translated at 100.0% (15 of 15 strings)

Translation: contract-16.0/contract-16.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_sale_generation/it/
Currently translated at 100.0% (15 of 15 strings)

Translation: contract-16.0/contract-16.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_sale_generation/pt_BR/
Currently translated at 86.6% (13 of 15 strings)

Translation: contract-16.0/contract-16.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_sale_generation/hr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-18.0/contract-18.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract_sale_generation/
Currently translated at 100.0% (15 of 15 strings)

Translation: contract-18.0/contract-18.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract_sale_generation/it/
Currently translated at 93.3% (14 of 15 strings)

Translation: contract-18.0/contract-18.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract_sale_generation/tr/
Currently translated at 100.0% (15 of 15 strings)

Translation: contract-18.0/contract-18.0-contract_sale_generation
Translate-URL: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract_sale_generation/sl/
- Bump manifest to 19.0.1.0.0 and regenerate README.
- sale.order.line: rename product_uom -> product_uom_id (field renamed
  in 19.0).
- _prepare_sale_line: drop the .new()/onchange/_convert_to_write dance
  that relied on sale.order.line._onchange_product_id_warning() (removed
  in 19.0). Build the line values directly, mirroring the base module's
  contract.line._prepare_invoice_line(); taxes and other computed values
  are now resolved by the sale order on creation.
- Use the lazy self.env._ translation helper.
- tests:
  - res.users.groups_id -> group_ids and sale.order.line.tax_id ->
    tax_ids (fields renamed in 19.0).
  - Build the test data instead of relying on demo data: create the
    product locally instead of using product.product_product_2, and
    drop the chart template loading (the account module already provides
    a chart of accounts on install).
  - Keep the sale tax in the test fiscal position: since 19.0 an empty
    fiscal position removes all taxes, which emptied the taxes on the
    generated sale order lines.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@OCA-git-bot OCA-git-bot added series:19.0 mod:contract_sale_generation Module contract_sale_generation labels Oct 19, 2026
Rad0van added a commit to Rad0van/contract that referenced this pull request Oct 19, 2026
The manual sale-generation note was a plain translated string containing
raw <a> HTML, so message_post escaped it and the chatter rendered the
markup as literal text. Build it the way the base contract module does
(Markup + record._get_html_link()) and post the note on the contract.

Changing the message changes its msgid, so regenerate the .pot, msgmerge
the .po files and translate the new string. The French wording follows
@RaphaelVicini's fix in OCA#1565; el_GR and hi_IN are left for translators.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@FrancoMaxime FrancoMaxime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM: code review

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

Labels

mod:contract_sale_generation Module contract_sale_generation series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.