Portal users cannot read uom.uom model due to ACL restrictions (1,0,0,0 permissions). This caused products sold by weight (kg) to have incorrect quantity step (1 instead of 0.1). Solution: - Calculate quantity_step in Python controller using product.uom_id.sudo() - Check if UoM category contains 'weight' or 'kg' -> use step=0.1 - For other products, use default step=1 - Pass quantity_step to template via product_display_info dict - Update XML input attributes (value, min, step) to use dynamic quantity_step This maintains proper UX for bulk products while respecting security permissions. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| portal.py | ||
| website_sale.py | ||