Skip to content

Commit

Permalink
Update fieldservice_account_analytic/models/fsm_order/py
Browse files Browse the repository at this point in the history
  • Loading branch information
max3903 authored and EdgarRetes committed Dec 2, 2024
1 parent 191d6b4 commit c1728b1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
11 changes: 10 additions & 1 deletion fieldservice_account_analytic/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ To configure this module, you need to:
Usage
=====


- Go to Field Service > Master Data > Locations
- Create or select a location
- Go to the Accounting tab
- Select a new or existing analytic account
- Go to Field Service> Operations > All Orders
- Create or select an order
- Select a location
- Go to the Accounting tab
- Add subcontractor costs
- Complete and invoice the order

Bug Tracker
===========
Expand Down
17 changes: 1 addition & 16 deletions fieldservice_account_analytic/models/fsm_order.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models
from odoo import api, fields, models


class FSMOrder(models.Model):
Expand Down Expand Up @@ -57,18 +57,3 @@ def create(self, vals_list):
)
record.analytic_account_id = analytic_account
return record

def action_view_analytic_account(self):
self.ensure_one()
analytic_account = self.env["account.analytic.account"].search(
[("fsm_order_id", "=", self.id)], limit=1
)

if analytic_account:
return {
"type": "ir.actions.act_window",
"res_model": "account.analytic.account",
"view_mode": "form",
"res_id": analytic_account.id,
"name": _("Analytic Account for Order %s") % self.name,
}
12 changes: 12 additions & 0 deletions fieldservice_account_analytic/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,18 @@ <h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
<ul class="simple">
<li>Go to Field Service &gt; Master Data &gt; Locations</li>
<li>Create or select a location</li>
<li>Go to the Accounting tab</li>
<li>Select a new or existing analytic account</li>
<li>Go to Field Service&gt; Operations &gt; All Orders</li>
<li>Create or select an order</li>
<li>Select a location</li>
<li>Go to the Accounting tab</li>
<li>Add subcontractor costs</li>
<li>Complete and invoice the order</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
Expand Down
6 changes: 5 additions & 1 deletion fieldservice_account_analytic/views/fsm_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
<page name="accounting" string="Accounting">
<group id="account-main">
<group id="account-left">
<field name="bill_to" widget="radio" options="{'horizontal': true}"/>
<field
name="bill_to"
widget="radio"
options="{'horizontal': true}"
/>
</group>
<group id="account-right">
<field name="analytic_account_id" />
Expand Down

0 comments on commit c1728b1

Please sign in to comment.