OCA / bank-payment

Odoo Electronic Payment
https://odoo-community.org/psc-teams/banking-10
GNU Affero General Public License v3.0
198 stars 524 forks source link

[17.0][FIX] account_payment_purchase: copy the fields to supplier invoices. #1326

Closed Tisho99 closed 2 months ago

Tisho99 commented 2 months ago

The account_payment_purchase says that the new fields (Bank Account and Payment Mode) are copied from partner to purchase order, but they are not.

This PR fixes it, but respecting the constrains of the compute of account_payment_partner, the payment mode has to require a bank account to copy the bank account. (Related with #1303)

I have added this constraint to the compute of the bank_account_id of the purchase, but it can be manually edited.

I have also adapted the _onchange_purchase_auto_complete to use the new function.

T-6102

Tisho99 commented 2 months ago

@HaraldPanten @manuelregidor

Tisho99 commented 2 months ago

Hi @victoralmau

This PR overrides a function you created last month (#1303), but it respects the account_payment_partner compute and your test. Maybe you are interested

A review would also be appreciated

Thank you!

HaraldPanten commented 2 months ago

@Tisho99 You commented that this PR is fixing a functionallity of the module. Souldn't it be a FIX, instead of an IMP, then?

HaraldPanten commented 2 months ago

@Tisho99 What about the commit message?

Tisho99 commented 2 months ago

@Tisho99 What about the commit message?

Updated

Tisho99 commented 2 months ago

Hi @pedrobaeza

I applied your requested changes

Thank you for the review!

OCA-git-bot commented 2 months ago

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

OCA-git-bot commented 2 months ago

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