Commit Graph

70 Commits

Author SHA1 Message Date
Víctor Martínez
e817effeea [FIX] contract: Set groups in back_in_edit_mode link to show only correct users 2021-01-19 09:42:41 +01:00
Víctor Martínez
cf4a8d4900 [IMP] contract: Add fields to contract page in portal 2020-12-31 16:01:59 +01:00
Víctor Martínez
a9f65b439a [IMP] contract: Add contract modification 2020-12-23 18:43:16 +01:00
Víctor Martínez
305ca3f540 [IMP] contract: Portal 2020-12-14 08:49:11 +01:00
Pedro M. Baeza
a12f0497f9 [FIX] contract: Currency is not editable + pricelist from partner
Previous related field was not accurated nor editable. Now the field is got
properly from a computed field.

Reviewing this, as the currency was taken (and it continues being taken) from the partner
pricelist if no pricelist is explicitly set, automatic price should use the same logic for
using partner pricelist.
2020-06-02 11:03:54 +02:00
Ernesto Tejeda
b66e388378 [FIX] contract: Select the correct sections/notes to be invoiced 2020-05-06 17:30:38 +02:00
Ernesto Tejeda
9291305c48 [IMP] contract: add section and notes in contract line 2020-04-13 18:16:08 +02:00
Bejaoui Souheil
4f4723b30c [IMP] - Place id attribute before model
Co-Authored-By: Carlos Dauden <carlos.dauden@tecnativa.com>
2020-04-02 17:14:04 +02:00
sbejaoui
ce08869075 [12.0][IMP] - Add menu for contract tag 2020-03-23 13:11:39 +01:00
OCA-git-bot
eb279d3b5a Merge PR #466 into 12.0
Signed-off-by sbejaoui
2020-03-17 18:12:33 +00:00
sbejaoui
e71fcc1694 [IMP] - use terminate term instead of resiliate 2020-03-11 11:13:13 +01:00
sbejaoui
30788d22f9 [12.0][IMP] - Update Resiliation Details 2020-03-10 11:12:51 +01:00
sbejaoui
3df0f570fd [IMP] - Add confirmation message for action_cancel_contract_resiliation 2020-03-10 11:12:51 +01:00
sbejaoui
fa605544d9 [IMP] - resiliate comment required based on resiliation reason 2020-03-10 11:12:51 +01:00
sbejaoui
58b38490f6 [IMP] - contract resiliation 2020-03-10 11:11:59 +01:00
sbejaoui
590ea6fd9b [12.0][IMP] - Improve partner With running contracts search view filter 2020-03-02 16:24:35 +01:00
OCA-git-bot
737239cc9a Merge PR #412 into 12.0
Signed-off-by sbejaoui
2020-03-02 12:04:27 +00:00
Ernesto Tejeda
5b6f304355 [IMP] contract: add analytic_tag_ids field in contract lines 2020-02-28 10:51:01 -05:00
sbejaoui
c7365b028f [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
2019-12-23 16:49:18 +01:00
sbejaoui
fd10c32f4f [12.0][ADD] - Add note field to contract 2019-12-23 10:27:54 +01:00
OCA-git-bot
51d8ccd387 Merge PR #402 into 12.0
Signed-off-by sbidoul
2019-12-22 22:24:35 +00:00
Stéphane Bidoul (ACSONE)
d9bd82241e [IMP] contract: display invoicing offset 2019-12-09 13:17:16 +01:00
Stéphane Bidoul (ACSONE)
557097be2d [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.
2019-12-09 13:17:15 +01:00
Stéphane Bidoul (ACSONE)
edf6833bec [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.
2019-12-06 11:09:32 +01:00
sbejaoui
3b79dea3eb [IMP] - Add contract tags 2019-11-04 13:07:27 +01:00
Enrique
87600e18bb [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.
2019-10-09 17:03:51 +02:00
hparfr
dcda2a1980 Add commercial_partner_id fields into contract module
Remove string attribute
2019-09-24 09:56:11 +02:00
Pedro M. Baeza
09d860ba17 [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.
2019-09-14 14:34:02 +02:00
sbejaoui
d93139d147 [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
2019-09-14 14:34:02 +02:00
Thomas Binsfeld
a429b10c20 [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
2019-09-14 14:34:02 +02:00
Thomas Binsfeld
da7826797c [REF] Contract: split from analytic account 2019-09-14 14:34:02 +02:00
Thomas Binsfeld
e167562a20 [REF] Contract: use context_today instead of time in filters 2019-09-14 14:34:02 +02:00
sbejaoui
130fbb693e [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
2019-09-14 14:34:02 +02:00
sbejaoui
834d0b959b [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
2019-09-14 14:34:02 +02:00
sbejaoui
2e0dad4937 [FIX] - Fix In progress contract filter 2019-09-14 14:34:02 +02:00
sbejaoui
cdb9d9af67 [FIX] - manual_renew_needed should be visible to all contract users 2019-09-14 14:34:02 +02:00
Thomas Binsfeld
7683e5a736 [IMP] Contract: matching invoice view depending on contract type
[ADD] Contract: invoice partner
2019-09-14 14:34:02 +02:00
Thomas Binsfeld
19b3f50d34 [ADD] Contract: fiscal position
[ADD] Contract: new contributor

[REF] Contract: indexes
2019-09-14 14:34:02 +02:00
sbejaoui
361d57fb64 [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
2019-09-14 14:34:02 +02:00
sbejaoui
8171c1d955 [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
2019-09-14 14:34:02 +02:00
sbejaoui
753862f41b [IMP] - Improve inprogress search filter 2019-09-14 14:34:02 +02:00
Thomas Binsfeld
60f589a41f [ADD] Contract: payment term 2019-09-14 14:34:02 +02:00
sbejaoui
6b96172fb9 [IMP] - Add responsible to contract form view 2019-09-14 14:34:02 +02:00
sbejaoui
c55540b2c9 [FIX] - compute recurring_next_date for contract
[IMP] - get contract line default data onchange product_id
2019-09-14 14:34:02 +02:00
sbejaoui
aefa12ab9e [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
2019-09-14 14:34:02 +02:00
sbejaoui
f217be4f19 [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
2019-09-14 14:34:02 +02:00
sbejaoui
6cbf85107a [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
2019-09-14 14:34:02 +02:00
sbejaoui
913405cdd2 [IMP] - Add primary views for contract
[IMP] - don't use related filed for partner_id and pricelist_id
2019-09-14 14:34:02 +02:00
sbejaoui
13a21b2b94 [FIX] - invoice last period for post-paid case 2019-09-14 14:34:02 +02:00
sbejaoui
73c08d0f2f [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
2019-09-14 14:34:02 +02:00