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
Florian da Costa
parent
1702da4350
commit
b7c138f31b
@@ -9,7 +9,7 @@
|
||||
"summary": "Introduces the return merchandise authorization (RMA) process "
|
||||
"in odoo",
|
||||
"author": "ForgeFlow",
|
||||
"website": "https://github.com/OCA/https://github.com/ForgeFlow/stock-rma",
|
||||
"website": "https://github.com/OCA/account-budgeting",
|
||||
"depends": ["stock", "mail", "web"],
|
||||
"demo": ["demo/stock_demo.xml"],
|
||||
"data": [
|
||||
|
||||
@@ -217,6 +217,7 @@ class RmaOrderLine(models.Model):
|
||||
)
|
||||
operation_id = fields.Many2one(
|
||||
comodel_name="rma.operation",
|
||||
required=True,
|
||||
string="Operation",
|
||||
readonly=True,
|
||||
states={"draft": [("readonly", False)]},
|
||||
@@ -342,7 +343,7 @@ class RmaOrderLine(models.Model):
|
||||
string="Delivery Policy",
|
||||
default="no",
|
||||
readonly=True,
|
||||
ondelete="cascade",
|
||||
ondelete='cascade',
|
||||
states={"draft": [("readonly", False)]},
|
||||
)
|
||||
in_route_id = fields.Many2one(
|
||||
|
||||
@@ -533,7 +533,9 @@ class TestRma(common.SavepointCase):
|
||||
self.assertEqual(
|
||||
list(set(lines.mapped("qty_outgoing"))), [0], "Wrong qty_outgoing"
|
||||
)
|
||||
self.assertEqual(list(set(lines.mapped("qty_delivered"))), [0], "qty_delivered")
|
||||
self.assertEqual(
|
||||
list(set(lines.mapped("qty_delivered"))), [0], "qty_delivered"
|
||||
)
|
||||
|
||||
# product specific
|
||||
self._check_equal_quantity(
|
||||
@@ -611,7 +613,9 @@ class TestRma(common.SavepointCase):
|
||||
self.assertEqual(
|
||||
list(set(lines.mapped("qty_received"))), [0], "Wrong qty_received"
|
||||
)
|
||||
self.assertEqual(list(set(lines.mapped("qty_delivered"))), [0], "qty_delivered")
|
||||
self.assertEqual(
|
||||
list(set(lines.mapped("qty_delivered"))), [0], "qty_delivered"
|
||||
)
|
||||
|
||||
# product specific
|
||||
self._check_equal_quantity(
|
||||
|
||||
@@ -6,10 +6,15 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Move">
|
||||
<group>
|
||||
<field name="partner_id" string="Customer" />
|
||||
<field
|
||||
name="partner_id"
|
||||
string="Customer"
|
||||
/>
|
||||
</group>
|
||||
<separator string="Select Stock Moves to add" />
|
||||
<field name="move_ids">
|
||||
<field
|
||||
name="move_ids"
|
||||
>
|
||||
<tree>
|
||||
<field name="product_id" />
|
||||
<field name="product_uom_qty" />
|
||||
@@ -83,10 +88,15 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Move">
|
||||
<group>
|
||||
<field name="partner_id" string="Supplier" />
|
||||
<field
|
||||
name="partner_id"
|
||||
string="Supplier"
|
||||
/>
|
||||
</group>
|
||||
<separator string="Select Stock Moves to add" />
|
||||
<field name="move_ids" />
|
||||
<field
|
||||
name="move_ids"
|
||||
/>
|
||||
<footer>
|
||||
<button
|
||||
string="Confirm"
|
||||
|
||||
@@ -206,18 +206,17 @@ class RmaMakePickingItem(models.TransientModel):
|
||||
|
||||
wiz_id = fields.Many2one("rma_make_picking.wizard", string="Wizard", required=True)
|
||||
line_id = fields.Many2one(
|
||||
"rma.order.line", string="RMA order Line", readonly=True, ondelete="cascade"
|
||||
"rma.order.line", string="RMA order Line", ondelete="cascade"
|
||||
)
|
||||
rma_id = fields.Many2one(
|
||||
"rma.order", related="line_id.rma_id", string="RMA Group", readonly=True
|
||||
"rma.order", related="line_id.rma_id", string="RMA Group"
|
||||
)
|
||||
product_id = fields.Many2one("product.product", string="Product", readonly=True)
|
||||
product_id = fields.Many2one("product.product", string="Product")
|
||||
product_qty = fields.Float(
|
||||
related="line_id.product_qty",
|
||||
string="Quantity Ordered",
|
||||
copy=False,
|
||||
digits="Product Unit of Measure",
|
||||
readonly=True,
|
||||
)
|
||||
qty_to_receive = fields.Float(
|
||||
string="Quantity to Receive", digits="Product Unit of Measure"
|
||||
@@ -225,4 +224,4 @@ class RmaMakePickingItem(models.TransientModel):
|
||||
qty_to_deliver = fields.Float(
|
||||
string="Quantity To Deliver", digits="Product Unit of Measure"
|
||||
)
|
||||
uom_id = fields.Many2one("uom.uom", string="Unit of Measure", readonly=True)
|
||||
uom_id = fields.Many2one("uom.uom", string="Unit of Measure")
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
<separator string="Select lines for picking" />
|
||||
<field name="item_ids">
|
||||
<tree string="RMA Lines" editable="bottom" create="false">
|
||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="product_id" />
|
||||
<field name="rma_id" groups="rma.group_rma_groups" readonly="1"/>
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="product_qty" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
<field name="line_id" invisible="1"/>
|
||||
<field name="rma_id" invisible="1"/>
|
||||
<field name="uom_id" groups="uom.group_uom" readonly="1"/>
|
||||
<field name="qty_to_receive" readonly="0" />
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user