Skip to content

Commit

Permalink
[FIX] product_Expiry_ux: manifest version
Browse files Browse the repository at this point in the history
  • Loading branch information
mav-adhoc committed Nov 21, 2023
1 parent ca4e126 commit 6a38c64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion product_expiry_ux/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
'name': 'Products Expiration Date UX',
'version': '15.0.1.0.0',
'version': '16.0.1.0.0',
'category': 'Inventory/Inventory',
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
Expand Down
4 changes: 2 additions & 2 deletions product_expiry_ux/models/production_lot.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from odoo import api, fields, models
from odoo.tools import float_compare

class StockProductionLot(models.Model):
_inherit = 'stock.production.lot'
class StockLot(models.Model):
_inherit = 'stock.lot'

is_alert_date = fields.Boolean(compute='_compute_is_alert_date', help="The Alert Date has been reached")

Expand Down
11 changes: 6 additions & 5 deletions product_expiry_ux/views/production_lot_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<odoo>
<record id="view_move_form_expiry_ux" model="ir.ui.view">
<field name="name">stock.production.lot.inherit.form.ux</field>
<field name="model">stock.production.lot</field>
<field name="model">stock.lot</field>
<field name="inherit_id" ref="product_expiry.view_move_form_expiry" />
<field name="arch" type="xml">
<xpath expr="//span[hasclass('badge-danger')]" position="replace">
<span class="badge badge-danger" attrs="{'invisible': [('product_expiry_alert', '=', False)]}">Expired</span>
<xpath expr="//div[hasclass('oe_title')]/span" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//span[hasclass('badge-danger')]" position="after">
<xpath expr="//div[hasclass('oe_title')]" position="inside">
<field name="is_alert_date" invisible="1"/>
<span class="badge badge-warning" attrs="{'invisible': [('is_alert_date', '=', False)]}">Expiration Alert</span>
<span class="badge text-bg-danger" attrs="{'invisible': [('product_expiry_alert', '=', False)]}">Expired </span>
<span class="badge text-bg-warning" attrs="{'invisible': [('is_alert_date', '=', False)]}"> Expiration Alert</span>
</xpath>
</field>
</record>
Expand Down

0 comments on commit 6a38c64

Please sign in to comment.