Skip to content

Commit

Permalink
[IMP] fieldservice_account_analytic: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 authored and EdgarRetes committed Nov 15, 2024
1 parent f28ec99 commit 2b3edfe
Show file tree
Hide file tree
Showing 19 changed files with 66 additions and 56 deletions.
42 changes: 23 additions & 19 deletions fieldservice_account_analytic/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@ 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/16.0/fieldservice_account_analytic
:target: https://github.com/OCA/field-service/tree/17.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-16-0/field-service-16-0-fieldservice_account_analytic
:target: https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-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=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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.
service orders. It also adds the option to track the billing partner for
field service locations and orders.

**Table of contents**

Expand All @@ -48,44 +47,49 @@ Configuration

To configure this module, you need to:

* Go to Field Service > Master Data > Locations
* Create or select a location and set their analytic account
- Go to Field Service > Master Data > Locations
- Create or select a location and set their analytic account

Usage
=====



Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/field-service/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 <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_account_analytic%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_account_analytic%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~
-------

* Open Source Integrators

Contributors
~~~~~~~~~~~~
------------

* Michael Allen <[email protected]>
* Serpent Consulting Services Pvt. Ltd. <[email protected]>
* Brian McMaster <[email protected]>
* Freni Patel <[email protected]>
- Michael Allen <[email protected]>
- Serpent Consulting Services Pvt. Ltd. <[email protected]>
- Brian McMaster <[email protected]>
- Freni Patel <[email protected]>

Other credits
~~~~~~~~~~~~~
-------------

The development of this module has been financially supported by:

* Open Source Integrators <https://opensourceintegrators.com>
- Open Source Integrators <https://opensourceintegrators.com>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -111,6 +115,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-osimallen| |maintainer-brian10048| |maintainer-bodedra|

This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/16.0/fieldservice_account_analytic>`_ project on GitHub.
This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/17.0/fieldservice_account_analytic>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion fieldservice_account_analytic/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def create(self, vals_list):
raise ValidationError(
_("No analytic account " "set on the order's Location.")
)
return super(AccountMoveLine, self).create(vals_list)
return super().create(vals_list)
2 changes: 1 addition & 1 deletion fieldservice_account_analytic/models/analytic_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def create(self, vals):
raise ValidationError(
_("No analytic account set " "on the order's Location.")
)
return super(AccountAnalyticLine, self).create(vals)
return super().create(vals)

@api.onchange("product_id")
def onchange_product_id(self):
Expand Down
2 changes: 1 addition & 1 deletion fieldservice_account_analytic/models/fsm_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _search(
("partner_id", "=", partner.id),
]
)
return super(FSMLocation, self)._search(
return super()._search(
args,
offset=offset,
limit=limit,
Expand Down
2 changes: 1 addition & 1 deletion fieldservice_account_analytic/models/fsm_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _onchange_customer_id_location(self):
)

def write(self, vals):
res = super(FSMOrder, self).write(vals)
res = super().write(vals)
for order in self:
if "customer_id" not in vals and not order.customer_id:
order.customer_id = order.location_id.customer_id.id
Expand Down
2 changes: 1 addition & 1 deletion fieldservice_account_analytic/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _search(
("service_location_id", "=", location.id),
]
)
return super(ResPartner, self)._search(
return super()._search(
args,
offset=offset,
limit=limit,
Expand Down
3 changes: 3 additions & 0 deletions fieldservice_account_analytic/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions fieldservice_account_analytic/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
To configure this module, you need to:

- Go to Field Service \> Master Data \> Locations
- Create or select a location and set their analytic account
4 changes: 0 additions & 4 deletions fieldservice_account_analytic/readme/CONFIGURE.rst

This file was deleted.

4 changes: 4 additions & 0 deletions fieldservice_account_analytic/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Michael Allen \<<[email protected]>\>
- Serpent Consulting Services Pvt. Ltd. \<<[email protected]>\>
- Brian McMaster \<<[email protected]>\>
- Freni Patel \<<[email protected]>\>
4 changes: 0 additions & 4 deletions fieldservice_account_analytic/readme/CONTRIBUTORS.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
The development of this module has been financially supported by:

* Open Source Integrators <https://opensourceintegrators.com>
- Open Source Integrators \<<https://opensourceintegrators.com>\>
3 changes: 3 additions & 0 deletions fieldservice_account_analytic/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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.
4 changes: 0 additions & 4 deletions fieldservice_account_analytic/readme/DESCRIPTION.rst

This file was deleted.

1 change: 1 addition & 0 deletions fieldservice_account_analytic/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Empty file.
39 changes: 21 additions & 18 deletions fieldservice_account_analytic/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,22 +369,22 @@ <h1 class="title">Field Service - Analytic Accounting</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c872de4b09a48a6f6cf3811cf08102104249a86cb7aa84f7a9871bfb58831449
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/field-service/tree/16.0/fieldservice_account_analytic"><img alt="OCA/field-service" src="https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/field-service-16-0/field-service-16-0-fieldservice_account_analytic"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/field-service&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/field-service/tree/17.0/fieldservice_account_analytic"><img alt="OCA/field-service" src="https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-0-fieldservice_account_analytic"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/field-service&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>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.</p>
service orders. It also adds the option to track the billing partner for
field service locations and orders.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li>
<li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="toc-entry-7">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="toc-entry-8">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
</ul>
</li>
</ul>
Expand All @@ -401,24 +401,27 @@ <h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
<li>Create or select a location and set their analytic account</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/field-service/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_account_analytic%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_account_analytic%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
<ul class="simple">
<li>Open Source Integrators</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<ul class="simple">
<li>Michael Allen &lt;<a class="reference external" href="mailto:mallen&#64;opensourceintegrators.com">mallen&#64;opensourceintegrators.com</a>&gt;</li>
<li>Serpent Consulting Services Pvt. Ltd. &lt;<a class="reference external" href="mailto:support&#64;serpentcs.com">support&#64;serpentcs.com</a>&gt;</li>
Expand All @@ -427,22 +430,22 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#toc-entry-7">Other credits</a></h2>
<h2><a class="toc-backref" href="#toc-entry-8">Other credits</a></h2>
<p>The development of this module has been financially supported by:</p>
<ul class="simple">
<li>Open Source Integrators &lt;<a class="reference external" href="https://opensourceintegrators.com">https://opensourceintegrators.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/osimallen"><img alt="osimallen" src="https://github.com/osimallen.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/brian10048"><img alt="brian10048" src="https://github.com/brian10048.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/bodedra"><img alt="bodedra" src="https://github.com/bodedra.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/field-service/tree/16.0/fieldservice_account_analytic">OCA/field-service</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/field-service/tree/17.0/fieldservice_account_analytic">OCA/field-service</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class FSMAccountAnalyticCase(TransactionCase):
@classmethod
def setUpClass(cls):
super(FSMAccountAnalyticCase, cls).setUpClass()
super().setUpClass()
cls.Wizard = cls.env["fsm.wizard"]
cls.WorkOrder = cls.env["fsm.order"]
cls.AccountInvoice = cls.env["account.move"]
Expand Down

0 comments on commit 2b3edfe

Please sign in to comment.