Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1203 Представления

Hello, I have come asking for help, since the truth is I can't think of anything.

I have only this:

# -*- coding: utf-8 -*-

from odoo import models, fields

class AccountPayment(models.TransientModel):
_inherit = 'account.payment.register'

attachment_ids = fields.Many2many(
comodel_name='ir.attachment',
relation='account_payment_attachment_rel',
column1='payment_id',
column2='attachment_id',
string='Attachments'
)


and this:






account.payment.register.form.inherit
account.payment.register











If I go to accounting > Invoices > enter a published invoice and record a payment, I have a field called "attachment_ids" where I can add multiple files, this is where my question comes from.

If I add files to the field and create the payment, is there a way for those attachments that I add when registering the payment to be automatically added to the attachments but to the accounting entry of the payment that is created automatically?

Thank you very much for your help, odoo 15

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
мар. 15
3880
1
мар. 15
5774
0
мар. 15
3575
0
янв. 24
1572
1
янв. 25
2896