Exemplo n.º 1
0
 def get_modifications(self, filter = lambda x: True):
     return Modification.wrapCollection(self.element.findall('//variant'), filter)
Exemplo n.º 2
0
 def add(self, product_id, modification, lang=None):
     modifications = self.create('/admin/products/%d/variants.xml' % product_id, modification, lang)
     return Modification.wrapCollection(modifications)
Exemplo n.º 3
0
 def get_list(self, product_id, lang=None):
     """@rtype: L{list}"""
     modifications = self.read('/admin/products/%d/variants.xml' % product_id, lang)
     return Modification.wrapCollection(modifications)
Exemplo n.º 4
0
 def edit(self, product_id, modification, lang=None):
     """@rtype: L{list}"""
     modifications = self.update('/admin/products/%d/variants/%d' % (product_id, modification.get_id()), modification, lang)
     return Modification.wrapCollection(modifications)