mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[MIG] rma: Migration to 14.0 - fix
This commit is contained in:
committed by
Carlos Vallés Fuster
parent
3efe41ed86
commit
28fcd8efbe
@@ -9,7 +9,7 @@
|
|||||||
"summary": "Introduces the return merchandise authorization (RMA) process "
|
"summary": "Introduces the return merchandise authorization (RMA) process "
|
||||||
"in odoo",
|
"in odoo",
|
||||||
"author": "ForgeFlow",
|
"author": "ForgeFlow",
|
||||||
"website": "https://github.com/OCA/account-budgeting",
|
"website": "https://github.com/OCA/https://github.com/ForgeFlow/stock-rma",
|
||||||
"depends": ["stock", "mail", "web"],
|
"depends": ["stock", "mail", "web"],
|
||||||
"demo": ["demo/stock_demo.xml"],
|
"demo": ["demo/stock_demo.xml"],
|
||||||
"data": [
|
"data": [
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ class RmaOrderLine(models.Model):
|
|||||||
string="Delivery Policy",
|
string="Delivery Policy",
|
||||||
default="no",
|
default="no",
|
||||||
readonly=True,
|
readonly=True,
|
||||||
ondelete='cascade',
|
ondelete="cascade",
|
||||||
states={"draft": [("readonly", False)]},
|
states={"draft": [("readonly", False)]},
|
||||||
)
|
)
|
||||||
in_route_id = fields.Many2one(
|
in_route_id = fields.Many2one(
|
||||||
|
|||||||
@@ -533,9 +533,7 @@ class TestRma(common.SavepointCase):
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list(set(lines.mapped("qty_outgoing"))), [0], "Wrong qty_outgoing"
|
list(set(lines.mapped("qty_outgoing"))), [0], "Wrong qty_outgoing"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(list(set(lines.mapped("qty_delivered"))), [0], "qty_delivered")
|
||||||
list(set(lines.mapped("qty_delivered"))), [0], "qty_delivered"
|
|
||||||
)
|
|
||||||
|
|
||||||
# product specific
|
# product specific
|
||||||
self._check_equal_quantity(
|
self._check_equal_quantity(
|
||||||
@@ -613,9 +611,7 @@ class TestRma(common.SavepointCase):
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list(set(lines.mapped("qty_received"))), [0], "Wrong qty_received"
|
list(set(lines.mapped("qty_received"))), [0], "Wrong qty_received"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(list(set(lines.mapped("qty_delivered"))), [0], "qty_delivered")
|
||||||
list(set(lines.mapped("qty_delivered"))), [0], "qty_delivered"
|
|
||||||
)
|
|
||||||
|
|
||||||
# product specific
|
# product specific
|
||||||
self._check_equal_quantity(
|
self._check_equal_quantity(
|
||||||
|
|||||||
@@ -6,15 +6,10 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Select Move">
|
<form string="Select Move">
|
||||||
<group>
|
<group>
|
||||||
<field
|
<field name="partner_id" string="Customer" />
|
||||||
name="partner_id"
|
|
||||||
string="Customer"
|
|
||||||
/>
|
|
||||||
</group>
|
</group>
|
||||||
<separator string="Select Stock Moves to add" />
|
<separator string="Select Stock Moves to add" />
|
||||||
<field
|
<field name="move_ids">
|
||||||
name="move_ids"
|
|
||||||
>
|
|
||||||
<tree>
|
<tree>
|
||||||
<field name="product_id" />
|
<field name="product_id" />
|
||||||
<field name="product_uom_qty" />
|
<field name="product_uom_qty" />
|
||||||
@@ -88,15 +83,10 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Select Move">
|
<form string="Select Move">
|
||||||
<group>
|
<group>
|
||||||
<field
|
<field name="partner_id" string="Supplier" />
|
||||||
name="partner_id"
|
|
||||||
string="Supplier"
|
|
||||||
/>
|
|
||||||
</group>
|
</group>
|
||||||
<separator string="Select Stock Moves to add" />
|
<separator string="Select Stock Moves to add" />
|
||||||
<field
|
<field name="move_ids" />
|
||||||
name="move_ids"
|
|
||||||
/>
|
|
||||||
<footer>
|
<footer>
|
||||||
<button
|
<button
|
||||||
string="Confirm"
|
string="Confirm"
|
||||||
|
|||||||
@@ -208,9 +208,7 @@ class RmaMakePickingItem(models.TransientModel):
|
|||||||
line_id = fields.Many2one(
|
line_id = fields.Many2one(
|
||||||
"rma.order.line", string="RMA order Line", ondelete="cascade"
|
"rma.order.line", string="RMA order Line", ondelete="cascade"
|
||||||
)
|
)
|
||||||
rma_id = fields.Many2one(
|
rma_id = fields.Many2one("rma.order", related="line_id.rma_id", string="RMA Group")
|
||||||
"rma.order", related="line_id.rma_id", string="RMA Group"
|
|
||||||
)
|
|
||||||
product_id = fields.Many2one("product.product", string="Product")
|
product_id = fields.Many2one("product.product", string="Product")
|
||||||
product_qty = fields.Float(
|
product_qty = fields.Float(
|
||||||
related="line_id.product_qty",
|
related="line_id.product_qty",
|
||||||
|
|||||||
@@ -8,12 +8,15 @@
|
|||||||
<separator string="Select lines for picking" />
|
<separator string="Select lines for picking" />
|
||||||
<field name="item_ids">
|
<field name="item_ids">
|
||||||
<tree string="RMA Lines" editable="bottom" create="false">
|
<tree string="RMA Lines" editable="bottom" create="false">
|
||||||
<field name="rma_id" groups="rma.group_rma_groups" readonly="1"/>
|
<field
|
||||||
<field name="product_id" readonly="1"/>
|
name="rma_id"
|
||||||
|
groups="rma.group_rma_groups"
|
||||||
|
readonly="1"
|
||||||
|
/>
|
||||||
|
<field name="product_id" readonly="1" />
|
||||||
<field name="product_qty" />
|
<field name="product_qty" />
|
||||||
<field name="line_id" invisible="1"/>
|
<field name="line_id" invisible="1" />
|
||||||
<field name="rma_id" invisible="1"/>
|
<field name="uom_id" groups="uom.group_uom" readonly="1" />
|
||||||
<field name="uom_id" groups="uom.group_uom" readonly="1"/>
|
|
||||||
<field name="qty_to_receive" readonly="0" />
|
<field name="qty_to_receive" readonly="0" />
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
@@ -47,6 +50,7 @@
|
|||||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||||
<field name="product_id" />
|
<field name="product_id" />
|
||||||
<field name="product_qty" />
|
<field name="product_qty" />
|
||||||
|
<field name="line_id" invisible="1" />
|
||||||
<field name="uom_id" groups="uom.group_uom" />
|
<field name="uom_id" groups="uom.group_uom" />
|
||||||
<field name="qty_to_deliver" readonly="0" />
|
<field name="qty_to_deliver" readonly="0" />
|
||||||
</tree>
|
</tree>
|
||||||
|
|||||||
Reference in New Issue
Block a user