mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
ce8c1fac5923a16282486881191c0ba668406b28
Steps to reproduce the problem:
- Create a new contract
- Set "Recurrence at line level?"
- Add a new line, with following data:
* Invoice Every: 1 Month(s)
* Date Start: 2022-06-01
* Invoicing type: Pre-paid
- Save and click on "Create invoices" button
- Now edit again and put "Date End": 2022-06-30
Current behavior:
The line is still invoiceable (appears in blue), and if you click on
"Create invoices" button, you get the traceback:
```
...
File "/mnt/data/odoo-addons-dir/contract/models/contract.py", line 534, in recurring_create_invoice
invoice = self._recurring_create_invoice()
File "/mnt/data/odoo-addons-dir/contract/models/contract.py", line 561, in _recurring_create_invoice
invoices_values = self._prepare_recurring_invoices_values(date_ref)
File "/mnt/data/odoo-addons-dir/contract/models/contract.py", line 516, in _prepare_recurring_invoices_values
invoice_line_vals = line._prepare_invoice_line(move_form=move_form)
File "/mnt/data/odoo-addons-dir/contract_layout_category_hide_detail/models/contract_line.py", line 12, in _prepare_invoice_line
vals = super()._prepare_invoice_line(move_form)
File "/mnt/data/odoo-addons-dir/product_contract/models/contract_line.py", line 22, in _prepare_invoice_line
res = super(ContractLine, self)._prepare_invoice_line(move_form)
File "/mnt/data/odoo-addons-dir/contract_variable_quantity/models/contract_line.py", line 44, in _prepare_invoice_line
vals = super()._prepare_invoice_line(move_form)
File "/mnt/data/odoo-addons-dir/contract/models/contract_line.py", line 545, in _prepare_invoice_line
name = self._insert_markers(dates[0], dates[1])
File "/mnt/data/odoo-addons-dir/contract/models/contract_line.py", line 595, in _insert_markers
name = name.replace("#END#", last_date_invoiced.strftime(date_format))
AttributeError: 'bool' object has no attribute 'strftime'
```
Expected behavior:
Line is not invoiceable anymore, and "Create invoices" button disappears
(as no invoiceable line - but anyways, calling the method the same
doesn't trigger the invoice creation).
TT37880
Contracts management
None
Available addons
| addon | version | maintainers | summary |
|---|---|---|---|
| agreement | 13.0.1.0.0 | ![]() |
Adds an agreement object |
| agreement_legal | 13.0.2.5.1 | ![]() |
Manage Agreements, LOI and Contracts |
| agreement_maintenance | 13.0.1.0.1 | ![]() |
Manage maintenance agreements and contracts |
| agreement_rebate | 13.0.1.0.1 | Rebate in agreements | |
| agreement_sale | 13.0.1.0.0 | ![]() |
Agreement on sales |
| agreement_serviceprofile | 13.0.1.0.0 | ![]() |
Adds an Agreement Service Profile object |
| contract | 13.0.2.8.0 | Recurring - Contracts Management | |
| contract_layout_category_hide_detail | 13.0.1.0.0 | Hide details for sections in Contract lines | |
| contract_mandate | 13.0.1.0.0 | Mandate in contracts and their invoices | |
| contract_payment_mode | 13.0.1.0.0 | Payment mode in contracts and their invoices | |
| contract_sale | 13.0.1.1.0 | Contract from Sale | |
| contract_variable_qty_timesheet | 13.0.1.0.0 | ![]() |
Add formula to invoice |
| contract_variable_quantity | 13.0.1.2.0 | Variable quantity in contract recurrent invoicing | |
| product_contract | 13.0.1.0.1 | ![]() |
Recurring - Product Contract |
Licenses
This repository is licensed under AGPL-3.0.
However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA)
policy. Consult each module's __manifest__.py file, which contains a license key
that explains its license.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Description
Languages
Python
60.4%
HTML
39%
JavaScript
0.4%
SCSS
0.2%







