-
-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] stock_barcodes_gs1: Use weight (gs1 code start with 3) as produ…
…ct_qty only if product_uom_categ_kgm TT49953
- Loading branch information
1 parent
40a89c4
commit a3832d0
Showing
9 changed files
with
112 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Copyright 2019 Sergio Teruel <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from . import models | ||
from . import wizard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,16 +6,16 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2019-08-27 14:47+0000\n" | ||
"PO-Revision-Date: 2023-10-30 21:36+0000\n" | ||
"Last-Translator: Ivorra78 <[email protected]>\n" | ||
"POT-Creation-Date: 2024-07-09 14:06+0000\n" | ||
"PO-Revision-Date: 2024-07-09 16:07+0200\n" | ||
"Last-Translator: Sergio Teruel <[email protected]>\n" | ||
"Language-Team: \n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.17\n" | ||
"X-Generator: Poedit 3.0.1\n" | ||
|
||
#. module: stock_barcodes_gs1 | ||
#: code:addons/stock_barcodes_gs1/wizard/stock_barcodes_read.py:0 | ||
|
@@ -29,12 +29,27 @@ msgstr "({ai}){barcode} No encontrado" | |
msgid "AI GS1 ({ai}) Not implemented" | ||
msgstr "AI GS1 ({ai}) No implementado" | ||
|
||
#. module: stock_barcodes_gs1 | ||
#: model:ir.model,name:stock_barcodes_gs1.model_barcode_nomenclature | ||
msgid "Barcode Nomenclature" | ||
msgstr "Nomenclatura de código de barras" | ||
|
||
#. module: stock_barcodes_gs1 | ||
#: model:ir.model,name:stock_barcodes_gs1.model_barcode_rule | ||
msgid "Barcode Rule" | ||
msgstr "Regla de código de barras" | ||
|
||
#. module: stock_barcodes_gs1 | ||
#: code:addons/stock_barcodes_gs1/wizard/stock_barcodes_read.py:0 | ||
#, python-format | ||
msgid "Review and confirm" | ||
msgstr "Revisar y confirmar" | ||
|
||
#. module: stock_barcodes_gs1 | ||
#: model:ir.model.fields,field_description:stock_barcodes_gs1.field_barcode_rule__use_weight_as_unit | ||
msgid "Use Weight As Unit" | ||
msgstr "Usar peso como unidades" | ||
|
||
#. module: stock_barcodes_gs1 | ||
#: model:ir.model,name:stock_barcodes_gs1.model_wiz_stock_barcodes_read | ||
msgid "Wizard to read barcode" | ||
|
@@ -57,11 +72,7 @@ msgstr "Asistente para leer código de barras" | |
#~ msgstr "Se ha encontrado más de un empaquetado" | ||
|
||
#~ msgid "Wizard to create new lot from barcode scanner" | ||
#~ msgstr "" | ||
#~ "Asistente para crear nuevo lote desde el lector de códigos de barras" | ||
|
||
#~ msgid "Barcode not found" | ||
#~ msgstr "Código de barras no encontrado" | ||
#~ msgstr "Asistente para crear nuevo lote desde el lector de códigos de barras" | ||
|
||
#~ msgid "More than one product found" | ||
#~ msgstr "Se ha encontrado más de un producto." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright 2024 Tecnativa - Sergio Teruel | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from . import barcode_nomenclature | ||
from . import barcode_rule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from odoo import models | ||
|
||
|
||
class BarcodeNomenclature(models.Model): | ||
_inherit = "barcode.nomenclature" | ||
|
||
def parse_gs1_rule_pattern(self, match, rule): | ||
# Allow use weight ai as units directly for products with unit category uom | ||
result = super().parse_gs1_rule_pattern(match, rule) | ||
result["use_weight_as_unit"] = True if rule.use_weight_as_unit else False | ||
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class BarcodeRule(models.Model): | ||
_inherit = "barcode.rule" | ||
|
||
use_weight_as_unit = fields.Boolean() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" ?> | ||
<odoo> | ||
<!-- Allow use weight ai as units directly for products with unit category uom --> | ||
<record id="view_barcode_gs1_nomenclature_form" model="ir.ui.view"> | ||
<field name="model">barcode.nomenclature</field> | ||
<field | ||
name="inherit_id" | ||
ref="barcodes_gs1_nomenclature.view_barcode_gs1_nomenclature_form" | ||
/> | ||
<field name="arch" type="xml"> | ||
<!-- Rules table --> | ||
<xpath expr="//field[@name='associated_uom_id']" position="after"> | ||
<field | ||
name="use_weight_as_unit" | ||
attrs="{'column_invisible': [('parent.is_gs1_nomenclature', '!=', True)], 'invisible': [('gs1_content_type', '!=', 'measure')]}" | ||
/> | ||
</xpath> | ||
</field> | ||
</record> | ||
<record id="view_barcode_gs1_rule_form" model="ir.ui.view"> | ||
<field name="model">barcode.rule</field> | ||
<field | ||
name="inherit_id" | ||
ref="barcodes_gs1_nomenclature.view_barcode_gs1_rule_form" | ||
/> | ||
<field name="arch" type="xml"> | ||
<field name="is_gs1_nomenclature" position="before"> | ||
<field | ||
name="use_weight_as_unit" | ||
attrs="{'invisible': ['|', ('parent.is_gs1_nomenclature', '=', False), ('gs1_content_type', '!=', 'measure')]}" | ||
/> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters