Skip to content

Commit

Permalink
[FIX] account_payment_group_document: receiptbook on account payment …
Browse files Browse the repository at this point in the history
…group

Ticket: 63024
When the company is changed on account payment group it is necessary to change receiptbook_id if it is needed.

closes #375

Signed-off-by: Katherine Zaoral <kz@adhoc.com.ar>
  • Loading branch information
pablohmontenegro committed Jun 27, 2023
1 parent 4979b0b commit 4ed0c8c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -120,7 +120,7 @@ def _get_receiptbook(self):
# Si no hay talonario por defecto, o si el talonario no coincide con el
# del tipo de grupo de pago (cobro/pago) obtenemos nuestro el primer
# elemento via un search
if not receiptbook or (receiptbook.partner_type != partner_type):
if not receiptbook or (receiptbook.partner_type != partner_type) or (receiptbook.company_id != self.company_id):
receiptbook = self.env[
'account.payment.receiptbook'].search([
('partner_type', '=', partner_type),
Expand Down

0 comments on commit 4ed0c8c

Please sign in to comment.