Hello, I am creating a model that will be linked to sales order, called "subscription.basket". This model's records (Baskets) have the fields shown bellow:
On the 'sale.order' model, I added a field as following:
)
And then, in order to link baskets to sales orders, I overwrote the create method as following:
What I expected is that when I created a "Basket A", all sales with the field shippingEstimatedDate within the range defined by the basket's date_start and date_end fields would have their basket_id field linked to "Basket A".
However, on creation nothing happens and no sales are updated. If try to duplicate "Basket A", creating "Basket B", the sales are then updated, getting linked to "Basket A". Is that expected? What should I do to update sales while creating a basket?