add event fields
This commit is contained in:
parent
b828bbb370
commit
9e85779e9f
|
|
@ -24,6 +24,39 @@ class Event(models.Model):
|
||||||
state_id = fields.Many2one("res.country.state", string='State', ondelete='restrict',
|
state_id = fields.Many2one("res.country.state", string='State', ondelete='restrict',
|
||||||
domain="[('country_id', '=?', country_id)]", related="address_id.state_id", readonly=True)
|
domain="[('country_id', '=?', country_id)]", related="address_id.state_id", readonly=True)
|
||||||
country_id = fields.Many2one('res.country', string='Country', ondelete='restrict', related="address_id.country_id", readonly=True)
|
country_id = fields.Many2one('res.country', string='Country', ondelete='restrict', related="address_id.country_id", readonly=True)
|
||||||
|
job_title = fields.Many2one(
|
||||||
|
string='المنصب الوظيفي',
|
||||||
|
related='user_id.employee_id.job_id',
|
||||||
|
store=True,
|
||||||
|
readonly=True
|
||||||
|
)
|
||||||
|
|
||||||
|
department_id = fields.Many2one(
|
||||||
|
'hr.department',
|
||||||
|
string='الإدارة',
|
||||||
|
related='user_id.employee_id.department_id',
|
||||||
|
store=True,
|
||||||
|
readonly=True
|
||||||
|
)
|
||||||
|
|
||||||
|
branch_name = fields.Many2one(
|
||||||
|
string='الفرع التابع للإدارة',
|
||||||
|
related='user_id.employee_id.department_id.branch_name',
|
||||||
|
store=True,
|
||||||
|
readonly=True
|
||||||
|
)
|
||||||
|
|
||||||
|
departments_id = fields.Many2one(
|
||||||
|
'hr.department',string='الإدارة التابع لها الفعالية'
|
||||||
|
|
||||||
|
)
|
||||||
|
branchs_name = fields.Many2one(
|
||||||
|
string='الفرع التابع للإدارة',
|
||||||
|
related='departments_id.branch_name',
|
||||||
|
store=True,
|
||||||
|
readonly=True
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@api.depends('date_begin', 'date_end')
|
@api.depends('date_begin', 'date_end')
|
||||||
def _compute_remaining_time(self):
|
def _compute_remaining_time(self):
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,21 @@
|
||||||
<field name="remaining_days"/>
|
<field name="remaining_days"/>
|
||||||
<field name="remaining_hours"/>
|
<field name="remaining_hours"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<xpath expr="//field[@name='tag_ids']" position="after">
|
<xpath expr="//field[@name='tag_ids']" position="after">
|
||||||
<field name="Description_event"/>
|
<field name="Description_event"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='user_id']" position="after">
|
||||||
|
<field name="job_title"/>
|
||||||
|
<field name="department_id"/>
|
||||||
|
<field name="branch_name"/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='event_type_id']" position="before">
|
||||||
|
<field name="departments_id"/>
|
||||||
|
<field name="branchs_name"/>
|
||||||
|
|
||||||
|
</xpath>
|
||||||
|
|
||||||
<xpath expr="//field[@name='address_id']" position="attributes">
|
<xpath expr="//field[@name='address_id']" position="attributes">
|
||||||
<attribute name="context">{'show_address': 1, 'default_is_event_address': True,'default_is_company':
|
<attribute name="context">{'show_address': 1, 'default_is_event_address': True,'default_is_company':
|
||||||
True}
|
True}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue