Siirry sisältöön
Menu
Tämä kysymys on merkitty
1 Vastaa
565 Näkymät

Hi All and thank you for reading this. (newbie)


Apoligies if I've posted in the wrong section :(


Free Plan -> latest version

Dashboard --> Bank --> Transactions --> click on a bank transaction which has been split / allocated to different partners.


Is it possible to add a database field to say "HasSupportingDocs" boolean or char(1) for example.


If so ,could you please help with where !!


Thank you in advance for any help - its much appreciated !! :)


Kind Regards,


Jon ....



Avatar
Hylkää
Paras vastaus

Hi,

To add a custom field like HasSupportingDocs to the bank transaction model, you can use the following:


from odoo import models, fields


class AccountBankStatementLine(models.Model):

    _inherit = 'account.bank.statement.line'


    has_supporting_docs = fields.Boolean(string='Has Supporting Docs', default=False)


Hope it helps

Avatar
Hylkää