Skip to content

Commit

Permalink
[MIG] rma_delivery: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPForgeFlow committed Aug 23, 2023
1 parent 82c35e9 commit 5232eb1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 28 deletions.
2 changes: 1 addition & 1 deletion rma_delivery/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "RMA delivery integration",
"version": "14.0.1.0.0",
"version": "16.0.1.0.0",
"license": "LGPL-3",
"category": "RMA",
"summary": "RMA default carrier on operation" "in odoo",
Expand Down
22 changes: 9 additions & 13 deletions rma_delivery/tests/test_rma_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,23 @@ def setUpClass(cls):
def test_rma_delivery(self):
self.rma_customer_id.rma_line_ids.action_rma_to_approve()
wizard = self.rma_make_picking.with_context(
{
"active_ids": self.rma_customer_id.rma_line_ids.ids,
"active_model": "rma.order.line",
"picking_type": "incoming",
"active_id": self.rma_customer_id.rma_line_ids.ids[0],
}
active_ids=self.rma_customer_id.rma_line_ids.ids,
active_model="rma.order.line",
picking_type="incoming",
active_id=self.rma_customer_id.rma_line_ids.ids[0],
).create({})
wizard._create_picking()
res = self.rma_customer_id.rma_line_ids.action_view_in_shipments()
picking = self.env["stock.picking"].browse(res["res_id"])
picking.action_assign()
for mv in picking.move_lines:
for mv in picking.move_ids:
mv.quantity_done = mv.product_uom_qty
picking._action_done()
wizard = self.rma_make_picking.with_context(
{
"active_id": self.rma_customer_id.rma_line_ids.ids[0],
"active_ids": self.rma_customer_id.rma_line_ids.ids,
"active_model": "rma.order.line",
"picking_type": "outgoing",
}
active_id=self.rma_customer_id.rma_line_ids.ids[0],
active_ids=self.rma_customer_id.rma_line_ids.ids,
active_model="rma.order.line",
picking_type="outgoing",
).create({})
wizard._create_picking()
res = self.rma_customer_id.rma_line_ids.action_view_out_shipments()
Expand Down
24 changes: 10 additions & 14 deletions rma_delivery/views/rma_operation_view.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>

<record id="rma_operation_form_view" model="ir.ui.view">
<field name="name">rma.operation.form.view</field>
<field name="model">rma.operation</field>
<field name="inherit_id" ref="rma.rma_operation_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='delivery_policy']" position="after">
<field name="default_carrier_id" options="{'no_create': True}" />
</xpath>
</field>
</record>

</data>
<record id="rma_operation_form_view" model="ir.ui.view">
<field name="name">rma.operation.form.view</field>
<field name="model">rma.operation</field>
<field name="inherit_id" ref="rma.rma_operation_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='delivery_policy']" position="after">
<field name="default_carrier_id" options="{'no_create': True}" />
</xpath>
</field>
</record>
</odoo>

0 comments on commit 5232eb1

Please sign in to comment.