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(
|
||||
string="Partner Reference", help="The partner reference of this RMA order."
|
||||
)
|
||||
description = fields.Text()
|
||||
comment = fields.Text("Additional Information")
|
||||
date_rma = fields.Datetime(
|
||||
string="Order Date", index=True, default=lambda self: self._default_date_rma()
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
</div>
|
||||
<group>
|
||||
<group name="info">
|
||||
<field name="type" readonly="1" invisible="1" />
|
||||
<field
|
||||
name="partner_id"
|
||||
context="{'res_partner_search_mode': 'customer'}"
|
||||
@@ -106,9 +107,13 @@
|
||||
attrs="{'readonly':[('state', '!=', 'draft')]}"
|
||||
/>
|
||||
</group>
|
||||
<group name="comments">
|
||||
<field name="comment" />
|
||||
<field name="type" readonly="1" invisible="1" />
|
||||
<group name="contact">
|
||||
<field name="requested_by" readonly="1" />
|
||||
<field
|
||||
name="assigned_to"
|
||||
attrs="{'readonly':[('state', '!=', 'draft')]}"
|
||||
/>
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
@@ -134,13 +139,15 @@
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="contact" string="Contact">
|
||||
<field name="requested_by" readonly="1" />
|
||||
<group name="comments" string="Description" colspan="2">
|
||||
<field
|
||||
name="assigned_to"
|
||||
attrs="{'readonly':[('state', '!=', 'draft')]}"
|
||||
name="description"
|
||||
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>
|
||||
<notebook colspan="4">
|
||||
|
||||
@@ -102,6 +102,7 @@ class RmaAddSerialWiz(models.TransientModel):
|
||||
|
||||
vals = {
|
||||
"partner_id": self.partner_id.id,
|
||||
"description": self.rma_id.description,
|
||||
"product_id": lot.product_id.id,
|
||||
"lot_id": lot.id,
|
||||
"uom_id": lot.product_id.uom_id.id,
|
||||
|
||||
@@ -120,6 +120,7 @@ class RmaAddStockMove(models.TransientModel):
|
||||
)
|
||||
data = {
|
||||
"partner_id": self.partner_id.id,
|
||||
"description": self.rma_id.description,
|
||||
"reference_move_id": sm.id,
|
||||
"product_id": sm.product_id.id,
|
||||
"lot_id": lot and lot.id or False,
|
||||
|
||||
@@ -113,6 +113,7 @@ class RmaLineMakeSupplierRma(models.TransientModel):
|
||||
)
|
||||
data = {
|
||||
"partner_id": self.partner_id.id,
|
||||
"description": self.supplier_rma_id.description,
|
||||
"type": "supplier",
|
||||
"origin": item.line_id.rma_id.name,
|
||||
"customer_address_id": item.line_id.delivery_address_id.id
|
||||
|
||||
Reference in New Issue
Block a user