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

[ADD] hr_timesheet_stop_button: In Timesheets new fields: Start Date,… #120

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

Conversation

alfredoavanzosc
Copy link
Contributor

… and End Date. Also new button "Put end date".

@alfredoavanzosc
Copy link
Contributor Author

@avanzosc/developers .... review please

@oihane oihane added this to the 12.0 milestone Dec 21, 2021
Comment on lines 11 to 10
start_date = fields.Datetime(
string='Start date', default=fields.datetime.now())
Copy link
Contributor

Choose a reason for hiding this comment

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

Modificar este campo debería de modificar el campo de fecha de imputacion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Realizado lo solicitado por @oihane , eskerrik asko.

oihane
oihane previously requested changes Dec 21, 2021
Comment on lines 13 to 12
end_date = fields.Datetime(
string='End date')
Copy link
Contributor

Choose a reason for hiding this comment

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

Modificar este campo, debería de hacer el recálculo del importe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tenido en cuenta lo solicitado por @oihane , eskerrik asko.

@alfredoavanzosc alfredoavanzosc force-pushed the hr-addons12-hr_timesheet_stop_button branch from 1773384 to c75f6ac Compare December 21, 2021 14:44
@alfredoavanzosc alfredoavanzosc dismissed oihane’s stale review December 21, 2021 14:44

Realizado lo solicitado. Eskerrik asko.

@alfredoavanzosc alfredoavanzosc force-pushed the hr-addons12-hr_timesheet_stop_button branch 2 times, most recently from 8b38147 to b931fe9 Compare December 23, 2021 10:26
@alfredoavanzosc alfredoavanzosc force-pushed the hr-addons12-hr_timesheet_stop_button branch from b931fe9 to 65b5e69 Compare January 24, 2022 09:37
class AccountAnalyticLine(models.Model):
_inherit = 'account.analytic.line'

start_date = fields.Datetime(

Choose a reason for hiding this comment

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

Haremos compatible este módulo con hr_timesheet_usability de OCA

  1. Eliminar los campos start date y end date
  2. Al crear la línea meter en el campo "hora inicio" del módulo de OCa, la de la creación de la línea

string='End date')

@api.onchange('start_date', 'end_date')
def _onchange_start_end_date(self):

Choose a reason for hiding this comment

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

No hace falta porque ya el de OCA hace el onchange

self.unit_amount = self._compute_new_duration(
self.end_date, self.start_date)

def action_end_button(self):

Choose a reason for hiding this comment

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

Usar el de OCA

… and End Date. Also new button "Put end date".
@alfredoavanzosc alfredoavanzosc force-pushed the hr-addons12-hr_timesheet_stop_button branch from 65b5e69 to 6e11f95 Compare January 24, 2022 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants