Exemplo n.º 1
0
 def _update_default_sellable_code(self, category=None):
     if category:
         query = (Sellable.category_id == category.id)
         code = Sellable.get_max_value(self.store, Sellable.code, query=query)
     else:
         code = Sellable.get_max_value(self.store, Sellable.code)
     self.code.update(next_value_for(code))
Exemplo n.º 2
0
 def _update_default_sellable_code(self, category=None):
     if category:
         query = (Sellable.category_id == category.id)
         code = Sellable.get_max_value(self.store, Sellable.code, query=query)
     else:
         code = Sellable.get_max_value(self.store, Sellable.code)
     self.code.update(next_value_for(code))
Exemplo n.º 3
0
 def _update_default_sellable_code(self):
     code = Sellable.get_max_value(self.store, Sellable.code)
     self.code.update(next_value_for(code))
Exemplo n.º 4
0
 def _update_default_sellable_code(self):
     code = Sellable.get_max_value(self.store, Sellable.code)
     self.code.update(next_value_for(code))