mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 11:32:04 +02:00
Initial commit: Sale packages
This commit is contained in:
commit
14e3d26998
6469 changed files with 2479670 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
# -*- 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue