[IMP]: Removed unused variables and import statements. Removed '\r' escape sequences from translation files.

bzr revid: uco@tinyerp.com-20100908122515-d37yvyxb2a1119oy
This commit is contained in:
uco (Open ERP) 2010-09-08 17:55:15 +05:30
parent b0a522c029
commit 3575decfab
20 changed files with 30 additions and 77 deletions

View File

@ -2669,10 +2669,10 @@ msgid ""
"partners accounts (for debit/credit computations), closed for deprecated "
"accounts."
msgstr ""
"Pogled: Sintetički zbrojni konto, ne sadrži knjiženja\r\n"
"Konsolidacija: Zbrojni konto za više poduzeća i paralelne kontne planove\r\n"
"Obveze: Salda konta partnera - dobavljači\r\n"
"Potraživanja: Salda konta partnera - kupci\r\n"
"Pogled: Sintetički zbrojni konto, ne sadrži knjiženja\n"
"Konsolidacija: Zbrojni konto za više poduzeća i paralelne kontne planove\n"
"Obveze: Salda konta partnera - dobavljači\n"
"Potraživanja: Salda konta partnera - kupci\n"
"Zatvoren: Za konta koja se više ne koriste"
#. module: account

View File

@ -54,9 +54,8 @@ class quality_test(base_module_quality.abstract_quality_check):
flag = True
file_path = os.path.join(module_path, file_py)
try:
import pylint
res = os.popen('pylint --rcfile=' + config_file_path + ' ' + file_path).read()
except Exception, e:
except Exception:
self.error = True
self.log.exception("Cannot run pylint test for %s", file_path)
self.result += _("Error. Is pylint correctly installed? (http://pypi.python.org/pypi/pylint)")+"\n"

View File

@ -19,7 +19,6 @@
#
##############################################################################
from osv import fields, osv
import netsvc
class base_setup_installer(osv.osv_memory):
_name = 'base.setup.installer'

View File

@ -21,7 +21,6 @@
from osv import fields,osv
import time
import tools
class report_document_user(osv.osv):

View File

@ -220,8 +220,8 @@ msgid ""
"managers can obtain an easy view on best ideas from all the users. Once "
"installed, check the menu 'Ideas' in the 'Tools' main menu."
msgstr ""
"这模块允许你在企业创新里简单和有效地使用.\r\n"
"它允许每个人对不同注意表达构想, 其它用户能评价这些构想和对具体的构想进行投票. 每个构想根据不同投票决定得分.\r\n"
"这模块允许你在企业创新里简单和有效地使用.\n"
"它允许每个人对不同注意表达构想, 其它用户能评价这些构想和对具体的构想进行投票. 每个构想根据不同投票决定得分.\n"
"管理人员可以很容易得到所有用户对构想的评价."
#. module: idea

View File

@ -19,11 +19,9 @@
#
##############################################################################
from mx import DateTime
from datetime import datetime, timedelta
from datetime import datetime
from osv import osv, fields
from tools.translate import _
import ir
import netsvc
import time
@ -250,7 +248,6 @@ class mrp_bom(osv.osv):
@param properties: List of related properties.
@return: False or BoM id.
"""
bom_result = False
cr.execute('select id from mrp_bom where product_id=%s and bom_id is null order by sequence', (product_id,))
ids = map(lambda x: x[0], cr.fetchall())
max_prop = 0
@ -681,7 +678,6 @@ class mrp_production(osv.osv):
stock_mov_obj = self.pool.get('stock.move')
production = self.browse(cr, uid, production_id)
raw_product_todo = []
final_product_todo = []
produced_qty = 0
@ -800,7 +796,6 @@ class mrp_production(osv.osv):
""" Changes state to In Production and writes starting date.
@return: True
"""
move_ids = []
self.write(cr, uid, ids, {'state': 'in_production', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S')})
return True

View File

@ -27,7 +27,7 @@
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1}
-
I am checking Procurement orders.
I am checking Procurement orders for components of PC1.
-
!python {model: procurement.order}: |
from tools.translate import _

View File

@ -21,7 +21,6 @@
from osv import fields
from osv import osv
import ir
import datetime
import netsvc
import time
@ -135,8 +134,6 @@ class mrp_production_workcenter_line(osv.osv):
result = super(mrp_production_workcenter_line, self).write(cr, uid, ids, vals, context=context)
prod_obj = self.pool.get('mrp.production')
if vals.get('date_planned', False) and update:
pids = {}
pids2 = {}
for prod in self.browse(cr, uid, ids, context=context):
if prod.production_id.workcenter_lines:
dstart = min(vals['date_planned'], prod.production_id.workcenter_lines[0]['date_planned'])
@ -496,25 +493,25 @@ class mrp_operations_operation(osv.osv):
production_obj=self.pool.get('mrp.production').browse(cr,uid,vals['production_id'])
wc_op_id.append(self.pool.get('mrp.production.workcenter.line').create(cr,uid,{'production_id':vals['production_id'],'name':production_obj.product_id.name,'workcenter_id':vals['workcenter_id']}))
if code.start_stop=='start':
tmp=self.pool.get('mrp.production.workcenter.line').action_start_working(cr,uid,wc_op_id)
self.pool.get('mrp.production.workcenter.line').action_start_working(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_start_working', cr)
if code.start_stop=='done':
tmp=self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_done', cr)
self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finnished':DateTime.now().strftime('%Y-%m-%d %H:%M:%S')})
if code.start_stop=='pause':
tmp=self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_pause', cr)
if code.start_stop=='resume':
tmp=self.pool.get('mrp.production.workcenter.line').action_resume(cr,uid,wc_op_id)
self.pool.get('mrp.production.workcenter.line').action_resume(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_resume', cr)
if code.start_stop=='cancel':
tmp=self.pool.get('mrp.production.workcenter.line').action_cancel(cr,uid,wc_op_id)
self.pool.get('mrp.production.workcenter.line').action_cancel(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_cancel', cr)
if not self.check_operation(cr, uid, vals):

View File

@ -19,7 +19,6 @@
#
##############################################################################
from mx import DateTime
from osv import osv, fields
from tools.translate import _
import netsvc

View File

@ -421,7 +421,7 @@ msgid ""
"reception of products."
msgstr ""
"Preço Padrão: o preço é fixo e recalculado periodicamente (geralmente no "
"final do ano).\r\n"
"final do ano).\n"
"Preço Médio: o preço de custo é recalculado a cada recepção de produtos."
#. module: product

View File

@ -399,7 +399,7 @@ msgid ""
"at the end of the year), Average Price: the cost price is recomputed at each "
"reception of products."
msgstr ""
"标准价格: 成本价格是定期重新计算(通常在年底).\r\n"
"标准价格: 成本价格是定期重新计算(通常在年底).\n"
"平均价格: 成本价格是在每次接收产品时重新计算."
#. module: product
@ -557,7 +557,7 @@ msgid ""
"and the reception of goods for this product and for the default supplier. It "
"is used by the scheduler to order requests based on reordering delays."
msgstr ""
"产品供应在确认采购订单到接收产品之间的默认平均延迟. \r\n"
"产品供应在确认采购订单到接收产品之间的默认平均延迟. \n"
"用于在调度订单请求时要考虑的重订货延迟."
#. module: product
@ -671,7 +671,7 @@ msgid ""
"supplying. 'Make to Order': When needed, purchase or produce for the "
"procurement request."
msgstr ""
"按库存生产: 在仓库或等待重新供应时得到需求.\r\n"
"按库存生产: 在仓库或等待重新供应时得到需求.\n"
" 按订单生产: 在采购或产品获得请求时得到需求."
#. module: product
@ -1214,7 +1214,7 @@ msgid ""
"The computed quantity will be a multiple of this value. Use 1.0 for products "
"that can not be split."
msgstr ""
"这数量计算将乘于一个数值.\r\n"
"这数量计算将乘于一个数值.\n"
"产品使用1.0表示不能拆分."
#. module: product
@ -1444,7 +1444,7 @@ msgid ""
"the delivery of the finished products. It's the time you promise to your "
"customers."
msgstr ""
"这是确认客户订单和交付的平均时间.\r\n"
"这是确认客户订单和交付的平均时间.\n"
"是承诺客户的时间."
#. module: product
@ -1668,7 +1668,7 @@ msgid ""
"reception of the products in your warehouse. Used by the scheduler for "
"automatic computation of the purchase order planning."
msgstr ""
"延迟天数是确认采购订单到仓库接收产品之间的延迟天数.\r\n"
"延迟天数是确认采购订单到仓库接收产品之间的延迟天数.\n"
"用于制定采购订单计划时调度程序自动计算."
#. module: product

View File

@ -21,13 +21,10 @@
from osv import osv, fields
import decimal_precision as dp
import pooler
import math
import logging
from _common import rounding
from tools import config
from tools.translate import _
def is_pair(x):

View File

@ -81,7 +81,6 @@ class crm_make_sale(osv.osv_memory):
sale_line_obj = self.pool.get('sale.order.line')
result = mod_obj._get_id(cr, uid, 'sale', 'view_sales_order_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
data = context and context.get('active_ids', []) or []

View File

@ -2013,7 +2013,7 @@ msgid ""
"This stock location will be used, instead of the default one, as the "
"destination location for goods you send to this partner"
msgstr ""
"Koristiće se ova lokacija zaliha, umjesto podrazumjevane, kao \r\n"
"Koristiće se ova lokacija zaliha, umjesto podrazumjevane, kao \n"
"odredišna lokacija za robu koju šaljete ovom partneru"
#. module: stock
@ -2151,8 +2151,8 @@ msgid ""
"instead of the default one, as the source location for stock moves generated "
"by production orders"
msgstr ""
"Za ovaj proizvod (šablon) biće korištena ova lokacija zaliha, \r\n"
"umjesto podrazumjevane, kao izvorna lokacija za premještanja zaliha \r\n"
"Za ovaj proizvod (šablon) biće korištena ova lokacija zaliha, \n"
"umjesto podrazumjevane, kao izvorna lokacija za premještanja zaliha \n"
"kada ga inicira nalog za proizvodnju"
#. module: stock
@ -2238,7 +2238,7 @@ msgid ""
"by procurements"
msgstr ""
"Za ovaj proizvod (šablon) biće korištena ova lokacija zaliha, umjesto "
"podrazumjevane, kao izvorna lokacija za premještanja zaliha \r\n"
"podrazumjevane, kao izvorna lokacija za premještanja zaliha \n"
"kada ga inicira nabavka"
#. module: stock

View File

@ -67,7 +67,6 @@ class product_product(osv.osv):
stock_output_acc = datas.get('stock_output_account', False)
stock_input_acc = datas.get('stock_input_account', False)
journal_id = datas.get('stock_journal', False)
property_obj=self.pool.get('ir.property')
product_obj=self.browse(cr,uid,ids)[0]
account_variation = product_obj.categ_id.property_stock_variation
account_variation_id = account_variation and account_variation.id or False

View File

@ -23,7 +23,6 @@ from dateutil.relativedelta import relativedelta
import time
from osv import fields, osv
from tools import config
from tools.translate import _
import netsvc
import tools
@ -856,7 +855,6 @@ class stock_picking(osv.osv):
""" Gets payment term from partner.
@return: Payment term
"""
partner_obj = self.pool.get('res.partner')
partner = picking.address_id.partner_id
return partner.property_payment_term and partner.property_payment_term.id or False
@ -1132,12 +1130,8 @@ class stock_picking(osv.osv):
price_type_obj = self.pool.get('product.price.type')
sequence_obj = self.pool.get('ir.sequence')
wf_service = netsvc.LocalService("workflow")
partner_id = partial_datas.get('partner_id', False)
address_id = partial_datas.get('address_id', False)
delivery_date = partial_datas.get('delivery_date', False)
for pick in self.browse(cr, uid, ids, context=context):
new_picking = None
new_moves = []
complete, too_many, too_few = [], [], []
move_product_qty = {}
for move in pick.move_lines:
@ -1197,7 +1191,7 @@ class stock_picking(osv.osv):
})
if product_qty != 0:
new_obj = move_obj.copy(cr, uid, move.id,
move_obj.copy(cr, uid, move.id,
{
'product_qty' : product_qty,
'product_uos_qty': product_qty, #TODO: put correct uos_qty
@ -1682,7 +1676,6 @@ class stock_move(osv.osv):
"""
moves = self.browse(cr, uid, ids)
self.write(cr, uid, ids, {'state': 'confirmed'})
i = 0
def create_chained_picking(self, cr, uid, moves, context=None):
new_moves = []
@ -1815,7 +1808,6 @@ class stock_move(osv.osv):
def setlast_tracking(self, cr, uid, ids, context=None):
tracking_obj = self.pool.get('stock.tracking')
tracking = context.get('tracking', False)
picking = self.browse(cr, uid, ids)[0].picking_id
if picking:
last_track = [line.tracking_id.id for line in picking.move_lines if line.tracking_id]
@ -1895,7 +1887,6 @@ class stock_move(osv.osv):
amount = q * move.price_unit
# Base computation on valuation price type
else:
company_id = move.company_id.id
context['currency_id'] = move.company_id.currency_id.id
pricetype = price_type_obj.browse(cr,uid,move.company_id.property_valuation_price_type.id)
amount_unit = move.product_id.price_get(pricetype.field, context)[move.product_id.id]
@ -1906,11 +1897,7 @@ class stock_move(osv.osv):
""" Makes the move done and if all moves are done, it will finish the picking.
@return:
"""
track_flag = False
picking_ids = []
product_uom_obj = self.pool.get('product.uom')
price_type_obj = self.pool.get('product.price.type')
product_obj = self.pool.get('product.product')
move_obj = self.pool.get('account.move')
if context is None:
context = {}
@ -2205,12 +2192,7 @@ class stock_move(osv.osv):
users_obj = self.pool.get('res.users')
uom_obj = self.pool.get('product.uom')
price_type_obj = self.pool.get('product.price.type')
sequence_obj = self.pool.get('ir.sequence')
wf_service = netsvc.LocalService("workflow")
partner_id = partial_datas.get('partner_id', False)
address_id = partial_datas.get('address_id', False)
delivery_date = partial_datas.get('delivery_date', False)
new_moves = []
if context is None:
context = {}
@ -2303,7 +2285,6 @@ class stock_move(osv.osv):
picking_obj.action_move(cr, uid, [move.picking_id.id])
wf_service.trg_validate(uid, 'stock.picking', move.picking_id.id, 'button_done', cr)
ref = {}
done_move_ids = []
for move in complete:
done_move_ids.append(move.id)
@ -2345,7 +2326,6 @@ class stock_inventory(osv.osv):
context = {}
for inv in self.browse(cr, uid, ids):
move_ids = []
move_line = []
for line in inv.inventory_line_id:
pid = line.product_id.id
@ -2495,7 +2475,6 @@ class stock_picking_move_wizard(osv.osv_memory):
def action_move(self, cr, uid, ids, context=None):
move_obj = self.pool.get('stock.move')
picking_obj = self.pool.get('stock.picking')
account_move_obj = self.pool.get('account.move')
for act in self.read(cr, uid, ids):
move_lines = move_obj.browse(cr, uid, act['move_ids'])
for line in move_lines:

View File

@ -20,7 +20,6 @@
##############################################################################
from osv import fields, osv
from tools.translate import _
class stock_move_track(osv.osv_memory):
_name = "stock.move.track"
@ -220,7 +219,6 @@ class split_in_production_lot(osv.osv_memory):
@return:
"""
prodlot_obj = self.pool.get('stock.production.lot')
ir_sequence_obj = self.pool.get('ir.sequence')
move_obj = self.pool.get('stock.move')
new_move = []
for data in self.browse(cr, uid, ids):

View File

@ -36,7 +36,6 @@ class stock_partial_move(osv.osv_memory):
move_obj = self.pool.get('stock.move')
if not context:
context={}
moveids = []
for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
if m.state in ('done', 'cancel'):
raise osv.except_osv(_('Invalid action !'), _('Cannot delivery products which are already delivered !'))
@ -63,7 +62,7 @@ class stock_partial_move(osv.osv_memory):
move_ids = move_obj.search(cr, uid, [('id','in',move_ids)])
_moves_arch_lst = """<form string="Deliver Products">
<separator colspan="4" string="Delivery Information"/>
<field name="date" colspan="2"/>
<field name="date" colspan="2"/>
<separator colspan="4" string="Move Detail"/>
"""
_moves_fields = result['fields']
@ -147,7 +146,6 @@ class stock_partial_move(osv.osv_memory):
move_obj = self.pool.get('stock.move')
if not context:
context={}
moveids = address_delivery = address_default = []
if 'date' in fields:
res.update({'date': time.strftime('%Y-%m-%d %H:%M:%S')})
move_ids = context.get('active_ids', [])
@ -203,7 +201,6 @@ class stock_partial_move(osv.osv_memory):
@return: A dictionary which of fields with values.
"""
rec_id = context and context.get('active_id', False)
move_obj = self.pool.get('stock.move')
move_ids = context.get('active_ids', False)
partial = self.browse(cr, uid, ids[0], context)
@ -224,7 +221,7 @@ class stock_partial_move(osv.osv_memory):
'product_price' : getattr(partial, 'move%s_product_price'%(m.id)),
'product_currency': getattr(partial, 'move%s_product_currency'%(m.id)).id
})
res = move_obj.do_partial(cr, uid, move_ids, partial_datas, context=context)
move_obj.do_partial(cr, uid, move_ids, partial_datas, context=context)
return {}
stock_partial_move()

