Commit Graph

15 Commits

Author SHA1 Message Date
Christopher Rogos
d1cb9312ae [MIG] contract: Migration to 17.0 2024-04-10 16:23:33 +00:00
Christopher Rogos
fcaddfcb46 [IMP] contract: black, isort, prettier 2024-04-03 07:12:05 +00:00
Jean-Charles Drubay
aad405e568 ADJ: When generating invoices from the Wizard to create invoices manually, reraise any UserError with information about which contract triggered the exception to facilitate the investigation by accountants in case invoices are not generated automatically. 2024-03-23 15:10:11 +00:00
Jean-Charles Drubay
da393c937d [MIG] contract: Migration to 15.0
Most changes are related to the switch from jinja to qweb in mail templates.

Also included:
- convert deprecated onchange that returns a domain and other deprecation warnings
  (see below)
- Add migration scripts from version 14.0 (force the update of the mail templates)
- Fix warnings from pre-commit checks

Fixes depreciation warnings:

- onchange method ContractAbstractContractLine._onchange_product_id returned
  a domain, this is deprecated
- SavepointCase is deprecated:
  https://github.com/odoo/odoo/blob/15.0/odoo/tests/common.py#L742
- assertDictContainsSubset: According to:
  https://stackoverflow.com/questions/20050913/python-unittests-assertdictcontainssubset-recommended-alternative
2024-03-23 15:10:11 +00:00
Francisco Ivan Anton Prieto
6965b755e0 [MIG] contract: Migration to 14.0 2024-03-23 15:10:10 +00:00
Francisco Ivan Anton Prieto
cddd13cf5c [IMP] contract: black, isort, prettier 2024-03-23 15:10:10 +00:00
Pedro M. Baeza
017faff34a [MIG] contract: Migration to 13.0
- Standard procedure
- Adapt invoice creation to new account.move
- Tests adapted
2024-03-23 15:10:10 +00:00
Pedro M. Baeza
a425d2a431 [IMP] : black, isort, prettier 2024-03-23 15:10:10 +00:00
Pedro M. Baeza
b52bb30727 [FIX] contract: Delete cascade line wizard
For avoiding problems while trying to remove the contract/contract line
2024-03-23 15:10:09 +00:00
sbejaoui
6cb0fc6ebe [IMP] contract: Improve partner With running contracts search view filter + contract termination 2024-03-23 15:10:09 +00:00
sbejaoui
8412378133 [12.0][IMP] - Add an action for contracts manual invoicing
It happen that a company has to trigger the invoicing action to generate invoices before
the scheduled date (to print and prepare invoices documents, check invoices, etc.).
This requires technical access for end users with the risk that this represents.

This commit adds a new wizard to run the invoicing action for a given date with a helper
to see and check the contract that will be invoiced. When the manual action is called,
the system displays all created invoices.

[12.0][IMP] - log the manual invoice action in contract chatter

[IMP] - Add alink to the invoice in contract message at manual invoicing

[IMP] - Improve code

[FIX] - log message for invoice creation only when there is an invoice

[IMP] - split the manual invoice menu into to menus sale & purhcase

[IMP] - hide invoice button if there is nothing to invoice
2024-03-23 15:10:09 +00:00
Thomas Binsfeld
489a79588d [REF] contract: Several things
[REF] use context_today instead of time in filters
[REF] Contract: split from analytic account
[REF] Contract Sale Invoicing: split from analytic account
[REF] Contract Sale Invoicing: update translations
[IMP] - Assert that the predecessor is available for new link at uncancel
[RMV] - remove usless changes
[RMV] - Remove usless field recurring_invoices
  after the total isolation between contract model and account analytic one.
  recurring_invoices which was used to mark analytic account as contract became usless
[IMP] - P3 syntax
[IMP] - use @openupgrade.migrate() and openupgrade.logged_query
[IMP] - drop transient table in migration script
2024-03-23 15:10:09 +00:00
sbejaoui
19f9587025 [ADD] - Add more value for auto_renew_rule_type
[REF] - refactoring for compute_first_date_end

[RMV] - remove auto_renew_rule_type option monthlylastday

[IMP] - rename manual_renew_needed label

