[IMP] website_sale_aplicoop: mostrar franjas de recogida en formulario group.order
- Añadir reglas de acceso para group.order.slot en ir.model.access.csv - Añadir pestaña "Pickup Slots" en el formulario de group.order con lista editable (handle de secuencia, día, etiqueta, hora inicio/fin, activo) - Corregir valores del campo weekday: de dígitos numéricos a nombres de día (Monday...Sunday) para mejor usabilidad Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
eb81e7db6a
commit
b14a6f84ed
3 changed files with 25 additions and 1 deletions
|
|
@ -23,7 +23,15 @@ class GroupOrderSlot(models.Model):
|
|||
)
|
||||
|
||||
weekday = fields.Selection(
|
||||
[(str(i), str(i)) for i in range(7)],
|
||||
[
|
||||
("0", "Monday"),
|
||||
("1", "Tuesday"),
|
||||
("2", "Wednesday"),
|
||||
("3", "Thursday"),
|
||||
("4", "Friday"),
|
||||
("5", "Saturday"),
|
||||
("6", "Sunday"),
|
||||
],
|
||||
string="Weekday",
|
||||
required=True,
|
||||
help="Day of week for this slot (0=Monday)",
|
||||
|
|
|
|||
|
|
@ -4,3 +4,5 @@ access_group_order_user,group.order user,model_group_order,website_sale_aplicoop
|
|||
access_group_order_manager,group.order manager,model_group_order,website_sale_aplicoop.group_group_order_manager,1,1,1,1
|
||||
access_group_order_portal,group.order portal,model_group_order,base.group_portal,1,0,0,0
|
||||
access_product_supplierinfo_portal,product.supplierinfo portal,product.model_product_supplierinfo,base.group_portal,1,0,0,0
|
||||
access_group_order_slot_base,group.order.slot base,model_group_order_slot,,1,1,1,0
|
||||
access_group_order_slot_manager,group.order.slot manager,model_group_order_slot,website_sale_aplicoop.group_group_order_manager,1,1,1,1
|
||||
|
|
|
|||
|
|
|
@ -92,6 +92,20 @@
|
|||
<field name="excluded_product_ids" widget="many2many_tags" help="Products explicitly excluded from this order (blacklist has absolute priority over inclusions)"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Pickup Slots" name="pickup_slots">
|
||||
<field name="pickup_slot_ids">
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="weekday"/>
|
||||
<field name="label" placeholder="e.g. Morning slot"/>
|
||||
<field name="start_hour" widget="float_time"/>
|
||||
<field name="end_hour" widget="float_time"/>
|
||||
<field name="active"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue