Add bool flag to set "not billable"

This commit is contained in:
Renzo Meister
2022-12-31 15:18:29 +01:00
parent a5601cf87f
commit 5c7810ff2a
8 changed files with 561 additions and 13 deletions

View File

@@ -1,19 +1,25 @@
<flectra>
<data noupdate="1">
<record id="demo_invoicable_factor1" model="hr_timesheet_invoice.factor">
<field name="name">100% Invoicable</field>
<field name="name">100% Invoiceable</field>
<field name="factor">100</field>
</record>
<record id="demo_invoicable_factor2" model="hr_timesheet_invoice.factor">
<field name="name">50% Invoicable</field>
<field name="name">50% Invoiceable</field>
<field name="factor">50</field>
</record>
<record id="demo_invoicable_factor3" model="hr_timesheet_invoice.factor">
<field name="name">25% Invoicable</field>
<field name="name">25% Invoiceable</field>
<field name="factor">25</field>
</record>
<record id="demo_invoicable_factor4" model="hr_timesheet_invoice.factor">
<field name="name">Not Invoiceable</field>
<field name="factor">0</field>
<field name="not_invoiceable" eval="True"/>
</record>
</data>
</flectra>

View File

@@ -0,0 +1,269 @@
# Translation of Flectra Server.
# This file contains the translation of the following modules:
# * project_billing_options
#
msgid ""
msgstr ""
"Project-Id-Version: Flectra Server 2.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-31 13:43+0000\n"
"PO-Revision-Date: 2022-12-31 13:43+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: project_billing_options
#: model:hr_timesheet_invoice.factor,name:project_billing_options.demo_invoicable_factor1
msgid "100% Invoicable"
msgstr "100% abrechenbar"
#. module: project_billing_options
#: model:hr_timesheet_invoice.factor,name:project_billing_options.demo_invoicable_factor3
msgid "25% Invoicable"
msgstr "25% abrechenbar"
#. module: project_billing_options
#: model:hr_timesheet_invoice.factor,name:project_billing_options.demo_invoicable_factor2
msgid "50% Invoicable"
msgstr "50% abrechenbar"
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_account_analytic_line
msgid "Account Analytic Line"
msgstr "Kostenrechnungspositionen"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__timesheet_invoice_type
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__timesheet_invoice_type
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__timesheet_invoice_type
msgid "Billable Type"
msgstr "Abrechnungsart"
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__billable_fixed
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__billable_fixed
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__billable_fixed
msgid "Billed at a Fixed price"
msgstr "zum Fixpreis"
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__billable_time
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__billable_time
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__billable_time
msgid "Billed on Timesheets"
msgstr "nach Aufwand"
#. module: project_billing_options
#: code:addons/project_billing_options/models/project.py:0
#: code:addons/project_billing_options/models/project.py:0
#, python-format
msgid "Calculated"
msgstr "Abrechenbar"
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.project_inherit_form
msgid "Calculated Days Spent"
msgstr "Abrechenbare Tage verbraucht"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__calculated_hours_invoice
msgid "Calculated Hours"
msgstr "Abrechenbare Stunden"
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.project_inherit_form
msgid "Calculated Hours Spent"
msgstr "Abrechenbare Stunden verbraucht"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__create_uid
msgid "Created by"
msgstr "Erstellt von"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__create_date
msgid "Created on"
msgstr "Angelegt am"
#. module: project_billing_options
#: code:addons/project_billing_options/models/project.py:0
#, python-format
msgid "Days"
msgstr "Tage"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order_line__display_name
msgid "Display Name"
msgstr "Anzeigename"
#. module: project_billing_options
#: code:addons/project_billing_options/models/project.py:0
#, python-format
msgid "Hours"
msgstr "Stunden"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__id
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__id
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__id
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__id
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order__id
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order_line__id
msgid "ID"
msgstr "ID"
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.view_account_analytic_line_inherit
msgid "Invoiceable(%)"
msgstr "Abrechenbar (%)"
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_hr_timesheet_invoice_factor
msgid "Invoice Rate"
msgstr "Rechnungssatz"
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.hr_timesheet_invoice_factor_view
msgid "Invoice factor"
msgstr "Rechnungssatz"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__invoicable_id
msgid "Invoiceable"
msgstr "Abrechenbar"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__factor
msgid "Invoiceable Factor"
msgstr "Rechnungssatz"
#. module: project_billing_options
#: model:ir.model.fields,help:project_billing_options.field_hr_timesheet_invoice_factor__factor
msgid "Invoiceable in percentage"
msgstr "Rechnungssatz in Prozet"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__invoicable_id
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__invoicable_id
msgid "Invoiceable(%)"
msgstr "Abrechenbar (%)"
#. module: project_billing_options
#: model:ir.actions.act_window,name:project_billing_options.action_hr_timesheet_invoice_factor
#: model:ir.ui.menu,name:project_billing_options.menu_invoicing_factor_sub
msgid "Invoicing Factor"
msgstr "Rechnungssatz"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_project_project____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_project_task____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order_line____last_update
msgid "Last Modified on"
msgstr "Aktualisiert am"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__write_uid
msgid "Last Updated by"
msgstr "Aktualisiert von"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__write_date
msgid "Last Updated on"
msgstr "Zuletzt aktualisiert am"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__name
msgid "Name"
msgstr "Name"
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__non_billable_project
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__non_billable_project
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__non_billable_project
msgid "No task found"
msgstr "Keine Aufgabe gefunden"
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__non_billable
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__non_billable
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__non_billable
msgid "Non Billable Tasks"
msgstr "Nicht abrechenbare Aufgaben"
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__non_billable_timesheet
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__non_billable_timesheet
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__non_billable_timesheet
msgid "Non Billable Timesheet"
msgstr "Nicht abrechenbare Zeiterfassung"
#. module: project_billing_options
#: model:hr_timesheet_invoice.factor,name:project_billing_options.demo_invoicable_factor4
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__not_invoiceable
msgid "Not Invoiceable"
msgstr "Nicht Abrechenbar"
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_project_task
msgid "Project Task"
msgstr "Projekt Aufgaben"
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_project_project
msgid "Project of Project"
msgstr "Projekt"
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_sale_order
msgid "Sales Order"
msgstr "Verkaufsauftrag"
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_sale_order_line
msgid "Sales Order Line"
msgstr "Auftragsposition"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__task_id
msgid "Task"
msgstr "Aufgabe"
#. module: project_billing_options
#: model:ir.model.fields,help:project_billing_options.field_project_task__total_computed_hours
msgid "Time spent on this task, excluding its sub-tasks."
msgstr "Verbrauchte Zeit der Aufgabe, ohne Unteraufgaben"
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.hr_timesheet_line_tree_inherited
msgid "Total Calculated Hours"
msgstr "Total abrechenbare Stunden"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__total_calculated_timesheet_time
msgid "Total Calculated Timesheet Time"
msgstr "Total abrechenbare Zeit der Zeiterfassung"
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__total_computed_hours
msgid "Total Computed Hours"
msgstr "Total abrechenbare Stunden"
#. module: project_billing_options
#: model:ir.model.fields,help:project_billing_options.field_project_project__total_calculated_timesheet_time
msgid ""
"Total number of time (in the proper UoM) recorded in the project, rounded to"
" the unit."
msgstr ""
"Gesamtzahl der Arbeitszeit (in der entsprechenden Einheit) im Projekt, auf die"
" Einheit gerundet."

View File

@@ -0,0 +1,267 @@
# Translation of Flectra Server.
# This file contains the translation of the following modules:
# * project_billing_options
#
msgid ""
msgstr ""
"Project-Id-Version: Flectra Server 2.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-31 13:43+0000\n"
"PO-Revision-Date: 2022-12-31 13:43+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: project_billing_options
#: model:hr_timesheet_invoice.factor,name:project_billing_options.demo_invoicable_factor1
msgid "100% Invoicable"
msgstr ""
#. module: project_billing_options
#: model:hr_timesheet_invoice.factor,name:project_billing_options.demo_invoicable_factor3
msgid "25% Invoicable"
msgstr ""
#. module: project_billing_options
#: model:hr_timesheet_invoice.factor,name:project_billing_options.demo_invoicable_factor2
msgid "50% Invoicable"
msgstr ""
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_account_analytic_line
msgid "Account Analytic Line"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__timesheet_invoice_type
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__timesheet_invoice_type
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__timesheet_invoice_type
msgid "Billable Type"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__billable_fixed
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__billable_fixed
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__billable_fixed
msgid "Billed at a Fixed price"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__billable_time
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__billable_time
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__billable_time
msgid "Billed on Timesheets"
msgstr ""
#. module: project_billing_options
#: code:addons/project_billing_options/models/project.py:0
#: code:addons/project_billing_options/models/project.py:0
#, python-format
msgid "Calculated"
msgstr ""
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.project_inherit_form
msgid "Calculated Days Spent"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__calculated_hours_invoice
msgid "Calculated Hours"
msgstr ""
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.project_inherit_form
msgid "Calculated Hours Spent"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__create_uid
msgid "Created by"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__create_date
msgid "Created on"
msgstr ""
#. module: project_billing_options
#: code:addons/project_billing_options/models/project.py:0
#, python-format
msgid "Days"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order__display_name
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order_line__display_name
msgid "Display Name"
msgstr ""
#. module: project_billing_options
#: code:addons/project_billing_options/models/project.py:0
#, python-format
msgid "Hours"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__id
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__id
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__id
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__id
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order__id
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order_line__id
msgid "ID"
msgstr ""
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.view_account_analytic_line_inherit
msgid "Invoicable(%)"
msgstr ""
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_hr_timesheet_invoice_factor
msgid "Invoice Rate"
msgstr ""
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.hr_timesheet_invoice_factor_view
msgid "Invoice factor"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__invoicable_id
msgid "Invoiceable"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__factor
msgid "Invoiceable Factor"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,help:project_billing_options.field_hr_timesheet_invoice_factor__factor
msgid "Invoiceable in percentage"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__invoicable_id
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__invoicable_id
msgid "Invoiceable(%)"
msgstr ""
#. module: project_billing_options
#: model:ir.actions.act_window,name:project_billing_options.action_hr_timesheet_invoice_factor
#: model:ir.ui.menu,name:project_billing_options.menu_invoicing_factor_sub
msgid "Invoicing Factor"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_project_project____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_project_task____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order____last_update
#: model:ir.model.fields,field_description:project_billing_options.field_sale_order_line____last_update
msgid "Last Modified on"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__write_uid
msgid "Last Updated by"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__write_date
msgid "Last Updated on"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__name
msgid "Name"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__non_billable_project
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__non_billable_project
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__non_billable_project
msgid "No task found"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__non_billable
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__non_billable
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__non_billable
msgid "Non Billable Tasks"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields.selection,name:project_billing_options.selection__account_analytic_line__timesheet_invoice_type__non_billable_timesheet
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_project__timesheet_invoice_type__non_billable_timesheet
#: model:ir.model.fields.selection,name:project_billing_options.selection__project_task__timesheet_invoice_type__non_billable_timesheet
msgid "Non Billable Timesheet"
msgstr ""
#. module: project_billing_options
#: model:hr_timesheet_invoice.factor,name:project_billing_options.demo_invoicable_factor4
#: model:ir.model.fields,field_description:project_billing_options.field_hr_timesheet_invoice_factor__not_invoiceable
msgid "Not Invoiceable"
msgstr ""
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_project_task
msgid "Project Task"
msgstr ""
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_project_project
msgid "Project of Project"
msgstr ""
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_sale_order
msgid "Sales Order"
msgstr ""
#. module: project_billing_options
#: model:ir.model,name:project_billing_options.model_sale_order_line
msgid "Sales Order Line"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_account_analytic_line__task_id
msgid "Task"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,help:project_billing_options.field_project_task__total_computed_hours
msgid "Time spent on this task, excluding its sub-tasks."
msgstr ""
#. module: project_billing_options
#: model_terms:ir.ui.view,arch_db:project_billing_options.hr_timesheet_line_tree_inherited
msgid "Total Calculated Hours"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_project_project__total_calculated_timesheet_time
msgid "Total Calculated Timesheet Time"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,field_description:project_billing_options.field_project_task__total_computed_hours
msgid "Total Computed Hours"
msgstr ""
#. module: project_billing_options
#: model:ir.model.fields,help:project_billing_options.field_project_project__total_calculated_timesheet_time
msgid ""
"Total number of time (in the proper UoM) recorded in the project, rounded to"
" the unit."
msgstr ""

