Skip to content

[16.0][FIX] volunteer_attendance: various fixes#580

Open
Genepi314 wants to merge 6 commits into16.0from
16.0-fix-volunteer_attendance
Open

[16.0][FIX] volunteer_attendance: various fixes#580
Genepi314 wants to merge 6 commits into16.0from
16.0-fix-volunteer_attendance

Conversation

@Genepi314
Copy link

@Genepi314 Genepi314 commented Mar 4, 2026

…ity file with record rule for company access on volunteer shift attendance status.

Description

Odoo task (if applicable)

Checklist before approval

  • Tests are present (or not needed).
  • Credits/copyright have been changed correctly.
  • Change log snippet is present.
  • (If a new module) Moving this to OCA has been considered.

…ity file with record rule for company access on volunteer shift attendance status.
@remytms remytms changed the title Fix write override method in volunteer shift participation, add secur… [16.0][FIX] volunteer_attendance: various fixes Mar 4, 2026
Copy link
Collaborator

@remytms remytms left a comment

Choose a reason for hiding this comment

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

One small change. Then it is ok.

string="Company",
default=lambda self: self.env.user.company_id,
required=True,
# required=True,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Either leave required or remove but do not comment. I think here it should be removed as a False value for Company is ok.

Copy link
Author

Choose a reason for hiding this comment

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

Ah sorry, didn't remove comments yet. I'll trim it now :-)

Copy link
Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator

@remytms remytms left a comment

Choose a reason for hiding this comment

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

Still one change. Sorry I should have seen it the first time.

Comment on lines +40 to +42
if "attendance_status_id" in vals:
vals["attendance_date"] = fields.Datetime.now()
return super().write(vals)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ho, this one, I didn’t catch it the first time.

write should always return and call the parent function. So write this:

Suggested change
if "attendance_status_id" in vals:
vals["attendance_date"] = fields.Datetime.now()
return super().write(vals)
if "attendance_status_id" in vals:
vals["attendance_date"] = fields.Datetime.now()
return super().write(vals)

Copy link
Author

Choose a reason for hiding this comment

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

Oh, missed it myself. Thanks, done !

@Genepi314 Genepi314 marked this pull request as ready for review March 10, 2026 08:03
@Genepi314
Copy link
Author

Just fixed README so that Remy is now visible as maintainer.

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.

3 participants