Skip to content

Commit

Permalink
[IMP] lighting_reporting_vanguard_product: show RAL after the Finish
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankC013 committed Sep 18, 2024
1 parent 215c280 commit 25577f3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions lighting_reporting_vanguard_product/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from . import res_config_settings
from . import lighting_product_source_line
from . import lighting_product
17 changes: 17 additions & 0 deletions lighting_reporting_vanguard_product/models/lighting_product.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright NuoBiT Solutions - Frank Cespedes <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)

from odoo import models


class LightingProduct(models.Model):
_inherit = "lighting.product"

def get_finish_display(self):
self.ensure_one()
finish = " / ".join(
filter(None, [self.finish_id.display_name, self.finish2_id.display_name])
)
if self.ral_id:
finish += f" ({self.ral_id.display_name})"
return finish
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@
Finish
</td>
<td>
<span
t-out="' / '.join(filter(None, [doc.finish_id.display_name, doc.finish2_id.display_name]))"
/>
<span t-out="doc.get_finish_display()" />
</td>
</tr>
<tr t-if="doc.location_ids">
Expand Down

0 comments on commit 25577f3

Please sign in to comment.