Skip to Content
Menu
This question has been flagged
1 Atsakyti
4873 Rodiniai

How to create a payment for an invoice from python code in odoo15 

Portretas
Atmesti
Autorius

Following is a Code Snippet to Archive it.

payment=self.env['account.payment.register'].with_context(active_model='account.move'
active_id=rec.ids).create({
'payment_date': date.today(),
'amount': 120,
'journal_id': 7,
'currency_id': 122,
})

Best Answer

Hello Estain Makaudze,

Please find below way to use payment create from invoice in py code,
 
addons > account > wizard > account_payment_register.py file > method(_create_payments())

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
kov. 25
1141
1
spal. 22
11134
7
saus. 22
18374
1
saus. 24
14882
1
spal. 19
3949