19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:29:53 +01:00
parent 6e54c1af6c
commit 3ca647e428
1087 changed files with 132065 additions and 108499 deletions

View file

@ -0,0 +1,20 @@
export const addProductLineToOrder = async (
store,
order,
{ templateId = 1, productId = 1, qty = 1, price_unit = 10, ...extraFields } = {}
) => {
const template = store.models["product.template"].get(templateId);
const product = store.models["product.product"].get(productId);
const lineData = {
product_tmpl_id: template,
product_id: product,
qty,
price_unit,
...extraFields,
};
const line = await store.addLineToOrder(lineData, order);
return line;
};