@@ -101,9 +101,6 @@ def _get_pack_total(self):
101
101
def _onchange_pack_line_ids (self ):
102
102
self .price_unit = self .pack_total
103
103
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
107
104
@api .constrains ('product_id' )
108
105
def expand_none_detailed_pack (self ):
109
106
if self .product_id .pack_price_type == 'none_detailed_assited_price' :
@@ -122,44 +119,3 @@ def expand_none_detailed_pack(self):
122
119
'price_subtotal' : price_unit * quantity ,
123
120
}
124
121
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