Skip to content

Commit

Permalink
Revert "IMP: add tumbnail to mrp.bom.lines"
Browse files Browse the repository at this point in the history
This reverts commit cd6845f.
  • Loading branch information
mboscolo committed Aug 1, 2024
1 parent 786a178 commit dc868d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 2 additions & 4 deletions plm/models/mrp_bom_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from odoo import fields
from odoo import api
from odoo import _
import logging


class MrpBomLineExtension(models.Model):
Expand Down Expand Up @@ -192,7 +193,6 @@ def _related_doc_ids(self):
readonly=True,
index=True,
help=_("This is the document object that declares this BoM."))

type = fields.Selection(related="bom_id.type")
itemnum = fields.Integer(_('CAD Item Position'), help=_(
"This is the item reference position into the CAD document that declares this BoM."))
Expand All @@ -219,9 +219,7 @@ def _related_doc_ids(self):
default='none')

product_tag_ids = fields.Many2many(related='product_tmpl_id.product_tag_ids')

product_tumbnail = fields.Image(related="product_id.product_tmpl_id.image_1920")


def go_to_product(self):
return {'name': _('Product'),
'res_model': 'product.product',
Expand Down
3 changes: 0 additions & 3 deletions plm/views/mrp_extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<field name="model">mrp.bom.line</field>
<field name="arch" type="xml">
<tree>
<field name="product_tumbnail" widget="image" options="{ 'size': [60, 60]}"/>
<field name="product_id"/>
<button name="go_to_product"
icon="fa-external-link"
Expand Down Expand Up @@ -46,7 +45,6 @@
<field name="arch" type="xml">
<field name="product_id" position="before">
<field name="itemnum"/>
<field name="product_tumbnail" widget="image" options="{ 'size': [60, 60]}"/>
</field>
<field name="product_id" position="after">
<field name="engineering_revision" readonly="True"/>
Expand Down Expand Up @@ -161,7 +159,6 @@
<xpath expr="//field[@name='bom_line_ids']/tree/field[@name='product_id']" position="before">
<field name="related_bom_ids" invisible="True"/>
<field name="hasChildBoms" invisible="True"/>
<field name="product_tumbnail" widget="image" options="{ 'size': [60, 60]}"/>
<button name="openRelatedBoms"
type="object"
icon="fa-level-down"
Expand Down

0 comments on commit dc868d7

Please sign in to comment.