Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0][MIG] fieldservice_stock_account_analytic #779

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
729f75c
[ADD] fieldservice_stock_account_analytic
max3903 Jul 29, 2019
cb05c93
[IMP] fieldservice_stock_account_analytic
max3903 Aug 2, 2019
32561b2
[UPD] README.rst
OCA-git-bot Aug 21, 2019
9ec7c16
[FIX] fieldservice_stock_account_analytic: PEP8 errors
max3903 Aug 21, 2019
810df0a
[IMP] fieldservice_stock_account_analytic
max3903 Oct 11, 2019
600e488
[UPD] Update fieldservice_stock_account_analytic.pot
oca-travis Nov 14, 2019
185ec7c
[FIX] Positional Arguments
osi-scampbell Nov 20, 2019
43364e3
fieldservice_stock_account_analytic 12.0.1.0.1
OCA-git-bot Nov 22, 2019
023bddb
Added translation using Weblate (German)
marylla Nov 22, 2019
b55ed39
[FIX] fieldservice_stock_account_analytic: AttributeError: 'account.i…
max3903 Nov 25, 2019
5c538d4
Translated using Weblate (German)
marylla Nov 26, 2019
255cda0
fieldservice_stock_account_analytic 12.0.1.0.2
OCA-git-bot Nov 26, 2019
20cfb2e
Added translation using Weblate (Spanish (Chile))
Dec 14, 2019
630ad08
Translated using Weblate (Spanish (Chile))
Dec 14, 2019
c63741a
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Jan 16, 2020
c26c348
[ADD] Spanish (es) translation
max3903 Jan 16, 2020
cf3063d
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Feb 5, 2020
28baf02
Added translation using Weblate (Portuguese (Portugal))
dreispt Jul 1, 2020
cfdf118
Translated using Weblate (Portuguese (Portugal))
dreispt Jul 1, 2020
3451de3
fix dependencies of fs_stock_account_analytic
aleuffre Mar 23, 2021
baa1591
fieldservice_stock_account_analytic 12.0.1.1.0
OCA-git-bot Apr 23, 2021
5abc322
[IMP] fieldservice_stock_account_analytic: black, isort, prettier
baimont May 3, 2021
13b40dd
[MIG] fieldservice_stock_account_analytic: Migration to 13.0
baimont May 3, 2021
d845fd5
[TO REVERT] travis dependencies
baimont May 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,35 @@ env:
- VERSION="13.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"

install:
# FIXME 1: when PR671 is merged
- git clone --branch 13.0-mig-fsm-stock https://github.com/ursais/field-service.git
PR671
- rm -rf fieldservice_stock && cp -ar PR671/fieldservice_stock .
# FIXME 2: when PR180 is merged
- git clone --branch 13.0-mig-account_invoice_report_hide_line
https://github.com/QubiQ/account-invoice-reporting.git PR180
- rm -rf account_invoice_report_hide_line && cp -ar
PR180/account_invoice_report_hide_line .
# FIXME 3: when PR773 is merged
- git clone --branch 13.0-mig-fieldservice_account_analytic
https://github.com/acsone/field-service.git PR773
- rm -rf fieldservice_account_analytic && cp -ar PR773/fieldservice_account_analytic .
# FIXME 4: when PR778 is merged
- git clone --branch 13.0-mig-fieldservice_stock_account
https://github.com/acsone/field-service.git PR778
- rm -rf fieldservice_stock_account && cp -ar PR778/fieldservice_stock_account .
# FIXME 5: before merge
- git clone --branch 13.0 https://github.com/oca/stock-logistics-warehouse.git
stock_logistic_warehouse
- rm -rf stock_request && cp -ar stock_logistic_warehouse/stock_request .
- rm -rf stock_request_direction && cp -ar
stock_logistic_warehouse/stock_request_direction .
- rm -rf stock_request_picking_type && cp -ar
stock_logistic_warehouse/stock_request_picking_type .
- rm -rf stock_request_analytic && cp -ar
stock_logistic_warehouse/stock_request_analytic .
- git clone --branch 13.0 https://github.com/oca/account-analytic.git account_analytic
- rm -rf stock_analytic && cp -ar account_analytic/stock_analytic .
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git
${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
Expand Down
125 changes: 125 additions & 0 deletions fieldservice_stock_account_analytic/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
===========================================
Field Service - Stock - Analytic 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/13.0/fieldservice_stock_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-13-0/field-service-13-0-fieldservice_stock_account_analytic
: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/13.0
:alt: Try me on Runbot

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

This module allows you to report on the stock output account by analytic account.

It uses the analytic account of the field service location to set the
analytic account on the deliveries.

**Table of contents**

.. contents::
:local:

Usage
=====

FSM Location
~~~~~~~~~~~~

* Go to Field Service > Master data > Locations
* Create or select a location
* Check that the inventory location is a Customer location
* Go to the Accounting tab
* Set the analytic account

FSM Order
~~~~~~~~~

* Go to Field Service
* Create or select an order
* Select the location
* Go to the Inventory tab to add some products and submit the stock requests

Inventory
~~~~~~~~~

* Go to Inventory > Stock Request Orders > X to process
* Open the stock request order related to your Field Service order
* Set the route on the lines and confirm it
* Process the transfers

Accounting
~~~~~~~~~~

* Go to Accounting > Adviser > Analytic Entries

Known issues / Roadmap
======================

The roadmap of the Field Service application is documented on
`Github <https://github.com/OCA/field-service/issues/1>`_.

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stock_account_analytic%0Aversion:%2013.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
~~~~~~~~~~~~

* `Open Source Integrators <https://www.opensourceintegrators.com>`_

* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>

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-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-max3903|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions fieldservice_stock_account_analytic/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
19 changes: 19 additions & 0 deletions fieldservice_stock_account_analytic/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Field Service - Stock - Analytic Accounting",
"summary": "Track costs of delivered items with analytic accounting",
"license": "AGPL-3",
"version": "13.0.1.0.0",
"category": "Field Service",
"author": "Open Source Integrators, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/field-service",
"depends": [
"fieldservice_account_analytic",
"fieldservice_stock_account",
"stock_request_analytic",
],
"development_status": "Beta",
"maintainers": ["max3903"],
}
27 changes: 27 additions & 0 deletions fieldservice_stock_account_analytic/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stock_account_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-11-26 11:58+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\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_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_fsm_order
msgid "Field Service Order"
msgstr "Field-Service-Auftrag"

#. module: fieldservice_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_stock_request
msgid "Stock Request"
msgstr ""
27 changes: 27 additions & 0 deletions fieldservice_stock_account_analytic/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stock_account_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-12-14 16:05+0000\n"
"Last-Translator: Nelson Ramírez Sánchez <info@konos.cl>\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.9.1\n"

#. module: fieldservice_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_fsm_order
msgid "Field Service Order"
msgstr "Pedido de Servicio de Campo"

#. module: fieldservice_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_stock_request
msgid "Stock Request"
msgstr "Solicitud de Stock"
27 changes: 27 additions & 0 deletions fieldservice_stock_account_analytic/i18n/es_CL.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stock_account_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-12-14 16:05+0000\n"
"Last-Translator: Nelson Ramírez Sánchez <info@konos.cl>\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.9.1\n"

#. module: fieldservice_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_fsm_order
msgid "Field Service Order"
msgstr "Pedido de Servicio de Campo"

#. module: fieldservice_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_stock_request
msgid "Stock Request"
msgstr "Solicitud de Stock"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stock_account_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.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_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_fsm_order
msgid "Field Service Order"
msgstr ""

#. module: fieldservice_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_stock_request
msgid "Stock Request"
msgstr ""

27 changes: 27 additions & 0 deletions fieldservice_stock_account_analytic/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stock_account_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-02-05 11:13+0000\n"
"Last-Translator: Marcel Savegnago <marcel.savegnago@gmail.com>\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_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_fsm_order
msgid "Field Service Order"
msgstr "Ordem de Serviço de Campo"

#. module: fieldservice_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_stock_request
msgid "Stock Request"
msgstr "Requisição de Estoque"
27 changes: 27 additions & 0 deletions fieldservice_stock_account_analytic/i18n/pt_PT.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stock_account_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-07-02 00:19+0000\n"
"Last-Translator: Daniel Reis <dgreis@sapo.pt>\n"
"Language-Team: none\n"
"Language: pt_PT\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_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_fsm_order
msgid "Field Service Order"
msgstr "Ordem de Serviço de Campo"

#. module: fieldservice_stock_account_analytic
#: model:ir.model,name:fieldservice_stock_account_analytic.model_stock_request
msgid "Stock Request"
msgstr "Requisição de Stock"
5 changes: 5 additions & 0 deletions fieldservice_stock_account_analytic/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import stock_request
from . import fsm_order
13 changes: 13 additions & 0 deletions fieldservice_stock_account_analytic/models/fsm_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class FSMOrder(models.Model):
_inherit = "fsm.order"

def _prepare_inv_line_for_stock_request(self, stock_request, invoice=False):
vals = super()._prepare_inv_line_for_stock_request(stock_request, invoice)
vals.update({"analytic_account_id": self.location_id.analytic_account_id.id})
return vals
17 changes: 17 additions & 0 deletions fieldservice_stock_account_analytic/models/stock_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models


class StockRequest(models.Model):
_inherit = "stock.request"

@api.model
def create(self, vals):
if "fsm_order_id" in vals and vals.get("fsm_order_id"):
fsm_order = self.env["fsm.order"].browse(vals.get("fsm_order_id"))
vals.update(
{"analytic_account_id": fsm_order.location_id.analytic_account_id.id}
)
return super().create(vals)
3 changes: 3 additions & 0 deletions fieldservice_stock_account_analytic/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Open Source Integrators <https://www.opensourceintegrators.com>`_

* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
4 changes: 4 additions & 0 deletions fieldservice_stock_account_analytic/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module allows you to report on the stock output account by analytic account.

It uses the analytic account of the field service location to set the
analytic account on the deliveries.
Loading