Skip to content

[16.0][IMP] hr_timesheet_time_type: add the active field to be able t… #751

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

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

lbarry-apsl
Copy link
Member

Add the active field to be able to archive records

cc https://helpdesk.apsl.net/ HT01785

@miquelalzanillas @peluko00 @mpascuall @ppyczko @javierobcn @BernatObrador please review

Copy link

@mpascuall mpascuall left a comment

Choose a reason for hiding this comment

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

LGTM, tested in runboat

@@ -11,3 +11,4 @@ class ProjectTimeType(models.Model):
name = fields.Char(required=True)
code = fields.Char()
description = fields.Text()
active = fields.Boolean(default=True)

Choose a reason for hiding this comment

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

Please put it in views to change value

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @peluko00 ,

The idea is to modify this field in the record action:

Action > Archive or Action > Unarchive

Copy link

@ppyczko ppyczko left a comment

Choose a reason for hiding this comment

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

Since we have enabled archiving, I think it would be useful to add an "Archived" filter:

<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>

@lbarry-apsl lbarry-apsl requested a review from peluko00 March 13, 2025 14:33
Copy link

@peluko00 peluko00 left a comment

Choose a reason for hiding this comment

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

LGTM!

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@lbarry-apsl lbarry-apsl force-pushed the 16.0-imp-hr_timesheet_time_type branch from 3b93c7e to fdb43ce Compare March 19, 2025 11:03
@lbarry-apsl
Copy link
Member Author

Since we have enabled archiving, I think it would be useful to add an "Archived" filter:

<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>

Done! Thanks @ppyczko !

Copy link

@ppyczko ppyczko left a comment

Choose a reason for hiding this comment

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

LGTM!

@lbarry-apsl
Copy link
Member Author

@Chandresh-SerpentCS , could you check this improvement for me?

@lbarry-apsl
Copy link
Member Author

Hi @pedrobaeza , can this improvement be merged?

domain="[('active','=',False)]"
/>
<separator />
<field name="name" filter_domain="[('name', 'ilike', self)]" />
Copy link
Member

Choose a reason for hiding this comment

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

These 2 lines are unrelated and shouldn't be here.

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.

6 participants