如何将客户支付树添加到 openerp 的 cahs 寄存器中。我像这样添加我的编码。
'customer_payment_lines':fields.one2many('account.voucher','account_id','Customer Payments'),在 account.bank.statement 中。
但我在收银机中看不到任何客户付款行。我应该怎么办?来人帮帮我。提前致谢。
如何将客户支付树添加到 openerp 的 cahs 寄存器中。我像这样添加我的编码。
'customer_payment_lines':fields.one2many('account.voucher','account_id','Customer Payments'),在 account.bank.statement 中。
但我在收银机中看不到任何客户付款行。我应该怎么办?来人帮帮我。提前致谢。
对于 one2many,必须将 many2one 放在其他对象中。在您的情况下,您必须将 many2one 放入 account.voucher 中。并检查您是否保留了“customer_payment_lines”字段。尝试这个,
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- product tree -->
<record id="view_royalfood_customer_payment" model="ir.ui.view">
<field name="name">Royal Food Customer Payment</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_form2" />
<field name="arch" type="xml">
<field name="opening_details_ids" position="after">
<field name="customer_payment_lines">
<tree>
<field name="name"/>
<field name="company_id"/>
<field name="account_id"/>
</tree>
</field>
</field>
</field>
</record>
</data>
</openerp>
希望这能解决您的问题。