Commit Graph

68 Commits

Author SHA1 Message Date
Víctor Martínez
4657830368 [IMP] contract: Add discount + price_subtotal fields to the contract lines in the portal view.
TT34117
2022-01-25 14:33:25 +01:00
nans
a4ce934132 [IMP] contract: add kanban, calendar, graph, pivot, activity views on contract 2021-07-23 10:16:45 +02:00
Denis Roussel
0261d34211 [13.0][FIX] contract: Set layout for section and note in portal template 2021-04-30 16:18:34 +02:00
Víctor Martínez
1f616b56b1 [FIX] contract: Set groups in back_in_edit_mode link to show only correct users 2021-01-19 09:07:07 +01:00
Víctor Martínez
ef7c00de42 [IMP] contract: Add fields to contract page in portal 2020-12-31 15:56:55 +01:00
Víctor Martínez
aa5f72c734 [IMP] contract: Add contract modification 2020-12-29 08:27:50 +01:00
Pedro M. Baeza
2001a806d5 [IMP] contract: JS tour on test assets 2020-12-25 12:25:04 +01:00
Víctor Martínez
e367d090c3 [IMP] contract: Portal 2020-12-25 12:25:04 +01:00
Pedro M. Baeza
cd086ddbb4 [IMP+REF] contract: Allow to set recurrency at header level
Big refactoring for allowing to define recurrency at header level for simplifying
the use of the module for most of the cases where you don't need different
recurrency at line level.
2020-10-24 19:30:50 +02:00
Pedro M. Baeza
321c688b75 [MIG] contract: Migration to 13.0
- Standard procedure
- Adapt invoice creation to new account.move
- Tests adapted
2020-08-28 20:07:40 +02:00
Pedro M. Baeza
ac2e2b15bc [IMP] : black, isort, prettier 2020-08-28 20:07:39 +02:00
Ernesto Tejeda
243935faff [FIX] contract: Select the correct sections/notes to be invoiced 2020-07-14 11:53:00 +02:00
Ernesto Tejeda
cba85b966f [IMP] contract: add section and notes in contract line 2020-07-14 11:53:00 +02:00
Bejaoui Souheil
97843dbde8 [IMP] - Place id attribute before model
Co-Authored-By: Carlos Dauden <carlos.dauden@tecnativa.com>
2020-07-14 11:52:22 +02:00
sbejaoui
4ff3f90b75 [IMP] - Add contract tags 2020-07-14 11:52:21 +02:00
sbejaoui
3c0d520c91 [IMP] - contract termination 2020-07-13 18:26:43 +02:00
sbejaoui
944fb19f4e [12.0][IMP] - Improve partner With running contracts search view filter 2020-07-13 18:26:43 +02:00
Ernesto Tejeda
04e7724858 [IMP] contract: add analytic_tag_ids field in contract lines 2020-07-13 18:26:43 +02:00
sbejaoui
8bb7e73c5e [12.0][IMP] - add new option: create_new_line_at_contract_line_renew
Add a company config option to decide whether to create or to extend contract
line at renew action
2020-07-13 18:26:42 +02:00
sbejaoui
5d846a196b [12.0][ADD] - Add note field to contract 2020-07-13 18:26:42 +02:00
Stéphane Bidoul (ACSONE)
c1d7e080e1 [IMP] contract: display invoicing offset 2020-07-13 18:26:42 +02:00
Stéphane Bidoul (ACSONE)
41468b0388 [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.
2020-07-13 18:26:42 +02:00
Stéphane Bidoul (ACSONE)
a040b1c066 [IMP] contract: add next period start/end fields
Add two computed field showing the next period
start and end date. This improve the UX and will
enable further simplifications in the code.
2020-07-13 18:26:42 +02:00
Enrique
932d2abf8d [12.0][FIX] contract & contract_sale - security fix
The lowest model access for contract.contract model is group_account_invoice group. However the addon adds two smart buttons to res.partner view without any security restrictions and without compute_sudo attribute on computed fields.
This causes the view to crash when a user without the proper permissions tries to access the res.partner form view.
The solution adds groups_id to the partner form views in which the buttons are added, so the only loads when the user has proper permissions.
Other way to solve it would be to add compute_sudo attribute to the relevant fields, but this causes an access error when the user clicks on the smart buttons.
2020-07-13 18:26:41 +02:00
hparfr
8517152991 Add commercial_partner_id fields into contract module
Remove string attribute
2020-07-13 18:26:41 +02:00
Pedro M. Baeza
8aa27b9f6e [FIX+IMP+MIG] contract: Several refinements:
* Remove incorrect oldname attributes.
* Add filter on partners for running contracts (+ a support o2m field for that).
* Cover more tables in model renaming + cleaner code using a loop.
* Don't copy contract lines, but rename table + copy contract records on pre.
* Contract code is now populated to "Reference/Description" field in invoice.
* Order on new contract model has been restored to the same as old analytic accounts.
2020-07-13 18:26:41 +02:00
sbejaoui
f4db1ce2b0 [IMP] - Make one migration from 12.0.1 to 12.0.4
[RMV] - Remove empty file

[IMP] - Update no_update cron after migration

[IMP] - move contract template recurrence info to line level

[FIX] - Fix contract line model description

[IMP] - Link contracts to analytic accounts

[FIX] - Fix pylint

[IMP] - Move chatter and attachments from analytic account to contract

[IMP] - Move account_analytic_id to contract line level

[IMP] - Improve version check in migration script

[IMP] - Move contracts followers from analytic accounts

[ADD] - Add mail.activity.mixin to contract.contract model

remove data drop from migration scripts

[12.0][FIX] - Fix _init_last_date_invoiced

fix flake8

[ADD] - Update contributors list
2020-07-13 18:26:41 +02:00
Thomas Binsfeld
1169382b18 [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
2020-07-13 18:26:41 +02:00
Thomas Binsfeld
fff9eac579 [REF] Contract: split from analytic account 2020-07-13 18:26:41 +02:00
Thomas Binsfeld
bce2a95423 [REF] Contract: use context_today instead of time in filters 2020-07-13 18:26:41 +02:00
sbejaoui
d5c94e74bd [FIX] - don't play onchange date_start for old lines on contract template change
[FIX] - Fix stop post message

[FIX] - Fix sale_contract_count should count all partner contract

[FIX] - set recurring_next_date to False if contract line stoped at last date invoiced

[FIX] - Group by next_invoice also considers dates in the past
2020-07-13 18:26:41 +02:00
sbejaoui
c139f2d734 [FIX] - Onchange contract line don't reste contract lines
[FIX] - Rename _get_invoiced_period to _get_period_to_invoice

[ADD] - Add stop_at_date_end to _get_period_to_invoice

[FIX] - Remove useless filter
2020-07-13 18:26:41 +02:00
sbejaoui
cdeaa2cc34 [FIX] - Fix In progress contract filter 2020-07-13 18:26:41 +02:00
sbejaoui
b292f12784 [FIX] - manual_renew_needed should be visible to all contract users 2020-07-13 18:26:41 +02:00
Thomas Binsfeld
533a33aca2 [IMP] Contract: matching invoice view depending on contract type
[ADD] Contract: invoice partner
2020-07-13 18:26:41 +02:00
Thomas Binsfeld
c06e3f52d8 [ADD] Contract: fiscal position
[ADD] Contract: new contributor

[REF] Contract: indexes
2020-07-13 18:26:41 +02:00
sbejaoui
51fb72803b [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
2020-07-13 18:26:41 +02:00
sbejaoui
8b0398abc9 [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
2020-07-13 18:26:41 +02:00
sbejaoui
22c10c96d8 [IMP] - Improve inprogress search filter 2020-07-13 18:26:41 +02:00
Thomas Binsfeld
6555161f24 [ADD] Contract: payment term 2020-07-13 18:26:41 +02:00
sbejaoui
def76117e1 [IMP] - Add responsible to contract form view 2020-07-13 18:23:49 +02:00
sbejaoui
c3fc2c84ca [FIX] - compute recurring_next_date for contract
[IMP] - get contract line default data onchange product_id
2020-07-13 18:23:49 +02:00
sbejaoui
86dfdb14c5 [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
2020-07-13 18:23:49 +02:00
sbejaoui
92c1c837c6 [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
2020-07-13 18:23:49 +02:00
sbejaoui
01e3e0fe44 [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
2020-07-13 18:23:49 +02:00
sbejaoui
ae7bb3fdc5 [IMP] - Add primary views for contract
[IMP] - don't use related filed for partner_id and pricelist_id
2020-07-13 18:23:49 +02:00
sbejaoui
d6db72995f [FIX] - invoice last period for post-paid case 2020-07-13 18:23:49 +02:00
sbejaoui
c716e7ab39 [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
2020-07-13 18:23:49 +02:00
sbejaoui
f785d3ae76 [IMP] - 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
2020-07-13 18:23:49 +02:00
Jordi Ballester Alomar
712d63d351 [FIX] Errors in navigation to customer invoices / vendor bills 2020-07-13 18:23:49 +02:00