[IMP] - use get_product_multiline_description_sale to get contract line description
2024-03-23 15:10:09 +00:00
sbejaoui
1881028b32 [FIX+IMP] contract: several things
[FIX] - as date_start is required, constraints on it become useless
[FIX] - for finished contract _get_lines_to_invoice should return False
[FIX] - default value for active field in contract line
[FIX] - fix flake8
[IMP] - check invoice line vals before assignment
[FIX] - Fix unit tests.
[FIX] - do not copy last_date_invoiced on plan_successor
[FIX] - renew only recurring_invoices contract
[FIX] - filter by termination_notice for contract line to renew
[IMP] - Improve inprogress search filter
[IMP] - Link invoice line to contract lines
[IMP] - Add index on contract line
[IMP] - Add is_suspended flag and _search_state
[IMP] - Add is_suspended flag to stop contract line
[MV] - move onchange method to contract_product module
[IMP] - Replace is_suspended flag by manual_renew_needed
  Add a computed field for the first date of the termination notice period
  Adapt state compute and search method
[IMP] - Improve unit tests
2024-03-23 15:10:09 +00:00
sbejaoui
103d5c1c66 [IMP] contract: Make recurrence mechanism on contract line
Make recurrence mechanism on contract line and some other refactoring

[FIX] - Keep contract_cron on account_analytic_account model

contract_cron defined with no_update option.
Changing it, will cause issue to past version installation.

[IMP] - Fix recurring_next_date default value

recurring_next_date should have start_date as default value in prepaid policy
and start_date + invoicing_interval if postpaid

[FIX] - Fix test check no journal

[IMP] - Return created invoices on recurring_create_invoice

[IMP] - Specific process to compute recurring_next_date for  monthly-last-day

fixes: #198

[ADD] - Add Post-migration script to bring recurrence info from contract to contract lines

[ADD] - Add search filter based on date_end and recurring_next_date

 - not_finished filter in contract search view
 - finished filter in contract search view
 - Next Invoice group by in contract search view

[ADD] - Add unit tests

- cases to compute first recurring next date
- contract recurring_next_date
- contract date_end

[IMP] - Improve Unit tests

[12.0][IMP] - Add strat/stop wizard to contract line

[12.0][IMP] - Add pause button to contract line

[IMP] - Add state filed in contract line form

[FIX] - stop don't change date_end for finished contract line

[IMP] - Change contract line buttons visibility

Add renewal process with termination notice

[FIX] - don't consider stop_date If it is after the contract line end_date

[IMP] - consider more cases in stop_plan_successor

[IMP] - cancel upcoming line on stop

[IMP] - Chnage next invoice date on un-cancel

[IMP] - Post message in contract on contract line actions

[IMP] - check contract line overlap

[FIX] - invoice last period for post-paid case

[IMP] - Add primary views for contract

[IMP] - don't use related filed for partner_id and pricelist_id

[FIX] - fix stop_plan_successor case 5

contract line start in the suspension period and end after it

[IMP] - improve cancel/uncancel process

[FIX] - Test if start_date is set before compute

[FIX] - date_end include in the period in auto_renew case

[FIX] - in suspension case, contract line should start a day after the end

[IMP] - confirm message on contract line cancel

[IMP] - hide recurring_invoicing_type if recurring_rule_type is monthlylastday

for the monthlylastday case, pre-paid is logicly impossible,
if monthlylastday is set, we consider only post-paid case

[IMP] - Improve unit tests

[IMP] - store last_date_invoiced on contract_line

Improve CRITERIA_ALLOWED_DICT

[IMP] - code improvement

[IMP] - Use last_date_invoiced to set marker in invoice description

[IMP] - add migration script to init last_day_invoiced and some other improvement

[FIX] - a contract line suspended should start a day after the suspension end

[IMP] - don't allow to unlink uncnaceled contrac line

[FIX] - check date_start before onchange

[FIX] - compute recurring_next_date for contract

[IMP] - get contract line default data onchange product_id

[IMP] - Add responsible to contract form view

[FIX] - contract recurring_next_date ignore canceled lines

[FIX] - fix _get_invoiced_period if recurring_next_date manually updated

[IMP] - archive contract_line on contract archive
2024-03-23 15:10:09 +00:00