Merge PR #226 into 12.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2021-05-25 13:48:45 +00:00
3 changed files with 12 additions and 0 deletions

View File

@@ -19,6 +19,10 @@ class RmaTag(models.Model):
translate=True,
copy=False,
)
is_public = fields.Boolean(
string="Public Tag",
help="The tag is visible in the portal view",
)
color = fields.Integer(string="Color Index")
rma_ids = fields.Many2many(comodel_name="rma")

View File

@@ -83,6 +83,12 @@
</a>
</span>
<span class="float-right">
<!-- Tags -->
<t t-set="tags" t-value="rma.tag_ids.filtered('is_public')" />
<!-- We don't have the color o_tag_color_# classes available in the frontend -->
<t t-foreach="tags" t-as="tag">
<span class="badge badge-pill badge-info label-text-align" t-esc="tag.name" />
</t>
<t t-if="rma.state in ['refunded', 'returned', 'replaced']">
<span class="small text-success orders_label_text_align"><i class="fa fa-fw fa-check"/> <b><span t-field="rma.state"/></b></span>
</t>

View File

@@ -22,6 +22,7 @@
</div>
<group>
<field name="name"/>
<field name="is_public"/>
</group>
</sheet>
</form>
@@ -34,6 +35,7 @@
<field name="arch" type="xml">
<tree string="RMA Tags">
<field name="name"/>
<field name="is_public"/>
<field name="active"/>
</tree>
</field>