Skip to content

Commit df4b6e6

Browse files
committed
[ADD]
1 parent c7f4f34 commit df4b6e6

File tree

8 files changed

+64
-15
lines changed

8 files changed

+64
-15
lines changed

estate/__init__.py

Whitespace-only changes.

estate/__manifest__.py

-15
This file was deleted.

pos_update/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

pos_update/__manifest__.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
'name': 'Point Of Sale Update',
3+
'version': '1.0',
4+
'description': 'Remove Barcode field if product type is "combo" (in point_of_sale)',
5+
'depends': ['point_of_sale', 'product_barcodelookup'],
6+
'data': [
7+
'views/product_views.xml',
8+
],
9+
'assets': {
10+
'point_of_sale._assets_pos': [
11+
'pos_update/static/src/**/*'
12+
],
13+
},
14+
'auto_install': True,
15+
'license': 'LGPL-3',
16+
}

pos_update/models/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import pos_update_product
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from odoo import api,models
2+
3+
class ProductProduct(models.Model):
4+
5+
_inherit = "product.product"
6+
7+
@api.model
8+
def _load_pos_data_fields(self, config_id):
9+
fields = super()._load_pos_data_fields(config_id)
10+
fields += ['public_description']
11+
return fields
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<templates id="template_id" xml:space="preserve">
3+
<t t-name="template" t-inherit="point_of_sale.ProductInfoPopup" t-inherit-mode="extension">
4+
<xpath expr="//ProductInfoBanner" position="after">
5+
<t t-debug="pdb"/>
6+
<h3 class="section-title">
7+
Description
8+
</h3>
9+
<span class="modal-body o_self_order_main_desc fs-3 p-4 ps-5 overflow-auto" t-out="props.product.public_description" />
10+
</xpath>
11+
</t>
12+
</templates>

pos_update/views/product_views.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
<record id="product_product_view_form_normalized_pos_update" model="ir.ui.view">
4+
<field name="name">product.product.view.form.normalized.pos_update.inherit</field>
5+
<field name="model">product.product</field>
6+
<field name="inherit_id" ref="product.product_product_view_form_normalized" />
7+
<field name="arch" type="xml">
8+
<field name="barcode" position="attributes">
9+
<attribute name="invisible">type == 'combo'</attribute>
10+
</field>
11+
</field>
12+
</record>
13+
<record id="product_template_form_view_pos_update" model="ir.ui.view">
14+
<field name="name">product.template.form.pos_update.inherit</field>
15+
<field name="model">product.template</field>
16+
<field name="inherit_id" ref="product.product_template_form_view"/>
17+
<field name="arch" type="xml">
18+
<xpath expr="//group[@name='public_description']" position="attributes">
19+
<attribute name="invisible">0</attribute>
20+
</xpath>
21+
</field>
22+
</record>
23+
</odoo>

0 commit comments

Comments
 (0)