View File

@@ -12,8 +12,9 @@ class HrTimesheetInvoiceFactor(models.Model):
_description = "Invoice Rate"
name = fields.Char('Name', translate=True)
factor = fields.Float(string='Invoicable Factor',
required=True, help="Invoicable in percentage")
factor = fields.Float(string='Invoiceable Factor',
required=True, help="Invoiceable in percentage")
not_invoiceable = fields.Boolean(string='Not Invoiceable')
class AccountAnalyticLine(models.Model):
@@ -21,7 +22,7 @@ class AccountAnalyticLine(models.Model):
_description = "Account Analytic Line"
invoicable_id = fields.Many2one('hr_timesheet_invoice.factor',
string="Invoicable(%)")
string="Invoiceable(%)")
calculated_hours_invoice = fields.Float(string="Calculated Hours",
compute_sudo=True, store=True,
compute="_compute_calculated_hours")
@@ -29,7 +30,11 @@ class AccountAnalyticLine(models.Model):
@api.depends('unit_amount', 'invoicable_id')
def _compute_calculated_hours(self):
for rec in self:
if rec.invoicable_id.factor != 0.0:
if rec.invoicable_id.not_invoiceable:
rec.update({
'calculated_hours_invoice': 0.0,
})
elif rec.invoicable_id.factor != 0.0:
calculated_hours = (rec.unit_amount * rec.invoicable_id.factor / 100)
rec.update({
'calculated_hours_invoice': calculated_hours,

View File

@@ -18,7 +18,7 @@ class Task(models.Model):
('non_billable_project', 'No task found')],
string="Billable Type")
invoicable_id = fields.Many2one('hr_timesheet_invoice.factor',
string="Invoicable(%)")
string="Invoiceable(%)")
total_computed_hours = fields.Float(compute="_compute_total_calculated_hours",
help="Time spent on this task,"
" excluding its sub-tasks.")
@@ -42,7 +42,7 @@ class AccountAnalyticLine(models.Model):
_inherit = 'account.analytic.line'
_description = "Account Analytic Line"
invoicable_id = fields.Many2one('hr_timesheet_invoice.factor', string="Invoicable",
invoicable_id = fields.Many2one('hr_timesheet_invoice.factor', string="Invoiceable",
readonly=False)
timesheet_invoice_type = fields.Selection([
('billable_time', 'Billed on Timesheets'),
@@ -132,7 +132,7 @@ class Project(models.Model):
_description = "Project of Project"
invoicable_id = fields.Many2one('hr_timesheet_invoice.factor',
string="Invoicable(%)")
string="Invoiceable(%)")
timesheet_invoice_type = fields.Selection([
('billable_time', 'Billed on Timesheets'),
('billable_fixed', 'Billed at a Fixed price'),

View File

@@ -31,7 +31,7 @@
</div>
</div>
<div class="oe_span6">
<p class="oe_mt32">In Task, Billable Type & Invoicable(%) data will automatically filled based on the data which is assigned in project.</p>
<p class="oe_mt32">In Task, Billable Type & Invoiceable(%) data will automatically filled based on the data which is assigned in project.</p>
</div>
</div>
</section>

View File

@@ -6,7 +6,8 @@
<field name="arch" type="xml">
<tree string="Invoice factor" editable="bottom">
<field name="name"/>
<field name="factor"/>
<field name="not_invoiceable"/>
<field name="factor" attrs="{'invisible': [('not_invoiceable', '=', True)]}"/>
</tree>
</field>
</record>

View File

@@ -635,7 +635,7 @@ msgstr "Geleistete Stunden"
#. module: sale_timesheet
#: model_terms:ir.ui.view,arch_db:sale_timesheet.timesheet_plan
msgid "Hours recorded"
msgstr ""
msgstr "Erfasste Stunden"
#. module: sale_timesheet
#: model:ir.model.fields,field_description:sale_timesheet.field_account_analytic_line__id