Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2631 Visualizzazioni

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>

Avatar
Abbandona
Risposta migliore

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

   

Avatar
Abbandona
Autore

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.

Post correlati Risposte Visualizzazioni Attività
1
giu 24
4847
0
gen 24
1790
0
ott 22
68
0
ott 22
7
1
gen 24
4551