Stop workflow to Confirmed
This commit is contained in:
@@ -1077,16 +1077,19 @@ class Sale(
|
||||
@Workflow.transition('confirmed')
|
||||
@set_employee('confirmed_by')
|
||||
def confirm(cls, sales):
|
||||
transaction = Transaction()
|
||||
context = transaction.context
|
||||
cls.set_sale_date(sales)
|
||||
cls.store_cache(sales)
|
||||
for process_after, sub_sales in groupby(
|
||||
sales, lambda s: s.process_after):
|
||||
with transaction.set_context(
|
||||
queue_scheduled_at=process_after,
|
||||
queue_batch=context.get('queue_batch', True)):
|
||||
cls.__queue__.process(sub_sales)
|
||||
# Stop the workflow at Confirmed.
|
||||
# The user must explicitly click Process to create/update invoices and
|
||||
# shipments.
|
||||
# transaction = Transaction()
|
||||
# context = transaction.context
|
||||
# for process_after, sub_sales in groupby(
|
||||
# sales, lambda s: s.process_after):
|
||||
# with transaction.set_context(
|
||||
# queue_scheduled_at=process_after,
|
||||
# queue_batch=context.get('queue_batch', True)):
|
||||
# cls.__queue__.process(sub_sales)
|
||||
|
||||
@classmethod
|
||||
@ModelView.button_action('sale.wizard_invoice_handle_exception')
|
||||
|
||||
Reference in New Issue
Block a user