-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] fieldservice_stock: Split equipment
Remove the equipment related functionality from the fieldservice_stock module and make into separate module
- Loading branch information
1 parent
1d50fe7
commit 1c4a5fb
Showing
27 changed files
with
245 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
=============================== | ||
Field Service - Stock Equipment | ||
=============================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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/12.0/fieldservice_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-12-0/field-service-12-0-fieldservice_stock | ||
: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/12.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module is an add-on for the Field Service application in Odoo. | ||
It allows you to track your FSM Equipments in stock moves. | ||
|
||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
Products can be automatically converted into FSM Equipments. | ||
This is only available only for products tracked by serial number. | ||
This needs to be enabled both on Operation Types and Products. | ||
For example, we may want to create the FSM Equipment on Delivery, | ||
or on Receipts. | ||
|
||
To enable on Products: | ||
|
||
* Go to Inventory > Master Data > Products | ||
* Open the Product form, Inventory tab | ||
* On the "Traceability" section, make sure | ||
"Tracking" is set to "By Unique Serial Number" | ||
* Enable the "Creates FSM Equipment" checkbox | ||
|
||
To enable on Operation Types: | ||
|
||
* Go to Inventory > Configuration > Operation Types | ||
* Select the intended Operation Type ("Receipts" for example) | ||
* On the "Traceability" section, enable the | ||
"Create FSM Equipment" checkbox | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
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%0Aversion:%2012.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 | ||
* Brian McMaster | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Brian McMaster <brian@mcmpest.com> | ||
* Sandip Mangukiya <smangukiya@opensourceintegrators.com> | ||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com> | ||
|
||
Other credits | ||
~~~~~~~~~~~~~ | ||
|
||
The development of this module has been financially supported by: | ||
|
||
* Open Source Integrators <https://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-brian10048| image:: https://github.com/brian10048.png?size=40px | ||
:target: https://github.com/brian10048 | ||
:alt: brian10048 | ||
.. |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-smangukiya| image:: https://github.com/smangukiya.png?size=40px | ||
:target: https://github.com/smangukiya | ||
:alt: smangukiya | ||
|
||
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-brian10048| |maintainer-wolfhall| |maintainer-max3903| |maintainer-smangukiya| | ||
|
||
This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/12.0/fieldservice_stock_equipment>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (C) 2020, Brian McMaster | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright (C) 2020, Brian McMaster | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'Field Service - Stock Equipment', | ||
'summary': 'Integrate stock operations with your field service equipments', | ||
'version': '12.0.1.0.0', | ||
'category': 'Field Service', | ||
'author': "Open Source Integrators, " | ||
"Brian McMaster, " | ||
"Odoo Community Association (OCA)", | ||
'website': 'https://github.com/OCA/field-service', | ||
'depends': [ | ||
'fieldservice_stock', | ||
], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'views/fsm_equipment.xml', | ||
'views/product_template.xml', | ||
'views/stock_picking_type.xml', | ||
'views/stock_production_lot.xml', | ||
], | ||
'license': 'AGPL-3', | ||
'development_status': 'Beta', | ||
'maintainers': [ | ||
'brian10048', | ||
'wolfhall', | ||
'max3903', | ||
'smangukiya', | ||
], | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from . import ( | ||
stock_move, | ||
stock_picking_type, | ||
fsm_equipment, | ||
product_template, | ||
stock_production_lot, | ||
) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright (C) 2018 Brian McMaster | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from odoo import fields, models | ||
|
||
|
||
class StockMove(models.Model): | ||
_inherit = "stock.move" | ||
|
||
def prepare_equipment_values(self, move_line): | ||
return {'name': '%s (%s)' % ( | ||
move_line.product_id.name, move_line.lot_id.name), | ||
'product_id': move_line.product_id.id, | ||
'lot_id': move_line.lot_id.id, | ||
'location_id': | ||
move_line.move_id.stock_request_ids.fsm_order_id.location_id.id, | ||
'current_location_id': | ||
move_line.move_id.stock_request_ids.fsm_order_id.location_id.id, | ||
'current_stock_location_id': move_line.location_dest_id.id} | ||
|
||
def _action_done(self): | ||
res = super()._action_done() | ||
for rec in self: | ||
if (rec.state == 'done' | ||
and rec.picking_type_id.create_fsm_equipment | ||
and rec.product_tmpl_id.create_fsm_equipment): | ||
for line in rec.move_line_ids: | ||
vals = self.prepare_equipment_values(line) | ||
line.lot_id.fsm_equipment_id = \ | ||
rec.env['fsm.equipment'].create(vals) | ||
return res |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Products can be automatically converted into FSM Equipments. | ||
This is only available only for products tracked by serial number. | ||
This needs to be enabled both on Operation Types and Products. | ||
For example, we may want to create the FSM Equipment on Delivery, | ||
or on Receipts. | ||
|
||
To enable on Products: | ||
|
||
* Go to Inventory > Master Data > Products | ||
* Open the Product form, Inventory tab | ||
* On the "Traceability" section, make sure | ||
"Tracking" is set to "By Unique Serial Number" | ||
* Enable the "Creates FSM Equipment" checkbox | ||
|
||
To enable on Operation Types: | ||
|
||
* Go to Inventory > Configuration > Operation Types | ||
* Select the intended Operation Type ("Receipts" for example) | ||
* On the "Traceability" section, enable the | ||
"Create FSM Equipment" checkbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* Brian McMaster <brian@mcmpest.com> | ||
* Sandip Mangukiya <smangukiya@opensourceintegrators.com> | ||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The development of this module has been financially supported by: | ||
|
||
* Open Source Integrators <https://opensourceintegrators.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module is an add-on for the Field Service application in Odoo. | ||
It allows you to track your FSM Equipments in stock moves. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
To use this module, you need to: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_stock_picking_type_portal,access.stock.picking.type.portal,stock.model_stock_picking_type,base.group_portal,1,0,0,0 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_stock_move_portal,access.stock.move.portal,stock.model_stock_move,base.group_portal,1,1,0,0 | ||
access_stock_picking_type_portal,access.stock.picking.type.portal,stock.model_stock_picking_type,base.group_portal,1,0,0,0 | ||
access_product_product_portal,access.product.product.portal,product.model_product_product,base.group_portal,1,0,0,0 | ||
access_product_template_portal,access.product.template.portal,product.model_product_template,base.group_portal,1,0,0,0 | ||
access_uom_uom_portal,access.uom.uom.portal,uom.model_uom_uom,base.group_portal,1,0,0,0 |