-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
[14.0][ADD] hr_timesheet_predefined_description: Add predefined descriptions for timesheets #709
[14.0][ADD] hr_timesheet_predefined_description: Add predefined descriptions for timesheets #709
Conversation
hr_timesheet_predefined_description/tests/test_account_analytic_line.py
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/tests/test_account_analytic_line.py
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/tests/test_account_analytic_line.py
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/tests/test_hr_timesheet_predefined_description.py
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/views/hr_timesheet_views.xml
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/models/hr_timesheet_predefined_description.py
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/models/hr_timesheet_predefined_description.py
Outdated
Show resolved
Hide resolved
a38e0e2
to
c8e3658
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.
Can you add as demo data several predefined descriptions?
hr_timesheet_predefined_description/security/ir.model.access.csv
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/views/hr_timesheet_views.xml
Outdated
Show resolved
Hide resolved
441ac85
to
a2788ca
Compare
hr_timesheet_predefined_description/models/account_analytic_line.py
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/models/account_analytic_line.py
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/data/hr_timesheet_predefined_description_data.xml
Outdated
Show resolved
Hide resolved
hr_timesheet_predefined_description/tests/test_hr_timesheet_predefined_description.py
Outdated
Show resolved
Hide resolved
<field name="model">timesheet.predefined.description</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Predefined Descriptions" editable="bottom"> | ||
<field name="name" /> |
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.
Missing company_id
field, and also missing record rules for multi-company.
<field name="model">account.analytic.line</field> | ||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" /> | ||
<field name="arch" type="xml"> | ||
<field name="name" position="attributes"> |
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.
Don't hide the name field. Make it readonly (with force_save="1"
) if the predefined description is set.
<field name="name" position="attributes"> | ||
<attribute name="invisible">1</attribute> | ||
</field> | ||
<field name="name" position="after"> |
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.
<field name="name" position="after"> | |
<field name="name" position="before"> |
</field> | ||
</field> | ||
</record> | ||
<record id="view_project_task_form_inherit" model="ir.ui.view"> |
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.
The same as above for this view.
b1b14d1
to
5d028ed
Compare
I have implemented all the requested changes and adjusted the tests so that they pass without any errors. If you notice any further modifications are needed, feel free to let me know. |
d470048
to
353795a
Compare
…s for timesheets TT50619 Co-Authored-By: Pedro M. Baeza <[email protected]>
353795a
to
3715956
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.
Code and functional review OK
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at bf2fa48. Thanks a lot for contributing to OCA. ❤️ |
@Tecnativa TT50619