Commit 2c47bab3 by Damien Moulard

add db dej issuer in sales export

parent 5790b181
Pipeline #2732 passed with stage
in 1 minute 33 seconds
......@@ -29,7 +29,7 @@ class CagetteSales(models.Model):
statements_orders[s] = o["name"]
# Get payment lines
cond = [['id', 'in', statements]]
fields = ["amount", "journal_id", "create_date"]
fields = ["amount", "journal_id", "create_date", "meal_voucher_issuer"]
payments = self.o_api.search_read('account.bank.statement.line', cond, fields, order="create_date ASC", limit=50000)
try:
for payment in payments:
......@@ -41,7 +41,8 @@ class CagetteSales(models.Model):
"payments": [
{
"amount": round(float(payment["amount"]), 2),
"journal_id": payment["journal_id"]
"journal_id": payment["journal_id"],
"meal_voucher_issuer": payment["meal_voucher_issuer"]
}
]
})
......
......@@ -50,12 +50,12 @@ function display_orders(orders) {
{
data:"partner",
title:"Membre",
width: "40%"
// width: "40%"
},
{
data:"total_amount",
title: "Montant dû",
className:"dt-body-center",
// className:"dt-body-center",
render: function (data) {
return parseFloat(data).toFixed(2) + ' €';
}
......@@ -72,9 +72,16 @@ function display_orders(orders) {
}
res += "</ul>";
return res;
return res;
}
}
},
{
data:"payments[0].meal_voucher_issuer",
title: "Émetteur CB Déj",
render: function (data) {
return data === 'false' || data == false ? '' : data;
}
},
],
order: [
[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment