diff --git a/fieldservice_account_analytic/README.rst b/fieldservice_account_analytic/README.rst index 4de3ce115a..0dbde0b314 100644 --- a/fieldservice_account_analytic/README.rst +++ b/fieldservice_account_analytic/README.rst @@ -17,13 +17,13 @@ Field Service - Analytic Accounting :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/17.0/fieldservice_account_analytic + :target: https://github.com/OCA/field-service/tree/18.0/fieldservice_account_analytic :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-17-0/field-service-17-0-fieldservice_account_analytic + :target: https://translation.odoo-community.org/projects/field-service-18-0/field-service-18-0-fieldservice_account_analytic :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -61,7 +61,7 @@ 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 to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -118,6 +118,6 @@ Current `maintainers `__: |maintainer-osimallen| |maintainer-brian10048| |maintainer-bodedra| -This module is part of the `OCA/field-service `_ project on GitHub. +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_analytic/__manifest__.py b/fieldservice_account_analytic/__manifest__.py index c496157e31..9dc1531467 100644 --- a/fieldservice_account_analytic/__manifest__.py +++ b/fieldservice_account_analytic/__manifest__.py @@ -5,7 +5,7 @@ "name": "Field Service - Analytic Accounting", "summary": """Track analytic accounts on Field Service locations and orders""", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "category": "Field Service", "author": "Open Source Integrators, Odoo Community Association (OCA)", "website": "https://github.com/OCA/field-service", diff --git a/fieldservice_account_analytic/models/analytic_account.py b/fieldservice_account_analytic/models/analytic_account.py index 08f8cca3f5..da454ac2ce 100644 --- a/fieldservice_account_analytic/models/analytic_account.py +++ b/fieldservice_account_analytic/models/analytic_account.py @@ -11,17 +11,18 @@ class AccountAnalyticLine(models.Model): fsm_order_id = fields.Many2one("fsm.order", string="FSM Order") product_id = fields.Many2one("product.product", string="Time Type") - @api.model - def create(self, vals): - order = self.env["fsm.order"].browse(vals.get("fsm_order_id")) - if order: - if order.location_id.analytic_account_id: - vals["account_id"] = order.location_id.analytic_account_id.id - else: - raise ValidationError( - _("No analytic account set " "on the order's Location.") - ) - return super().create(vals) + @api.model_create_multi + def create(self, vals_list): + for vals in vals_list: + order = self.env["fsm.order"].browse(vals.get("fsm_order_id")) + if order: + if order.location_id.analytic_account_id: + vals["account_id"] = order.location_id.analytic_account_id.id + else: + raise ValidationError( + _("No analytic account set " "on the order's Location.") + ) + return super().create(vals_list) @api.onchange("product_id") def onchange_product_id(self): diff --git a/fieldservice_account_analytic/models/fsm_location.py b/fieldservice_account_analytic/models/fsm_location.py index 6f558e37e1..c731d55b41 100644 --- a/fieldservice_account_analytic/models/fsm_location.py +++ b/fieldservice_account_analytic/models/fsm_location.py @@ -38,7 +38,6 @@ def _search( offset=0, limit=None, order=None, - access_rights_uid=None, ): args = args or [] context = dict(self._context) or {} @@ -54,5 +53,4 @@ def _search( offset=offset, limit=limit, order=order, - access_rights_uid=access_rights_uid, ) diff --git a/fieldservice_account_analytic/models/res_partner.py b/fieldservice_account_analytic/models/res_partner.py index e6f038f110..99464a45f5 100644 --- a/fieldservice_account_analytic/models/res_partner.py +++ b/fieldservice_account_analytic/models/res_partner.py @@ -14,7 +14,6 @@ def _search( offset=0, limit=None, order=None, - access_rights_uid=None, ): args = args or [] context = dict(self._context) or {} @@ -33,5 +32,4 @@ def _search( offset=offset, limit=limit, order=order, - access_rights_uid=access_rights_uid, ) diff --git a/fieldservice_account_analytic/static/description/icon.png b/fieldservice_account_analytic/static/description/icon.png index 955674d8f0..e3757caa15 100644 Binary files a/fieldservice_account_analytic/static/description/icon.png and b/fieldservice_account_analytic/static/description/icon.png differ diff --git a/fieldservice_account_analytic/static/description/icon.svg b/fieldservice_account_analytic/static/description/icon.svg new file mode 100644 index 0000000000..c27c090fda --- /dev/null +++ b/fieldservice_account_analytic/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fieldservice_account_analytic/static/description/index.html b/fieldservice_account_analytic/static/description/index.html index bcc0fe87f3..09690df65a 100644 --- a/fieldservice_account_analytic/static/description/index.html +++ b/fieldservice_account_analytic/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,7 +369,7 @@

Field Service - Analytic Accounting

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:187502c73f589c1c69cf504b3bb83cd50ca38eee87433bde51306e12d8cad645 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module adds the ability to track your analytic accounts on field service orders. It also adds the option to track the billing partner for field service locations and orders.

@@ -408,7 +409,7 @@

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 to smash it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -442,13 +443,15 @@

Other credits

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +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.

+

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_analytic/tests/test_fsm_account_wizard.py b/fieldservice_account_analytic/tests/test_fsm_account_wizard.py index de746079aa..064e1c5d48 100644 --- a/fieldservice_account_analytic/tests/test_fsm_account_wizard.py +++ b/fieldservice_account_analytic/tests/test_fsm_account_wizard.py @@ -71,7 +71,7 @@ def setUpClass(cls): ) cls.default_account_revenue = cls.env["account.account"].search( [ - ("company_id", "=", cls.env.user.company_id.id), + ("company_ids", "in", cls.env.user.company_id.id), ("account_type", "=", "income"), ], limit=1, @@ -81,7 +81,7 @@ def setUpClass(cls): cls.product1 = cls.env["product.product"].create( { "name": "Product A", - "detailed_type": "consu", + "type": "consu", } ) diff --git a/fieldservice_account_analytic/views/fsm_location.xml b/fieldservice_account_analytic/views/fsm_location.xml index 35c10b28ce..d28616a45e 100644 --- a/fieldservice_account_analytic/views/fsm_location.xml +++ b/fieldservice_account_analytic/views/fsm_location.xml @@ -1,9 +1,9 @@ - - fsm.location.tree.accounting + + fsm.location.list.accounting fsm.location - + diff --git a/fieldservice_account_analytic/views/fsm_order.xml b/fieldservice_account_analytic/views/fsm_order.xml index b92d0e8c98..73b9480814 100644 --- a/fieldservice_account_analytic/views/fsm_order.xml +++ b/fieldservice_account_analytic/views/fsm_order.xml @@ -23,10 +23,10 @@ - - fsm.order.tree + + fsm.order.list fsm.order - +