Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. context = super(PriceList, self)._get_context_price_list_line(
  18. party, product, unit_price, quantity, uom)
  19. context['dealer_price'] = product.dealer_price
  20. return context
  21.  
  22. Pricelist()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement