Skip to Content
मेन्यू
This question has been flagged
1 Reply
5085 Views

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

Avatar
Discard
Author

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
Discard
Related Posts Replies Views Activity
1
मार्च 25
1340
1
अक्तू॰ 22
11260
7
जन॰ 22
18691
1
जन॰ 24
15030
1
अक्तू॰ 19
4039