Commit Graph

26 Commits

Author SHA1 Message Date
Stéphane Bidoul (ACSONE)
7a774daccd [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.
2024-05-06 17:49:07 +02:00
sbejaoui
39d796b446 [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
2024-05-06 17:49:07 +02:00
sbejaoui
f6106181af [12.0][IMP] - sale line linked to contracts must not be invoiced from sale order 2024-05-06 17:49:07 +02:00
sbejaoui
59d254ee4a [12.0][IMP] - Improve unit tests 2024-05-06 17:49:07 +02:00
sbejaoui
14642e0bff [12.0][REF] - Split analytic accouts and contracts 2024-05-06 17:49:07 +02:00
sbejaoui
bc0f33760e [12.0][IMP] - option to decide if we automaticallt create contract a sale confirm 2024-05-06 17:49:07 +02:00
sbejaoui
c99cc123bb [IMP] - cancel contract line if the downsell/upsell comes before 2024-05-06 17:49:07 +02:00
sbejaoui
a92e287ae8 [FIX] - Fix recurring_next_date 2024-05-06 17:49:07 +02:00
sbejaoui
998d8ab9bd [IMP] - Simplify sale order line creation for contract product 2024-05-06 17:49:07 +02:00
sbejaoui
4332d4dd9a [IMP] - Add unit test 2024-05-06 17:49:07 +02:00
sbejaoui
de6033fb85 [FIX] - fix unit tests 2024-05-06 17:49:07 +02:00
sbejaoui
1f00ebb7cd [FIX] - fix flake8 2024-05-06 17:49:07 +02:00
sbejaoui
dc4d94591a [FIX] - include date_end in the period if the product is_autorenew 2024-05-06 17:49:07 +02:00
sbejaoui
d6b24da56b [FIX] - fix onchange 2024-05-06 17:49:07 +02:00
sbejaoui
a956163d42 [FIX] - on upsel, contract line should stop day - 1 2024-05-06 17:49:07 +02:00
sbejaoui
2be3a74d69 [IMP] - link contract line and its successor in upsel case 2024-05-06 17:49:07 +02:00
sbejaoui
91f39c1a5b [ADD] - Add renewal process with termination notice 2024-05-06 17:49:07 +02:00
sbejaoui
967d4dcef8 [IMP] - Upsell/Downsell contract from sale order 2024-05-06 17:49:07 +02:00
sbejaoui
961a77fcf8 [FIX] - Compute recurring_next_date before create contract line 2024-05-06 17:49:07 +02:00
sbejaoui
9d01b3e20c [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
2024-05-06 17:49:07 +02:00
sbejaoui
18649ec0c2 [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
2024-05-06 17:49:07 +02:00
sbejaoui
284dc91764 [IMP] - Add recurrence fields to product template and sale order line 2024-05-06 17:49:07 +02:00
sbejaoui
187ca1f4ce [IMP] - Product with is_contract can be only of type service 2024-05-06 17:49:07 +02:00
Florent THOMAS
b290dc98d1 [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
2024-05-06 17:49:07 +02:00
Dave Lasley
58b3d9987f [FIX] product_contract: Fix mock usage in tests 2024-05-06 17:49:07 +02:00
Ted Salmon
85adab23c5 [ADD] product_contract: Create module
* Add contract functionality to `product.templates`
* Add logic to create contracts from `sale.order` that contains contract products.
2024-05-06 17:49:07 +02:00