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/
2019-04-03 02:49:27 +00:00
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/
2019-04-03 02:49:27 +00:00
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/
2019-04-03 02:49:26 +00:00
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/
2019-04-03 02:49:26 +00:00
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/
2019-04-03 02:49:26 +00:00
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/
2019-04-03 02:49:26 +00:00
OCA-git-bot
9d74f7faa5
[ADD] icon.png
2019-04-03 02:42:46 +00:00
Maria Sparenberg
f9c3e98a27
Added translation using Weblate (German)
2019-02-22 13:12:11 +00:00
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/
2019-02-07 16:50:27 +00:00
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/
2019-02-07 11:50:29 +00:00
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/
2019-02-07 11:50:28 +00:00
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/
2019-02-07 11:50:28 +00:00
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/
2019-02-07 11:50:27 +00:00
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/
2019-02-04 14:50:18 +00:00
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/
2019-02-04 14:50:18 +00:00
OCA Transbot
2026bcca3a
Update translation files
...
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
2019-01-24 19:48:28 +00:00
oca-travis
262c746580
[UPD] Update contract.pot
2019-01-24 19:48:04 +00:00
Pedro M. Baeza
fcf510fae3
Merge pull request #266 from Tecnativa/10-contract-optimize
...
[10.0][IMP] contract: Performance boost 🚀
2019-01-24 19:44:53 +01:00
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.
2019-01-24 13:30:49 +00:00
OCA Transbot
43accdc655
Update translation files
...
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
2019-01-24 04:04:16 +00:00
OCA Transbot
d6cf976c84
Update translation files
...
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
2019-01-24 04:04:10 +00:00
oca-travis
438bed41b1
[UPD] Update contract_sale_generation.pot
2019-01-24 04:03:53 +00:00
oca-travis
901fd1504d
[UPD] Update contract.pot
2019-01-24 04:03:44 +00:00
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.
2019-01-24 04:40:52 +01:00
Ronald Portier
58e967f887
[FIX] contract. Optimize insertion of dates in invoice and lines.
2019-01-18 22:44:49 +01:00
OCA Transbot
2fc9eb5fc7
Update translation files
...
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
2019-01-15 10:45:06 +00:00
oca-travis
71f829a6d2
[UPD] Update contract.pot
2019-01-15 10:44:41 +00:00
OCA-git-bot
fe8f33eb73
[UPD] addons table in README.md
2019-01-15 10:02:35 +00:00
Pedro M. Baeza
8120035ef8
Merge pull request #260 from Tecnativa/10.0-imp-cron_limit
...
[10.0] contract: allow to limit records on cron
2019-01-15 11:02:32 +01:00
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`.
2019-01-15 09:30:30 +00:00
David
be8e768905
[10.0] contract: allow to limit records on cron
2019-01-15 09:30:29 +00:00
OCA Transbot
e56ea37b65
Update translation files
...
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
2019-01-15 09:18:28 +00:00
OCA-git-bot
90c72af1d8
[UPD] addons table in README.md
2019-01-15 09:18:08 +00:00
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…
2019-01-15 10:18:00 +01:00
Sunny Sheth
13acf42c62
[FIX] Issue-199: if not set Partner Language then language should be company's partner language for date format.
2019-01-08 23:11:18 +05:30
Pedro M. Baeza
5581a9048a
[IMP] contract: Make price test more deterministic
...
As this uses demo data, it may returns an invalid price.
2018-11-16 18:25:59 +01:00
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.
2018-11-15 11:17:37 +01:00
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/
2018-11-03 19:34:14 +00:00
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/
2018-10-28 23:59:11 +00:00
oca-travis
99b1300231
[UPD] Update contract_show_invoice.pot
2018-10-01 10:30:10 +00:00
Alberto Martín Cortada
8a5de59ada
[IMP] contract_show_invoice: ADD total invoiced in show invoices button ( #181 )
2018-10-01 10:40:37 +02:00
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/
2018-07-28 16:09:13 +00:00
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/
2018-07-27 15:09:19 +00:00
OCA Git Bot
567fdf4ff6
[UPD] addons table in README.md [ci skip]
2018-07-22 02:43:41 +02:00
oca-travis
173c632b90
[UPD] Update website_portal_contract.pot
2018-07-21 21:55:28 +00:00
oca-travis
3d7622e6db
[UPD] Update product_contract.pot
2018-07-21 21:55:25 +00:00
oca-travis
8cd4db1e71
[UPD] Update contract_variable_quantity.pot
2018-07-21 21:55:23 +00:00
oca-travis
64e319d226
[UPD] Update contract_show_invoice.pot
2018-07-21 21:55:21 +00:00
oca-travis
49a795522b
[UPD] Update contract_sale_generation.pot
2018-07-21 21:55:19 +00:00
oca-travis
142352a96f
[UPD] Update contract_sale.pot
2018-07-21 21:55:17 +00:00