-
-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][MIG] hr_timesheet_task_required #640
[17.0][MIG] hr_timesheet_task_required #640
Conversation
6419179
to
162c93c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM: code review
162c93c
to
9e9c436
Compare
Currently translated at 100.0% (9 of 9 strings) Translation: timesheet-14.0/timesheet-14.0-hr_timesheet_task_required Translate-URL: https://translation.odoo-community.org/projects/timesheet-14-0/timesheet-14-0-hr_timesheet_task_required/nl_NL/
Currently translated at 66.6% (6 of 9 strings) Translation: timesheet-14.0/timesheet-14.0-hr_timesheet_task_required Translate-URL: https://translation.odoo-community.org/projects/timesheet-14-0/timesheet-14-0-hr_timesheet_task_required/fr/
Currently translated at 100.0% (12 of 12 strings) Translation: timesheet-15.0/timesheet-15.0-hr_timesheet_task_required Translate-URL: https://translation.odoo-community.org/projects/timesheet-15-0/timesheet-15-0-hr_timesheet_task_required/fr/
Currently translated at 100.0% (10 of 10 strings) Translation: timesheet-16.0/timesheet-16.0-hr_timesheet_task_required Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_task_required/it/
Currently translated at 100.0% (10 of 10 strings) Translation: timesheet-16.0/timesheet-16.0-hr_timesheet_task_required Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_task_required/es/
9e9c436
to
50a9c80
Compare
86278a3
to
23c81c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and working, but some code improvements possible.
@@ -10,27 +10,15 @@ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | |||
<field name="inherit_id" ref="hr_timesheet.res_config_settings_view_form" /> | |||
<field name="arch" type="xml"> | |||
<xpath | |||
expr="//div[@data-key='project']//field[@name='module_hr_timesheet']/../../.." | |||
expr="//app[@data-string='Project']//block[@name='project_time']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expr="//block[@name='project_time']"
should be sufficient.
<div | ||
class="col-lg-6 o_setting_box" | ||
id="timesheet_task_settings" | ||
attrs="{'invisible': [('allow_timesheets', '=', False)]}" | ||
invisible="allow_timesheets == False" | ||
> | ||
<div class="o_setting_left_pane"> | ||
<field name="is_timesheet_task_required" class="oe_inline" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the hole div block should be replaced by this:
<setting id="timesheet_task_settings" help="Set tasks on timesheet as a mandatory field" invisible="allow_timesheets == False">
<field name="is_timesheet_task_required"/>
</setting>
<attribute | ||
name="attrs" | ||
>{'required':[('is_task_required','=',True)]}</attribute> | ||
<attribute name="required">is_task_required == True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<attribute name="required">is_task_required</attribute>
should be enough.
<attribute | ||
name="attrs" | ||
>{'required':[('is_task_required','=',True)]}</attribute> | ||
<attribute name="required">is_task_required == True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. remove "== True"
@@ -14,9 +14,8 @@ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | |||
<field name="is_task_required" invisible="1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invisible needs to be changed to
column_invisible="True"
23c81c7
to
28dcd4f
Compare
/ocabot migration hr_timesheet_task_required |
This PR has the |
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 191eb44. Thanks a lot for contributing to OCA. ❤️ |
No description provided.