在Many2one字段中,我想查看发票名称和发票ammount_total如何添加?
customer_invoice = fields.Many2one('account.invoice', 'Customer Inv', select=True)现在在打开customer_invoice字段后,我查看了例如。INV/2017/0001,INV/2017/0002我要INV/2017/0001 100欧元,INV/2017/0002 200欧元
有可能吗?
发布于 2017-10-10 16:45:09
此方法可更改默认名称,只需将其添加到发票类中
@api.multi
def name_get(self):
result = []
for record in self:
name = record.name
if record.ammount_total :
name = record.name + ' ' + str(record.ammount_total)
result.append((record.id, name))
return resulthttps://stackoverflow.com/questions/46662114
复制相似问题