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

[ADD] account_credit_control: migration scripts #1

Open
wants to merge 17 commits into
base: 14.0
Choose a base branch
from

Conversation

fredzamoabg
Copy link
Owner

No description provided.

pedrobaeza and others added 17 commits January 31, 2022 11:52
It was working, but better to not introduce such typo.
(cherry picked from commit 811310fd06ca8589fa8e87da6b8bdaea403bf660)

[MIG] Improve the code and fix some bugs

(cherry picked from commit 5bcdfe3f748884d650120f76d1642b820d0a800b)

[FIX] Change the parent for the menu Credit Control (the previous parent menu was not in the Odoo standard)

(cherry picked from commit 826257ce7b5248956d838cae9c94a012d550327e)

[FIX] Fix a lot of errors to respect pep8

(cherry picked from commit bed6cf35d665eea32122c91d33322af141053f29)

[FIX] Respect PEP8

(cherry picked from commit 6353eef0dce1bfe5db8a38d3410d1cc7f833fa10)
…useless spaces, ...) and fix some small bugs

(cherry picked from commit efd9e9f8efe9a5e8da791d179b5a5d57710a31c3)

[FIX] Add space to respect PEP8

(cherry picked from commit 06c93c610646bb4269f303c3a7a55700cc6dfd1f)

[FIX] Replace the field "full_reconcile_id" by "reconciled" in a search domain on account.move.line

(cherry picked from commit cf2cfd43e34dff9eef2571b87de777a183c220c0)
Let's use OU populated old_invoice_id field for taking into account draft invoices
converted to account.move records.
If not, the FK constraint is kept and thus we can't switch the values.
Before this patch, `credit.control.communication` was a `TransientModel` that sent emails. This produced that, when someone responded to one of those emails, Odoo detected it was a response but couldn't know where to store it, so it was lost. Also, users with credit control access got a 500 error when clicking on the "View" button in the email.

Now, `credit.control.communication` is a normal `Model` which inherits from `mail.thread` and `mail.activity.mixin`. This makes more sense, because when you are tracking credit control communications, you usually communicate with a customer regarding several lines at once (no sense on asking a customer to pay each line separately).

More changes:

- `credit.control.run` now displays an additional smart button that leads users to generated communications.
- `credit.control.line` now is linked to a communication instead of a simple message (the old link is preserved in a hidden legacy column).
- `credit.control.line` has a new state "queued", which indicates that the communication is executed but still not sent. When sent, it's changed to "done" or "email_error".
- Comunication emails have a specific subtype.
- Some fields are renamed, as they didn't follow guidelines.
- Some menu names are less verbose now.
- Mail templates code is migrated.

@Tecnativa TT24841
- Template translations migration scripts
- Template recipients
Update patch imported from OCA#86 to new style guidelines.
Adapt imported patch OCA#86 to v13.

@Tecnativa TT24841

@openupgrade.migrate()
def migrate(env, version):
# Skip migration if 12.0.3 was already installed (migration was already run)
if parse_version("12.0.3.0.0") <= parse_version(version) < parse_version("13.0"):
return

Choose a reason for hiding this comment

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

Ho visto che hai saltato anche gli script precedenti: https://github.com/OCA/credit-control/tree/12.0/account_credit_control/migrations/12.0.1.7.0.
E' voluto?

Copy link
Owner Author

Choose a reason for hiding this comment

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

nel task ci sono dei commenti a riguardo

Choose a reason for hiding this comment

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

Ok grazie, non lo avevo notato perché barrato.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants