Changeset d0b1cb5 in tailbone


Ignore:
Timestamp:
03/11/19 19:32:41 (6 months ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
4312238
Parents:
c78d6f2
Message:

Tweak how batch handler is invoked to remove row

also, removes some related logic which now lives in handler

Location:
tailbone/views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tailbone/views/batch/core.py

    rc78d6f2 rd0b1cb5  
    11211121        Perform the actual deletion of given row object.
    11221122        """
    1123         self.handler.remove_row(row)
     1123        self.handler.do_remove_row(row)
    11241124
    11251125    def bulk_delete_rows(self):
  • tailbone/views/purchasing/batch.py

    rc78d6f2 rd0b1cb5  
    908908        return self.redirect(self.get_action_url('view', parent, mobile=mobile))
    909909
    910     def delete_row(self):
    911         """
    912         Update the batch totals in addition to marking row as removed.
    913         """
    914         row = self.Session.query(self.model_row_class).get(self.request.matchdict['row_uuid'])
    915         if not row:
    916             raise self.notfound()
    917         batch = row.batch
    918         if row.po_total:
    919             batch.po_total -= row.po_total
    920         if row.invoice_total:
    921             batch.invoice_total -= row.invoice_total
    922         return super(PurchasingBatchView, self).delete_row()
    923 
    924910#     def get_execute_success_url(self, batch, result, **kwargs):
    925911#         # if batch execution yielded a Purchase, redirect to it
Note: See TracChangeset for help on using the changeset viewer.