mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[IMP] rma: add description to rma order and copy it over to new lines
This commit is contained in:
committed by
AaronHForgeFlow
parent
5f0f1c1681
commit
739f67beca
@@ -84,6 +84,7 @@ class RmaOrder(models.Model):
|
|||||||
reference = fields.Char(
|
reference = fields.Char(
|
||||||
string="Partner Reference", help="The partner reference of this RMA order."
|
string="Partner Reference", help="The partner reference of this RMA order."
|
||||||
)
|
)
|
||||||
|
description = fields.Text()
|
||||||
comment = fields.Text("Additional Information")
|
comment = fields.Text("Additional Information")
|
||||||
date_rma = fields.Datetime(
|
date_rma = fields.Datetime(
|
||||||
string="Order Date", index=True, default=lambda self: self._default_date_rma()
|
string="Order Date", index=True, default=lambda self: self._default_date_rma()
|
||||||
|
|||||||
@@ -91,6 +91,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group name="info">
|
<group name="info">
|
||||||
|
<field name="type" readonly="1" invisible="1" />
|
||||||
<field
|
<field
|
||||||
name="partner_id"
|
name="partner_id"
|
||||||
context="{'res_partner_search_mode': 'customer'}"
|
context="{'res_partner_search_mode': 'customer'}"
|
||||||
@@ -106,9 +107,13 @@
|
|||||||
attrs="{'readonly':[('state', '!=', 'draft')]}"
|
attrs="{'readonly':[('state', '!=', 'draft')]}"
|
||||||
/>
|
/>
|
||||||
</group>
|
</group>
|
||||||
<group name="comments">
|
<group name="contact">
|
||||||
<field name="comment" />
|
<field name="requested_by" readonly="1" />
|
||||||
<field name="type" readonly="1" invisible="1" />
|
<field
|
||||||
|
name="assigned_to"
|
||||||
|
attrs="{'readonly':[('state', '!=', 'draft')]}"
|
||||||
|
/>
|
||||||
|
<field name="company_id" groups="base.group_multi_company" />
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
@@ -134,13 +139,15 @@
|
|||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<group name="contact" string="Contact">
|
<group name="comments" string="Description" colspan="2">
|
||||||
<field name="requested_by" readonly="1" />
|
|
||||||
<field
|
<field
|
||||||
name="assigned_to"
|
name="description"
|
||||||
attrs="{'readonly':[('state', '!=', 'draft')]}"
|
placeholder="This description will be copied to RMA lines."
|
||||||
|
/>
|
||||||
|
<field
|
||||||
|
name="comment"
|
||||||
|
placeholder="Additional information will be printed in RMA group report."
|
||||||
/>
|
/>
|
||||||
<field name="company_id" groups="base.group_multi_company" />
|
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<notebook colspan="4">
|
<notebook colspan="4">
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ class RmaAddSerialWiz(models.TransientModel):
|
|||||||
|
|
||||||
vals = {
|
vals = {
|
||||||
"partner_id": self.partner_id.id,
|
"partner_id": self.partner_id.id,
|
||||||
|
"description": self.rma_id.description,
|
||||||
"product_id": lot.product_id.id,
|
"product_id": lot.product_id.id,
|
||||||
"lot_id": lot.id,
|
"lot_id": lot.id,
|
||||||
"uom_id": lot.product_id.uom_id.id,
|
"uom_id": lot.product_id.uom_id.id,
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ class RmaAddStockMove(models.TransientModel):
|
|||||||
)
|
)
|
||||||
data = {
|
data = {
|
||||||
"partner_id": self.partner_id.id,
|
"partner_id": self.partner_id.id,
|
||||||
|
"description": self.rma_id.description,
|
||||||
"reference_move_id": sm.id,
|
"reference_move_id": sm.id,
|
||||||
"product_id": sm.product_id.id,
|
"product_id": sm.product_id.id,
|
||||||
"lot_id": lot and lot.id or False,
|
"lot_id": lot and lot.id or False,
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ class RmaLineMakeSupplierRma(models.TransientModel):
|
|||||||
)
|
)
|
||||||
data = {
|
data = {
|
||||||
"partner_id": self.partner_id.id,
|
"partner_id": self.partner_id.id,
|
||||||
|
"description": self.supplier_rma_id.description,
|
||||||
"type": "supplier",
|
"type": "supplier",
|
||||||
"origin": item.line_id.rma_id.name,
|
"origin": item.line_id.rma_id.name,
|
||||||
"customer_address_id": item.line_id.delivery_address_id.id
|
"customer_address_id": item.line_id.delivery_address_id.id
|
||||||
|
|||||||
Reference in New Issue
Block a user