View difference between Paste ID: YkcqKt4U and 2YJB1rjH
SHOW: | | - or go back to the newest paste.
1
class PriceList(ModelSQL, ModelView):
2
    _name = 'product.price_list'
3
4
    def _get_context_price_list_line(self, party, product, unit_price,
5
            , dealer_price, quantity, uom):
6
        '''
7
        Get price list context for unit price
8
9
        :param party: the BrowseRecord of the party.party
10
        :param product: the BrowseRecord of the product.product
11
        :param unit_price: a Decimal for the default unit price in the
12
            company's currency and default uom of the product
13
        :param quantity: the quantity of product
14
        :param uom: the BrowseRecord of the product.uom
15
        :return: a dictionary
16
        '''
17-
        return {
17+
        context = super(PriceList, self)._get_context_price_list_line(
18-
            'unit_price': unit_price,
18+
            party, product, unit_price, quantity, uom)
19-
            'dealer_price': dealer_price,
19+
        context['dealer_price'] = product.dealer_price
20-
        }
20+
        return context
21
22
Pricelist()