mirror of
https://github.com/bringout/oca-ocb-accounting.git
synced 2026-04-24 07:02:07 +02:00
Initial commit: Accounting packages
This commit is contained in:
commit
4ef34c2317
2661 changed files with 1709616 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class PaymentLinkWizard(models.TransientModel):
|
||||
_inherit = 'payment.link.wizard'
|
||||
|
||||
def _get_additional_link_values(self):
|
||||
""" Override of `payment` to add `invoice_id` to the payment link values.
|
||||
|
||||
The other values related to the invoice are directly read from the invoice.
|
||||
|
||||
Note: self.ensure_one()
|
||||
|
||||
:return: The additional payment link values.
|
||||
:rtype: dict
|
||||
"""
|
||||
res = super()._get_additional_link_values()
|
||||
if self.res_model != 'account.move':
|
||||
return res
|
||||
|
||||
# Invoice-related fields are retrieved in the controller.
|
||||
return {
|
||||
'invoice_id': self.res_id,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue