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

[18.0][MIG] fieldservice_sale_stock #1245

Open
wants to merge 35 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
25b07ac
[ADD] fieldservice_sale_stock
brian10048 Nov 20, 2019
aca6960
[IMP] fieldservice_sale_stock: Auto Install module
brian10048 Dec 6, 2019
7bcdb3d
[FIX] fieldservice_sale
brian10048 Dec 6, 2019
165e325
[FIX] fieldservice_sale_stock: Expecting one result
max3903 Dec 10, 2019
0432902
[IMP] fieldservice_sale_stock
max3903 Dec 22, 2019
4c15652
fieldservice_sale_stock 12.0.1.0.1
OCA-git-bot Dec 30, 2019
eb55c20
[IMP] fieldservice_sale_stock
max3903 Jan 9, 2020
5d05934
fieldservice_sale_stock 12.0.1.0.2
OCA-git-bot Jan 14, 2020
6eeda33
[ADD] Spanish (es) translation
max3903 Jan 16, 2020
9c9d960
[IMP] fieldservice_sale_stock
max3903 Feb 3, 2020
2395054
fieldservice_sale_stock 12.0.1.0.3
OCA-git-bot Feb 9, 2020
4dd5dbb
[FIX] fieldservice_sale_stock: Set the FSM order on the procurement g…
max3903 May 12, 2020
cc4a252
[FIX] fieldservice_sale_stock
max3903 May 20, 2020
d42593c
fieldservice_sale_stock 12.0.1.0.4
OCA-git-bot May 20, 2020
6c6634f
[FIX] Travis
Freni-OSI Apr 19, 2021
202e610
[14.0][MIG] fieldservice_sale_stock
Freni-OSI Apr 19, 2021
bedaff6
[UPD] Update fieldservice_sale_stock.pot
oca-travis Aug 3, 2021
a1fe19d
Added translation using Weblate (Italian)
mymage Sep 26, 2021
8971a3c
Translated using Weblate (Italian)
mymage Sep 29, 2021
9e9d3ab
Added translation using Weblate (Spanish (Argentina))
ibuioli Oct 3, 2021
2820e8b
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 3, 2021
7817a20
[FIX] pre-commit.
ShwetaSerpentCS Nov 1, 2022
15ac791
[MIG] fieldservice_sale_stock
ShwetaSerpentCS Nov 2, 2022
e6c2e94
[UPD] Update fieldservice_sale_stock.pot
Nov 2, 2022
b37c96f
[UPD] README.rst
OCA-git-bot Nov 2, 2022
aaf22db
Update translation files
weblate Nov 2, 2022
9ffdf8e
Translated using Weblate (Italian)
francesco-ooops Jan 18, 2023
b7361e0
[UPD] README.rst
OCA-git-bot Sep 3, 2023
de8d011
Translated using Weblate (Spanish)
Ivorra78 Sep 26, 2023
afbabec
Translated using Weblate (Portuguese (Brazil))
May 17, 2024
26c367c
[IMP] fieldservice_sale_stock: pre-commit auto fixes
Sep 16, 2024
97cf556
[17.0][MIG] fieldservice_sale_stock: Migration to 17.0
Sep 16, 2024
e47f4e6
[UPD] Update fieldservice_sale_stock.pot
Sep 23, 2024
02a3a33
[BOT] post-merge updates
OCA-git-bot Sep 23, 2024
9fb46d3
[MIG] fieldservice_sale_stock: Migration to 18.0
EdgarRetes Oct 21, 2024
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
124 changes: 124 additions & 0 deletions fieldservice_sale_stock/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
==========================
Field Service - Sale Stock
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:da03ba406dbbaf50ca1b793439af169e4b0fdfb8d687ef8202ba7625051b113b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/18.0/fieldservice_sale_stock
: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-18-0/field-service-18-0-fieldservice_sale_stock
: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=18.0
:alt: Try me on Runboat

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

This module links pickings created by a sale order to the field service
order created by the sale order.

**Table of contents**

.. contents::
:local:

Configuration
=============

Configure a storable product that generates a unique field service order
for an individual sale order:

- Go to Sales > Catalog > Products
- Create or select a product
- Set the type to 'Storable'
- Set the Service Policy to 'Per Sale Order'

Usage
=====

- Go to Sales
- Create a new Quotation/Sale Order
- Set the FSM Location to be used
- On a Sale Order Line, select a product configured for field service
orders
- Confirm the Sale Order
- Field Service orders linked to SO lines are created
- The pickings for storable products will get linked to the newly
created field service order

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

* Brian McMaster

Contributors
------------

- Brian McMaster <[email protected]>
- Ammar Officewala <[email protected]>
- Freni Patel <[email protected]>
- Italo LOPES <[email protected]>

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

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

|maintainer-wolfhall| |maintainer-max3903| |maintainer-brian10048|

This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/18.0/fieldservice_sale_stock>`_ 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_sale_stock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2019 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

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

{
"name": "Field Service - Sale Stock",
"version": "18.0.1.0.0",
"summary": "Sell stockable items linked to field service orders.",
"category": "Field Service",
"author": "Brian McMaster, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/field-service",
"depends": [
"fieldservice_sale",
"fieldservice_stock",
],
"license": "AGPL-3",
"development_status": "Beta",
"maintainers": [
"wolfhall",
"max3903",
"brian10048",
],
"installable": True,
"auto_install": True,
}
25 changes: 25 additions & 0 deletions fieldservice_sale_stock/i18n/es.po
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_sale_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-09 07:47+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\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 4.17\n"

#. module: fieldservice_sale_stock
#: model:ir.model,name:fieldservice_sale_stock.model_sale_order
msgid "Sales Order"
msgstr "Órdenes de Venta"

#~ msgid "Sale Order"
#~ msgstr "Pedido de Venta"
31 changes: 31 additions & 0 deletions fieldservice_sale_stock/i18n/es_AR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_sale_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-10-03 21:34+0000\n"
"Last-Translator: Ignacio Buioli <[email protected]>\n"
"Language-Team: none\n"
"Language: es_AR\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 4.3.2\n"

#. module: fieldservice_sale_stock
#: model:ir.model,name:fieldservice_sale_stock.model_sale_order
msgid "Sales Order"
msgstr "Pedidos de Venta"

#~ msgid "Display Name"
#~ msgstr "Mostrar Nombre"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Última Modificación el"
25 changes: 25 additions & 0 deletions fieldservice_sale_stock/i18n/es_CL.po
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_sale_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-06-07 05:19+0000\n"
"Last-Translator: Nelson Ramírez Sánchez <[email protected]>\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_sale_stock
#: model:ir.model,name:fieldservice_sale_stock.model_sale_order
msgid "Sales Order"
msgstr ""

#~ msgid "Sale Order"
#~ msgstr "Nota de Venta"
19 changes: 19 additions & 0 deletions fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_sale_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.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_sale_stock
#: model:ir.model,name:fieldservice_sale_stock.model_sale_order
msgid "Sales Order"
msgstr ""
31 changes: 31 additions & 0 deletions fieldservice_sale_stock/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_sale_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-01-18 11:48+0000\n"
"Last-Translator: Francesco Foresti <[email protected]>\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 4.14.1\n"

#. module: fieldservice_sale_stock
#: model:ir.model,name:fieldservice_sale_stock.model_sale_order
msgid "Sales Order"
msgstr "Ordine di vendita"

#~ msgid "Display Name"
#~ msgstr "Nome visualizzato"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Ultima modifica il"
26 changes: 26 additions & 0 deletions fieldservice_sale_stock/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_sale_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-05-17 21:34+0000\n"
"Last-Translator: Rodrigo Macedo <[email protected]."
"translation.odoo-community.org>\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 4.17\n"

#. module: fieldservice_sale_stock
#: model:ir.model,name:fieldservice_sale_stock.model_sale_order
msgid "Sales Order"
msgstr "Pedidos de Venda"

#~ msgid "Sale Order"
#~ msgstr "Pedido de Venda"
4 changes: 4 additions & 0 deletions fieldservice_sale_stock/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2019 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import sale_order
41 changes: 41 additions & 0 deletions fieldservice_sale_stock/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright (C) 2019 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models


class SaleOrder(models.Model):
_inherit = "sale.order"

def prepare_fsm_values_for_stock_move(self, fsm_order):
return {
"fsm_order_id": fsm_order.id,
}

def prepare_fsm_values_for_stock_picking(self, fsm_order):
return {
"fsm_order_id": fsm_order.id,
}

def _link_pickings_to_fsm(self):
for rec in self:
# TODO: We may want to split the picking to have one picking
# per FSM order
fsm_order = self.env["fsm.order"].search(
[
("sale_id", "=", rec.id),
("sale_line_id", "=", False),
]
)
if rec.procurement_group_id:
rec.procurement_group_id.fsm_order_id = fsm_order.id or False
for picking in rec.picking_ids:
picking.write(rec.prepare_fsm_values_for_stock_picking(fsm_order))
for move in picking.move_ids:
move.write(rec.prepare_fsm_values_for_stock_move(fsm_order))

def _action_confirm(self):
"""On SO confirmation, link the fsm order on the pickings
created by the sale order"""
res = super()._action_confirm()
self._link_pickings_to_fsm()
return res
3 changes: 3 additions & 0 deletions fieldservice_sale_stock/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
7 changes: 7 additions & 0 deletions fieldservice_sale_stock/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Configure a storable product that generates a unique field service order
for an individual sale order:

- Go to Sales \> Catalog \> Products
- Create or select a product
- Set the type to 'Storable'
- Set the Service Policy to 'Per Sale Order'
4 changes: 4 additions & 0 deletions fieldservice_sale_stock/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Brian McMaster \<<[email protected]>\>
- Ammar Officewala \<<[email protected]>\>
- Freni Patel \<<[email protected]>\>
- Italo LOPES \<<[email protected]>\>
2 changes: 2 additions & 0 deletions fieldservice_sale_stock/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module links pickings created by a sale order to the field service
order created by the sale order.
2 changes: 2 additions & 0 deletions fieldservice_sale_stock/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The roadmap of the Field Service application is documented on
[Github](https://github.com/OCA/field-service/issues/1).
9 changes: 9 additions & 0 deletions fieldservice_sale_stock/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- Go to Sales
- Create a new Quotation/Sale Order
- Set the FSM Location to be used
- On a Sale Order Line, select a product configured for field service
orders
- Confirm the Sale Order
- Field Service orders linked to SO lines are created
- The pickings for storable products will get linked to the newly
created field service order
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading