Skip to content

Refactor callback #99

@sebastienbeau

Description

@sebastienbeau

In V18 callback on transaction are removed, and in V16 odoo not do use then.

The idea is to remove the callback logic from here :

https://github.com/shopinvader/odoo-shopinvader-payment/blob/16.0/shopinvader_api_payment_cart/models/sale_order.py#L7-L28

Also removing the logic of confirming to a sale order

https://github.com/shopinvader/odoo-shopinvader-payment/blob/16.0/shopinvader_api_payment_cart/models/payment_provider.py#L10-L15

And use the odoo native approach

For converting a cart to a sale.

We can in the module sale_cart inherit the method "set_pending", "set_done", "set_autorized" and change the typology before calling the super method

For confirming the sale order, we should not add extra logic in shopinvader as odoo native already take care of this and check the amout between the so and the transaction : https://github.com/odoo/odoo/blob/16.0/addons/sale/models/payment_transaction.py#L63

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions