Files
odoo_source/addons/resource/data/resource_data.xml
T
Thibault Delavallée 2b90398cb6 [REF] resource: strengthen link between companies and calendars
Purpose of this commit is to always have a default calendar for each
company and ensure it is correctly set on resources.

Some cleaning is also performed in resource models to remove unused
fields, improve labels and make views a bit more odoo-ish.

 * [REF] res_company: add a m2o to the default calendar to use in the
   company as well as a o2m linking all resource calendars used in the
   company. Some code has been added to correctly update existing
   companies when installing the module;
 * [REF] resource_calendar
  * [REM] manager field on resource.calendar: this field is never used
    and is not necessary anyway
  * [ADD] global_leave_ids: filter leaves on a calendar to see global
    company leaves
  * [IMP] better default company / calendar computation to ensure there
    is always a calendar attached to a resource
  * [IMP] improve resource and calendar views in order to look more like
    other odoo views
2017-01-18 10:26:53 +01:00

17 lines
536 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="resource_calendar_std" model="resource.calendar">
<field name="name">Standard 40 Hours/Week</field>
<field name="company_id" ref="base.main_company"/>
</record>
<record id="base.main_company" model="res.company">
<field name="resource_calendar_id" ref="resource_calendar_std"/>
</record>
<function id="_init_data_resource_calendar"
model="res.company"
name="_init_data_resource_calendar"
eval="[]"/>
</odoo>