Compare commits
No commits in common. "51a53f54ba5872a6b55af40f133fa0b9c36063d7" and "19af717773c117c9067b39410e4d582c22b534d2" have entirely different histories.
51a53f54ba
...
19af717773
5 changed files with 1 additions and 97 deletions
|
|
@ -13,7 +13,7 @@ class PosOrder(models.Model):
|
||||||
if self.state not in ("paid", "done", "invoiced"):
|
if self.state not in ("paid", "done", "invoiced"):
|
||||||
raise UserError(
|
raise UserError(
|
||||||
_(
|
_(
|
||||||
"You can only print the receipt when the order is paid, closed, or invoiced."
|
"Solo se puede imprimir el ticket cuando el pedido está pagado o cerrado."
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return self.env.ref(
|
return self.env.ref(
|
||||||
|
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
# Website Sale Cart Line Subtotal
|
|
||||||
|
|
||||||
## Description
|
|
||||||
|
|
||||||
This module adds a "Subtotal" column to the shopping cart lines that displays the total amount for each line (quantity × unit price).
|
|
||||||
|
|
||||||
### Problem
|
|
||||||
|
|
||||||
By default, the Odoo website shopping cart shows:
|
|
||||||
- Product quantity
|
|
||||||
- Unit price
|
|
||||||
|
|
||||||
But it doesn't show the line total (quantity × price), which can be confusing for customers when they want to quickly see how much each line is costing them.
|
|
||||||
|
|
||||||
### Solution
|
|
||||||
|
|
||||||
This module adds a new "Subtotal" column that shows:
|
|
||||||
- `price_subtotal` (without taxes) for users with tax-excluded view
|
|
||||||
- `price_total` (with taxes) for users with tax-included view
|
|
||||||
|
|
||||||
The subtotal column is inserted between the "Price" and action columns in the cart.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
1. Install the module from the Apps menu
|
|
||||||
2. No additional configuration is required
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
After installation:
|
|
||||||
1. Add products to your cart
|
|
||||||
2. Go to the shopping cart page
|
|
||||||
3. You will see a new "Subtotal" column showing the line total for each product
|
|
||||||
|
|
||||||
The subtotal respects your tax display configuration (with or without taxes).
|
|
||||||
|
|
||||||
## Credits
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
|
|
||||||
* Criptomart
|
|
||||||
|
|
||||||
### Maintainers
|
|
||||||
|
|
||||||
This module is maintained by the OCA.
|
|
||||||
|
|
||||||
## Compatibility
|
|
||||||
|
|
||||||
- Odoo 16.0
|
|
||||||
- website_sale
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
# Copyright 2025 Criptomart
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
{
|
|
||||||
"name": "Website Sale Cart Line Subtotal",
|
|
||||||
"version": "16.0.1.0.0",
|
|
||||||
"summary": "Show line subtotal (quantity × price) in shopping cart",
|
|
||||||
"license": "AGPL-3",
|
|
||||||
"author": "Criptomart, Odoo Community Association (OCA)",
|
|
||||||
"website": "https://github.com/OCA/e-commerce",
|
|
||||||
"depends": ["website_sale"],
|
|
||||||
"data": ["views/website_sale_cart_templates.xml"],
|
|
||||||
"installable": True,
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<!-- Add Line Subtotal column to cart -->
|
|
||||||
<template id="cart_lines_subtotal" inherit_id="website_sale.cart_lines">
|
|
||||||
<!-- Add header for subtotal column -->
|
|
||||||
<xpath expr="//thead/tr/th[@class='text-center td-price']" position="after">
|
|
||||||
<th class="text-center td-subtotal">Subtotal</th>
|
|
||||||
</xpath>
|
|
||||||
|
|
||||||
<!-- Add subtotal value for each line -->
|
|
||||||
<xpath expr="//tbody//tr/td[@name='price']" position="after">
|
|
||||||
<td class="text-center td-subtotal" name="line_subtotal">
|
|
||||||
<t groups="account.group_show_line_subtotals_tax_excluded">
|
|
||||||
<span
|
|
||||||
t-esc="line.price_subtotal"
|
|
||||||
style="white-space: nowrap;"
|
|
||||||
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"
|
|
||||||
/>
|
|
||||||
</t>
|
|
||||||
<t groups="account.group_show_line_subtotals_tax_included">
|
|
||||||
<span
|
|
||||||
t-esc="line.price_total"
|
|
||||||
style="white-space: nowrap;"
|
|
||||||
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"
|
|
||||||
/>
|
|
||||||
</t>
|
|
||||||
</td>
|
|
||||||
</xpath>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue