Oddo Button返回供应商账单而非客户发票

问题描述 投票:0回答:1

当我点击一个按钮时,我必须转到客户发票树和表单视图。现在它将转到供应商发票。我在按钮点击时尝试这样。

return {
               'name': "Invoice",
               'type': 'ir.actions.act_window',
               'view_mode': 'tree,form',
                'xml_id': 'account.action_invoice_tree1',
                'tree_view_id': self.env.ref('account.invoice_tree').id,               
                'form_view_id': self.env.ref('account.invoice_form').id,               
               'target': 'current',
               'res_model':'account.invoice',
               'domain': [('id','in',[invoice_obj.id])],
           }
odoo odoo-10
1个回答
1
投票
'views': [(self.env.ref('account.invoice_tree').id, 'tree'),
          (self.env.ref('account.invoice_form').id, 'form')],
© www.soinside.com 2019 - 2024. All rights reserved.