如何获得客户发票行数?

时间:2019-01-14 09:32:01

标签: odoo odoo-10

我需要一种使所有客户发票行都处于打开状态的方法

enter image description here

2 个答案:

答案 0 :(得分:0)

如果您需要在仪表板中使用此值,则在仪表板模型中添加计算字段,并在那里计算所有未清发票,并将其添加到仪表板中

答案 1 :(得分:0)

#You first need to get the open invoices
open_invoices = self.env['account.invoice'].search([('state','=','open')]) 
#then get invoice lines
invoice_lines = open_invoices.mapped('line_ids')
相关问题