Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3833 Ansichten

Hello, I my problem is that the payroll journal bookings have only the reference but not the employee_id there in the column.

How can I add the employee_id to see from who is this booking. It's strange, because the reference it comes from the payroll Account.  

 This is my example, but it's not working:

from openerp.osv import fields, osv
 class account_move_line(osv.osv): 
_inherits = 'account.move.line' _columns = {
'employee_id': fields.related('payslip','employee_id',type="char",relation="hr.payslip",string="employee_id",store=True,readonly=True),
}

<?xml version="1.0" encoding="utf-8"?>

<openerp>
<data>
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account.move.line.form</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='ref']" position="after">
<field name="employee_id"/>
</xpath>
</field>
</record>
</data>
</openerp>

How to reference a field from a other object? I don't get it...

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Juli 16
3374
0
Okt. 15
3215
2
Nov. 21
5666
0
Nov. 17
2942
1
Juli 17
3335