I want to limit the quantity of "Order lines" to 2 products only (When 2 products are loaded, I want the "Add a Product", "Add a section" and "Add a note" buttons to disappear automatically).
I tried to use an @api.constrains
but it only validates when I click Save button.