SHARE
TWEET

proteus change draft sale state

a guest Aug 10th, 2013 35 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CODE
  2.  
  3. #!/usr/bin/env python
  4. # -*- coding: utf8 -*-
  5.  
  6. #Try to quote draft sale
  7.  
  8. from proteus import config, Model
  9. from con_data_dm import *
  10.  
  11. config = config.set_xmlrpc(url)
  12.  
  13. Sale = Model.get('sale.sale')
  14. (sale,) = Sale.find([('id','=',"2456")])
  15. Sale.quote([sale.id], config.context)
  16.  
  17.  
  18.  
  19. RESULT
  20.  
  21. Traceback (most recent call last):
  22.   File "change_sale_state.py", line 13, in <module>
  23.     Sale.quote([sale.id], config.context)
  24. AttributeError: type object 'sale.sale' has no attribute 'quote'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top