[POS-commit] r8181 - stoqlib/trunk/stoqlib/domain
romaia at async.com.br
romaia at async.com.br
Fri Jul 24 18:08:42 BRT 2009
Author: romaia
Date: Fri Jul 24 18:08:42 2009
New Revision: 8181
Log:
Bug 4031 Tela principal de estoque deve exibir todos os produtos cadastrados
Modified:
stoqlib/trunk/stoqlib/domain/views.py
Modified: stoqlib/trunk/stoqlib/domain/views.py
==============================================================================
--- stoqlib/trunk/stoqlib/domain/views.py Fri Jul 24 17:24:15 2009 (r8180)
+++ stoqlib/trunk/stoqlib/domain/views.py Fri Jul 24 18:08:42 2009 (r8181)
@@ -98,7 +98,9 @@
@classmethod
def select_by_branch(cls, query, branch, having=None, connection=None):
if branch:
- branch_query = ProductStockItem.q.branchID == branch.id
+ # Also show products that were never purchased.
+ branch_query = OR(ProductStockItem.q.branchID == branch.id,
+ ProductStockItem.q.branchID == None)
if query:
query = AND(query, branch_query)
else:
More information about the POS-commit
mailing list