Skip to content

Commit 03502b4

Browse files
committedSep 25, 2015
IMP clean code
1 parent d4cb5c8 commit 03502b4

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed
 

‎product_pack/models/sale_order_line.py

-44
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ def _get_pack_total(self):
101101
def _onchange_pack_line_ids(self):
102102
self.price_unit = self.pack_total
103103

104-
# onchange para agregar los product en el tipo el pack "sale order pack"
105-
# TODO cambiar este onchange por un constraint oa lgo que escriba al hacer
106-
# write
107104
@api.constrains('product_id')
108105
def expand_none_detailed_pack(self):
109106
if self.product_id.pack_price_type == 'none_detailed_assited_price':
@@ -122,44 +119,3 @@ def expand_none_detailed_pack(self):
122119
'price_subtotal': price_unit * quantity,
123120
}
124121
self.pack_line_ids.create(vals)
125-
126-
# def product_id_change(
127-
# self, cr, uid, ids, pricelist, product, qty=0,
128-
# uom=False, qty_uos=0, uos=False, name='', partner_id=False,
129-
# lang=False, update_tax=True, date_order=False, packaging=False,
130-
# fiscal_position=False, flag=False, context=None):
131-
# # warning = {}
132-
# if not product:
133-
# return {'value': {
134-
# 'th_weight': 0,
135-
# 'product_packaging': False,
136-
# 'product_uos_qty': qty},
137-
# 'domain': {'product_uom': [], 'product_uos': []}
138-
# }
139-
# product_obj = self.pool.get('product.product')
140-
# product_info = product_obj.browse(cr, uid, product)
141-
142-
# result = super(sale_order_line, self).product_id_change(
143-
# cr, uid, ids, pricelist, product, qty,
144-
# uom, qty_uos, uos, name, partner_id,
145-
# lang, update_tax, date_order, packaging,
146-
# fiscal_position, flag, context)
147-
148-
# pack_line_ids = [(5, False, False)]
149-
# if (
150-
# product_info.pack_line_ids and
151-
# product_info.pack_price_type == 'none_detailed_assited_price'
152-
# ):
153-
# for pack_line in product_info.pack_line_ids:
154-
# price_unit = pack_line.product_id.lst_price
155-
# quantity = pack_line.quantity
156-
# pack_line_ids.append((0, False, {
157-
# 'product_id': pack_line.product_id.id,
158-
# 'product_uom_qty': quantity,
159-
# 'price_unit': price_unit,
160-
# 'price_subtotal': price_unit * quantity,
161-
# }))
162-
# result['value']['pack_line_ids'] = pack_line_ids
163-
# print 'result', result
164-
# print 'product_info.pack_price_type', product_info.pack_price_type
165-
# return result

0 commit comments

Comments
 (0)