feat(configurator): C1+C3 - pricelist currency picker + Express SCSS (light + dark)

C1: product.pricelist._compute_display_name override gated by the
'fp_express_currency_picker' context flag (set on the Express form's
pricelist_id field). When active, prefixes the dropdown label with
the currency code: 'CAD — Public Pricelist (CAD)'. Elsewhere the
standard display name is unchanged.

C3: SCSS tokens + base styles for the Express form. Tokens use the
compile-time @if $o-webclient-color-scheme branch per the project's
'Dark Mode' rule — same SCSS compiles into both bundles with different
hex values. Token vars wrapped in CSS custom properties so downstream
modules can override for per-shop branding without recompiling.
Base styles: spreadsheet-feel table borders, bake-cell inset-pill,
customer line ref bold/uppercase, accent section markers.
This commit is contained in:
gsinghpal
2026-05-26 21:25:59 -04:00
parent 27af984f28
commit 43abb8ef25
6 changed files with 218 additions and 1 deletions

View File

@@ -17,3 +17,4 @@ from . import account_move_line
from . import fp_sale_assembly
from . import res_partner
from . import fp_process_node
from . import product_pricelist

View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import api, models
class ProductPricelist(models.Model):
"""Express Orders currency-picker enhancement (C1 / 2026-05-26).
When rendered with `fp_express_currency_picker=True` in context (set
by the Express Orders form's pricelist_id field), prefix the display
name with the currency code so the dropdown reads:
CAD — Public Pricelist (CAD)
USD — Westin USA Pricelist
EUR — Public Pricelist (EUR)
Elsewhere in Odoo (partner form, sale.order, settings), the standard
pricelist display name is unchanged.
"""
_inherit = 'product.pricelist'
@api.depends('name', 'currency_id')
@api.depends_context('fp_express_currency_picker')
def _compute_display_name(self):
super()._compute_display_name()
if self.env.context.get('fp_express_currency_picker'):
for pl in self:
if pl.currency_id and pl.currency_id.name not in (pl.display_name or ''):
pl.display_name = f"{pl.currency_id.name}{pl.name}"