Skip to content

Commit

Permalink
[FIX] Fix bug TID set as False
Browse files Browse the repository at this point in the history
Fix bug of setting Timesheet Invoice Description field as false by default or in views
  • Loading branch information
mario committed Apr 30, 2024
1 parent 72802f8 commit 10afadc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions sale_timesheet_invoice_description/models/res_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ResConfigSettings(models.TransientModel):
selection="_get_timesheet_invoice_description",
string="Timesheet Invoice Description",
default_model="sale.order",
default="000",
)

@api.model
Expand Down
2 changes: 2 additions & 0 deletions sale_timesheet_invoice_description/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def _get_timesheet_invoice_description(self):

def _get_timesheet_details(self, timesheet, desc_rule):
details = []
if not desc_rule:
return details
if desc_rule[0] == "1":
details.append(fields.Date.to_string(timesheet.date))
if desc_rule[1] == "1":
Expand Down

0 comments on commit 10afadc

Please sign in to comment.