~romaia/stoqlib/consig

« back to all changes in this revision

Viewing changes to stoqlib/domain/views.py

  • Committer: Ronaldo Maia
  • Date: 2010-05-27 20:37:56 UTC
  • Revision ID: romaia@async.com.br-20100527203756-r1hb38xxxra5fcbd
improce close consigment wizard: create a ReceivingOrder for the purchase

Show diffs side-by-side

added added

removed removed

Lines of Context:
662
662
    columns = dict(
663
663
        id=PersonAdaptToSupplier.q.id,
664
664
        supplier_name=Person.q.name,
665
 
        branch=InConsignment.q.branchID,
 
665
        branch_id=InConsignment.q.branchID,
666
666
        open_consignments=const.COUNT(InConsignment.q.id),
667
667
 
668
668
    )
682
682
        return PersonAdaptToSupplier.get(self.id,
683
683
                        connection=self.get_connection())
684
684
 
 
685
    @property
 
686
    def consignments(self):
 
687
        return InConsignment.selectBy(branchID=self.branch_id,
 
688
                                      supplierID=self.id)
 
689
 
685
690
    @classmethod
686
691
    def select_by_branch(cls, query, branch, connection=None):
687
692
        if branch: