Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class="'flex-column h-100 border'"
productId="product.id"
product="product"
price="formattedComboPrice(combo_item)"
comboExtraPrice="formattedComboPrice(combo_item)"
imageUrl="product.getImageUrl()"
onClick="(ev) => this.onClickProduct({ product, combo_item }, ev)" />
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class ProductCard extends Component {
name: String,
product: Object,
productId: Number | String,
price: String,
comboExtraPrice: { String, optional: true },
color: { type: [Number, undefined], optional: true },
imageUrl: [String, Boolean],
productInfo: { Boolean, optional: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
t-out="props.productCartQty"
class="product-cart-qty position-absolute bottom-0 end-0 m-1 px-2 rounded bg-black text-white fs-5 fw-bolder"/>
</div>
<div class="w-100 d-flex justify-content-between align-items-center px-2">
<span t-if="props.price" class="price-tag py-1 text-end" t-esc="props.price" />
<div t-if="props.comboExtraPrice" class="d-flex px-2 pb-1">
<span class="price-extra px-2 py-0 rounded-pill text-bg-info">
+ <t t-esc="props.comboExtraPrice"/>
</span>
</div>
</article>
</t>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
class="pos.productViewMode"
name="getProductName(product)"
color="product.pos_categ_ids?.at(-1)?.color"
price="this.getProductPrice(product)"
imageUrl="pos.config.show_product_images and this.getProductImage(product)"
onClick.bind="() => this.addProductToOrder(product)"
productInfo="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ registry.category("web_tour.tours").add("ProductComboChangeFP", {
Dialog.confirm("Open Register"),

ProductScreen.clickDisplayedProduct("Office Combo"),
ProductScreen.checkExtraPrice("2"),
ProductScreen.checkProductExtraPrice("Combo Product 3", "2"),
combo.select("Combo Product 2"),
combo.select("Combo Product 4"),
combo.select("Combo Product 6"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,10 @@ export function verifyOrderlineSequence(products) {
}));
}

export function checkExtraPrice(amount) {
export function checkProductExtraPrice(productName, extraAmount) {
return {
trigger: `.price-tag.py-1:contains(${amount})`,
content: `'${productName}' should have '${extraAmount}' extra price`,
trigger: `article.product:has(.product-name:contains("${productName}")):has(.price-extra:contains("${extraAmount}"))`,
};
}

Expand Down