~vauxoo/addons-vauxoo/8.0-import_tax_tariff-dev-yani-rev-2

« back to all changes in this revision

Viewing changes to procurement_wizard_schedulers/wizard/schedulers_all.py

  • Committer: Nhomar Hernandez
  • Date: 2013-04-19 20:33:12 UTC
  • mfrom: (542.1.314 addons-vauxoo)
  • Revision ID: nhomar@gmail.com-20130419203312-o35v7dn79l6vur0t
[MERGE - PEP8 AND V7-MIG] All migrated to V7 Just
improved osv.osv => osv.Model, osv.osv_memory => osv.TransientModel
import inside openerp.* enviroment
Erased class instansiation no necesarry anymore in V7
AUTOPEP8 run, Left PEP8 long lines manually.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#    Module Writen to OpenERP, Open Source Management Solution
5
5
#    Copyright (C) Vauxoo (<http://vauxoo.com>).
6
6
#    All Rights Reserved
7
 
###############Credits######################################################
 
7
# Credits######################################################
8
8
#    Coded by: Juan Carlos Funes(juan@vauxoo.com)
9
9
#############################################################################
10
10
#    This program is free software: you can redistribute it and/or modify
19
19
#
20
20
#    You should have received a copy of the GNU Affero General Public License
21
21
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
 
################################################################################
 
22
##########################################################################
23
23
 
24
24
import threading
25
25
import pooler
26
 
import netsvc
 
26
import openerp.netsvc as netsvc
27
27
import os
28
 
from osv import osv, fields
29
 
 
30
 
class procurement_compute_all(osv.osv_memory):
 
28
from openerp.osv import osv, fields
 
29
 
 
30
 
 
31
class procurement_compute_all(osv.TransientModel):
31
32
    _inherit = 'procurement.order.compute.all'
32
33
 
33
34
    _columns = {
35
36
    }
36
37
 
37
38
    def procure_calculation(self, cr, uid, ids, context=None):
38
 
        form = self.read(cr,uid,ids,[])
 
39
        form = self.read(cr, uid, ids, [])
39
40
        products = form and form[0]['product_ids'] or False
40
41
        context.update({'product_ids': products})
41
 
        res=super(procurement_compute_all, self).procure_calculation(cr, uid, ids, context=context)
 
42
        res = super(procurement_compute_all, self).procure_calculation(
 
43
            cr, uid, ids, context=context)
42
44
        return res
43
45
 
44
 
procurement_compute_all()
45
46
 
46
47
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: