refactoring this fixes bugs introduced by https://github.com/odoo/odoo/commit/beaa30a3d1843de43a45f419bfbc1bfa7613a920 in saas-13.2, the field invoice_payment_state was renamed into payment_state by https://github.com/odoo/odoo/commit/8e4158af810bcf475214946fa64d3b0ce4d3b26d in saas-13.4, the feature post_at of journal have been removed by https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074 closes odoo/odoo#49569 X-original-commit: 2001c413ee142c50ca6549cd5dff9fc0f9f1637b Signed-off-by: Csaba Tóth <csaba.toth@i3rendszerhaz.hu> Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>