|
4 | 4 | <t t-as="ml" position="attributes"> |
5 | 5 | <attribute |
6 | 6 | name="t-foreach" |
7 | | - >o.move_line_ids_without_package.sorted(lambda ml: (ml.move_id.categ_id.display_name, ml.move_id.product_brand_id.name, ml.product_id.display_name))</attribute> |
| 7 | + >o.move_line_ids_without_package.sorted(lambda ml: (ml.move_id.categ_id.display_name or '', ml.move_id.product_brand_id.name or '', ml.product_id.display_name or '')) |
| 8 | + </attribute> |
8 | 9 | </t> |
9 | 10 | <!-- |
10 | 11 | <xpath expr="//thead/tr/th[4]" position="attributes"> |
|
21 | 22 | <t |
22 | 23 | t-if="lines" |
23 | 24 | t-set="lines" |
24 | | - t-value="lines.sorted(lambda m: (m.categ_id.display_name, m.product_brand_id.name, m.product_id.display_name))" |
| 25 | + t-value="lines.sorted(lambda m: (m.categ_id.display_name or '', m.product_brand_id.name or '', m.product_id.display_name or ''))" |
25 | 26 | /> |
26 | 27 | </t> |
27 | 28 | <t t-set="package_move_lines" position="after"> |
28 | 29 | <t |
29 | 30 | t-if="package_move_lines" |
30 | 31 | t-set="package_move_lines" |
31 | | - t-value="package_move_lines.sorted(lambda ml: (ml.move_id.categ_id.display_name, ml.move_id.product_brand_id.name, ml.product_id.display_name))" |
| 32 | + t-value="package_move_lines.sorted(lambda ml: (ml.move_id.categ_id.display_name or '', ml.move_id.product_brand_id.name or '', ml.product_id.display_name or ''))" |
32 | 33 | /> |
33 | 34 | </t> |
34 | 35 | <t t-set="move_lines" position="after"> |
35 | 36 | <t |
36 | 37 | t-if="move_lines" |
37 | 38 | t-set="move_lines" |
38 | | - t-value="move_lines.sorted(lambda ml: (ml.move_id.categ_id.display_name, ml.move_id.product_brand_id.name, ml.product_id.display_name))" |
| 39 | + t-value="move_lines.sorted(lambda ml: (ml.move_id.categ_id.display_name or '', ml.move_id.product_brand_id.name or '', ml.product_id.display_name or ''))" |
39 | 40 | /> |
40 | 41 | </t> |
41 | 42 | <xpath |
|
44 | 45 | > |
45 | 46 | <attribute |
46 | 47 | name="t-foreach" |
47 | | - >o.move_line_ids.sorted(lambda ml: (ml.move_id.categ_id.display_name, ml.move_id.product_brand_id.name, ml.product_id.display_name))</attribute> |
| 48 | + >o.move_line_ids.sorted(lambda ml: (ml.move_id.categ_id.display_name or '', ml.move_id.product_brand_id.name or '', ml.product_id.display_name or ''))</attribute> |
48 | 49 | </xpath> |
49 | 50 | <t t-set="bo_lines" position="after"> |
50 | 51 | <t |
51 | 52 | t-if="bo_lines" |
52 | 53 | t-set="bo_lines" |
53 | | - t-value="bo_lines.sorted(lambda m: (m.categ_id.display_name, m.product_brand_id.name, m.product_id.display_name))" |
| 54 | + t-value="bo_lines.sorted(lambda m: (m.categ_id.display_name or '', m.product_brand_id.name or '', m.product_id.display_name or ''))" |
54 | 55 | /> |
55 | 56 | </t> |
56 | 57 | </template> |
|
0 commit comments