~ecommerce-addons-core-editors/e-commerce-addons/github-6.1

« back to all changes in this revision

Viewing changes to sale_automatic_workflow/sale.py

  • Committer: sebastien beau
  • Date: 2012-08-21 13:57:44 UTC
  • mto: (269.1.1)
  • mto: This revision was merged to the branch mainline in revision 273.
  • Revision ID: git-v1:5a17b67295468f3c90564a729144ebc41da38618
[REF] refactor/clean code due to orm change in 6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.      #
19
19
#                                                                               #
20
20
#################################################################################
21
 
from osv import osv, fields
22
 
import netsvc
 
21
from openerp.osv.orm import Model
 
22
from openerp.osv import fields
23
23
 
24
 
class sale_order(osv.osv):
 
24
class sale_order(Model):
25
25
    _inherit = "sale.order"
26
26
    _columns = {
27
27
        'workflow_process_id':fields.related('payment_method_id', 'workflow_process_id', \
40
40
        picking_vals['workflow_process_id'] = order.workflow_process_id.id
41
41
        return picking_vals
42
42
 
43
 
class stock_picking(osv.osv):
 
43
class stock_picking(Model):
44
44
    _inherit = "stock.picking"
45
45
    _columns = {
46
46
        'workflow_process_id':fields.many2one('sale.workflow.process', 'Sale Workflow Process'),
82
82
#        return True
83
83
#        
84
84
 
85
 
class account_invoice(osv.osv):
 
85
class account_invoice(Model):
86
86
    _inherit = "account.invoice"
87
87
    _columns = {
88
88
        'workflow_process_id':fields.many2one('sale.workflow.process', 'Sale Workflow Process'),