跳至內容
選單
此問題已被標幟
1 回覆
572 瀏覽次數

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 ....



頭像
捨棄
最佳答案

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

頭像
捨棄