Skip to Content
Menú
This question has been flagged
1 Respondre
5685 Vistes

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

Avatar
Descartar
Autor

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


Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de març 25
1960
1
d’oct. 22
11752
7
de gen. 22
19366
1
de gen. 24
15557
1
d’oct. 19
4388