summaryrefslogtreecommitdiff
path: root/addons/auction
diff options
context:
space:
mode:
authorAVP(Axelor) <>2011-04-29 14:19:48 +0530
committerAMP (OpenERP) <amp@tinyerp.com>2011-04-29 14:19:48 +0530
commitcc3d7333c87dcd5e164ec88ea5bc1cfef4bc8cd5 (patch)
treec8117d281e494c73a3aa2af28e9f9ab3d22f80f2 /addons/auction
parentd553615695cee83345692d53a033e1e7c5f2a512 (diff)
[FIX][IMP] all modules improvement.
bzr revid: amp@tinyerp.com-20110429084948-x0pny8n2ersc4h8m
Diffstat (limited to 'addons/auction')
-rw-r--r--addons/auction/auction.py14
-rw-r--r--addons/auction/report/auction_artists.py1
-rw-r--r--addons/auction/report/auction_bids.py1
-rw-r--r--addons/auction/report/auction_buyer_result.py1
-rw-r--r--addons/auction/report/auction_catelog.py1
-rw-r--r--addons/auction/report/auction_objects.py1
-rw-r--r--addons/auction/report/auction_result.py1
-rw-r--r--addons/auction/report/auction_total_rml.py1
-rw-r--r--addons/auction/report/bids_lots.py1
-rw-r--r--addons/auction/report/bids_phones_details.py1
-rw-r--r--addons/auction/report/buyer_form_report.py3
-rw-r--r--addons/auction/report/buyer_list.py4
-rw-r--r--addons/auction/report/catalog2.py18
-rw-r--r--addons/auction/report/catelogwithpictures.py1
-rw-r--r--addons/auction/report/deposit_seller.py1
-rw-r--r--addons/auction/report/huissier.py1
-rw-r--r--addons/auction/report/lots_list.py1
-rw-r--r--addons/auction/report/lots_list_inventory.py1
-rw-r--r--addons/auction/report/lots_list_landscape.py1
-rw-r--r--addons/auction/report/report_lot_bar_code.py1
-rw-r--r--addons/auction/report/seller_form_report.py4
-rw-r--r--addons/auction/report/total.py9
-rw-r--r--addons/auction/wizard/auction_aie_send.py4
23 files changed, 12 insertions, 60 deletions
diff --git a/addons/auction/auction.py b/addons/auction/auction.py
index 20442f16250..0b2fc467f88 100644
--- a/addons/auction/auction.py
+++ b/addons/auction/auction.py
@@ -293,13 +293,13 @@ class auction_lots(osv.osv):
result = lot.buyer_price - lot.seller_price - lot.costs
elif name == "gross_margin":
- if ((lot.obj_price==0) and (lot.state=='draft')):
- amount = lot.lot_est1
- else:
- amount = lot.obj_price
- if amount > 0:
- result = (lot.gross_revenue * 100) / amount
- result = round(result,2)
+ if ((lot.obj_price==0) and (lot.state=='draft')):
+ amount = lot.lot_est1
+ else:
+ amount = lot.obj_price
+ if amount > 0:
+ result = (lot.gross_revenue * 100) / amount
+ result = round(result,2)
elif name == "net_margin":
if ((lot.obj_price==0) and (lot.state=='draft')):
diff --git a/addons/auction/report/auction_artists.py b/addons/auction/report/auction_artists.py
index b61f9a70e21..818724802f3 100644
--- a/addons/auction/report/auction_artists.py
+++ b/addons/auction/report/auction_artists.py
@@ -20,7 +20,6 @@
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/auction_bids.py b/addons/auction/report/auction_bids.py
index 7b0639e8849..8f4425a0e70 100644
--- a/addons/auction/report/auction_bids.py
+++ b/addons/auction/report/auction_bids.py
@@ -20,7 +20,6 @@
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/auction_buyer_result.py b/addons/auction/report/auction_buyer_result.py
index 9534fcdfb56..f979d541e97 100644
--- a/addons/auction/report/auction_buyer_result.py
+++ b/addons/auction/report/auction_buyer_result.py
@@ -20,7 +20,6 @@
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/auction_catelog.py b/addons/auction/report/auction_catelog.py
index bfa42d730d0..489859f9672 100644
--- a/addons/auction/report/auction_catelog.py
+++ b/addons/auction/report/auction_catelog.py
@@ -19,7 +19,6 @@
#
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/auction_objects.py b/addons/auction/report/auction_objects.py
index a83a75a873e..59b44ce4c2f 100644
--- a/addons/auction/report/auction_objects.py
+++ b/addons/auction/report/auction_objects.py
@@ -19,7 +19,6 @@
#
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/auction_result.py b/addons/auction/report/auction_result.py
index 0f77e456c28..79de1ccac6b 100644
--- a/addons/auction/report/auction_result.py
+++ b/addons/auction/report/auction_result.py
@@ -20,7 +20,6 @@
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/auction_total_rml.py b/addons/auction/report/auction_total_rml.py
index 576ed47a84d..610cb108cc4 100644
--- a/addons/auction/report/auction_total_rml.py
+++ b/addons/auction/report/auction_total_rml.py
@@ -20,7 +20,6 @@
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/bids_lots.py b/addons/auction/report/bids_lots.py
index 3bcc0fd4853..c6c93930455 100644
--- a/addons/auction/report/bids_lots.py
+++ b/addons/auction/report/bids_lots.py
@@ -20,7 +20,6 @@
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/bids_phones_details.py b/addons/auction/report/bids_phones_details.py
index 4356fff941e..3721fb84c37 100644
--- a/addons/auction/report/bids_phones_details.py
+++ b/addons/auction/report/bids_phones_details.py
@@ -20,7 +20,6 @@
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/buyer_form_report.py b/addons/auction/report/buyer_form_report.py
index ceffc87e557..37b82cd872e 100644
--- a/addons/auction/report/buyer_form_report.py
+++ b/addons/auction/report/buyer_form_report.py
@@ -20,10 +20,8 @@
##############################################################################
-import pooler
import time
from report import report_sxw
-from osv import osv
class buyer_form_report(report_sxw.rml_parse):
count=0
@@ -51,7 +49,6 @@ class buyer_form_report(report_sxw.rml_parse):
def buyer_info(self):
objects = [object for object in self.localcontext.get('objects')]
ret_dict = {}
- ret_list = []
for object in objects:
partner = ret_dict.get(object.ach_uid.id,False)
if not partner:
diff --git a/addons/auction/report/buyer_list.py b/addons/auction/report/buyer_list.py
index dde5c6ede04..3829238a43f 100644
--- a/addons/auction/report/buyer_list.py
+++ b/addons/auction/report/buyer_list.py
@@ -19,11 +19,8 @@
#
##############################################################################
-import pooler
import time
from report import report_sxw
-from osv import osv
-from tools.translate import _
class buyer_list(report_sxw.rml_parse):
auc_lot_ids=[]
@@ -66,7 +63,6 @@ class buyer_list(report_sxw.rml_parse):
return auct_dat
def lines_lots_auct_lot(self,obj):
- auc_lot_ids = []
auc_date_ids = self.pool.get('auction.dates').search(self.cr, self.uid, ([('name','like',obj['name'])]))
diff --git a/addons/auction/report/catalog2.py b/addons/auction/report/catalog2.py
index 22b6ecb82f7..e36f4bb3c44 100644
--- a/addons/auction/report/catalog2.py
+++ b/addons/auction/report/catalog2.py
@@ -19,22 +19,12 @@
#
##############################################################################
-import datetime
-import time
from report.interface import report_rml
-from report.interface import toxml
import pooler
-from osv import osv,orm
-from time import strptime
from xml.dom import minidom
-import sys
-import os
import re
-import netsvc
import base64
-import wizard
import photo_shadow
-from tools import config
import addons
def _to_unicode(s):
@@ -75,11 +65,6 @@ class auction_catalog(report_rml):
catalog=doc.createElement('catalog')
doc.documentElement.appendChild(catalog)
-
- infodb='info'
- commdb='comm'
- tab_avoid = []
- tab_no_photo=[]
auction_lot_pool = pooler.get_pool(cr.dbname).get('auction.lots')
auction_dates_pool = pooler.get_pool(cr.dbname).get('auction.dates')
for auction in auction_dates_pool.browse(cr, uid, ids, context=context):
@@ -89,7 +74,7 @@ class auction_catalog(report_rml):
categ.appendChild(doc.createTextNode(_to_decode(auction.name)))
catalog.appendChild(categ)
- #Auctuion Date element
+ #Auctuion Date element
categ = doc.createElement("AuctionDate1")
categ.appendChild(doc.createTextNode(_to_decode(auction.auction1)))
catalog.appendChild(categ)
@@ -133,7 +118,6 @@ class auction_catalog(report_rml):
infos.appendChild(lnum)
if cat.image:
- import random
import tempfile
limg = doc.createElement('photo_small')
diff --git a/addons/auction/report/catelogwithpictures.py b/addons/auction/report/catelogwithpictures.py
index 4cfa5f3acc7..6b01c4c45d0 100644
--- a/addons/auction/report/catelogwithpictures.py
+++ b/addons/auction/report/catelogwithpictures.py
@@ -19,7 +19,6 @@
#
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/deposit_seller.py b/addons/auction/report/deposit_seller.py
index 01aeef83f33..d7460e5db3a 100644
--- a/addons/auction/report/deposit_seller.py
+++ b/addons/auction/report/deposit_seller.py
@@ -20,7 +20,6 @@
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/huissier.py b/addons/auction/report/huissier.py
index 1b5f7cc68d7..1d680548886 100644
--- a/addons/auction/report/huissier.py
+++ b/addons/auction/report/huissier.py
@@ -20,7 +20,6 @@
##############################################################################
import pooler
-from osv.osv import osv, orm
from report.interface import report_rml
#FIXME: use the one from tools and delete the one from report
from report.int_to_text import int_to_text
diff --git a/addons/auction/report/lots_list.py b/addons/auction/report/lots_list.py
index e21df216c64..0ce06f7b498 100644
--- a/addons/auction/report/lots_list.py
+++ b/addons/auction/report/lots_list.py
@@ -19,7 +19,6 @@
#
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/lots_list_inventory.py b/addons/auction/report/lots_list_inventory.py
index e740d6ac6c8..017d8598fa4 100644
--- a/addons/auction/report/lots_list_inventory.py
+++ b/addons/auction/report/lots_list_inventory.py
@@ -19,7 +19,6 @@
#
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/lots_list_landscape.py b/addons/auction/report/lots_list_landscape.py
index 84762fb8b05..4c50a3def92 100644
--- a/addons/auction/report/lots_list_landscape.py
+++ b/addons/auction/report/lots_list_landscape.py
@@ -19,7 +19,6 @@
#
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/report_lot_bar_code.py b/addons/auction/report/report_lot_bar_code.py
index 1337738eb22..338ddf0a539 100644
--- a/addons/auction/report/report_lot_bar_code.py
+++ b/addons/auction/report/report_lot_bar_code.py
@@ -19,7 +19,6 @@
#
##############################################################################
-import pooler
import time
from report import report_sxw
diff --git a/addons/auction/report/seller_form_report.py b/addons/auction/report/seller_form_report.py
index 5a67d5be51a..06ff021dcc1 100644
--- a/addons/auction/report/seller_form_report.py
+++ b/addons/auction/report/seller_form_report.py
@@ -20,15 +20,12 @@
##############################################################################
-import pooler
import time
from report import report_sxw
-from osv import osv
class seller_form_report(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(seller_form_report, self).__init__(cr, uid, name, context=context)
- lot=self.pool.get('auction.lots').browse(cr, uid, uid)
self.localcontext.update({
'time': time,
@@ -52,7 +49,6 @@ class seller_form_report(report_sxw.rml_parse):
def seller_info(self):
objects = [object for object in self.localcontext.get('objects')]
ret_dict = {}
- ret_list = []
for object in objects:
partner = ret_dict.get(object.bord_vnd_id.partner_id.id,False)
diff --git a/addons/auction/report/total.py b/addons/auction/report/total.py
index a198a7c4416..e878001c2e4 100644
--- a/addons/auction/report/total.py
+++ b/addons/auction/report/total.py
@@ -19,13 +19,9 @@
#
##############################################################################
-import os, time, datetime
+import time
+import netsvc
-import netsvc, tools
-
-import report.print_xml
-import report.render
-import report.common
from report.interface import report_rml
def toxml(val):
@@ -47,7 +43,6 @@ class report_custom(report_rml):
unpaid_ids = []
buyer = {}
seller = {}
- debit = 0
for l in lots:
if l['lot_est2']:
diff --git a/addons/auction/wizard/auction_aie_send.py b/addons/auction/wizard/auction_aie_send.py
index 1caec13b852..b6a65a48ae8 100644
--- a/addons/auction/wizard/auction_aie_send.py
+++ b/addons/auction/wizard/auction_aie_send.py
@@ -140,7 +140,7 @@ class auction_lots_send_aie(osv.osv_memory):
return post_multipart('auction-in-europe.com', "/bin/photo.cgi", (('uname',uname),('ref',ref),('passwd',passwd),('did',did)),(('file',photo_name,photo_data),))
- def _photos_send(cr, uid, uname, passwd, did, ids):
+ def _photos_send(self,cr, uid, uname, passwd, did, ids):
service = netsvc.LocalService("object_proxy")
for (ref,id) in ids:
datas = service.execute(cr.db_name, uid, 'auction.lots', 'read', [id], ['name','image'])
@@ -179,7 +179,7 @@ class auction_lots_send_aie(osv.osv_memory):
}
def _send(self, cr, uid, ids, context=None):
- import pickle, thread, sql_db
+ import pickle, thread
cr.execute('select name,aie_categ from auction_lot_category')
vals = dict(cr.fetchall())
cr.close()