View File

@ -75,7 +75,7 @@ class stock_return_picking(osv.osv_memory):
self._columns['return%s'%(m.id)] = fields.float(string=m.name, required=True)
if 'invoice_state' not in self._columns:
self._columns['invoice_state'] = fields.selection([('2binvoiced', 'To be Invoiced'), ('none', 'None')], string='Invoice State', required=True)
except Exception, e:
except Exception:
return res
return res
@ -117,10 +117,6 @@ class stock_return_picking(osv.osv_memory):
raise osv.except_osv(_('Warning!'),_('There is no product to return!'))
arch_lst.append('<field name="invoice_state"/>\n<newline/>')
if pick.invoice_state=='invoiced':
new_invoice_state='2binvoiced'
else:
new_invoice_state=pick.invoice_state
res['fields']['invoice_state']={'string':_('Invoice state'), 'type':'selection','required':True, 'selection':[('2binvoiced', _('To Be Invoiced')), ('none', _('None'))]}
arch_lst.append('<group col="2" colspan="4">')
arch_lst.append('<button icon="gtk-cancel" special="cancel" string="Cancel" />')

View File

@ -69,7 +69,7 @@ class stock_split_into(osv.osv_memory):
'state': move.state,
'product_uos': move.product_uom.id
}
current_move = move_obj.copy(cr, uid, move.id, default_val)
move_obj.copy(cr, uid, move.id, default_val)
return {}
stock_split_into()