sergiocorato
de5752d3dc
Merge branch '10.0_imp_sequence_journal' of git+ssh://github.com/efatto/contract into 10.0
5 years ago
Maria Sparenberg
d73f0e2404
Translated using Weblate (German)
Currently translated at 100.0% (99 of 99 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
adafb29ca5
Translated using Weblate (German)
Currently translated at 62.4% (58 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
OCA Transbot
d6c9ef2632
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: contract-10.0/contract-10.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract/
6 years ago
oca-travis
c7068e4b05
[UPD] Update contract.pot
6 years ago
Ronald Portier
14f3cc2775
[10.0][IMP] contract. Enable automatic invoice generation before invoice date. ( #282 )
* [IMP] contract. Enable automatic invoice generation before invoice date.
* [IMP] contract pregenerate - improvements after review.
6 years ago
OCA-git-bot
2337ad191c
[UPD] addons table in README.md
6 years ago
Maria Sparenberg
06c572a514
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
Pedro M. Baeza
dace58094e
Merge pull request #321 from NL66278/10.0-product_contract-fix-recurring
[10.0] [FIX] product_contract. Correctly create contract from template.
6 years ago
Ronald Portier
09245d0e0e
[FIX] product_contract. Correctly create contract from template.
6 years ago
sergiocorato
71b886866f
[IMP] add sequence in search default journal
6 years ago
Jarmo Kortetjärvi
b6f75686bc
Translated using Weblate (Finnish)
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/
6 years ago
Maria Sparenberg
f4c40aa0da
Translated using Weblate (German)
Currently translated at 61.3% (57 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
Marta Vázquez Rodríguez
d4d48a1a1d
Translated using Weblate (Spanish)
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/es/
6 years ago
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