Commit Graph

35 Commits

Author SHA1 Message Date
Mourad
fae86d5180 [FIX][14.0] tests & typo 2023-05-04 16:41:52 +02:00
Ilyas
f3cb7beb71 [IMP] product_contract: code improvements 2023-04-06 11:48:10 +02:00
Mourad
b793cf6356 [MIG] product_contract: Migration to 14.0 2023-04-03 11:23:39 +02:00
Mourad
1d0c280fe5 [IMP] product_contract: black, isort, prettier 2023-04-03 11:22:41 +02:00
sbejaoui
417702f3d5 [13.0][MIG] - migration product_contract 2023-03-30 13:59:09 +02:00
sbejaoui
d8a654c3cd [12.0][IMP] - Add failing test for creating contract grouped by contract template
When creating a contract from SO, the systme should bgoup by contract template
sale order lines and create one contract per contract template

actually the system group by contract template but create as many contracts as many
sale order lines.
2023-03-30 13:59:09 +02:00
sbejaoui
be6dcd0e4d [IMP] - use terminate term instead of resiliate 2023-03-30 13:59:09 +02:00
sbejaoui
4450953113 [IMP] - can't upsell or downsell a resiliated contract 2023-03-30 13:59:09 +02:00
Ernesto Tejeda
86db9dc026 [FIX] product_contract: set 'Contract template' field company depend 2023-03-30 13:59:09 +02:00
sbejaoui
d1e5f6bb69 [12.0][ADD] - add auto_renew_interval, auto_renew_rule_type fields to sale order line 2023-03-30 13:59:09 +02:00
Stéphane Bidoul (ACSONE)
6977906e13 [IMP] contract: support pre-paid for monthlylastday
monthlylastday is (almost) not a special case anymore \o/.
montlylastday is simply a montly period where the
periods are aligned on month boundaries.
The last bit of special casing is that postpaid generates
invoice the day after the last dasy of the period, except
for monthlylastday where the invoice is generated on the
last day of the period. This last exception will disappear
when we put the offset under user control.

This is a breaking change because the post-paid/pre-paid
mode becomes relevant for monthlylastday invoicing.
The field becomes visible in the UI. Code that generate
monthlylastday contract lines must now correctly set
the pre-paid/post-paid mode too. Some tests have had
to be adapted to reflect that.
2023-03-30 13:59:09 +02:00
sbejaoui
18c897e67c [12.0][FIX] - contract company must be the same as the sale order
When creating a contract from a sale order the company must be the sale order
company and not the user company
2023-03-30 13:59:09 +02:00
sbejaoui
6cb39e62ec [12.0][IMP] - sale line linked to contracts must not be invoiced from sale order 2023-03-30 13:59:09 +02:00
sbejaoui
423dc4531b [12.0][IMP] - Improve unit tests 2023-03-30 13:59:09 +02:00
sbejaoui
c16bf2fe2e [12.0][REF] - Split analytic accouts and contracts 2023-03-30 13:59:09 +02:00
sbejaoui
3a6544d1e3 [12.0][IMP] - option to decide if we automaticallt create contract a sale confirm 2023-03-30 13:59:09 +02:00
sbejaoui
874e88f68b [IMP] - cancel contract line if the downsell/upsell comes before 2023-03-30 13:59:09 +02:00
sbejaoui
b2a05cd09f [FIX] - Fix recurring_next_date 2023-03-30 13:59:09 +02:00
sbejaoui
0080d1a419 [IMP] - Simplify sale order line creation for contract product 2023-03-30 13:59:09 +02:00
sbejaoui
0f76c80372 [IMP] - Add unit test 2023-03-30 13:59:09 +02:00
sbejaoui
c38ce55f2c [FIX] - fix unit tests 2023-03-30 13:59:09 +02:00
sbejaoui
fb04ce19b1 [FIX] - include date_end in the period if the product is_autorenew 2023-03-30 13:59:09 +02:00
sbejaoui
0ba3ae658a [FIX] - fix onchange 2023-03-30 13:59:09 +02:00
sbejaoui
02396d3d95 [FIX] - on upsel, contract line should stop day - 1 2023-03-30 13:59:09 +02:00
sbejaoui
19c05f6dd8 [IMP] - link contract line and its successor in upsel case 2023-03-30 13:59:09 +02:00
sbejaoui
1347133695 [ADD] - Add renewal process with termination notice 2023-03-30 13:59:09 +02:00
sbejaoui
ba65321a31 [IMP] - Upsell/Downsell contract from sale order 2023-03-30 13:59:09 +02:00
sbejaoui
6350ccf2ec [FIX] - Compute recurring_next_date before create contract line 2023-03-30 13:59:09 +02:00
sbejaoui
6ccedf53ec [IMP] - Contract product are ignored on invoicing process
- Sale order line for contract product pass to nothing to invoice on order confirmation
- Contract Invoices are linked to sale order line
2023-03-30 13:59:09 +02:00
sbejaoui
11f35b248b [IMP] - Create contract on sale order confirmation
- On Sale Order confirmation, a contract is created for each contract template used on sale order lines
- A not finished contract can be mentioned on sale order line
- A sale order line linked to a contract will update it and don't create a new one if it had the same template
2023-03-30 13:59:09 +02:00
sbejaoui
db601695f9 [IMP] - Add recurrence fields to product template and sale order line 2023-03-30 13:59:09 +02:00
sbejaoui
a4d82e8f3e [IMP] - Product with is_contract can be only of type service 2023-03-30 13:59:09 +02:00
Florent THOMAS
8a661fd957 [FIX] contract_sale_generation: it doesn't create sales (#141)
* 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
2023-03-30 13:59:09 +02:00
Dave Lasley
f422a4bc50 [FIX] product_contract: Fix mock usage in tests 2023-03-30 13:59:09 +02:00
Ted Salmon
9c73b48c0d [ADD] product_contract: Create module
* Add contract functionality to `product.templates`
* Add logic to create contracts from `sale.order` that contains contract products.
2023-03-30 13:59:09 +02:00