Store setup: champ store_regular_price (prix barré boutique, inline-editable)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e47ecd26ac
commit
4760ae5e73
|
|
@ -38,6 +38,19 @@ cf.in_standard_filter = 1 # filtre rapide dans la barre
|
|||
cf.save()
|
||||
print("CHAMP show_in_store: in_list_view + in_standard_filter OK")
|
||||
|
||||
# 1b) Prix barré boutique (marketing). Si > prix de vente (Item Price) → affiché barré.
|
||||
CFR = "Item-store_regular_price"
|
||||
if not frappe.db.exists("Custom Field", CFR):
|
||||
frappe.get_doc({
|
||||
"doctype": "Custom Field", "dt": "Item", "fieldname": "store_regular_price",
|
||||
"label": "Prix barré (boutique)", "fieldtype": "Currency", "insert_after": "show_in_store",
|
||||
"in_list_view": 1, "in_standard_filter": 1,
|
||||
"description": "Prix de référence barré en boutique. Si > prix de vente (Item Price) il s'affiche barré. Vide = aucun barré.",
|
||||
}).insert()
|
||||
print("CHAMP store_regular_price créé")
|
||||
else:
|
||||
print("CHAMP store_regular_price déjà là")
|
||||
|
||||
# 2) Rapport nommé pré-filtré (liste gérable du catalogue)
|
||||
if not frappe.db.exists("Report", "Produits Boutique"):
|
||||
frappe.get_doc({
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user