diff --git a/fieldservice_account/README.rst b/fieldservice_account/README.rst new file mode 100644 index 0000000000..84f192349f --- /dev/null +++ b/fieldservice_account/README.rst @@ -0,0 +1,112 @@ +========================== +Field Service - Accounting +========================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github + :target: https://github.com/OCA/field-service/tree/12.0/fieldservice_account + :alt: OCA/field-service +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_account + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/264/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the ability to link field service orders to invoices. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +No special installation instructions + +Configuration +============= + +No special configuration instructions. + +Usage +===== + +No specific usage instructions. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Open Source Integrators + +Contributors +~~~~~~~~~~~~ + +* Michael Allen +* Serpent Consulting Services Pvt. Ltd. +* Rapha??l Reverdy +* Brian McMaster + +Other credits +~~~~~~~~~~~~~ + +The development of this module has been financially supported by: + +* Open Source Integrators + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-osimallen| image:: https://github.com/osimallen.png?size=40px + :target: https://github.com/osimallen + :alt: osimallen +.. |maintainer-brian10048| image:: https://github.com/brian10048.png?size=40px + :target: https://github.com/brian10048 + :alt: brian10048 +.. |maintainer-bodedra| image:: https://github.com/bodedra.png?size=40px + :target: https://github.com/bodedra + :alt: bodedra + +Current `maintainers `__: + +|maintainer-osimallen| |maintainer-brian10048| |maintainer-bodedra| + +This module is part of the `OCA/field-service `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fieldservice_account/__init__.py b/fieldservice_account/__init__.py new file mode 100644 index 0000000000..859fb789cc --- /dev/null +++ b/fieldservice_account/__init__.py @@ -0,0 +1,3 @@ +# Copyright (C) 2018 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import models diff --git a/fieldservice_account/__manifest__.py b/fieldservice_account/__manifest__.py new file mode 100644 index 0000000000..fc48a25ce5 --- /dev/null +++ b/fieldservice_account/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright (C) 2018 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Field Service - Accounting", + "summary": "Track invoices linked to Field Service orders", + "version": "13.0.2.0.0", + "category": "Field Service", + "author": "Open Source Integrators, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/field-service", + "depends": ["fieldservice", "account"], + "data": [ + "security/ir.model.access.csv", + "views/account_move.xml", + "views/fsm_order.xml", + ], + "license": "AGPL-3", + "development_status": "Beta", + "maintainers": ["osimallen", "brian10048", "bodedra"], +} diff --git a/fieldservice_account/i18n/de.po b/fieldservice_account/i18n/de.po new file mode 100644 index 0000000000..0178a4d9a7 --- /dev/null +++ b/fieldservice_account/i18n/de.po @@ -0,0 +1,107 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_account +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-11-26 17:58+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.8\n" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice_line__fsm_order_id +msgid "FSM Order" +msgstr "Field-Service-Auftrag" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_count +#, fuzzy +#| msgid "FSM Order" +msgid "FSM Order Count" +msgstr "Field-Service-Auftrag" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.account_invoice_form +#: model_terms:ir.ui.view,arch_db:fieldservice_account.invoice_search_view_fso +#, fuzzy +#| msgid "FSM Order" +msgid "FSM Orders" +msgstr "Field-Service-Auftrag" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_fsm_order +msgid "Field Service Order" +msgstr "Field-Service-Auftrag" + +#. module: fieldservice_account +#: model_terms:ir.ui.view,arch_db:fieldservice_account.vendor_bill_form_view_fso +#, fuzzy +#| msgid "Field Service Order" +msgid "Field Service Orders" +msgstr "Field-Service-Auftrag" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_count +msgid "Invoice Count" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice_line +msgid "Invoice Line" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.view_fsm_order_form_inherit_account +msgid "Invoices/Bills" +msgstr "" + +#~ msgid "Analytic Account" +#~ msgstr "Kostenstelle" + +#~ msgid "Analytic Line" +#~ msgstr "Kostenstellenbuchung" + +#~ msgid "Confirm" +#~ msgstr "Bestätigen" + +#~ msgid "Contact" +#~ msgstr "Kontakt" + +#~ msgid "Create Invoice" +#~ msgstr "Rechnung erstellen" + +#~ msgid "Customer" +#~ msgstr "Kunde" + +#~ msgid "Draft" +#~ msgstr "Entwurf" + +#~ msgid "Duration" +#~ msgstr "Dauer" + +#~ msgid "Employee" +#~ msgstr "Mitarbeiter" + +#~ msgid "Field Service Location" +#~ msgstr "Field-Service-Ort" + +#~ msgid "Field Service Worker" +#~ msgstr "Service-Mitarbeiter" + +#~ msgid "Service Orders" +#~ msgstr "Service-Aufträge" diff --git a/fieldservice_account/i18n/es.po b/fieldservice_account/i18n/es.po new file mode 100644 index 0000000000..47761723d6 --- /dev/null +++ b/fieldservice_account/i18n/es.po @@ -0,0 +1,231 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_account +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-03-27 19:13+0000\n" +"Last-Translator: Nelson Ramírez Sánchez \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice_line__fsm_order_id +msgid "FSM Order" +msgstr "Orden FSM" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_count +msgid "FSM Order Count" +msgstr "Cuenta Orden FSM" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.account_invoice_form +#: model_terms:ir.ui.view,arch_db:fieldservice_account.invoice_search_view_fso +msgid "FSM Orders" +msgstr "Orden FSM" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_fsm_order +msgid "Field Service Order" +msgstr "Orden de Servicio de Campo" + +#. module: fieldservice_account +#: model_terms:ir.ui.view,arch_db:fieldservice_account.vendor_bill_form_view_fso +msgid "Field Service Orders" +msgstr "Pedidos de Servicio de Campo" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_count +msgid "Invoice Count" +msgstr "Cantidad de Facturas" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice_line +msgid "Invoice Line" +msgstr "Línea de Factura" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.view_fsm_order_form_inherit_account +msgid "Invoices/Bills" +msgstr "Facturas" + +#~ msgid "Invoice Reference" +#~ msgstr "Referencia de Factura" + +#~ msgid "Accounting" +#~ msgstr "Contabilidad" + +#~ msgid "Accounting Stage" +#~ msgstr "Etapa Contable" + +#~ msgid "Analytic Account" +#~ msgstr "Cuenta Analítica" + +#~ msgid "Analytic Line" +#~ msgstr "Apunte Analítico" + +#~ msgid "Bill Contact" +#~ msgstr "Contacto de Facturación" + +#~ msgid "Bill Location" +#~ msgstr "Dirección de Facturación" + +#~ msgid "Bill to" +#~ msgstr "Facturar a" + +#~ msgid "Billed Customer" +#~ msgstr "Cliente Facturado" + +#~ msgid "Cannot move to Complete until 'Contractor Costs' is filled in" +#~ msgstr "" +#~ "No se puede pasar a Completado hasta que se completen los 'Costos del " +#~ "contratista'" + +#~ msgid "Cannot move to Complete until 'Employee Timesheets' is filled in" +#~ msgstr "" +#~ "No se puede mover a Completado hasta que se completen las 'Hojas de " +#~ "tiempo de empleado'" + +#~ msgid "Confirm" +#~ msgstr "Confirmar" + +#~ msgid "Confirmed" +#~ msgstr "Confirmado" + +#~ msgid "Contact" +#~ msgstr "Contacto" + +#~ msgid "Contact empty" +#~ msgstr "Contacto vacío" + +#~ msgid "Contractor Cost Estimate" +#~ msgstr "Estimación de Costos del Contratista" + +#~ msgid "Contractor Costs" +#~ msgstr "Costos del Contratista" + +#~ msgid "Create Invoice" +#~ msgstr "Crear Factura" + +#~ msgid "Customer" +#~ msgstr "Proveedor" + +#~ msgid "Draft" +#~ msgstr "Borrador" + +#~ msgid "Duration" +#~ msgstr "Duración" + +#~ msgid "Employee" +#~ msgstr "Empleado" + +#~ msgid "FSM Overtime" +#~ msgstr "Tiempo Extra FSM" + +#~ msgid "FSM Record Conversion" +#~ msgstr "Conversión de Registro FSM" + +#~ msgid "FSM Regular Time" +#~ msgstr "Tiempo Regular FSM" + +#~ msgid "FSM Travel Time" +#~ msgstr "Tiempo de Viaje FSM" + +#~ msgid "Field Service Location" +#~ msgstr "Ubicación del Servicio de Campo" + +#~ msgid "Field Service Location Person Info" +#~ msgstr "Servicio de Campo Ubicación Información de la Persona" + +#~ msgid "Field Service Worker" +#~ msgstr "Trabajador de Servicio de Campo" + +#~ msgid "Fully Invoiced" +#~ msgstr "Totalmente Facturado" + +#~ msgid "Hour(s)" +#~ msgstr "Hora(s)" + +#~ msgid "Needs Review" +#~ msgstr "Necesita Revisión" + +#~ msgid "No Field Service Orders to review." +#~ msgstr "No hay órdenes de servicio de campo para revisar." + +#~ msgid "No Invoice" +#~ msgstr "Sin Factura" + +#~ msgid "No analytic account set on the order's Location." +#~ msgstr "No hay una cuenta analítica establecida en la ubicación del pedido." + +#~ msgid "Nothing Invoiced" +#~ msgstr "Nada Facturado" + +#~ msgid "Operations" +#~ msgstr "Operaciones" + +#~ msgid "" +#~ "Overtime for Field Service Employees\n" +#~ " " +#~ msgstr "" +#~ "Horas Extra para Empleados del Servicio de Campo\n" +#~ "……\n" +#~ " " + +#~ msgid "Please set the field service worker." +#~ msgstr "Configure el trabajador de servicio de campo." + +#~ msgid "" +#~ "Regular time for Field Service\n" +#~ " Employees\n" +#~ " " +#~ msgstr "" +#~ "Tiempo Regular para Servicio de Campo\n" +#~ " Empleados\n" +#~ " " + +#~ msgid "Service Orders" +#~ msgstr "Orden de Servicio" + +#~ msgid "The worker assigned to this order is not a supplier" +#~ msgstr "El trabajador asignado a este pedido no es un proveedor" + +#~ msgid "Time Type" +#~ msgstr "Tipo de Tiempo" + +#~ msgid "Timesheet Activities" +#~ msgstr "Actividades de Parte de Horas" + +#~ msgid "Total Cost" +#~ msgstr "Costo Total" + +#~ msgid "Total Employee Hours" +#~ msgstr "Horas Totales de Empleados" + +#~ msgid "" +#~ "Travel time for Field Service\n" +#~ " Employees\n" +#~ " " +#~ msgstr "" +#~ "Tiempo de viaje para Servicio de Campo\n" +#~ " Empleados\n" +#~ "……\n" +#~ " " + +#~ msgid "Vendor Bills" +#~ msgstr "Facturas de Proveedor" diff --git a/fieldservice_account/i18n/es_CL.po b/fieldservice_account/i18n/es_CL.po new file mode 100644 index 0000000000..ff0bf10654 --- /dev/null +++ b/fieldservice_account/i18n/es_CL.po @@ -0,0 +1,231 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_account +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-03-25 17:13+0000\n" +"Last-Translator: Nelson Ramírez Sánchez \n" +"Language-Team: none\n" +"Language: es_CL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice_line__fsm_order_id +msgid "FSM Order" +msgstr "Pedido FSM" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_count +msgid "FSM Order Count" +msgstr "Cuenta Pedidos FSM" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.account_invoice_form +#: model_terms:ir.ui.view,arch_db:fieldservice_account.invoice_search_view_fso +msgid "FSM Orders" +msgstr "Pedidos FSM" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_fsm_order +msgid "Field Service Order" +msgstr "Pedidos de Servicio de Campo" + +#. module: fieldservice_account +#: model_terms:ir.ui.view,arch_db:fieldservice_account.vendor_bill_form_view_fso +msgid "Field Service Orders" +msgstr "Pedidos de Servicio de Campo" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_count +msgid "Invoice Count" +msgstr "Recuento de Facturas" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice_line +msgid "Invoice Line" +msgstr "Línea de Factura" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.view_fsm_order_form_inherit_account +msgid "Invoices/Bills" +msgstr "Facturas/Boletas" + +#~ msgid "Invoice Reference" +#~ msgstr "Referencia de Factura" + +#~ msgid "Accounting" +#~ msgstr "Contabilidad" + +#~ msgid "Accounting Stage" +#~ msgstr "Etapa Contable" + +#~ msgid "Analytic Account" +#~ msgstr "Cuenta Analítica" + +#~ msgid "Analytic Line" +#~ msgstr "Apunte Analítico" + +#~ msgid "Bill Contact" +#~ msgstr "Contacto de Facturación" + +#~ msgid "Bill Location" +#~ msgstr "Dirección de Facturación" + +#~ msgid "Bill to" +#~ msgstr "Facturar a" + +#~ msgid "Billed Customer" +#~ msgstr "Cliente Facturado" + +#~ msgid "Cannot move to Complete until 'Contractor Costs' is filled in" +#~ msgstr "" +#~ "No se puede pasar a Completado hasta que se completen los 'Costos del " +#~ "contratista'" + +#~ msgid "Cannot move to Complete until 'Employee Timesheets' is filled in" +#~ msgstr "" +#~ "No se puede mover a Completado hasta que se completen las 'Hojas de " +#~ "tiempo de empleado'" + +#~ msgid "Confirm" +#~ msgstr "Confirmar" + +#~ msgid "Confirmed" +#~ msgstr "Confirmado" + +#~ msgid "Contact" +#~ msgstr "Contacto" + +#~ msgid "Contact empty" +#~ msgstr "Contacto vacío" + +#~ msgid "Contractor Cost Estimate" +#~ msgstr "Estimación de Costos del Contratista" + +#~ msgid "Contractor Costs" +#~ msgstr "Costos del Contratista" + +#~ msgid "Create Invoice" +#~ msgstr "Crear Factura" + +#~ msgid "Customer" +#~ msgstr "Proveedor" + +#~ msgid "Draft" +#~ msgstr "Borrador" + +#~ msgid "Duration" +#~ msgstr "Duración" + +#~ msgid "Employee" +#~ msgstr "Empleado" + +#~ msgid "FSM Overtime" +#~ msgstr "Tiempo Extra FSM" + +#~ msgid "FSM Record Conversion" +#~ msgstr "Conversión de Registro FSM" + +#~ msgid "FSM Regular Time" +#~ msgstr "Tiempo Regular FSM" + +#~ msgid "FSM Travel Time" +#~ msgstr "Tiempo de Viaje FSM" + +#~ msgid "Field Service Location" +#~ msgstr "Ubicación del Servicio de Campo" + +#~ msgid "Field Service Location Person Info" +#~ msgstr "Servicio de Campo Ubicación Información de la Persona" + +#~ msgid "Field Service Worker" +#~ msgstr "Trabajador de Servicio de Campo" + +#~ msgid "Fully Invoiced" +#~ msgstr "Totalmente Facturado" + +#~ msgid "Hour(s)" +#~ msgstr "Hora(s)" + +#~ msgid "Needs Review" +#~ msgstr "Necesita Revisión" + +#~ msgid "No Field Service Orders to review." +#~ msgstr "No hay órdenes de servicio de campo para revisar." + +#~ msgid "No Invoice" +#~ msgstr "Sin Factura" + +#~ msgid "No analytic account set on the order's Location." +#~ msgstr "No hay una cuenta analítica establecida en la ubicación del pedido." + +#~ msgid "Nothing Invoiced" +#~ msgstr "Nada Facturado" + +#~ msgid "Operations" +#~ msgstr "Operaciones" + +#~ msgid "" +#~ "Overtime for Field Service Employees\n" +#~ " " +#~ msgstr "" +#~ "Horas Extra para Empleados del Servicio de Campo\n" +#~ "……\n" +#~ " " + +#~ msgid "Please set the field service worker." +#~ msgstr "Configure el trabajador de servicio de campo." + +#~ msgid "" +#~ "Regular time for Field Service\n" +#~ " Employees\n" +#~ " " +#~ msgstr "" +#~ "Tiempo Regular para Servicio de Campo\n" +#~ " Empleados\n" +#~ " " + +#~ msgid "Service Orders" +#~ msgstr "Orden de Servicio" + +#~ msgid "The worker assigned to this order is not a supplier" +#~ msgstr "El trabajador asignado a este pedido no es un proveedor" + +#~ msgid "Time Type" +#~ msgstr "Tipo de Tiempo" + +#~ msgid "Timesheet Activities" +#~ msgstr "Actividades de Parte de Horas" + +#~ msgid "Total Cost" +#~ msgstr "Costo Total" + +#~ msgid "Total Employee Hours" +#~ msgstr "Horas Totales de Empleados" + +#~ msgid "" +#~ "Travel time for Field Service\n" +#~ " Employees\n" +#~ " " +#~ msgstr "" +#~ "Tiempo de viaje para Servicio de Campo\n" +#~ " Empleados\n" +#~ "……\n" +#~ " " + +#~ msgid "Vendor Bills" +#~ msgstr "Facturas de Proveedor" diff --git a/fieldservice_account/i18n/fieldservice_account.pot b/fieldservice_account/i18n/fieldservice_account.pot new file mode 100644 index 0000000000..8aebdf8986 --- /dev/null +++ b/fieldservice_account/i18n/fieldservice_account.pot @@ -0,0 +1,63 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_account +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \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: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice_line__fsm_order_id +msgid "FSM Order" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_count +msgid "FSM Order Count" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.account_invoice_form +#: model_terms:ir.ui.view,arch_db:fieldservice_account.invoice_search_view_fso +msgid "FSM Orders" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_fsm_order +msgid "Field Service Order" +msgstr "" + +#. module: fieldservice_account +#: model_terms:ir.ui.view,arch_db:fieldservice_account.vendor_bill_form_view_fso +msgid "Field Service Orders" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_count +msgid "Invoice Count" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice_line +msgid "Invoice Line" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.view_fsm_order_form_inherit_account +msgid "Invoices/Bills" +msgstr "" + diff --git a/fieldservice_account/i18n/it.po b/fieldservice_account/i18n/it.po new file mode 100644 index 0000000000..0e0ad36887 --- /dev/null +++ b/fieldservice_account/i18n/it.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_account +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-06-09 01:19+0000\n" +"Last-Translator: Sergio Zanchetta \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice_line__fsm_order_id +msgid "FSM Order" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_count +msgid "FSM Order Count" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.account_invoice_form +#: model_terms:ir.ui.view,arch_db:fieldservice_account.invoice_search_view_fso +msgid "FSM Orders" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_fsm_order +msgid "Field Service Order" +msgstr "" + +#. module: fieldservice_account +#: model_terms:ir.ui.view,arch_db:fieldservice_account.vendor_bill_form_view_fso +msgid "Field Service Orders" +msgstr "" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice +msgid "Invoice" +msgstr "Fattura" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_count +msgid "Invoice Count" +msgstr "Numero fatture" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice_line +msgid "Invoice Line" +msgstr "Riga fattura" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.view_fsm_order_form_inherit_account +msgid "Invoices/Bills" +msgstr "Fatture" diff --git a/fieldservice_account/i18n/pt_BR.po b/fieldservice_account/i18n/pt_BR.po new file mode 100644 index 0000000000..f8804482d4 --- /dev/null +++ b/fieldservice_account/i18n/pt_BR.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_account +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-06-17 22:19+0000\n" +"Last-Translator: Fernando Colus \n" +"Language-Team: none\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice_line__fsm_order_id +msgid "FSM Order" +msgstr "Ordem FSM (Field Service Management)" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_count +msgid "FSM Order Count" +msgstr "Contagem de Ordens do FSM (Field Service Management)" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_account_invoice__fsm_order_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.account_invoice_form +#: model_terms:ir.ui.view,arch_db:fieldservice_account.invoice_search_view_fso +msgid "FSM Orders" +msgstr "Ordens FSM (Field Service Management)" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_fsm_order +msgid "Field Service Order" +msgstr "Ordem de Serviço de Campo" + +#. module: fieldservice_account +#: model_terms:ir.ui.view,arch_db:fieldservice_account.vendor_bill_form_view_fso +msgid "Field Service Orders" +msgstr "Ordens de Serviço de Campo" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice +msgid "Invoice" +msgstr "Fatura" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_count +msgid "Invoice Count" +msgstr "Contagem de Faturas" + +#. module: fieldservice_account +#: model:ir.model,name:fieldservice_account.model_account_invoice_line +msgid "Invoice Line" +msgstr "Linha de Fatura" + +#. module: fieldservice_account +#: model:ir.model.fields,field_description:fieldservice_account.field_fsm_order__invoice_ids +#: model_terms:ir.ui.view,arch_db:fieldservice_account.view_fsm_order_form_inherit_account +msgid "Invoices/Bills" +msgstr "Faturas / Contas" diff --git a/fieldservice_account/migrations/13.0.1.0.0/pre-migration.py b/fieldservice_account/migrations/13.0.1.0.0/pre-migration.py new file mode 100644 index 0000000000..57e48a5e8e --- /dev/null +++ b/fieldservice_account/migrations/13.0.1.0.0/pre-migration.py @@ -0,0 +1,21 @@ +# Copyright (C) 2020 Brian McMaster +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade + +_model_renames = [ + ("account.invoice", "account.move"), + ("account.invoice.line", "account.move.line"), +] + +_table_renames = [ + ("account.invoice", "account.move"), + ("account.invoice.line", "account.move.line"), + ("fsm_order_account_invoice_rel", "fsm_order_account_move_rel"), +] + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.rename_models(env.cr, _model_renames) + openupgrade.rename_tables(env.cr, _table_renames) diff --git a/fieldservice_account/migrations/13.0.2.0.0/post-migration.py b/fieldservice_account/migrations/13.0.2.0.0/post-migration.py new file mode 100644 index 0000000000..690f03f5e8 --- /dev/null +++ b/fieldservice_account/migrations/13.0.2.0.0/post-migration.py @@ -0,0 +1,19 @@ +# Copyright 2020 Akretion +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade + + +def _field_type_change(env): + openupgrade.m2o_to_x2m( + env.cr, + env["account.move.line"], + "account_move_line", + "fsm_order_ids", + openupgrade.get_legacy_name("fsm_order_id"), + ) + + +@openupgrade.migrate() +def migrate(env, version): + _field_type_change(env) diff --git a/fieldservice_account/migrations/13.0.2.0.0/pre-migration.py b/fieldservice_account/migrations/13.0.2.0.0/pre-migration.py new file mode 100644 index 0000000000..c17c05a826 --- /dev/null +++ b/fieldservice_account/migrations/13.0.2.0.0/pre-migration.py @@ -0,0 +1,13 @@ +# Copyright 2020 Akretion +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade + +column_renames = { + "account_move_line": [("fsm_order_id", None)], +} + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.rename_columns(env.cr, column_renames) diff --git a/fieldservice_account/models/__init__.py b/fieldservice_account/models/__init__.py new file mode 100644 index 0000000000..816289ec31 --- /dev/null +++ b/fieldservice_account/models/__init__.py @@ -0,0 +1,7 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import ( + account_move, + account_move_line, + fsm_order, +) diff --git a/fieldservice_account/models/account_move.py b/fieldservice_account/models/account_move.py new file mode 100644 index 0000000000..b28051feb6 --- /dev/null +++ b/fieldservice_account/models/account_move.py @@ -0,0 +1,36 @@ +# Copyright (C) 2018, Open Source Integrators +# Copyright 2019 Akretion +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class AccountMove(models.Model): + _inherit = "account.move" + + fsm_order_ids = fields.Many2many( + "fsm.order", + compute="_compute_fsm_order_ids", + string="Field Service orders associated to this invoice", + ) + fsm_order_count = fields.Integer( + string="FSM Orders", compute="_compute_fsm_order_ids" + ) + + @api.depends("line_ids") + def _compute_fsm_order_ids(self): + for order in self: + orders = self.env["fsm.order"].search( + [("invoice_lines", "in", order.line_ids.ids)] + ) + order.fsm_order_ids = orders + order.fsm_order_count = len(order.fsm_order_ids) + + def action_view_fsm_orders(self): + action = self.env.ref("fieldservice.action_fsm_dash_order").read()[0] + if self.fsm_order_count > 1: + action["domain"] = [("id", "in", self.fsm_order_ids.ids)] + elif self.fsm_order_ids: + action["views"] = [(self.env.ref("fieldservice.fsm_order_form").id, "form")] + action["res_id"] = self.fsm_order_ids[0].id + return action diff --git a/fieldservice_account/models/account_move_line.py b/fieldservice_account/models/account_move_line.py new file mode 100644 index 0000000000..ec49de5135 --- /dev/null +++ b/fieldservice_account/models/account_move_line.py @@ -0,0 +1,18 @@ +# Copyright 2019 Akretion +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountMoveLine(models.Model): + _inherit = "account.move.line" + + fsm_order_ids = fields.Many2many( + "fsm.order", + "fsm_order_account_move_line_rel", + "account_move_line_id", + "fsm_order_id", + string="FSM Orders", + readonly=True, + copy=False, + ) diff --git a/fieldservice_account/models/fsm_order.py b/fieldservice_account/models/fsm_order.py new file mode 100644 index 0000000000..7c8eb7592c --- /dev/null +++ b/fieldservice_account/models/fsm_order.py @@ -0,0 +1,50 @@ +# Copyright (C) 2018 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import api, fields, models + + +class FSMOrder(models.Model): + _inherit = "fsm.order" + + invoice_lines = fields.Many2many( + "account.move.line", + "fsm_order_account_move_line_rel", + "fsm_order_id", + "account_move_line_id", + string="Invoice Lines", + copy=False, + ) + + invoice_ids = fields.Many2many( + "account.move", + string="Invoices", + compute="_compute_get_invoiced", + readonly=True, + copy=False, + ) + + invoice_count = fields.Integer( + string="Invoice Count", + compute="_compute_get_invoiced", + readonly=True, + copy=False, + ) + + @api.depends("invoice_lines") + def _compute_get_invoiced(self): + for order in self: + invoices = order.invoice_lines.mapped("move_id").filtered( + lambda r: r.type in ("out_invoice", "out_refund") + ) + order.invoice_ids = invoices + order.invoice_count = len(invoices) + + def action_view_invoices(self): + action = self.env.ref("account.action_move_out_invoice_type").read()[0] + invoices = self.mapped("invoice_ids") + if len(invoices) > 1: + action["domain"] = [("id", "in", invoices.ids)] + elif invoices: + action["views"] = [(self.env.ref("account.view_move_form").id, "form")] + action["res_id"] = invoices.ids[0] + return action diff --git a/fieldservice_account/readme/CONFIGURE.rst b/fieldservice_account/readme/CONFIGURE.rst new file mode 100644 index 0000000000..89a40f9121 --- /dev/null +++ b/fieldservice_account/readme/CONFIGURE.rst @@ -0,0 +1 @@ +No special configuration instructions. diff --git a/fieldservice_account/readme/CONTRIBUTORS.rst b/fieldservice_account/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..d89e3c8daf --- /dev/null +++ b/fieldservice_account/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Michael Allen +* Serpent Consulting Services Pvt. Ltd. +* Raphaël Reverdy +* Brian McMaster diff --git a/fieldservice_account/readme/CREDITS.rst b/fieldservice_account/readme/CREDITS.rst new file mode 100644 index 0000000000..0eff0acf4e --- /dev/null +++ b/fieldservice_account/readme/CREDITS.rst @@ -0,0 +1,3 @@ +The development of this module has been financially supported by: + +* Open Source Integrators diff --git a/fieldservice_account/readme/DESCRIPTION.rst b/fieldservice_account/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..e47bfdb678 --- /dev/null +++ b/fieldservice_account/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds the ability to link field service orders to invoices. diff --git a/fieldservice_account/readme/INSTALL.rst b/fieldservice_account/readme/INSTALL.rst new file mode 100644 index 0000000000..54fea7becb --- /dev/null +++ b/fieldservice_account/readme/INSTALL.rst @@ -0,0 +1 @@ +No special installation instructions diff --git a/fieldservice_account/readme/USAGE.rst b/fieldservice_account/readme/USAGE.rst new file mode 100644 index 0000000000..f08cd97a88 --- /dev/null +++ b/fieldservice_account/readme/USAGE.rst @@ -0,0 +1 @@ +No specific usage instructions. diff --git a/fieldservice_account/security/ir.model.access.csv b/fieldservice_account/security/ir.model.access.csv new file mode 100644 index 0000000000..e8e0566f22 --- /dev/null +++ b/fieldservice_account/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_move_line_fsm_user,account.move.line.fsm.user,model_account_move_line,fieldservice.group_fsm_user,1,1,1,1 diff --git a/fieldservice_account/static/description/icon.png b/fieldservice_account/static/description/icon.png new file mode 100644 index 0000000000..955674d8f0 Binary files /dev/null and b/fieldservice_account/static/description/icon.png differ diff --git a/fieldservice_account/static/description/index.html b/fieldservice_account/static/description/index.html new file mode 100644 index 0000000000..b33fa3e6f4 --- /dev/null +++ b/fieldservice_account/static/description/index.html @@ -0,0 +1,728 @@ + + + + + + + Field Service - Accounting + + + +
+

