Position fields

This commit is contained in:
michel 2017-11-24 18:49:25 +01:00
parent 949ecb41ee
commit 3f7865bba3
3 changed files with 16 additions and 9 deletions

View File

@ -3,16 +3,23 @@
<odoo>
<!-- Form -->
<record id="view_form_res_partner" model="ir.ui.view">
<field name="name">Res_partner Form</field>
<field name="name">>res.partner.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref ="base.view_partner_form" />
<field name="arch" type="xml">
<group>
<field name="contact_date" />
<field name="coworker_type" />
<field name="url" />
</group>
<field name="parent_id" position="after">
<field name="coworker_type" />
<field name="contact_date" />
</field>
<field name="email" position="after">
<field name="url" />
</field>
</field>
</record>
</odoo>

View File

@ -15,7 +15,7 @@ class Event(models.Model):
title = fields.Char(required=True)
manager_id = fields.Many2one('coworking.coworker', 'Manager', index=True, required=True,
manager_id = fields.Many2one('coworking.res_partner', 'Manager', index=True, required=True,
domain="[('coworker_type', 'in', ['staffer', 'member'])]")
date_start = fields.Datetime(default=fields.Date.context_today, required=True)
starts_this_week = fields.Integer(compute='_compute_starts_this_week',

View File

@ -14,7 +14,7 @@ class CoworkingEventWeekly(models.TransientModel):
_description = 'Weekly massive event creation'
title = fields.Char(required=True)
manager_id = fields.Many2one('coworking.coworker', string='Manager',
manager_id = fields.Many2one('coworking.res_partner', string='Manager',
required=True)
date_start_recurence = fields.Datetime('Date start', required=True)
date_stop_recurence = fields.Datetime('Date stop', required=True)