Skip to content

Commit

Permalink
[FIX] stock_landed_costs: landed Cost to be hidden on other product t…
Browse files Browse the repository at this point in the history
…ypes

Steps to Reproduce :
- install sales, stock modules
- go to products and create new
- select product type as Event Ticket,Event Booth or Gift Card
- Landed cost boolean is suppose to be visible for a service type product under
  purchase.

Issue :
- Landed cost boolean is suppose to be visible for a service type product under
  purchase, But currently it is visible on other type of products specific to
  other models like event tickets, event booths etc.

Cause:
- In product Module there are two Selection fields like detailed_type and
  type. The detailed_type Selection field contain service, consumable,
  event booths, event tickets, storable product  And the type selection field
  contains service, consumable, storable product
- In xml views for that landed cost boolean the invisible  attribute contains
  the condition like  type != service, because of this the landed cost boolean
  is visible for the product type of event tickets, event booths and gift Cards.

Solution:
- if we use detailed_type instead of type selection field, then the landed cost
  boolean field  will be invisible on other product types.

 task- 3725202

closes #156038

X-original-commit: 6ff6b20
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
  • Loading branch information
suth-odoo committed Mar 1, 2024
1 parent 4485476 commit b432e29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/stock_landed_costs/views/product_views.xml
Expand Up @@ -7,7 +7,7 @@
<field name="inherit_id" ref="account.product_template_form_view"/>
<field name="arch" type="xml">
<group name="bill" position="inside">
<field name="landed_cost_ok" attrs="{'invisible':[('type', '!=', 'service')]}"/>
<field name="landed_cost_ok" attrs="{'invisible':[('detailed_type', '!=', 'service')]}"/>
<field name="split_method_landed_cost" attrs="{'invisible': ['|', ('landed_cost_ok', '=', False), ('type', '!=', 'service')]}"/>
</group>
</field>
Expand Down

0 comments on commit b432e29

Please sign in to comment.