Skip to content

Commit

Permalink
[MIG] portal_sale_distributor: Migration to 17.0
Browse files Browse the repository at this point in the history
closes #803

Signed-off-by: lav-adhoc <lav@adhoc.com.ar>
  • Loading branch information
lef-adhoc committed Apr 29, 2024
1 parent b80eb57 commit 294c8a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions portal_sale_distributor/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Portal Distributor Sale',
'version': "16.0.1.5.0",
'version': "17.0.1.0.0",
'category': 'Tools',
'complexity': 'easy',
'author': 'ADHOC SA, Odoo Community Association (OCA)',
Expand All @@ -46,6 +46,6 @@
# 'views/portal_templates.xml',
'views/sale_report_templates.xml',
],
'installable': False,
'installable': True,
'auto_install': False,
}
10 changes: 4 additions & 6 deletions portal_sale_distributor/views/portal_sale_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
<header position="after">
<header groups="portal_sale_distributor.group_portal_backend_distributor">
<field name="invoice_count" invisible="1"/>
<button name="action_confirm_distributor" states="draft,sent" string="Confirm Sale" class="btn-primary" type="object" context="{'show_sale': True}"/>
<field name="state" widget="statusbar" statusbar_visible="draft,sent,sale,done"/>
<button name="action_confirm_distributor" invisible="state not in ('draft', 'sent')" string="Confirm Sale" class="btn-primary" type="object" context="{'show_sale': True}"/>
</header>
</header>
<button name="action_view_invoice" position="attributes">
Expand All @@ -44,7 +43,7 @@
<attribute name="groups">!portal_sale_distributor.group_portal_backend_distributor</attribute>
</field>
<field name="validity_date" position="after">
<field name="validity_date" attrs="{'invisible':[('state', 'in', ('draft', 'sent'))]}" groups="portal_sale_distributor.group_portal_backend_distributor"/>
<field name="validity_date" invisible="state in ('draft', 'sent')" groups="portal_sale_distributor.group_portal_backend_distributor"/>
</field>
<xpath expr="//button[@name='action_update_prices']" position="attributes">
<attribute name="groups">!portal_sale_distributor.group_portal_backend_distributor</attribute>
Expand All @@ -64,8 +63,7 @@
name="action_open_delivery_wizard"
type="object"
groups="portal_sale_distributor.group_portal_backend_distributor"
attrs="{'invisible': ['|', '|', '|',('is_all_service', '=', True), ('order_line', '=', []), ('delivery_set', '=', True), ('state','not in',('draft','sent'))]}"
/>
invisible="is_all_service or not order_line or delivery_set or state not in ('draft', 'sent')"/>
</xpath>
<field name="pricelist_id" position="attributes">
<attribute name="groups">!portal_sale_distributor.group_portal_backend_distributor</attribute>
Expand All @@ -79,7 +77,7 @@
<xpath expr="//field[@name='order_line']/tree//widget[@name='qty_at_date_widget']" position="attributes">
<attribute name="groups">!portal_sale_distributor.group_portal_backend_distributor</attribute>
</xpath>
<button name="%(sale_ux.action_sale_global_discount_wizard_form)d" position="attributes">
<button name="action_open_discount_wizard" position="attributes">
<attribute name="groups">!portal_sale_distributor.group_portal_backend_distributor</attribute>
</button>
<field name="sale_order_template_id" position="attributes">
Expand Down
3 changes: 3 additions & 0 deletions portal_sale_distributor/views/product_product_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<field name="product_tag_ids" position="attributes">
<attribute name="groups">!portal_sale_distributor.group_portal_backend_distributor</attribute>
</field>
<field name="additional_product_tag_ids" position="attributes">
<attribute name="groups">!portal_sale_distributor.group_portal_backend_distributor</attribute>
</field>
<field name="type" position="attributes">
<attribute name="groups">!portal_sale_distributor.group_portal_backend_distributor</attribute>
</field>
Expand Down

0 comments on commit 294c8a4

Please sign in to comment.