mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-26 15:12:00 +02:00
15 lines
571 B
Python
15 lines
571 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import models
|
|
|
|
|
|
class AccountPaymentRegister(models.TransientModel):
|
|
_inherit = 'account.payment.register'
|
|
|
|
def _create_payment_vals_from_wizard(self, batch_result):
|
|
vals = super()._create_payment_vals_from_wizard(batch_result)
|
|
# Make sure the account move linked to generated payment
|
|
# belongs to the expected sales team
|
|
# team_id field on account.payment comes from the `_inherits` on account.move model
|
|
vals.update({'team_id': self.line_ids.move_id[0].team_id.id})
|
|
return vals
|