Skip to content

[IMP] hr_timesheet_time_control_begin_end: show begin/end in portal#905

Open
NICO-SOLUTIONS wants to merge 1 commit into
OCA:19.0from
NICO-SOLUTIONS:19.0-imp-hr_timesheet_time_control_begin_end
Open

[IMP] hr_timesheet_time_control_begin_end: show begin/end in portal#905
NICO-SOLUTIONS wants to merge 1 commit into
OCA:19.0from
NICO-SOLUTIONS:19.0-imp-hr_timesheet_time_control_begin_end

Conversation

@NICO-SOLUTIONS

Copy link
Copy Markdown
Member
  • add begin/end hour fields to portal table
  • adjusted groupby colspan

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @CRogos,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:19.0 mod:hr_timesheet_time_control_begin_end Module hr_timesheet_time_control_begin_end labels Apr 27, 2026
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 19.0-imp-hr_timesheet_time_control_begin_end branch from 0b82d88 to 003b3fd Compare April 27, 2026 17:17

@CRogos CRogos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When grouping is enabled, something is missing.

Image

I think the fixed index in the xpath is the problem... but I don't have a better idear.. maybe last()-1 ?

Image

@NICO-SOLUTIONS

Copy link
Copy Markdown
Member Author

When grouping is enabled, something is missing.

<img alt="Image" width="1356" height="200" src="....

<img alt="Image" width="1392" height="339" src="https://...>

@CRogos
Ouch… I hadn’t installed sale_timesheet.
We can hook into the t elements with class="text-end", but I still need to figure out how to properly handle the colspan. I’ll take another look.

@NICO-SOLUTIONS

Copy link
Copy Markdown
Member Author

@CRogos
I looked into it further — without a dependency on sale_timesheet, this cannot be handled cleanly.

The so_line / order_id / invoice_id grouping logic only exists when sale_timesheet is installed, so any XPath or colspan adjustments become unreliable or may break depending on whether the module is present.

We probably need to decide between:

  • adding a direct dependency on sale_timesheet in this module, or
  • creating a separate extension module (e.g. sale_portal_timesheet_time_control_begin_end or similar) that handles all sale-related UI adjustments.

Otherwise, we end up with fragile view inheritance depending on optional template blocks.

What do you think?

@NICO-SOLUTIONS NICO-SOLUTIONS marked this pull request as draft May 2, 2026 07:58
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 19.0-imp-hr_timesheet_time_control_begin_end branch from 003b3fd to 9b49501 Compare May 3, 2026 12:23
@NICO-SOLUTIONS NICO-SOLUTIONS marked this pull request as ready for review May 3, 2026 12:27
@NICO-SOLUTIONS NICO-SOLUTIONS requested a review from CRogos May 3, 2026 12:27
@NICO-SOLUTIONS

Copy link
Copy Markdown
Member Author
  • adding a direct dependency on sale_timesheet in this module, or

added a direct dependency on sale_timesheet

@CRogos

CRogos commented May 4, 2026

Copy link
Copy Markdown
Contributor
  • creating a separate extension module (e.g. sale_portal_timesheet_time_control_begin_end or similar) that handles all sale-related UI adjustments.

I think we should go this way.

@NICO-SOLUTIONS

Copy link
Copy Markdown
Member Author

@CRogos
Is there a reason to create this as a separate addon instead of adding a dependency on sale_timesheet?
From my perspective, the begin/end feature seems primarily relevant in a sales context where timesheets are sold via sales orders.

@CRogos

CRogos commented May 4, 2026

Copy link
Copy Markdown
Contributor

sale_timesheet also install all the sales dependencies. I think this module could also be used in a project/task only scenario.

I think best would be to add the fields here and only do the fixes needed with sales, into a separate module.

@NICO-SOLUTIONS

Copy link
Copy Markdown
Member Author

@CRogos
ok. i will separate it and create another module

@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 19.0-imp-hr_timesheet_time_control_begin_end branch from 9b49501 to e1450ed Compare May 4, 2026 09:41
@OCA-git-bot OCA-git-bot added the mod:hr_timesheet_begin_end Module hr_timesheet_begin_end label May 4, 2026
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 19.0-imp-hr_timesheet_time_control_begin_end branch from e1450ed to 362fe1a Compare May 4, 2026 09:42
Comment thread hr_timesheet_begin_end/static/description/index.html
- add begin/end hour fields to portal table
- adjusted groupby colspan logic
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 19.0-imp-hr_timesheet_time_control_begin_end branch from 362fe1a to ed3977c Compare May 4, 2026 16:54
@OCA-git-bot OCA-git-bot removed the mod:hr_timesheet_begin_end Module hr_timesheet_begin_end label May 4, 2026

@CRogos CRogos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM Code + Tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:hr_timesheet_time_control_begin_end Module hr_timesheet_time_control_begin_end series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants