title: SDD Payment via Automated Action (Odoo v13)
body: <p>Unfortunately Odoo has removed the automatic SSD payment from v12 to v13, which is crucial for me. Therefore I try to reproduce the behavior via an automated action and came quite far I guess.</p>
  <p>I created an Automated Action that watches all invoices in draft and runs a python code if the invoice is set from draft to not draft. But unfortunately I get an error as soon as I try to post an invoice:</p>
  <p>&quot;Database fetch misses ids (('10',)) and has extra ids ((10,)), may be caused by a type incoherence in a previous request&quot;</p>
  <p>As far as I know this is related to type transformation, but as I am new to python &amp; odoo, I am not sure how to transform the odoo datatypes correctly. Does anyone have a hint?</p>
  <p>Here's the python code that should be executed:</p>
  <pre><code>payment = env['account.payment'].create({
       'payment_method_id' : '6',
       'partner_id': record.partner_id.id,
       'journal_id' :     '10',
       'amount' : record.amount_residual
  })
  </code></pre>
  <p>The ids are double checked and link to the correct entries:</p>
  <ul>
  <li>payment_method_id '6' = my bank account</li>
  <li>journal_id '10' = SDD Payment</li>
  </ul>
  <p>Below please find the current domain applied to the Automated Action.
  Any hints or help is much appreciated!</p>
  <p>Many thanks.
  Best regards,
  Christian</p>
  <p><a href="https://i.stack.imgur.com/RqJwA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RqJwA.jpg" alt="Automated Action - Domain" /></a></p>