Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] contract_sale: Migration to 17.0 #1049

Closed
wants to merge 306 commits into from

Conversation

jaydeep32
Copy link
Contributor

No description provided.

Axel-G and others added 30 commits March 23, 2024 15:10
Currently translated at 53.0% (53 of 100 strings)

Translation: contract-11.0/contract-11.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-contract/de/
Currently translated at 75.0% (75 of 100 strings)

Translation: contract-11.0/contract-11.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-contract/de/

[UPD] README.rst
Currently translated at 98.0% (98 of 100 strings)

Translation: contract-11.0/contract-11.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-contract/es/
Currently translated at 10.0% (10 of 100 strings)

Translation: contract-11.0/contract-11.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-contract/pt_PT/
The test as it was, leaves to the demo pricelist the control on the price of
the product, so other modules that modifies this pricelist will make the
test to fail.

This is the minimum change needed for avoiding the problem.
    - Module: contract
    - Summary: several terms where not translated to Spanish.
Currently translated at 99.0% (99 of 100 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/de/
Currently translated at 100.0% (109 of 109 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/es/
Currently translated at 100.0% (109 of 109 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/gl/
Currently translated at 100.0% (109 of 109 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/de/
Currently translated at 83.5% (91 of 109 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/it/
Currently translated at 100.0% (109 of 109 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/fr/
Currently translated at 100.0% (109 of 109 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/pt/
Currently translated at 51.8% (57 of 110 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/pt_BR/
Currently translated at 100.0% (110 of 110 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/de/
Currently translated at 40.9% (45 of 110 strings)

Translation: contract-12.0/contract-12.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/zh_CN/
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: OCA#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
…ntract line + Gitignore: .eggs + tests: base the cron check on invoice lines instead of invoices + payment term
[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
[ADD] Contract: new contributor

[REF] Contract: indexes
…ll + rename recurring_interval to Invoice Every
[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
sbejaoui and others added 25 commits April 12, 2024 14:36
[REF] Contract Sale: update translations
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.
Currently translated at 100.0% (1 of 1 strings)

Translation: contract-12.0/contract-12.0-contract_sale
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract_sale/es_CL/
@jaydeep32
Copy link
Contributor Author

Hello @CRogos , @MohamedOsman7
would you please recheck this PR? I have been trying to rebase with 17.0 since a few days ago. There was a contract module PR merge, and that module is used as depends on this contract_sale, so I thought I should rebase it. But I might have something wrong here, I see now a lot of commits and not sure if this PR is ok or not.
Sorry for the extra trouble but please let me know if there is an issue I will make a new PR.

@CRogos
Copy link
Contributor

CRogos commented Apr 15, 2024

@jaydeep32 I am not sure what you did wrong but indeed this doesn't look correct.
I would suggest you start again and cherry-pick these two commits.
image

If you push to an existing branch after rebase, you need to use -f (force) to rewrite the hole history. Otherwise there might be a merge of both versions created.

@jaydeep32 jaydeep32 closed this Apr 15, 2024
@jaydeep32 jaydeep32 deleted the 17.0-mig-contract_sale branch April 15, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.