Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 透视图(odoo12)上未显示员工_Python_Odoo - Fatal编程技术网

Python 透视图(odoo12)上未显示员工

Python 透视图(odoo12)上未显示员工,python,odoo,Python,Odoo,我无法在透视视图中显示员工id值。我没有定义。 employee\u id=fields.manyOne('hr.employee','Employees')) hr.mymodel.pivot hr.mymodel 非常感谢。您需要确保表hr.mymodel上的employee_id字段中有值。如果没有值,则odoo将始终显示未定义 employee_id = fields.Many2one('hr.employee', "Employees") <record id="vi

我无法在透视视图中显示员工id值。我没有定义。

employee\u id=fields.manyOne('hr.employee','Employees'))
hr.mymodel.pivot
hr.mymodel

非常感谢。

您需要确保表hr.mymodel上的employee_id字段中有值。如果没有值,则odoo将始终显示未定义

employee_id = fields.Many2one('hr.employee', "Employees")


  <record id="view_hr_employee_pivot" model="ir.ui.view">
        <field name="name">hr.mymodel.pivot</field>
        <field name="model">hr.mymodel</field>
        <field name="arch" type="xml">
            <pivot string="Employee " display_quantity="true">
                  <field name="employee_id" type="row"/>
            </pivot>
        </field>
    </record>