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

[17.0][MIG] fieldservice_stock: Migration to 17.0 #1158

Merged
merged 135 commits into from
Apr 16, 2024
Merged
Changes from 1 commit
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
62264bc
[ADD] fieldservice_stock 0.0.1
brian10048 Nov 24, 2018
05c19e3
[FIX] fieldservice_stock
brian10048 Nov 24, 2018
b814ce6
[FIX] fieldservice_stock
brian10048 Nov 24, 2018
f5dfa04
[ADD] field service stock 0.0.2 (#49)
brian10048 Dec 12, 2018
6c2f67a
[IMP] Various improvements
max3903 Dec 13, 2018
94af619
[ADD] fieldservice_vehicle_stock
max3903 Dec 14, 2018
a1df0d1
[ADD] Security
max3903 Dec 14, 2018
ce2c233
[IMP] fieldservice_stock
max3903 Dec 14, 2018
a4631df
[IMP] fieldservice_stock
Dec 31, 2018
80f94dd
[IMP] fieldservice_stock
osimallen Jan 2, 2019
691d785
[IMP] action_inventory_*
max3903 Jan 9, 2019
16d4b93
[IMP] Various
osi-scampbell Jan 3, 2019
59fc2e3
[IMP] fieldservice_stock
osi-scampbell Jan 9, 2019
df4e6ad
[FIX] fieldservice_stock
max3903 Jan 10, 2019
b104724
[FIX] fieldservice_stock
max3903 Jan 11, 2019
d0e2c9f
[FIX] fieldservice_stock
max3903 Feb 2, 2019
ae558df
[FIX] fieldservice_stock
max3903 Feb 6, 2019
e008220
[IMP] UI stuff
max3903 Feb 8, 2019
9d9263d
[FIX] UnboundLocalError: local variable 'res' referenced before assig…
max3903 Feb 8, 2019
523191e
[FIX] Default value of requested quantity
max3903 Feb 8, 2019
1e6a864
[FIX] Conflict with parent_id field of res.partner
max3903 Feb 21, 2019
749f206
[IMP] Fieldservice Stock Bug Fix
osi-scampbell Mar 8, 2019
a1aa36b
[IMP] fieldservice_stock
osi-scampbell Mar 14, 2019
1f81cd2
[MIG][WIP][12.0] fieldservice_stock
murtuzasaleh Apr 4, 2019
02fbe2b
[12.0][IMP] fieldservice_stock:Improved code.
murtuzasaleh Apr 17, 2019
c20c416
[IMP] #122 Convert Locations from Contact
osi-scampbell May 3, 2019
dbd4f89
[IMP] Max Comments
osi-scampbell May 7, 2019
11a6eb0
[IMP] Flake8 Errors
osi-scampbell May 7, 2019
44b3829
[ADD] Stock Request Confirm on Order
osi-scampbell May 10, 2019
daa4051
[IMP] Remove Unnecessary Fields
osi-scampbell May 10, 2019
c4443d1
[FIX] Flake8 Error
osi-scampbell May 10, 2019
c0fbc7f
[IMP] Stock View Cleanup
osi-scampbell May 10, 2019
68b0259
Update stock.py
max3903 May 11, 2019
f3edce8
Update fsm_order.xml
max3903 May 11, 2019
55da24a
Update __manifest__.py
max3903 May 11, 2019
a9878a9
[IMP] fieldservice
osi-scampbell May 13, 2019
410f53f
[IMP] Github Comments
osi-scampbell May 24, 2019
a64ecbe
[IMP] fieldservice_account: #135 Contractor Cost Check
max3903 May 24, 2019
0e1293f
[FIX] fieldservice_stock
max3903 May 27, 2019
5e40e74
[IMP] fieldservice_stock: Add direction to views
max3903 May 30, 2019
b626bfb
[FIX] fieldservice_stock
max3903 May 30, 2019
9bf1229
[FIX] fieldservice_stock: reset the stage
max3903 May 30, 2019
bcfd417
Update stock.py
max3903 May 30, 2019
b8dc4e1
[IMP] Add FSM Order to Request, Submit Draft
osi-scampbell Jun 20, 2019
a791301
[IMP] fieldservice_stock: Remove description
max3903 Jul 17, 2019
38f24a8
[IMP] fieldservice_stock: Use stock request
osi-scampbell Jun 13, 2019
5302e33
[FIX] fieldservice_stock: Missing shipping_address_id field
max3903 Aug 1, 2019
d54108c
[FIX] fieldservice_stock: Element cannot be located in parent view
max3903 Aug 2, 2019
d26b953
[FIX] Group SR's into same SRO
osi-scampbell Aug 6, 2019
23d025f
[FIX] fieldservice_stock: Expected Date Error (#15)
osi-scampbell Aug 14, 2019
e01c38d
[FIX] Datetime catch
osi-scampbell Aug 14, 2019
9f47111
[IMP] Action Confirm
osi-scampbell Aug 15, 2019
2e1db49
[IMP] Acount or multiple groups
osi-scampbell Aug 15, 2019
991d3e7
Update fieldservice_stock/models/stock_request.py
max3903 Aug 19, 2019
85d0030
[IMP] fieldservice_stock
max3903 Aug 21, 2019
94f5478
Fix customer_id
hparfr Sep 6, 2019
4204c8f
[IMP] Warehouse Not Readonly + Submit Stage Fix
osi-scampbell Sep 16, 2019
a046727
[FIX] Datetime Error
osi-scampbell Sep 20, 2019
c274e52
[FIX] fieldservice_stock
max3903 Oct 10, 2019
528b9f4
[IMP] fieldservice_stock: SRO to SR Tree (#375)
osi-scampbell Oct 31, 2019
96ca4be
[FIX] fieldservice_stock
max3903 Oct 11, 2019
8b869db
[IMP] Fix Convert Error
osi-scampbell Nov 14, 2019
753160e
[FIX] fieldservice_stock: Multiple back-orders if multiple moves
max3903 Dec 12, 2019
bb0e9c1
fieldservice_stock 12.0.1.0.2
OCA-git-bot Dec 12, 2019
37d3f73
[WIP][12.0][IMP] fieldservice_stock
murtuzasaleh Dec 13, 2019
bcef8b5
fieldservice_stock 12.0.1.1.0
OCA-git-bot Dec 18, 2019
c73489b
[IMP] fieldervice_stock
max3903 Dec 22, 2019
71844dd
[FIX] fieldservice_stock: PEP8 error
max3903 Dec 22, 2019
22707c9
fieldservice_stock 12.0.1.2.0
OCA-git-bot Dec 30, 2019
9c0d5ab
[IMP] fieldservice_stock: Add warehouse to territory
max3903 Jan 28, 2020
8b7519e
[FIX] Don't error if some moves were deleted by previous logic
dreispt Jan 31, 2020
767c0ac
[IMP] fieldservice_stock: Views and doc
max3903 Feb 3, 2020
1716579
fieldservice_stock 12.0.1.2.1
OCA-git-bot Feb 3, 2020
9271b62
[FIX] fieldservice_stock
max3903 Feb 5, 2020
91223f8
fieldservice_stock 12.0.1.3.0
OCA-git-bot Feb 6, 2020
7c71129
[12.0][IMP] fieldservice_stock
murtuzasaleh Feb 24, 2020
06dc005
fieldservice_stock 12.0.1.4.0
OCA-git-bot Feb 24, 2020
6be4af3
[IMP] Add "Create FSM Equipment" option to Operation Types
dreispt Mar 19, 2020
00563c3
[IMP] Migration script to handle the otherwise breaking changes
dreispt Mar 19, 2020
24b4c89
[IMP] fieldservice_stock: Set the FSM location when creating equipment
max3903 Mar 18, 2020
651d533
fieldservice_stock 12.0.1.5.0
OCA-git-bot Apr 13, 2020
821f5c9
fieldservice_stock 12.0.2.1.0
OCA-git-bot Apr 14, 2020
c459ea2
[IMP] FSM Stock Request Workflow Adjustment
osi-scampbell Apr 15, 2020
d6de002
fieldservice_stock 12.0.2.1.1
OCA-git-bot Apr 21, 2020
45304bd
[IMP] Gave Access to portal user.
murtuzasaleh Aug 20, 2020
60aa4c7
fieldservice_stock 12.0.2.2.0
OCA-git-bot Sep 29, 2020
bebd90f
[IMP] fieldservice_stock: Improve Current Inventory Location
marcelsavegnago Sep 22, 2020
d110997
[FIX] remove lot_id=false
marcelsavegnago Nov 3, 2020
e94b9b3
fieldservice_stock 12.0.2.3.0
OCA-git-bot Dec 10, 2020
c804207
[IMP] fieldservice_stock: Split stock request
brian10048 Nov 21, 2020
388a953
[IMP] fieldservice_stock: Split equipment
brian10048 Nov 21, 2020
5df08e3
[IMP] fieldservice_stock_request: Add tests
brian10048 Jan 15, 2021
9412030
fieldservice_stock 12.0.3.0.0
OCA-git-bot Mar 9, 2021
1da2384
[IMP] fieldservice_stock: black, isort, prettier
brian10048 May 26, 2021
1af1603
[MIG] fieldservice_stock: Migration to 13.0
brian10048 May 26, 2021
11172c2
[14.0][MIG] fieldservice_stock
Freni-OSI Jul 5, 2021
4ca161f
[UPD] Update fieldservice_stock.pot
oca-travis Jul 9, 2021
f12df71
[UPD] README.rst
OCA-git-bot Jul 9, 2021
6f76aa5
Added translation using Weblate (Spanish (Argentina))
ibuioli Oct 3, 2021
b0f5a8b
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 4, 2021
de9a5c4
[FIX] Fixed an issue of type error while on form view load
vimalpatelserpentcs Dec 13, 2021
a4cca1b
fieldservice_stock 14.0.1.1.0
OCA-git-bot Dec 15, 2021
a2da1ad
[IMP] fieldservice_stock: Add FSM Order to Stock Picking views
brian10048 Mar 16, 2022
a8c3ff0
[UPD] Update fieldservice_stock.pot
oca-travis Mar 22, 2022
ea7cb1b
fieldservice_stock 14.0.1.2.0
OCA-git-bot Mar 22, 2022
2e769a9
Update translation files
oca-transbot Mar 22, 2022
a44c97a
Translated using Weblate (Spanish (Argentina))
ibuioli Mar 24, 2022
c9083f6
[FIX] fieldservice_stock: adapt access to ir.actions.* records
brian10048 May 6, 2022
9c52d30
fieldservice_stock 14.0.1.2.1
OCA-git-bot May 9, 2022
67c4722
[15.0][MIG] fieldservice_stock
Freni-OSI Jun 3, 2022
2866816
[UPD] Update fieldservice_stock.pot
Oct 20, 2022
0836148
[UPD] README.rst
OCA-git-bot Oct 20, 2022
0edc5ff
Update translation files
weblate Oct 20, 2022
630d89d
Added translation using Weblate (Italian)
mymage Oct 27, 2022
bdb9f3a
Translated using Weblate (Italian)
mymage Oct 27, 2022
1669a23
[MIG] fieldservice_stock: Migration to 16.0
gbrito Nov 3, 2022
eedd853
[UPD] Update fieldservice_stock.pot
Nov 7, 2022
6a1cae4
[UPD] README.rst
OCA-git-bot Nov 7, 2022
4fcf3aa
[16.0][FIX] fieldservice_stock: ensure inventory_location is assigned
gbrito Nov 8, 2022
090f398
Translated using Weblate (Italian)
francesco-ooops Jan 18, 2023
5446f0d
fieldservice_stock 16.0.1.1.0
OCA-git-bot Feb 6, 2023
f943105
[FIX] fieldservice_stock: make inventory location editable
dalonsod Apr 23, 2023
b9c4169
fieldservice_stock 16.0.1.2.0
OCA-git-bot Apr 25, 2023
0d8e9bc
Translated using Weblate (Italian)
francesco-ooops May 15, 2023
a3cfb7e
Translated using Weblate (Italian)
francesco-ooops May 16, 2023
b473717
Translated using Weblate (Italian)
francesco-ooops May 17, 2023
e9a7b6e
Translated using Weblate (Portuguese (Brazil))
adrianojprado Jun 22, 2023
8d04036
Translated using Weblate (Spanish)
Ivorra78 Jul 22, 2023
25c8507
[UPD] README.rst
OCA-git-bot Sep 3, 2023
2788e65
[REF] fieldservice_stock: pre-commit fixes
dreispt Oct 28, 2023
7ced8b0
[BOT] post-merge updates
OCA-git-bot Oct 28, 2023
11ac415
Translated using Weblate (Italian)
mymage Oct 23, 2023
6bf04e6
Added translation using Weblate (French)
houzefa-abba Dec 19, 2023
251629d
Translated using Weblate (French)
houzefa-abba Dec 19, 2023
39f5e99
[17.0][MIG] fieldservice_stock: Migration to 17.0
hiregui Jan 25, 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
Prev Previous commit
Next Next commit
[ADD] fieldservice_vehicle_stock
max3903 authored and hiregui committed Jan 25, 2024
commit 94af619fcd9ef45a19aae12a33e6726273962851
3 changes: 1 addition & 2 deletions fieldservice_stock/__manifest__.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

{
'name': 'Field Service - Stock',
'summary': 'Inventory and Stock Operations for Field Service',
'summary': 'Inventory and Stock Operations for Field Services',
'version': '11.0.0.0.2',
'category': 'Field Service',
'author': "Open Source Integrators, "
@@ -17,7 +17,6 @@
'data': [
'data/fsm_stock_data.xml',
'views/fsm_location.xml',
'views/fsm_vehicle.xml',
'views/fsm_order.xml',
'views/stock.xml',
],
148 changes: 5 additions & 143 deletions fieldservice_stock/data/fsm_stock_data.xml
Original file line number Diff line number Diff line change
@@ -1,148 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>

<record id="stock_location_field" model="stock.location">
<field name="name">Field</field>
<field name="usage">view</field>
<field name="company_id"></field>
</record>
<record id="stock_location_field" model="stock.location">
<field name="name">Field</field>
<field name="usage">view</field>
<field name="company_id"></field>
</record>

<record id="stock_location_vehicle" model="stock.location">
<field name="name">Vehicle</field>
<field name="usage">view</field>
<field name="company_id"></field>
</record>

<record id="stock_location_vehicle_storage" model="stock.location">
<field name="name">Storage</field>
<field name="usage">internal</field>
<field name="location_id" ref="stock_location_vehicle"/>
<field name="company_id"></field>
</record>

</data>

<data noupdate="1">

<!-- Output to Vehicle operations -->
<record id="seq_picking_type_output_to_vehicle" model="ir.sequence">
<field name="name">Vehicle Loading</field>
<field name="prefix">VL</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
</record>

<record id="picking_type_output_to_vehicle" model="stock.picking.type">
<field name="name">Vehicle Loading</field>
<field name="sequence_id" ref="seq_picking_type_output_to_vehicle"/>
<field name="code">internal</field>
<field name="warehouse_id" eval="False"/>
<field name="default_location_src_id" ref="stock.stock_location_stock"/>
<field name="default_location_dest_id" ref="stock_location_vehicle"/>
</record>

<!-- Vehicle to Location operations -->
<record id="seq_picking_type_vehicle_to_location" model="ir.sequence">
<field name="name">Location Delivery</field>
<field name="prefix">LD</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
</record>

<record id="picking_type_vehicle_to_location" model="stock.picking.type">
<field name="name">Location Delivery</field>
<field name="sequence_id" ref="seq_picking_type_vehicle_to_location"/>
<field name="code">outgoing</field>
<field name="warehouse_id" eval="False"/>
<field name="default_location_src_id" ref="stock_location_vehicle"/>
</record>

<record id="route_stock_to_vehicle_to_location" model='stock.location.route'>
<field name="name">Stock to Vehicle to Location</field>
<field name="sequence">3</field>
<field name="company_id"></field>
</record>

<record id="procurement_rule_vehicle_to_location" model="procurement.rule">
<field name="name">Vehicle → Location</field>
<field name="action">move</field>
<field name="location_id" ref="stock.stock_location_customers"/>
<field name="location_src_id" ref="stock_location_vehicle_storage"/>
<field name="procure_method">make_to_order</field>
<field name="route_id" ref="route_stock_to_vehicle_to_location"/>
<field name="picking_type_id" ref="picking_type_vehicle_to_location"/>
</record>

<record id="procurement_rule_output_to_vehicle" model="procurement.rule">
<field name="name">Warehouse → Vehicle</field>
<field name="action">move</field>
<field name="location_id" ref="stock_location_vehicle_storage"/>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="procure_method">make_to_stock</field>
<field name="route_id" ref="route_stock_to_vehicle_to_location"/>
<field name="picking_type_id" ref="picking_type_output_to_vehicle"/>
</record>

<!-- Location Return Operations -->
<record id="route_location_return" model='stock.location.route'>
<field name="name">Location Return</field>
<field name="sequence">3</field>
<field name="company_id"></field>
</record>

<!-- Location Return to Vehicle operations -->
<record id="seq_picking_type_location_to_vehicle" model="ir.sequence">
<field name="name">Location Pickup</field>
<field name="prefix">LP</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
</record>

<record id="picking_type_location_to_vehicle" model="stock.picking.type">
<field name="name">Location Pickup</field>
<field name="sequence_id" ref="seq_picking_type_location_to_vehicle"/>
<field name="code">internal</field>
<field name="warehouse_id" eval="False"/>
<field name="default_location_dest_id" ref="stock_location_vehicle"/>
</record>

<record id="procurement_rule_location_to_vehicle" model="procurement.rule">
<field name="name">Warehouse → Vehicle</field>
<field name="action">move</field>
<field name="location_id" ref="stock_location_vehicle"/>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="procure_method">make_to_stock</field>
<field name="route_id" ref="route_location_return"/>
<field name="picking_type_id" ref="picking_type_location_to_vehicle"/>
</record>


<!-- Vehicle to Input -->
<record id="seq_picking_type_vehicle_to_input" model="ir.sequence">
<field name="name">Vehicle Returns</field>
<field name="prefix">VR</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
</record>

<record id="picking_type_vehicle_to_input" model="stock.picking.type">
<field name="name">Vehicle Returns</field>
<field name="sequence_id" ref="seq_picking_type_vehicle_to_input"/>
<field name="code">internal</field>
<field name="warehouse_id" eval="False"/>
<field name="default_location_src_id" ref="stock_location_vehicle"/>
<field name="default_location_dest_id" ref="stock.stock_location_stock"/>
</record>

<record id="stock_location_path_vehicle_to_input" model="stock.location.path">
<field name="name">Vehicle → Warehouse</field>
<field name="location_from_id" ref="stock_location_vehicle"/>
<field name="location_dest_id" ref="stock.stock_location_stock"/>
<field name="auto">manual</field>
<field name="picking_type_id" ref="picking_type_vehicle_to_input"/>
<field name="route_id" ref="route_location_return"/>
</record>

</data>
</odoo>
1 change: 0 additions & 1 deletion fieldservice_stock/models/__init__.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@

from . import (
fsm_location,
fsm_vehicle,
fsm_order,
stock,
)
5 changes: 3 additions & 2 deletions fieldservice_stock/models/fsm_location.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (C) 2018 - TODAY, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models
from odoo import fields
from odoo.addons.base_geoengine import geo_model


class FSMLocation(models.Model):
class FSMLocation(geo_model.GeoModel):
_inherit = 'fsm.location'

inventory_location = fields.Many2one('stock.location',
46 changes: 38 additions & 8 deletions fieldservice_stock/models/fsm_order.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

from datetime import datetime, timedelta

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

from odoo.tools import (DEFAULT_SERVER_DATETIME_FORMAT,
float_is_zero, float_compare)
@@ -20,13 +20,42 @@ class FSMOrder(geo_model.GeoModel):
'fsm.order.line', 'order_id', string="Order Lines",)
picking_ids = fields.One2many('stock.picking', 'fsm_order_id',
string='Transfers')
delivery_count = fields.Integer(string='Delivery Orders',
compute='_compute_picking_ids')
procurement_group_id = fields.Many2one(
'procurement.group', 'Procurement Group', copy=False)
warehouse_id = fields.Many2one('stock.warehouse', string='Warehouse',
help="Warehouse used to ship the materials")

@api.depends('picking_ids')
def _compute_picking_ids(self):
for order in self:
order.delivery_count = len(order.picking_ids)

def action_confirm(self):
self.line_ids._confirm_picking()
return super(FSMOrder, self).action_confirm()
if self.location_id and self.line_ids and self.warehouse_id:
self.line_ids._confirm_picking()
return super(FSMOrder, self).action_confirm()
else:
raise UserError(_('Please select the location, a warehouse and a'
' product.'))

@api.multi
def action_view_delivery(self):
'''
This function returns an action that display existing delivery orders
of given fsm order ids. It can either be a in a list or in a form
view, if there is only one delivery order to show.
'''
action = self.env.ref('stock.action_picking_tree_all').read()[0]

pickings = self.mapped('picking_ids')
if len(pickings) > 1:
action['domain'] = [('id', 'in', pickings.ids)]
elif pickings:
action['views'] = [(self.env.ref('stock.view_picking_form').id, 'form')]
action['res_id'] = pickings.id
return action

class FSMOrderLine(models.Model):
_name = 'fsm.order.line'
@@ -42,7 +71,7 @@ class FSMOrderLine(models.Model):
sequence = fields.Integer(string='Sequence', default=10, readonly=True,
states={'draft': [('readonly', False)]})
product_id = fields.Many2one(
'product.product', string="Product", required=True,
'product.product', string="Product",
domain=[('type', '=', 'product')], ondelete='restrict',
readonly=True, states={'draft': [('readonly', False)]})
product_uom_id = fields.Many2one(
@@ -119,15 +148,15 @@ def _prepare_procurement_values(self, group_id=False):
self.ensure_one()
values = {}
date_planned = (self.order_id.scheduled_date_start
or self.order_id.requested_date
or self.order_id.request_early
or self.order_id.request_late
or (datetime.now() + timedelta(days=1)).strftime(
DEFAULT_SERVER_DATETIME_FORMAT))
values.update({
'group_id': group_id,
'fsm_order_line_id': self.id,
'date_planned': date_planned,
'route_ids': self.env.ref(
'fieldservice_stock.route_stock_to_vehicle_to_location'),
'route_ids': self.order_id.warehouse_id.delivery_route_id,
'partner_dest_id': self.order_id.customer_id
})
return values
@@ -170,6 +199,7 @@ def _confirm_picking(self):
procurement_uom = line.product_uom_id
quant_uom = line.product_id.uom_id
get_param = self.env['ir.config_parameter'].sudo().get_param
import pdb;pdb.set_trace()
if (procurement_uom.id != quant_uom.id
and get_param('stock.propagate_uom') != '1'):
qty_needed = line.product_uom_id._compute_quantity(
@@ -178,7 +208,7 @@ def _confirm_picking(self):
try:
self.env['procurement.group'].run(
line.product_id, qty_needed, procurement_uom,
line.order_id.fsm_location_id.inventory_location,
line.order_id.location_id.inventory_location,
line.name, line.order_id.name, values)
except UserError as error:
errors.append(error.name)
11 changes: 0 additions & 11 deletions fieldservice_stock/models/fsm_vehicle.py

This file was deleted.

4 changes: 2 additions & 2 deletions fieldservice_stock/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
To configure this module, you need to:

* Set Inventory Locations for FSM Locations and FSM Vehicles
* Verify procurement routes
* Go to Field Service > Master Data > Locations
* Create or select a location and set the inventory location
8 changes: 3 additions & 5 deletions fieldservice_stock/readme/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
You will first need to install:
To install Field Service and have the mapping features, you need to install GeoEngine.

* fieldservice

Then go to Field Service > Configuration > Settings
Enable the 'Use Odoo Stock Logistics' option under Integrations
Please refer to the installation instructions available at:
https://github.com/OCA/geospatial/tree/11.0/base_geoengine
10 changes: 5 additions & 5 deletions fieldservice_stock/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
To use this module, you need to:

* Create a new field service order
* Under the Materials tab, add products with quantity
* Confirm an order to create stock moves
* Validate stock moves in the Inventory app
* Quantities Delivered on FSM Order Line will be updated based on move
* Create a new service order
* Under the Inventory tab, select the warehouse and add products with quantity
* Confirm the order to create the delivery orders
* Validate the transfers in the Inventory app. Quantities delivered on FSM
Order Line will be updated.
3 changes: 2 additions & 1 deletion fieldservice_stock/views/fsm_location.xml
Original file line number Diff line number Diff line change
@@ -6,7 +6,8 @@
<field name="inherit_id" ref="fieldservice.fsm_location_form_view"/>
<field name="arch" type="xml">
<xpath expr="//form/sheet/group/group[2]" position="inside">
<field name="inventory_location" domain="[('usage', 'in', ['internal','supplier','customer'])]"/>
<field name="inventory_location"
domain="[('usage', 'in', ['internal', 'supplier', 'customer'])]"/>
</xpath>
</field>
</record>
45 changes: 30 additions & 15 deletions fieldservice_stock/views/fsm_order.xml
Original file line number Diff line number Diff line change
@@ -6,31 +6,46 @@
<field name="model">fsm.order</field>
<field name="inherit_id" ref="fieldservice.fsm_order_form"/>
<field name="arch" type="xml">
<div class="oe_button_box" position="inside">
<field name="picking_ids" invisible="1"/>
<button type="object"
name="action_view_delivery"
class="oe_stat_button"
icon="fa-truck"
attrs="{'invisible': [('delivery_count', '=', 0)]}" groups="base.group_user">
<field name="delivery_count" widget="statinfo" string="Delivery"/>
</button>
</div>
<xpath expr="//notebook/page[1]" position="after">
<page string="Materials">
<field name="line_ids" mode="tree">
<tree string="Material Order Lines" editable="bottom">
<page string="Inventory">
<group>
<group>
<field name="Warehouse"/>
</group>
<group></group>
</group>
<field name="line_ids" nolabel="1">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
<field name="product_id"
context="{
'quantity':qty_ordered,
'uom':product_uom_id,
context="{
'quantity': qty_ordered,
'uom': product_uom_id,
}"
/>
<field name="name"/>
<field name="qty_ordered"
string="Ordered Qty"
context="{
'quantity':qty_ordered,
'uom':product_uom_id,
string="Ordered Qty"
context="{
'quantity': qty_ordered,
'uom': product_uom_id,
}"
/>
<field name="qty_delivered"
/>
<field name="qty_delivered"/>
<field name="product_uom_id"
attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}"
options='{"no_open": True, "no_create": True}'
groups="product.group_uom"/>
attrs="{'readonly': [('state', 'in', ('sale', 'done', 'cancel'))]}"
options='{"no_open": True, "no_create": True}'
groups="product.group_uom"/>
<field name="state" invisible="1"/>
</tree>
</field>
14 changes: 0 additions & 14 deletions fieldservice_stock/views/fsm_vehicle.xml

This file was deleted.

6 changes: 6 additions & 0 deletions fieldservice_stock/views/stock.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<menuitem id="menu_fsm_product"
name="Products"
action="stock.product_template_action_product"
parent="fieldservice.data"
sequence="90"/>

<menuitem id="menu_fsm_stock_inventory"
name="Inventory"
action="stock.quantsact"