Marta Vázquez Rodríguez
cc75967eab
Translated using Weblate (Spanish)
Currently translated at 100.0% (5 of 5 strings)
Translation: contract-10.0/contract-10.0-agreement_sale
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-agreement_sale/es/
6 years ago
Maria Sparenberg
429ab3e875
Translated using Weblate (German)
Currently translated at 58.1% (54 of 93 strings)
Translation: contract-10.0/contract-10.0-website_portal_contract
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-website_portal_contract/de/
6 years ago
Maria Sparenberg
d11f39acf1
Translated using Weblate (German)
Currently translated at 100.0% (6 of 6 strings)
Translation: contract-10.0/contract-10.0-product_contract
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-product_contract/de/
6 years ago
Maria Sparenberg
548191b21f
Translated using Weblate (German)
Currently translated at 100.0% (31 of 31 strings)
Translation: contract-10.0/contract-10.0-contract_variable_quantity
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_variable_quantity/de/
6 years ago
Maria Sparenberg
2bc203deff
Translated using Weblate (German)
Currently translated at 100.0% (7 of 7 strings)
Translation: contract-10.0/contract-10.0-contract_show_invoice
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_show_invoice/de/
6 years ago
Maria Sparenberg
178563a816
Translated using Weblate (German)
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/
6 years ago
Maria Sparenberg
e5301edfee
Translated using Weblate (German)
Currently translated at 100.0% (25 of 25 strings)
Translation: contract-10.0/contract-10.0-contract_payment_auto
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_payment_auto/de/
6 years ago
Maria Sparenberg
183ce045a3
Translated using Weblate (German)
Currently translated at 100.0% (4 of 4 strings)
Translation: contract-10.0/contract-10.0-contract_digitized_signature
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_digitized_signature/de/
6 years ago
Maria Sparenberg
1270a0a772
Translated using Weblate (German)
Currently translated at 100.0% (96 of 96 strings)
Translation: contract-10.0/contract-10.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract/de/
6 years ago
Maria Sparenberg
5579dc8af8
Translated using Weblate (German)
Currently translated at 100.0% (5 of 5 strings)
Translation: contract-10.0/contract-10.0-agreement_sale
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-agreement_sale/de/
6 years ago
Maria Sparenberg
173faccc58
Translated using Weblate (German)
Currently translated at 100.0% (29 of 29 strings)
Translation: contract-10.0/contract-10.0-agreement_account
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-agreement_account/de/
6 years ago
OCA-git-bot
9d74f7faa5
[ADD] icon.png
6 years ago
Maria Sparenberg
f9c3e98a27
Added translation using Weblate (German)
6 years ago
Marta Vázquez Rodríguez
c1c42cde7e
Translated using Weblate (Galician)
Currently translated at 100.0% (31 of 31 strings)
Translation: contract-10.0/contract-10.0-contract_variable_quantity
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_variable_quantity/gl/
6 years ago
Marta Vázquez Rodríguez
d58713e52c
Translated using Weblate (Galician)
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/
6 years ago
Marta Vázquez Rodríguez
2bf9f1cd9b
Translated using Weblate (Galician)
Currently translated at 100.0% (3 of 3 strings)
Translation: contract-10.0/contract-10.0-contract_recurring_analytic_distribution
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_recurring_analytic_distribution/gl/
6 years ago
Marta Vázquez Rodríguez
e001e4f69d
Translated using Weblate (Galician)
Currently translated at 100.0% (4 of 4 strings)
Translation: contract-10.0/contract-10.0-contract_digitized_signature
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_digitized_signature/gl/
6 years ago
Marta Vázquez Rodríguez
864aa139a4
Translated using Weblate (Galician)
Currently translated at 100.0% (29 of 29 strings)
Translation: contract-10.0/contract-10.0-agreement_account
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-agreement_account/gl/
6 years ago
Marta Vázquez Rodríguez
38f5690413
Translated using Weblate (Spanish)
Currently translated at 100.0% (31 of 31 strings)
Translation: contract-10.0/contract-10.0-contract_variable_quantity
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_variable_quantity/es/
6 years ago
Marta Vázquez Rodríguez
bec24343af
Translated using Weblate (Spanish)
Currently translated at 100.0% (96 of 96 strings)
Translation: contract-10.0/contract-10.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract/es/
6 years ago
OCA Transbot
2026bcca3a
Update translation files
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
6 years ago
oca-travis
262c746580
[UPD] Update contract.pot
6 years ago
Pedro M. Baeza
fcf510fae3
Merge pull request #266 from Tecnativa/10-contract-optimize
[10.0][IMP] contract: Performance boost 🚀
6 years ago
Jairo Llopis
173b2b2db2
[10.0][IMP] contract: Performance boost 🚀
With this patch we save about 83% of the execution time when generating invoices in batch.
# Optimizations made
## Recompute once at the end of the batch
This part avoids recomputing many fields per record. Instead, global recomputations are triggered at the end of the block:
```python
with _self.env.norecompute():
...
invoices.compute_taxes()
_self.recompute()
```
Notice the explicit call to `compute_taxes()`, which was explicit before also, but it was done once per invoice, losing batch-computing boost.
## Disabling prefetch for extra fields
It's done in this part:
```python
_self = self.with_context(prefetch_fields=False)
```
Prefetching makes sense when we are going to use a lot of fields for a model that has only a few.
In our case, we are using not much fields, but the models involved have lots of them.
This produces more queries to get those fields, but the queries are noticeably smaller. At the end of the day, it saves a lot of time, which is what matters.
## Disabling track mail creation
This part does it:
```diff
ctx.update({
+ 'mail_notrack': True,
'next_date': next_date,
```
It makes that when creating invoices, we don't create the "Invoice created" message.
## Precomputing price
Obtaining `price_unit` from `contract.recurring_invoice_line_ids` was quite expenisve in terms of CPU, and it was being made once per line, each one in a different context, which means also a different cache.
Instead of that, lines now share a single context, and are computed before starting the batch.
This code precomputes stuff:
```python
# Precompute expensive computed fields in batch
recurring_lines = _self.mapped("recurring_invoice_line_ids")
recurring_lines._fields["price_unit"].determine_value(recurring_lines)
```
And the usage of 2 different environments done inside `_create_invoice()` (`self` and `_self`) guarantee that the invoices are filled with the correct data, but also that the lines use the cached precomputed value instead of having to compute it each time.
# Performance gain
According to my tests, generating 10 invoices took 62 seconds before, and it takes about 18 seconds now.
6 years ago
OCA Transbot
43accdc655
Update translation files
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
6 years ago
OCA Transbot
d6cf976c84
Update translation files
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
6 years ago
oca-travis
438bed41b1
[UPD] Update contract_sale_generation.pot
6 years ago
oca-travis
901fd1504d
[UPD] Update contract.pot
6 years ago
Rafael Blasco
a2cf2ef2d1
Merge pull request #240 from NL66278/10.0-marker-performance
[10.0] [FIX] contract. Optimize insertion of dates in invoice and lines.
6 years ago
Ronald Portier
58e967f887
[FIX] contract. Optimize insertion of dates in invoice and lines.
6 years ago
OCA Transbot
2fc9eb5fc7
Update translation files
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
6 years ago
oca-travis
71f829a6d2
[UPD] Update contract.pot
6 years ago
OCA-git-bot
fe8f33eb73
[UPD] addons table in README.md
6 years ago
Pedro M. Baeza
8120035ef8
Merge pull request #260 from Tecnativa/10.0-imp-cron_limit
[10.0] contract: allow to limit records on cron
6 years ago
Jairo Llopis
c23a752132
[FIX] contract: Process invoices limit in a lower method
To avoid blocking the queue when there are more than the specified limit
of contracts, we process the limit while creating invoices instead
of while searching for contracts, and break the process when the
max of invoices has been created.
See https://github.com/OCA/contract/pull/260#pullrequestreview-192187022
for more details.
In case you need to use this new feature in the cron, it is
also modified as `noupdate=1`.
6 years ago
David
be8e768905
[10.0] contract: allow to limit records on cron
6 years ago
OCA Transbot
e56ea37b65
Update translation files
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
6 years ago
OCA-git-bot
90c72af1d8
[UPD] addons table in README.md
6 years ago
Pedro M. Baeza
d5fe86bb1c
Merge pull request #241 from sys-odoo/10.0_contract_lang_date_format_issue_199
[FIX] Issue-199: OCA-Contract V10, if not set Partner Language so languag…
6 years ago
Sunny Sheth
13acf42c62
[FIX] Issue-199: if not set Partner Language then language should be company's partner language for date format.
6 years ago
Pedro M. Baeza
5581a9048a
[IMP] contract: Make price test more deterministic
As this uses demo data, it may returns an invalid price.
6 years ago
Pedro M. Baeza
738f75f65c
[IMP] contract: Don't depend on external data
The test as it was, leaves to the demo pricelist the control on the price of
the product, so other modules that modifies this pricelist will make the
test to fail.
This is the minimum change needed for avoiding the problem.
6 years ago
Sergio Zanchetta
d918405b0a
Translated using Weblate (Italian)
Currently translated at 76.0% (73 of 96 strings)
Translation: contract-10.0/contract-10.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract/it/
6 years ago
Sergio Zanchetta
7074fb4224
Translated using Weblate (Italian)
Currently translated at 100.0% (29 of 29 strings)
Translation: contract-10.0/contract-10.0-agreement_account
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-agreement_account/it/
6 years ago
oca-travis
99b1300231
[UPD] Update contract_show_invoice.pot
6 years ago
Alberto Martín Cortada
8a5de59ada
[IMP] contract_show_invoice: ADD total invoiced in show invoices button ( #181 )
6 years ago
lfreeke
f944b485c7
Translated using Weblate (Dutch)
Currently translated at 79.2% (76 of 96 strings)
Translation: contract-10.0/contract-10.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract/nl/
7 years ago
lfreeke
998cd83307
Translated using Weblate (Dutch)
Currently translated at 72.9% (70 of 96 strings)
Translation: contract-10.0/contract-10.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract/nl/
7 years ago
OCA Git Bot
567fdf4ff6
[UPD] addons table in README.md [ci skip]
7 years ago
oca-travis
173c632b90
[UPD] Update website_portal_contract.pot
7 years ago