콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2650 화면

In v14, I want to make invoices payment in payment form by choosing invoices.  In v13, already have invoice_ids field and I changed to readonly to 0 and can make payment. But in v14, there is no invoice_ids field.So I create this but how can I do that?I share my some code

invoice_ids = fields.Many2many('account.move', 'account_invoice_payment_rel', 'payment_id', 'invoice_id', string="Invoices", copy=False, readonly=True,
                                   help="""Technical field containing the invoice for which the payment has been generated.
                                   This does not especially correspond to the invoices reconciled with the payment,
                                   as it can have been generated first, and reconciled later""")


My view is


<record id="view_account_payment_form_inherit_payment" model="ir.ui.view">
                <field name="name">view.account.payment.form.inherit.payment</field>
                <field name="model">account.payment</field>
                <field name="inherit_id" ref="account.view_account_payment_form"/>
                <field name="arch" type="xml">
                  <xpath expr="//group" position="after">
                    <group invisible="context.get('active_model') == 'account.move'">
                      <field name="invoice_ids" attrs="{'invisible': [('partner_id', '=', False)]}"   readonly="0" domain="[('partner_id','child_of',partner_id),('state','=','posted'),('payment_state','=','not_paid')]" >
                          
                          <tree>
                              <field name="partner_id"/>
                              <field name="name"/>
                              <field name="amount_residual"/>
                              <field name="state"/>
                          </tree>
                      </field>
                    </group>
                  </xpath>

</field>

</record>

아바타
취소
베스트 답변

Hello,

For this, you do not need to take a new field, if you want to link your payment with an invoice, then you can simply do it by reconciliation.

Go to Payments -> Payment Matching.

On the reconciliation screen, select your invoice reference and payment reference and click on reconcile button.

https://tinyurl.com/y9tbhykt

Now go to your invoice, and you can find payment references there.

Thanks

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   

아바타
취소
작성자

When I create new customer payment, I didn't find any payment matching button.My requirement choose many invoices in payment form and when i confirm all invoice will be paid.

관련 게시물 답글 화면 활동
1
6월 24
4886
0
1월 24
1827
0
10월 22
68
0
10월 22
7
1
1월 24
4579