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

[12.0][IMP] - Make recurrence mechanism on contract line #207

Merged

Conversation

sbejaoui
Copy link
Contributor

@sbejaoui sbejaoui commented Oct 30, 2018

Make recurrence mechanism on contract line and some other refactoring
Related to #200

@sbidoul sbidoul changed the title WIP: [IMP] - Make recurrence mechanism on contract line [12.0][WIP][IMP] - Make recurrence mechanism on contract line Oct 31, 2018
@sbidoul sbidoul added this to the 12.0 milestone Oct 31, 2018
@sbejaoui
Copy link
Contributor Author

@gva-acsone, it's ready for a shot of test.

@gva-acsone
Copy link

gva-acsone commented Oct 31, 2018

  1. On the contract lines, I would switch the end date and the next invoice date so that the end date is located just next to the start date.

  2. I managed to create my first invoice, but afterwards, Odoo refuses to create my next invoices.

@sbejaoui
Copy link
Contributor Author

@gva-acsone

  1. On the contract lines, I would switch the end date and the next invoice date so that the end date is located just next to the start date.

I will make the change for this

  1. I managed to create my first invoice, but afterwards, Odoo refuses to create my next invoices.

The next date invoice > the today date, that's why, odoo would not create a new invoice. Nothing to invoice until the next date invoice.

@gva-acsone
Copy link

Can we modify this so that we can create invoices in advance?

@sbejaoui sbejaoui force-pushed the 12.0-recurrence-mechanism-on-contract-line branch from 0ae7071 to 7b6efc2 Compare October 31, 2018 12:13
sbejaoui added a commit to sbejaoui/contract that referenced this pull request Oct 31, 2018
- [] Sale order lines contain invoicing recurrence details
- [] Product has a new field is_contract applied only for type service
- [] Contract products are linked to contract templates
- [] On Sale Order confirmation, a contract is created for each contract template used on sale order lines
- [] Contract product are ignored on invoicing process and pass to fully invoiced
- [] 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

FIXME:
- [] remove change made in .travis.yml to get the OCA#207 on build
Copy link

@gva-acsone gva-acsone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Functional test

@sbejaoui sbejaoui force-pushed the 12.0-recurrence-mechanism-on-contract-line branch 4 times, most recently from 3eb084b to 7332665 Compare November 2, 2018 16:10
@sbejaoui sbejaoui changed the title [12.0][WIP][IMP] - Make recurrence mechanism on contract line [12.0][IMP] - Make recurrence mechanism on contract line Nov 5, 2018
@sbejaoui sbejaoui force-pushed the 12.0-recurrence-mechanism-on-contract-line branch 4 times, most recently from f1b7292 to cbe0d0d Compare November 5, 2018 17:28
@sbejaoui sbejaoui force-pushed the 12.0-recurrence-mechanism-on-contract-line branch 7 times, most recently from 8a1c796 to d69921b Compare November 13, 2018 15:35
sbejaoui and others added 19 commits September 14, 2019 14:34
[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
the contract line quantity can be in some use cases variable, to simplify
the way it is changed we add a new method _get_quantity_to_invoice.
[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
…late 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
[REF] Contract: pep8

[IMP] Contract: update USAGE section of README

[IMP]call onchange_is_auto_renew when changing template
[REF] Contract Sale: update translations
[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
[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
* 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.
@sbejaoui sbejaoui force-pushed the 12.0-recurrence-mechanism-on-contract-line branch from e6e3c37 to 09d860b Compare September 14, 2019 12:34
@sbejaoui
Copy link
Contributor Author

@pedrobaeza , squash is done. PR is ready to merge.

@pedrobaeza
Copy link
Member

/ocabot merge

Hope to see you all on Odoo XP.

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 12.0-ocabot-merge-pr-207-by-pedrobaeza-bump-no, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Sep 14, 2019
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 3216c2a. Thanks a lot for contributing to OCA. ❤️

@rafaelbn
Copy link
Member

Hello @sbidoul , @sbejaoui !

Did you made this promise changes?

#207 (comment)

We will add the UX feature to manage recurrence globally at the contract level a bit later, don't worry.

I see this is not available in v12 but it is in v13 and v14. And I cannot find where is that improvement in 13 or 14. I only know that it's not in 12 and today that contract module have FIX FIX FIX FIX and stills doesn't work propertly. Futhermore there are already BUGs in 13 and 14. https://www.loom.com/share/86fc343c704c42b6b5ab3c7b86828d29

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.

None yet