Field Service - Accounting

+ + +

+ Beta + License: AGPL-3 + OCA/field-service + Translate me on Weblate + Try me on Runbot +

+

This module adds the ability to link field service orders to invoices.

+

Table of contents

+
+ +
+
+

Installation

+

No special installation instructions

+
+
+

Configuration

+

No special configuration instructions.

+
+
+

Usage

+

No specific usage instructions.

+
+
+

Bug Tracker

+

+ Bugs are tracked on + GitHub Issues. In case of trouble, please check there if your issue has already been + reported. If you spotted it first, help us smashing it by providing a detailed + and welcomed + feedback. +

+

+ Do not contact contributors directly about support or help with technical + issues. +

+
+
+

Credits

+
+

Authors

+
    +
  • Open Source Integrators
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The development of this module has been financially supported by:

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ Odoo Community Association +

+ OCA, or the Odoo Community Association, is a nonprofit organization whose + mission is to support the collaborative development of Odoo features and + promote its widespread use. +

+

+ Current + maintainers: +

+

+ osimallen + brian10048 + bodedra +

+

+ This module is part of the + OCA/field-service + project on GitHub. +

+

+ You are welcome to contribute. To learn how please visit + https://odoo-community.org/page/Contribute. +

+
+
+
+ + diff --git a/fieldservice_account/tests/__init__.py b/fieldservice_account/tests/__init__.py new file mode 100644 index 0000000000..1fb62bd56d --- /dev/null +++ b/fieldservice_account/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) + +from . import test_fsm_account diff --git a/fieldservice_account/tests/test_fsm_account.py b/fieldservice_account/tests/test_fsm_account.py new file mode 100644 index 0000000000..7c34315ddd --- /dev/null +++ b/fieldservice_account/tests/test_fsm_account.py @@ -0,0 +1,34 @@ +# Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) + +from odoo.tests.common import TransactionCase + + +class FSMAccountCase(TransactionCase): + def setUp(self): + super(FSMAccountCase, self).setUp() + self.Wizard = self.env["fsm.wizard"] + self.WorkOrder = self.env["fsm.order"] + self.AccountInvoice = self.env["account.move"] + self.AccountInvoiceLine = self.env["account.move.line"] + # create a Res Partner + self.test_partner = self.env["res.partner"].create( + {"name": "Test Partner", "phone": "123", "email": "tp@email.com"} + ) + # create a Res Partner to be converted to FSM Location/Person + self.test_loc_partner = self.env["res.partner"].create( + {"name": "Test Loc Partner", "phone": "ABC", "email": "tlp@email.com"} + ) + self.test_loc_partner2 = self.env["res.partner"].create( + {"name": "Test Loc Partner 2", "phone": "123", "email": "tlp@example.com"} + ) + # create expected FSM Location to compare to converted FSM Location + self.test_location = self.env["fsm.location"].create( + { + "name": "Test Location", + "phone": "123", + "email": "tp@email.com", + "partner_id": self.test_loc_partner.id, + "owner_id": self.test_loc_partner.id, + } + ) diff --git a/fieldservice_account/views/account_move.xml b/fieldservice_account/views/account_move.xml new file mode 100644 index 0000000000..66f015779a --- /dev/null +++ b/fieldservice_account/views/account_move.xml @@ -0,0 +1,64 @@ + + + FSM order.invoice.form + account.move + + +
+ +
+
+
+ + + vendor.bill.tree.view.fso + account.move + + + + + + + + + + vendor.bill.form.view.fso + account.move + + + + + + + + + + + + invoice.search.view.fso + account.move + + + + + + + +
diff --git a/fieldservice_account/views/fsm_order.xml b/fieldservice_account/views/fsm_order.xml new file mode 100644 index 0000000000..cddb09b058 --- /dev/null +++ b/fieldservice_account/views/fsm_order.xml @@ -0,0 +1,24 @@ + + + fsm.order + + +
+ +
+
+
+
diff --git a/setup/fieldservice_account/odoo/addons/fieldservice_account b/setup/fieldservice_account/odoo/addons/fieldservice_account new file mode 120000 index 0000000000..ef12ee33af --- /dev/null +++ b/setup/fieldservice_account/odoo/addons/fieldservice_account @@ -0,0 +1 @@ +../../../../fieldservice_account \ No newline at end of file diff --git a/setup/fieldservice_account/setup.py b/setup/fieldservice_account/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/fieldservice_account/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)