Skip to content

Commit

Permalink
[IMP] stock_picking_product_barcode_report: Allow print from stock_qu…
Browse files Browse the repository at this point in the history
…ants
  • Loading branch information
CarlosRoca13 committed Mar 11, 2024
1 parent 1b8a23f commit c18f073
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 15 deletions.
17 changes: 9 additions & 8 deletions stock_picking_product_barcode_report/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-02-06 14:20+0000\n"
"PO-Revision-Date: 2024-02-06 15:22+0100\n"
"POT-Creation-Date: 2024-03-07 07:23+0000\n"
"PO-Revision-Date: 2024-03-07 08:24+0100\n"
"Last-Translator: Sergio Teruel <sergio.teruel@tecnativa.com>\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: Poedit 3.0.1\n"
"X-Generator: Poedit 3.4.1\n"

#. module: stock_picking_product_barcode_report
#: model_terms:ir.ui.view,arch_db:stock_picking_product_barcode_report.report_label_barcode
Expand Down Expand Up @@ -105,11 +105,6 @@ msgstr "Cancelar"
msgid "Companies"
msgstr "Compañías"

#. module: stock_picking_product_barcode_report
#: model:ir.model,name:stock_picking_product_barcode_report.model_res_config_settings
msgid "Config Settings"
msgstr "Opciones de configuración"

#. module: stock_picking_product_barcode_report
#: model:ir.model.fields,field_description:stock_picking_product_barcode_report.field_stock_picking_line_print__create_uid
#: model:ir.model.fields,field_description:stock_picking_product_barcode_report.field_stock_picking_print__create_uid
Expand Down Expand Up @@ -279,9 +274,15 @@ msgstr "Imprimir linea de albarán"
#. module: stock_picking_product_barcode_report
#: model:ir.actions.act_window,name:stock_picking_product_barcode_report.act_stock_barcode_selection_printing
#: model:ir.actions.act_window,name:stock_picking_product_barcode_report.act_stock_barcode_selection_printing_sml
#: model:ir.actions.server,name:stock_picking_product_barcode_report.print_picking_label_fishing_report_mini
msgid "Print barcode labels"
msgstr "Imprimir etiquetas de códigos de barras"

#. module: stock_picking_product_barcode_report
#: model:ir.model,name:stock_picking_product_barcode_report.model_res_config_settings
msgid "Procurement purchase grouping settings"
msgstr ""

#. module: stock_picking_product_barcode_report
#: model:ir.model.fields,field_description:stock_picking_product_barcode_report.field_stock_picking_line_print__product_id
msgid "Product"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-07 07:23+0000\n"
"PO-Revision-Date: 2024-03-07 07:23+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -95,11 +97,6 @@ msgstr ""
msgid "Companies"
msgstr ""

#. module: stock_picking_product_barcode_report
#: model:ir.model,name:stock_picking_product_barcode_report.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: stock_picking_product_barcode_report
#: model:ir.model.fields,field_description:stock_picking_product_barcode_report.field_stock_picking_line_print__create_uid
#: model:ir.model.fields,field_description:stock_picking_product_barcode_report.field_stock_picking_print__create_uid
Expand Down Expand Up @@ -265,9 +262,15 @@ msgstr ""
#. module: stock_picking_product_barcode_report
#: model:ir.actions.act_window,name:stock_picking_product_barcode_report.act_stock_barcode_selection_printing
#: model:ir.actions.act_window,name:stock_picking_product_barcode_report.act_stock_barcode_selection_printing_sml
#: model:ir.actions.server,name:stock_picking_product_barcode_report.print_picking_label_fishing_report_mini
msgid "Print barcode labels"
msgstr ""

#. module: stock_picking_product_barcode_report
#: model:ir.model,name:stock_picking_product_barcode_report.model_res_config_settings
msgid "Procurement purchase grouping settings"
msgstr ""

#. module: stock_picking_product_barcode_report
#: model:ir.model.fields,field_description:stock_picking_product_barcode_report.field_stock_picking_line_print__product_id
msgid "Product"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class ProductPrintingQty(models.TransientModel):
uom_id = fields.Many2one(
"uom.uom",
string="Unit of Measure",
related="move_line_id.product_uom_id",
)
lot_id = fields.Many2one("stock.production.lot", string="Lot/Serial Number")
result_package_id = fields.Many2one(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@
groups="stock.group_tracking_lot"
/>
<field name="quantity" force_save="1" readonly="1" />
<field name="uom_id" readonly="1" groups="uom.group_uom" />
<field
name="uom_id"
force_save="1"
readonly="1"
groups="uom.group_uom"
/>
<field name="label_qty" />
<field name="move_line_id" invisible="1" force_save="1" />
</tree>
Expand Down Expand Up @@ -84,4 +89,42 @@
<field name="binding_model_id" ref="stock.model_stock_move_line" />
<field name="target">new</field>
</record>
<record id="act_stock_barcode_selection_printing_quant" model="ir.actions.server">
<field name="name">Print barcode labels</field>
<field name="model_id" ref="stock.model_stock_quant" />
<field name="binding_model_id" ref="stock.model_stock_quant" />
<field name="binding_type">report</field>
<field name="state">code</field>
<field name="code">
lines = []
for quant in records:
lines.append(
(
0,
0,
{
"product_id": quant.product_id.id,
"label_qty": 1,
"quantity": quant.quantity,
"uom_id": quant.product_uom_id.id,
"lot_id": quant.lot_id.id,
"result_package_id": quant.package_id.id,
}
)
)
wizard = env["stock.picking.print"].create(
{
"product_print_moves": lines,
}
)
action = {
"type": "ir.actions.act_window",
"view_mode": "form",
"name": "Print barcode labels",
"res_model": "stock.picking.print",
"res_id": wizard.id,
"target": "new",
}
</field>
</record>
</odoo>

0 comments on commit c18f073

Please sign in to comment.