01-06-2021, 11:11 PM
(01-06-2021, 11:22 AM)Svemar Wrote: Hi,
Maybe it is better to mark product Inactive from Invoice side by workflow, after the last one has been sold?
Well for us the sale ends with approved SO. Invoices are just the legal end of the transaction, the products really leaves the warehouse before any invoice is issued and we want to avoid overselling before restock right away. So if the SO is approved and the stock hits 0 we want to disable the product in order to avoid it's selection on a quote. But the invoicing of that sales order happens later in the day so by the time the person responsible with the invoice wants to generate the invoice from the salesorder, the validations will complain about the deactivated product and will not save.
It is not a problem, we can avoid that by issuing the invoice before the SO gets accepted(while stock is still positive) but I was examining the option of doing it a more 'proper' way. I wondered if maybe someone else already did that(tinkered with validations against the active state of a product). It is a switch that seems to be buried deep into the application . It's good that you can rely on it making the product not available in most of the places but it would be nicer if i could disable it 'on demand' on some modules like invoices and purchase orders .