Hi,
I have a button that update the phase of a payment, i want to create journal entries when i click this button
is this possible? if so, how?
here's my button code.
class AccountPaymentsPhaseWizard(models.TransientModel):
_name = 'account.payments.phase.wizard'
phase = fields.Many2one('account.journal', string='Phase')
@api.multi
def update_payments_phase(self):
payments = self.env['account.payment'].browse(self.env.context.get('active_ids', []))
for payment in payments:
payment.phase = self.phase
Thanks
https://www.youtube.com/watch?v=Jssb15ADeyg
Thnx
self.env['account.move'].create(
{'field_1':a, 'field_2':2})