feat: add Cost and Margin % columns with inline editing
Cost column shows Odoo standard_price (editable). Margin % is calculated from cost and sale price. Editing margin auto-calculates the sale price using: price = cost / (1 - margin/100). All cells are inline-editable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -158,6 +158,7 @@ class WooProductSearchController(http.Controller):
|
||||
'odoo_product_name': m.product_id.name if m.product_id else '',
|
||||
'odoo_default_code': m.product_id.default_code or '' if m.product_id else '',
|
||||
'odoo_price': m.product_id.list_price if m.product_id else 0.0,
|
||||
'odoo_cost': m.product_id.standard_price if m.product_id else 0.0,
|
||||
'woo_regular_price': m.woo_regular_price or 0.0,
|
||||
'woo_sale_price': m.woo_sale_price or 0.0,
|
||||
'sync_price': m.sync_price,
|
||||
|
||||
Reference in New Issue
Block a user