Skip to content
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

Merged

Conversation

juanjosesegui-tecnativa
Copy link
Contributor

@Tecnativa TT50619

@pedrobaeza pedrobaeza added this to the 14.0 milestone Sep 4, 2024
@juanjosesegui-tecnativa juanjosesegui-tecnativa force-pushed the 14.0-add-hr_timesheet_predefined_description branch 3 times, most recently from a38e0e2 to c8e3658 Compare September 5, 2024 09:12
Copy link
Member

@victoralmau victoralmau left a 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?

@juanjosesegui-tecnativa juanjosesegui-tecnativa force-pushed the 14.0-add-hr_timesheet_predefined_description branch 2 times, most recently from 441ac85 to a2788ca Compare September 6, 2024 06:58
hr_timesheet_predefined_description/readme/CONFIGURE.rst Outdated Show resolved Hide resolved
hr_timesheet_predefined_description/readme/USAGE.rst 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" />
Copy link
Member

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">
Copy link
Member

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">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="name" position="after">
<field name="name" position="before">

</field>
</field>
</record>
<record id="view_project_task_form_inherit" model="ir.ui.view">
Copy link
Member

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.

@juanjosesegui-tecnativa juanjosesegui-tecnativa force-pushed the 14.0-add-hr_timesheet_predefined_description branch 2 times, most recently from b1b14d1 to 5d028ed Compare September 17, 2024 14:02
@juanjosesegui-tecnativa
Copy link
Contributor Author

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.

@pedrobaeza pedrobaeza force-pushed the 14.0-add-hr_timesheet_predefined_description branch 3 times, most recently from d470048 to 353795a Compare September 18, 2024 09:58
…s for timesheets

TT50619

Co-Authored-By: Pedro M. Baeza <[email protected]>
@pedrobaeza pedrobaeza force-pushed the 14.0-add-hr_timesheet_predefined_description branch from 353795a to 3715956 Compare September 18, 2024 10:29
Copy link
Member

@victoralmau victoralmau left a 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

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-709-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 5b4efd1 into OCA:14.0 Sep 18, 2024
5 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at bf2fa48. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 14.0-add-hr_timesheet_predefined_description branch September 18, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants