summaryrefslogtreecommitdiff
path: root/addons/resource/views
diff options
context:
space:
mode:
authorJorge Pinna Puissant <jpp@odoo.com>2020-04-29 12:59:40 +0000
committerJorge Pinna Puissant <jpp@odoo.com>2020-04-30 13:53:17 +0000
commited5ab19065767156802fb2a148636ae0c6bbd017 (patch)
tree6939818c766a991a0f731c851fda9711156da367 /addons/resource/views
parent3e81b810aaaaa29c10c57e092fb037b92f5f6e75 (diff)
[FIX] resource: week_type for new periods
In a calendar with 2 weeks mode (odd and even), before this commit, all new created periods (placed in one of the two sections) don't have the week_type field set. This generates a confusion, because a period that should be applied only in odd weeks, for instance, it was applied also in the even weeks. Now, the new periods will have the week_type field set with the week_type of the section where is it. Also, an error message is raised if a period is not in one of the two sections. opw-2239966 closes odoo/odoo#50478 X-original-commit: 33a62118818952872321591e85403b657380128a Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Diffstat (limited to 'addons/resource/views')
-rw-r--r--addons/resource/views/resource_views.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/resource/views/resource_views.xml b/addons/resource/views/resource_views.xml
index b3c24fb2058..e407f579d10 100644
--- a/addons/resource/views/resource_views.xml
+++ b/addons/resource/views/resource_views.xml
@@ -204,6 +204,7 @@
<field name="hour_to" widget="float_time"/>
<field name="date_from"/>
<field name="date_to"/>
+ <field name="week_type" readonly="1" force_save="1" groups="base.group_no_one"/>
</tree>
</field>
</record>