+1 vote

I'm creating a custom packing list in odoo using odoo studio.

When I create a table with all the products there should be a few colums such as: #products, #products in a carton, #cartons.

I can simply add #products and #products in a carton using the standard fields with this code:

<xpath expr="/t/t/t/div/table/tbody/tr/td[6]" position="after">
      <span t-field="table_line.product_qty"/>

or using "table_line.product_packaging.qty" in the t-field.

So I want to create a new field with the amount of packages by dividing #product by #products in carton. How could I do this, I searched and tried using:

<xpath expr="/t/t/t/div/table/tbody/tr/td[7]" position="after">
      <span t-esc="table_line.product_qty/table_line.product_packaging.qty"/>

But this doesn't work.

in Back-end by (10.5k points) | 49 views

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
205 questions
180 answers
221,398 users