Repository
OCA/product-pack · module folder · Try on Runboat
Module version
2.0.1
Category
E-Commerce
Folder size
0.05 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/product-pack
Last tracking update
2026-08-07 08:23:03
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Bruno Zanotti, Weblate, OCA-git-bot, Abraham Anes, oca-ci, augusto-weiss
Odoo dependencies
Python dependencies
geoip2
System dependencies
None
Required by
None
Description
This module introduces compatibility of product packs with e-commerce:

- In the cart summary, the components aren't editable and are shown
  hanging from the main pack reference.
- When we remove a pack from the cart, their components are removed as
  well.
- The cart popup summary only shows the main pack line and discards the
  sublines in the units count.
- The cart summary shows the component lines hanging from the main one
  as well.
- It's ensured the the prices are shown correctly for the whole pack and
  that they're correctly summarized depending on the pack type.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
cart_lines cart_lines ir.ui.view qweb Inherits website_sale.cart_lines
checkout_layout checkout_layout ir.ui.view qweb Inherits website_sale.checkout_layout
product_price product_price ir.ui.view qweb Inherits website_sale.product
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
(inherited route override) WebsiteSale.shop inherited http ALL
(inherited route override) WebsiteSaleVariantController.get_combination_info_website inherited http ALL
Models touched (5)

New fields (0)

No new fields.

Public methods (1)
  • check_website_published(self)
    @api.constrains('pack_line_ids')

New fields (0)

No new fields.

Public methods (1)
  • check_website_published(self)
    @api.constrains('is_published')
    For keep the consistent and prevent bugs within the e-commerce, we force that all childs of a parent pack stay publish when the parent is published. Also if any of the childs of the parent pack became unpublish, we unpublish the parent.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • unlink(self)
    The website calls this method specifically. We want to get rid of the children lines so the user doesn't have to

New fields (0)

No new fields.

Public methods (1)
  • sale_get_order(self, force_create=False, update_pricelist=False)
    Communicate with product pack expansion method to check if it's necessary to expand the product pack lines or not via context

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
622 days ago
Last activity
114 days ago
Repository
OCA/product-pack
Pull request
[18.0][MIG] website_sale_product_pack: Migration to 18.0 (#194)
Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
293 days ago
Last activity
121 days ago
Repository
OCA/product-pack
Pull request
[19.0][MIG] website_sale_product_pack: Migration to 19.0 (#229)