Skip to content

Commit

Permalink
shopfloor: add icons to packaging types
Browse files Browse the repository at this point in the history
  • Loading branch information
JuMiSanAr committed Dec 19, 2023
1 parent 734b494 commit 7d6cafb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shopfloor/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@
"data": [
"data/shopfloor_scenario_data.xml",
"security/groups.xml",
"views/product_packaging_type.xml",
"views/shopfloor_menu.xml",
"views/stock_picking_type.xml",
"views/stock_location.xml",
"views/stock_move_line.xml",
"views/stock_picking_type.xml",
],
"demo": [
"demo/stock_picking_type_demo.xml",
Expand Down
1 change: 1 addition & 0 deletions shopfloor/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from . import priority_postpone_mixin
from . import product_packaging_type
from . import shopfloor_menu
from . import shopfloor_app
from . import stock_picking_type
Expand Down
9 changes: 9 additions & 0 deletions shopfloor/models/product_packaging_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import fields, models


class ProductPackagingType(models.Model):
_inherit = "product.packaging.type"

icon = fields.Image()
18 changes: 18 additions & 0 deletions shopfloor/views/product_packaging_type.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_product_packaging_type_form" model="ir.ui.view">
<field name="name">shopfloor.product.packaging.type.form</field>
<field name="model">product.packaging.type</field>
<field
name="inherit_id"
ref="product_packaging_type.view_product_packaging_type_form"
/>
<field name="arch" type="xml">
<field name="name" position="after">
<div>
<field name="icon" widget="image" width="90" />
</div>
</field>
</field>
</record>
</odoo>

0 comments on commit 7d6cafb

Please sign in to comment.