Skip to content

Commit

Permalink
Update product templates and README for website addons
Browse files Browse the repository at this point in the history
Revised product template logic to ensure pricing without tax is accurately computed and updated search functionality by modifying fields in website settings. Additionally, README version numbers were incremented to reflect these changes.
  • Loading branch information
dhongu committed Jan 25, 2025
1 parent 45cf194 commit 419cad2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ addon | version | maintainers | summary | price
[deltatech_sale](deltatech_sale/) | 17.0.1.0.1 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Sale Extension Obsolete | Free
[deltatech_sale_activity_search](deltatech_sale_activity_search/) | 17.0.0.0.0 | [![VoicuStefan2001](https://github.com/VoicuStefan2001.png?size=30px)](https://github.com/VoicuStefan2001) | Adds a field with the active activity types on that sale order | Free
[deltatech_sale_add_extra_line](deltatech_sale_add_extra_line/) | 17.0.1.0.9 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Sale Add Extra Line | Free
[deltatech_sale_commission](deltatech_sale_commission/) | 17.0.1.1.9 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Compute sale commission | Free
[deltatech_sale_commission](deltatech_sale_commission/) | 17.0.1.2.0 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Compute sale commission | Free
[deltatech_sale_contact](deltatech_sale_contact/) | 17.0.1.0.21 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Limit contacts insale order | Free
[deltatech_sale_cost_product](deltatech_sale_cost_product/) | 17.0.0.0.2 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Sale Cost on Order | Free
[deltatech_sale_feedback](deltatech_sale_feedback/) | 17.0.1.0.5 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Sale Feedback | Free
Expand Down Expand Up @@ -199,7 +199,7 @@ addon | version | maintainers | summary | price
[deltatech_website_delivery_and_payment](deltatech_website_delivery_and_payment/) | 17.0.2.1.5 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | eCommerce Delivery and Payment constrains | Free
[deltatech_website_disable_fuzzy_search](deltatech_website_disable_fuzzy_search/) | 17.0.1.0.0 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Disable Fuzzy Search | Free
[deltatech_website_phone_validation](deltatech_website_phone_validation/) | 17.0.1.0.0 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Phone Validation | Free
[deltatech_website_price_without_tax](deltatech_website_price_without_tax/) | 17.0.1.0.1 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Display Product Price Without Tax | Free
[deltatech_website_price_without_tax](deltatech_website_price_without_tax/) | 17.0.1.0.2 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Display Product Price Without Tax | Free
[deltatech_website_product_code](deltatech_website_product_code/) | 17.0.1.0.1 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Display product by code in eCommerce | Free
[deltatech_website_product_url_image](deltatech_website_product_url_image/) | 17.0.1.0.0 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Load image for product from URL | Free
[deltatech_website_sale_attributes](deltatech_website_sale_attributes/) | 17.0.1.0.0 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Attribute values for products displayed | Free
Expand Down
3 changes: 3 additions & 0 deletions deltatech_alternative_website/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ class ProductTemplate(models.Model):
def _search_get_detail(self, website, order, options):
values = super()._search_get_detail(website, order, options)
values["search_fields"] += ["alternative_ids.name"]
values["search_fields"].remove("description")
values["search_fields"].remove("description_sale")

values["mapping"]["alternative_ids.name"] = {"name": "alternative_ids.name", "type": "text", "match": True}
return values
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _get_combination_info(
parent_combination=parent_combination,
only_template=only_template,
)
taxes = combination_info.get('taxes', self.taxes_id)
taxes = combination_info.get("taxes", self.taxes_id)
res = taxes.compute_all(combination_info["list_price"], product=self)
excluded = res["total_excluded"]
combination_info["list_price_without_tax"] = excluded
Expand Down

0 comments on commit 419cad2

Please sign in to comment.