(odoo10)如何在pdf发票中添加产品属性

时间:2018-10-16 15:43:32

标签: pdf odoo odoo-10

pls建议如何将产品属性添加到pdf发票中。 目前,我们正在印刷产品SCU:

1>------ Build started: Project: TestUniquePtr, Configuration: Debug Win32 ------
1>  Main.cpp
1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0(606): error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>'
1>          with
1>          [
1>              _Ty=Thing
1>          ]
1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\memory(1447) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr'
1>          with
1>          [
1>              _Ty=Thing
1>          ]
1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0(605) : while compiling class template member function 'void std::allocator<_Ty>::construct(_Ty *,const _Ty &)'
1>          with
1>          [
1>              _Ty=std::unique_ptr<Thing>
1>          ]
1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0(751) : see reference to function template instantiation 'void std::allocator<_Ty>::construct(_Ty *,const _Ty &)' being compiled
1>          with
1>          [
1>              _Ty=std::unique_ptr<Thing>
1>          ]
1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\type_traits(743) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=std::unique_ptr<Thing>
1>          ]
1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector(655) : see reference to class template instantiation 'std::is_empty<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=std::allocator<std::unique_ptr<Thing>>
1>          ]
1>          d:\projects\c++\testuniqueptr\testuniqueptr\main.cpp(11) : see reference to class template instantiation 'std::vector<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=std::unique_ptr<Thing>
1>          ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

,发票看起来有点难看。 请建议如何添加产品模板,例如l.product_id.name +属性,例如: enter image description here

另外,您能否提出建议如何将属性放在产品名称下方? 这是我的代码:

                    <tr t-foreach="o.invoice_line_ids" t-as="l">
                    <td><span t-field="l.product_id.default_code"/></td>
                    <td class="hidden"><span t-field="l.origin"/></td>
                    <td class="text-right">

我想要这样: enter image description here 提前非常感谢!

1 个答案:

答案 0 :(得分:1)

您将需要执行以下操作来输出产品属性名称和值:

read.csv.sql("iris.csv", verbose = TRUE)