Skip to content

Commit

Permalink
[MIG] stock_ean128: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vib-adhoc authored and jjscarafia committed Apr 14, 2023
1 parent 85fc40d commit 63a20e2
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions stock_ean128/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Stock EAN128',
'version': "15.0.1.0.0",
'version': "16.0.1.0.0",
'category': 'Warehouse Management',
'sequence': 14,
'summary': '',
Expand All @@ -37,7 +37,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
4 changes: 2 additions & 2 deletions stock_ean128/i18n/de.po
Expand Up @@ -20,12 +20,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: stock_ean128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_production_lot__ean_128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_lot__ean_128
msgid "EAN128"
msgstr ""

#. module: stock_ean128
#: model:ir.model,name:stock_ean128.model_stock_production_lot
#: model:ir.model,name:stock_ean128.model_stock_lot
msgid "Lot/Serial"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions stock_ean128/i18n/en.po
Expand Up @@ -18,12 +18,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: stock_ean128
#: model:ir.model.fields,field_description:stock.production.lot.ean_128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_lot__ean_128
msgid "EAN128"
msgstr "EAN128"

#. module: stock_ean128
#: model:ir.model,name:stock_ean128.model_stock_production_lot
#: model:ir.model,name:stock_ean128.model_stock_lot
msgid "Lot/Serial"
msgstr "Lot/Serial"

Expand Down
6 changes: 3 additions & 3 deletions stock_ean128/i18n/es.po
Expand Up @@ -22,17 +22,17 @@ msgstr ""
#. module: stock_ean128
#: model:ir.model.fields,field_description:stock_ean128.field_product_product__algolia_search
#: model:ir.model.fields,field_description:stock_ean128.field_product_template__algolia_search
#: model:ir.model.fields,field_description:stock_ean128.field_stock_production_lot__algolia_search
#: model:ir.model.fields,field_description:stock_ean128.field_stock_lot__algolia_search
msgid "Algolia Search"
msgstr ""

#. module: stock_ean128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_production_lot__ean_128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_lot__ean_128
msgid "EAN128"
msgstr ""

#. module: stock_ean128
#: model:ir.model,name:stock_ean128.model_stock_production_lot
#: model:ir.model,name:stock_ean128.model_stock_lot
msgid "Lot/Serial"
msgstr "Lote/Número de serie"

Expand Down
4 changes: 2 additions & 2 deletions stock_ean128/i18n/fr.po
Expand Up @@ -20,12 +20,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: stock_ean128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_production_lot__ean_128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_lot__ean_128
msgid "EAN128"
msgstr ""

#. module: stock_ean128
#: model:ir.model,name:stock_ean128.model_stock_production_lot
#: model:ir.model,name:stock_ean128.model_stock_lot
msgid "Lot/Serial"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions stock_ean128/i18n/pt_BR.po
Expand Up @@ -20,12 +20,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: stock_ean128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_production_lot__ean_128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_lot__ean_128
msgid "EAN128"
msgstr ""

#. module: stock_ean128
#: model:ir.model,name:stock_ean128.model_stock_production_lot
#: model:ir.model,name:stock_ean128.model_stock_lot
msgid "Lot/Serial"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions stock_ean128/i18n/ru.po
Expand Up @@ -20,12 +20,12 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"

#. module: stock_ean128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_production_lot__ean_128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_lot__ean_128
msgid "EAN128"
msgstr "EAN128"

#. module: stock_ean128
#: model:ir.model,name:stock_ean128.model_stock_production_lot
#: model:ir.model,name:stock_ean128.model_stock_lot
msgid "Lot/Serial"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions stock_ean128/i18n/sl.po
Expand Up @@ -20,12 +20,12 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"

#. module: stock_ean128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_production_lot__ean_128
#: model:ir.model.fields,field_description:stock_ean128.field_stock_lot__ean_128
msgid "EAN128"
msgstr ""

#. module: stock_ean128
#: model:ir.model,name:stock_ean128.model_stock_production_lot
#: model:ir.model,name:stock_ean128.model_stock_lot
msgid "Lot/Serial"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion stock_ean128/models/__init__.py
Expand Up @@ -5,4 +5,4 @@

from . import product_product
from . import product_template
from . import stock_production_lot
from . import stock_production_lot
2 changes: 1 addition & 1 deletion stock_ean128/models/product_product.py
Expand Up @@ -19,7 +19,7 @@ def name_search(self, name, args=None, operator='ilike', limit=100):
args = []
if name and name[0].encode('utf8') == ' ':
name = name[1:]
products = self.env['stock.production.lot'].search([
products = self.env['stock.lot'].search([
('ean_128', operator, name),
('product_id', 'not in', actual_product_ids),
], limit=limit).mapped('product_id')
Expand Down
6 changes: 3 additions & 3 deletions stock_ean128/models/product_template.py
Expand Up @@ -9,22 +9,22 @@ class ProductTemplate(models.Model):
_inherit = 'product.template'

lot_ids = fields.One2many(
'stock.production.lot',
'stock.lot',
compute='_compute_get_lots',
search='_search_lots',
string='Lots',
)

def _compute_get_lots(self):
for rec in self:
rec.lot_ids = self.env['stock.production.lot'].search(
rec.lot_ids = self.env['stock.lot'].search(
[('product_id.product_tmpl_id', '=', self.id)])

@api.model
def _search_lots(self, operator, operand):
if operand[0].encode('utf8') == ' ':
operand = operand[1:]
templates = self.env['stock.production.lot'].search(
templates = self.env['stock.lot'].search(
[('ean_128', operator, operand)]).mapped(
'product_id').mapped('product_tmpl_id')
return [('id', 'in', templates.ids)]
4 changes: 2 additions & 2 deletions stock_ean128/models/stock_production_lot.py
Expand Up @@ -5,8 +5,8 @@
from odoo import models, fields, api


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

ean_128 = fields.Char(
string="EAN128",
Expand Down
4 changes: 2 additions & 2 deletions stock_ean128/views/stock_production_lot.xml
Expand Up @@ -2,7 +2,7 @@
<odoo>
<record id="view_stock_lot_search" model="ir.ui.view">
<field name="name">Stock production lot</field>
<field name="model">stock.production.lot</field>
<field name="model">stock.lot</field>
<field name="inherit_id" ref="stock.search_product_lot_filter"/>
<field name="arch" type="xml">
<field name="product_id" position="before">
Expand All @@ -13,7 +13,7 @@

<record id="view_stock_lot" model="ir.ui.view">
<field name="name">Stock production lot</field>
<field name="model">stock.production.lot</field>
<field name="model">stock.lot</field>
<field name="inherit_id" ref="stock.view_production_lot_form"/>
<field name="arch" type="xml">
<field name="ref" position="after">
Expand Down

0 comments on commit 63a20e2

Please sign in to comment.