Hello to all, I have the following problem showing a one2many field on a form view at odoo8. I want to show the fields "days", "morning" and "afternoon" at the form, but only the field "created by" it's shown. What I'm doing wrong? Thanks in advice.
The code of my model:
from openerp.osv import fields, osv
class res_partner_schedule(osv.osv):
_name = "res.partner.schedule"
_columns = {
'company_id': fields.many2one('res.company', 'Company',
ondelete='cascade'),
'days': fields.char('Days'),
'morning': fields.char('Mornings'),
'afternoon': fields.char('Afternoon'),
}
class res_company(osv.osv):
_inherit = "res.company"
_columns = {
'schedule': fields.one2many('res.partner.schedule', 'company_id', 'Business Hours', help='Schedule of this company'),
}
The code of my view:
<openerp>
<data>
<record id="res_company_schedule_form" model="ir.ui.view">
<field name="name">res.company.schedule.form</field>
<field name="model">res.company</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<group string="Bank Accounts" position="before">
<group string="Schedule">
<field name="schedule"/>
</group>
</group>
</field>
</record>
</data>
</openerp>