Skip to content

Commit

Permalink
[MIG] fieldservice_stock_request: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Jun 19, 2024
1 parent 6e3995b commit 89d5d7b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 51 deletions.
2 changes: 1 addition & 1 deletion fieldservice_stock_request/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Field Service - Stock Request",
"summary": "Integrate Stock Requests with Field Service Orders",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"category": "Field Service",
"author": "Open Source Integrators, "
"Brian McMaster, "
Expand Down
1 change: 0 additions & 1 deletion fieldservice_stock_request/models/fsm_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class FSMOrder(models.Model):
REQUEST_STATES,
string="Request State",
default="draft",
readonly=True,
)

def action_request_submit(self):
Expand Down
37 changes: 1 addition & 36 deletions fieldservice_stock_request/tests/test_fsm_stock_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,41 +38,6 @@ def setUpClass(cls):
cls.warehouse = cls.env["stock.warehouse"].search(
[("company_id", "=", cls.env.user.company_id.id)], limit=1
)

# cls.route = cls.env["stock.location.route"].create(
# {
# "name": "Transfer",
# "product_categ_selectable": False,
# "product_selectable": True,
# "company_id": cls.env.user.company_id.id,
# "sequence": 10,
# "rule_ids": [
# (
# 0,
# 0,
# {
# "name": "Stock -> output rule",
# "action": "pull",
# "picking_type_id": cls.ref("stock.picking_type_out"),
# "location_src_id": cls.ref("stock.stock_location_stock"),
# "location_id": cls.ref("stock.stock_location_customers"),
# },
# ),
# (
# 0,
# 0,
# {
# "name": "Stock -> output rule",
# "action": "pull",
# "picking_type_id": cls.ref("stock.picking_type_out"),
# "location_src_id": cls.warehouse.lot_stock_id.id,
# "location_id": cls.ref("stock.stock_location_customers"),
# },
# ),
# ],
# }
# )

cls.ressuply_loc = cls.env["stock.location"].create(
{
"name": "Ressuply",
Expand Down Expand Up @@ -314,7 +279,7 @@ def test_stock_move_line(self):
picking.with_user(self.stock_request_manager).action_confirm()
picking.with_user(self.stock_request_manager).action_assign()
packout1 = picking.move_line_ids[0]
packout1.qty_done = 5
packout1.quantity = 5
picking.with_user(self.stock_request_manager)._action_done()

def test_08_stock_request(self):
Expand Down
24 changes: 12 additions & 12 deletions fieldservice_stock_request/views/fsm_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@
<header>
<button
name="action_request_submit"
attrs="{'invisible': [('request_stage', 'not in', ['draft'])]}"
invisible="request_stage not in ['draft']"
type="object"
class="oe_highlight"
string="Submit"
/>
<button
name="action_request_draft"
type="object"
attrs="{'invisible': [('request_stage', 'not in', ['cancel'])]}"
invisible="request_stage not in ['cancel']"
class="oe_highlight"
string="Set to Draft"
/>
<button
name="action_request_cancel"
attrs="{'invisible': [('request_stage', 'not in', ['draft','submitted','open'])]}"
invisible="request_stage not in ['draft','submitted','open']"
type="object"
string="Cancel"
/>
<field name='request_stage' widget="statusbar" />
<field name='request_stage' widget="statusbar" readonly="1" />
</header>
</xpath>
<field name="move_ids" position="before">
Expand All @@ -38,8 +38,8 @@
<field name="name" readonly="1" />
<field name="product_id" />
<field name="order_id" force_save="1" />
<field name="allowed_uom_categ_id" invisible="1" />
<field name="allow_virtual_location" invisible="1" />
<field name="allowed_uom_categ_id" column_invisible="1" />
<field name="allow_virtual_location" column_invisible="1" />
<field
name="product_uom_id"
options="{'no_open': True, 'no_create': True}"
Expand All @@ -50,18 +50,18 @@
name="route_id"
options="{'no_create': True}"
groups="stock.group_stock_multi_locations"
invisible="1"
column_invisible="1"
/>
<field name="route_ids" invisible="1" />
<field name="route_ids" column_invisible="1" />
<field name="product_uom_qty" />
<field name="qty_in_progress" />
<field name="qty_done" />
<field name="expected_date" />
<field name="picking_policy" invisible="1" />
<field name="warehouse_id" invisible="1" />
<field name="picking_policy" column_invisible="1" />
<field name="warehouse_id" column_invisible="1" />
<field name="location_id" invisible="0" />
<field name="procurement_group_id" invisible="1" />
<field name="company_id" invisible="1" />
<field name="procurement_group_id" column_invisible="1" />
<field name="company_id" column_invisible="1" />
<field name="state" />
</tree>
</field>
Expand Down
2 changes: 1 addition & 1 deletion fieldservice_stock_request/views/stock_request_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
expr="//field[@name='stock_request_ids']/tree/field[@name='product_id']"
position="after"
>
<field name="fsm_order_id" invisible="1" />
<field name="fsm_order_id" column_invisible="1" />
</xpath>
</field>
</record>
Expand Down

0 comments on commit 89d5d7b

Please sign in to comment.