Skip to content

Commit

Permalink
[IMP] rma: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Nov 12, 2024
1 parent c70e530 commit 7a5ff39
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 52 deletions.
25 changes: 12 additions & 13 deletions rma/data/mail_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<field name="relation_field">team_id</field>
</record>


<!--RMA email template -->
<record id="mail_template_rma_notification" model="mail.template">
<field name="name">RMA Notification</field>
Expand All @@ -50,14 +49,14 @@
Dear
<t t-out="object.partner_id.name" />
<t t-if="object.partner_id.parent_id">
<t t-out="object.partner_id.parent_id.name" />
</t>
<t t-out="object.partner_id.parent_id.name" />
</t>
<br />
<br />
Here is the RMA
<strong>
<t t-out="object.name" />
</strong>
<t t-out="object.name" />
</strong>
from
<t t-out="object.company_id.name" />
.
Expand Down Expand Up @@ -86,14 +85,14 @@
Dear
<t t-out="object.partner_id.name" />
<t t-if="object.partner_id.parent_id">
<t t-out="object.partner_id.parent_id.name" />
</t>
<t t-out="object.partner_id.parent_id.name" />
</t>
<br />
<br />
The products for your RMA
<strong>
<t t-out="object.name" />
</strong>
<t t-out="object.name" />
</strong>
from
<t t-out="object.company_id.name" />
have been received in our warehouse.
Expand Down Expand Up @@ -121,14 +120,14 @@
Dear
<t t-out="object.partner_id.name" />
<t t-if="object.partner_id.parent_id">
<t t-out="object.partner_id.parent_id.name" />
</t>
<t t-out="object.partner_id.parent_id.name" />
</t>
<br />
<br />
You've succesfully placed your RMA
<strong>
<t t-out="object.name" />
</strong>
<t t-out="object.name" />
</strong>
on
<t t-out="object.company_id.name" />
. Our team will check it and will validate it as soon as possible.
Expand Down
2 changes: 1 addition & 1 deletion rma/models/rma.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ def _message_get_suggested_recipients(self):
# Reporting business methods
def _get_report_base_filename(self):
self.ensure_one()
return "RMA Report - %s" % self.name
return f"RMA Report - {self.name}"

# Other business methods

Expand Down
36 changes: 15 additions & 21 deletions rma/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,39 @@
title="Finish RMAs manually"
help=" When the RMA is receive, allow to finsish it manually choosing a finalization reason."
>
<field name="group_rma_manual_finalization" />
<field name="group_rma_manual_finalization" />
</setting>
<setting
title="Values set here are company-specific."
help="Group RMA returns by customer and warehouse."
>
<field name="rma_return_grouping" />
<field name="rma_return_grouping" />
</setting>
<setting
title="Send automatic RMA info to customer"
help="When the RMA is confirmed, send an automatic information email."
>
<field name="send_rma_confirmation" />
<div class="row mt16" invisible="not send_rma_confirmation">
<label
<field name="send_rma_confirmation" />
<div class="row mt16" invisible="not send_rma_confirmation">
<label
for="rma_mail_confirmation_template_id"
string="Email Template"
class="col-lg-4 o_light_label"
/>
<field
<field
name="rma_mail_confirmation_template_id"
class="oe_inline"
required="send_rma_confirmation"
context="{'default_model': 'rma'}"
/>
</div>
</div>
</setting>
<setting
title="Send automatic RMA products reception notification to customer"
help="When the RMA products are received, send an automatic information email."
>
<field name="send_rma_receipt_confirmation" />
<div
class="row mt16"
invisible="not send_rma_receipt_confirmation"
>
<field name="send_rma_receipt_confirmation" />
<div class="row mt16" invisible="not send_rma_receipt_confirmation">
<label
for="rma_mail_receipt_confirmation_template_id"
string="Email Template"
Expand All @@ -60,29 +57,26 @@
required="send_rma_receipt_confirmation"
context="{'default_model': 'rma'}"
/>
</div>
</div>
</setting>
<setting
title="Send automatic notification when the customer places an RMA"
help="When customers themselves place an RMA from the portal, send an automatic notification acknowleging it."
>
<field name="send_rma_draft_confirmation" />
<div
class="row mt16"
invisible="not send_rma_draft_confirmation"
>
<label
<field name="send_rma_draft_confirmation" />
<div class="row mt16" invisible="not send_rma_draft_confirmation">
<label
for="rma_mail_draft_confirmation_template_id"
string="Email Template"
class="col-lg-4 o_light_label"
/>
<field
<field
name="rma_mail_draft_confirmation_template_id"
class="oe_inline"
required="send_rma_draft_confirmation"
context="{'default_model': 'rma'}"
/>
</div>
</div>
</setting>
</xpath>
</field>
Expand Down
12 changes: 6 additions & 6 deletions rma/views/rma_portal_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@
<div class="d-lg-inline-block">
Date:
<span
class="text-muted"
t-field="refund.invoice_date"
/>
class="text-muted"
t-field="refund.invoice_date"
/>
</div>
</div>
<span
Expand Down Expand Up @@ -466,9 +466,9 @@
<div class="d-lg-inline-block">
Date:
<span
class="text-muted"
t-field="picking.date"
/>
class="text-muted"
t-field="picking.date"
/>
</div>
</div>
<t t-if="picking.state == 'done'">
Expand Down
14 changes: 7 additions & 7 deletions rma/views/rma_team_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@
style="display: inline;"
>
<field
name="alias_name"
class="oe_inline"
/>@<field
name="alias_domain"
class="oe_inline"
readonly="1"
/>
name="alias_name"
class="oe_inline"
/>@<field
name="alias_domain"
class="oe_inline"
readonly="1"
/>
</div>
</div>
<field
Expand Down
6 changes: 2 additions & 4 deletions rma/views/rma_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@
class="oe_stat_button"
icon="fa-truck"
invisible="not reception_move_id"
>
</button>
/>
<button
type="object"
name="action_view_delivery"
Expand All @@ -226,8 +225,7 @@
class="oe_stat_button"
icon="fa-pencil-square-o"
invisible="not refund_id"
>
</button>
/>
</div>
<div class="oe_title">
<h1>
Expand Down

0 comments on commit 7a5ff39

Please sign in to comment.