Compare commits
3 commits
56509892e6
...
876e7b1fbf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
876e7b1fbf | ||
|
|
d3d1231d29 | ||
|
|
4ea0286b52 |
4 changed files with 2833 additions and 2927 deletions
|
|
@ -8,6 +8,16 @@ _logger = logging.getLogger(__name__)
|
|||
class SaleOrder(models.Model):
|
||||
_inherit = "sale.order"
|
||||
|
||||
def cron_action_update_lines_from_list_price(self):
|
||||
records = self.env["sale.order"].search(
|
||||
[
|
||||
("invoice_status", "!=", "invoiced"),
|
||||
("invoice_status", "!=", "up_to_date"),
|
||||
("state", "!=", "cancel"),
|
||||
]
|
||||
)
|
||||
records.action_update_lines_from_list_price()
|
||||
|
||||
def action_update_lines_from_list_price(self):
|
||||
"""Copy current product list price into sale order lines.
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -31,16 +31,16 @@
|
|||
—
|
||||
</t>
|
||||
</td>
|
||||
<!-- Action buttons -->
|
||||
<!-- Action buttons disabled
|
||||
<td class="text-center">
|
||||
<t t-if="order.group_order_id">
|
||||
<!-- Load in Cart button: available for all states -->
|
||||
|
||||
<a t-attf-href="/eskaera/#{order.group_order_id.id}/load-from-history/#{order.id}"
|
||||
class="btn btn-sm btn-primary me-1"
|
||||
t-att-title="'Load order items into cart' if order.state == 'draft' else 'Create new order from this one'">
|
||||
<i class="fa fa-cart-arrow-down"></i>
|
||||
</a>
|
||||
<!-- Confirm button: only for draft orders -->
|
||||
|
||||
<t t-if="order.state == 'draft'">
|
||||
<a t-attf-href="/eskaera/#{order.group_order_id.id}/checkout"
|
||||
class="btn btn-sm btn-success"
|
||||
|
|
@ -49,11 +49,12 @@
|
|||
</a>
|
||||
</t>
|
||||
</t>
|
||||
</td>
|
||||
</td> -->
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Add Load in Cart button to sidebar -->
|
||||
<!-- deshabilitado, da problemas en la recarga con productos no disponibles y cambios de precios
|
||||
<template id="portal_order_page_sidebar_button" inherit_id="sale.sale_order_portal_template" name="Order Page - Add Load in Cart Button">
|
||||
<xpath expr="//div[@id='sale_order_sidebar_button']" position="inside">
|
||||
<t t-if="sale_order.group_order_id">
|
||||
|
|
@ -64,8 +65,7 @@
|
|||
</a>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</template> -->
|
||||
<!-- Custom portal content template with group order info -->
|
||||
<template id="sale_order_portal_content_aplicoop" inherit_id="sale.sale_order_portal_content" name="Sale Order Portal Content - Aplicoop">
|
||||
<!-- Insert group order info BEFORE the products table -->
|
||||
|
|
@ -89,14 +89,9 @@
|
|||
</t>
|
||||
<t t-else="">
|
||||
<span class="badge bg-primary">
|
||||
<t t-if="sale_order.pickup_slot_label">
|
||||
<t t-esc="sale_order.pickup_slot_label"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="day_idx" t-value="int(sale_order.group_order_id.pickup_day) % 7 if sale_order.group_order_id.pickup_day else 0"/>
|
||||
<t t-esc="day_names[day_idx] if day_names else ''"/>,
|
||||
<t t-esc="sale_order.pickup_date.strftime('%d/%m/%Y')"/>
|
||||
</t>
|
||||
</span>
|
||||
<span class="mt-2 small">
|
||||
<t t-foreach="sale_order.group_order_id.group_ids" t-as="group">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue