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

[17.0][MIG] account_payment_order: Migration to 17.0 #1208

Merged
merged 117 commits into from
Feb 29, 2024

Conversation

ramiadavid
Copy link
Contributor

No description provided.

@ramiadavid ramiadavid mentioned this pull request Jan 13, 2024
14 tasks
@ramiadavid ramiadavid force-pushed the 17.0-mig-account_payment_order branch 2 times, most recently from 182f9c8 to 83f7102 Compare January 13, 2024 09:19
@ramiadavid ramiadavid marked this pull request as ready for review January 13, 2024 09:22
@pedrobaeza
Copy link
Member

/ocabot migration account_payment_order

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Jan 13, 2024
@HaraldPanten
Copy link

@ramiadavid Could you rebase, please? I'd like to test the module in runboat.

THX.

alexis-via and others added 22 commits February 26, 2024 22:06
…the Sorrento Code sprint 2016

Improvements include:
- full re-organisation of modules and big re-organisation of the code
- simplification of the code related to the fact that support for direct debit is now in t
he base module, not added by an optional module account_direct_debit (module was removed)
- new design of the wizard to select move lines to pay
- support for non-SEPA file transfer-
- support for German direct debit SEPA files (fixes bug OCA#129)
- remove workflow of payment.order
- add wizard of selection of move lines to pay
* IMP: prevent deleting a move-line that is linked to a payment order line
* FIX: better filtering of move lines already included in open payment order
Take into account all the remaining remarks of Frederic Clementi dated May 30:
- see multi-currency amounts in the wizard to add transaction lines
- add help msg on bank payment lines
* IMP: extensibility of _prepare_move

  Pass the list of bank lines to _prepare_move so it is possible to customize the move (eg it's name) based on the lines being paid.

* FIX: payment order: add missing onchange dependencies in move selection wizard
* Fix crash when selecting a customer that has a direct debit payment mode but no mandate
* Hide many fields when payment_order_ok is False on a payment_mode
* Fix payment line communication when the move line is not linked to an invoice (problem found when porting donation_debit_debit to v9)
* For the communication field, if self.move_id.ref is False, fallback on self.move_id.name
Port almost all modules to v10

* Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug OCA#300)
* FIX: Bug OCA#353 crash when selecting a payment mode that has a variable link to a bank account
* FIX: Add 'post_move' option on account.payment.mode with default True, to keep the previous behavior
* IMP: Explicit error when bank account is missing on bank journal
* IMP: Add field default_date_prefered on payment mode.
…ent order + allow to cancel an uploaded payment order
* Restrict the deletion of bank payment line
* Add test_cancel_payment_order
@ramiadavid
Copy link
Contributor Author

@HaraldPanten done

Copy link

@HaraldPanten HaraldPanten left a comment

Choose a reason for hiding this comment

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

1- Create a payment/debit order.
2- Click on "Create Payment Lines form Journal Items" button.

An error occured:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 1765, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo/odoo/http.py", line 1792, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo/http.py", line 1996, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo/http.py", line 722, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 24, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 468, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/addons/web/models/models.py", line 953, in onchange
    if cmd[0] in (Command.UPDATE, Command.LINK):
TypeError: 'int' object is not subscriptable

The above server error caused the following client error:
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
    at handleError (http://oca-bank-payment-17-0-pr1208-0a4c4115d4e1.runboat.odoo-community.org/web/assets/179c946/web.assets_web.min.js:916:101)
    at App.handleError (http://oca-bank-payment-17-0-pr1208-0a4c4115d4e1.runboat.odoo-community.org/web/assets/179c946/web.assets_web.min.js:1542:29)
    at ComponentNode.initiateRender (http://oca-bank-payment-17-0-pr1208-0a4c4115d4e1.runboat.odoo-community.org/web/assets/179c946/web.assets_web.min.js:1006:19)

Caused by: RPC_ERROR: Odoo Server Error
    at makeErrorFromResponse (http://oca-bank-payment-17-0-pr1208-0a4c4115d4e1.runboat.odoo-community.org/web/assets/179c946/web.assets_web.min.js:2875:163)
    at XMLHttpRequest.<anonymous> (http://oca-bank-payment-17-0-pr1208-0a4c4115d4e1.runboat.odoo-community.org/web/assets/179c946/web.assets_web.min.js:2879:13)

Captura de Pantalla 2024-02-28 a las 16 09 05

Tested in runboat.

Could you check the main options of the module? THX!

@ramiadavid ramiadavid force-pushed the 17.0-mig-account_payment_order branch 2 times, most recently from 71b997f to f86118e Compare February 28, 2024 16:36
@ramiadavid
Copy link
Contributor Author

@HaraldPanten Fixed

Copy link

@HaraldPanten HaraldPanten left a comment

Choose a reason for hiding this comment

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

Functional review tested in runboat. Seems to be OK 👍.

Comment on lines 330 to 325
# Write requested_date on 'date' field of payment line
# norecompute is for avoiding a chained recomputation
# payment_line_ids.date
# > payment_line_ids.amount_company_currency
# > total_company_currency
with self.env.norecompute():
payline.date = requested_date
payline.date = requested_date
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pedrobaeza I have removed this because in v17 it is obsolete and is not doing anything, but I am not sure how to check if it is a problem.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for pointing it. I agree it's not needed. This is an ORM glitch combined with old onchanges. Now all the compute stuff is way more robust and don't require these hacks.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Thanks for the work.

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 17.0-ocabot-merge-pr-1208-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Feb 29, 2024
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 17.0-ocabot-merge-pr-1208-by-pedrobaeza-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

1 similar comment
@OCA-git-bot
Copy link
Contributor

@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 17.0-ocabot-merge-pr-1208-by-pedrobaeza-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-1208-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit b8af5ba into OCA:17.0 Feb 29, 2024
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@ramiadavid ramiadavid deleted the 17.0-mig-account_payment_order branch April 7, 2024 08:38
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.