[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:
parent
b0a522c029
commit
3575decfab
|
@ -2669,10 +2669,10 @@ msgid ""
|
||||||
"partners accounts (for debit/credit computations), closed for deprecated "
|
"partners accounts (for debit/credit computations), closed for deprecated "
|
||||||
"accounts."
|
"accounts."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Pogled: Sintetički zbrojni konto, ne sadrži knjiženja\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\r\n"
|
"Konsolidacija: Zbrojni konto za više poduzeća i paralelne kontne planove\n"
|
||||||
"Obveze: Salda konta partnera - dobavljači\r\n"
|
"Obveze: Salda konta partnera - dobavljači\n"
|
||||||
"Potraživanja: Salda konta partnera - kupci\r\n"
|
"Potraživanja: Salda konta partnera - kupci\n"
|
||||||
"Zatvoren: Za konta koja se više ne koriste"
|
"Zatvoren: Za konta koja se više ne koriste"
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
|
|
|
@ -54,9 +54,8 @@ class quality_test(base_module_quality.abstract_quality_check):
|
||||||
flag = True
|
flag = True
|
||||||
file_path = os.path.join(module_path, file_py)
|
file_path = os.path.join(module_path, file_py)
|
||||||
try:
|
try:
|
||||||
import pylint
|
|
||||||
res = os.popen('pylint --rcfile=' + config_file_path + ' ' + file_path).read()
|
res = os.popen('pylint --rcfile=' + config_file_path + ' ' + file_path).read()
|
||||||
except Exception, e:
|
except Exception:
|
||||||
self.error = True
|
self.error = True
|
||||||
self.log.exception("Cannot run pylint test for %s", file_path)
|
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"
|
self.result += _("Error. Is pylint correctly installed? (http://pypi.python.org/pypi/pylint)")+"\n"
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
import netsvc
|
|
||||||
|
|
||||||
class base_setup_installer(osv.osv_memory):
|
class base_setup_installer(osv.osv_memory):
|
||||||
_name = 'base.setup.installer'
|
_name = 'base.setup.installer'
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
|
|
||||||
from osv import fields,osv
|
from osv import fields,osv
|
||||||
import time
|
|
||||||
import tools
|
import tools
|
||||||
|
|
||||||
class report_document_user(osv.osv):
|
class report_document_user(osv.osv):
|
||||||
|
|
|
@ -220,8 +220,8 @@ msgid ""
|
||||||
"managers can obtain an easy view on best ideas from all the users. Once "
|
"managers can obtain an easy view on best ideas from all the users. Once "
|
||||||
"installed, check the menu 'Ideas' in the 'Tools' main menu."
|
"installed, check the menu 'Ideas' in the 'Tools' main menu."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"这模块允许你在企业创新里简单和有效地使用.\r\n"
|
"这模块允许你在企业创新里简单和有效地使用.\n"
|
||||||
"它允许每个人对不同注意表达构想, 其它用户能评价这些构想和对具体的构想进行投票. 每个构想根据不同投票决定得分.\r\n"
|
"它允许每个人对不同注意表达构想, 其它用户能评价这些构想和对具体的构想进行投票. 每个构想根据不同投票决定得分.\n"
|
||||||
"管理人员可以很容易得到所有用户对构想的评价."
|
"管理人员可以很容易得到所有用户对构想的评价."
|
||||||
|
|
||||||
#. module: idea
|
#. module: idea
|
||||||
|
|
|
@ -19,11 +19,9 @@
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from mx import DateTime
|
from datetime import datetime
|
||||||
from datetime import datetime, timedelta
|
|
||||||
from osv import osv, fields
|
from osv import osv, fields
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
import ir
|
|
||||||
import netsvc
|
import netsvc
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
@ -250,7 +248,6 @@ class mrp_bom(osv.osv):
|
||||||
@param properties: List of related properties.
|
@param properties: List of related properties.
|
||||||
@return: False or BoM id.
|
@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,))
|
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())
|
ids = map(lambda x: x[0], cr.fetchall())
|
||||||
max_prop = 0
|
max_prop = 0
|
||||||
|
@ -681,7 +678,6 @@ class mrp_production(osv.osv):
|
||||||
stock_mov_obj = self.pool.get('stock.move')
|
stock_mov_obj = self.pool.get('stock.move')
|
||||||
production = self.browse(cr, uid, production_id)
|
production = self.browse(cr, uid, production_id)
|
||||||
|
|
||||||
raw_product_todo = []
|
|
||||||
final_product_todo = []
|
final_product_todo = []
|
||||||
|
|
||||||
produced_qty = 0
|
produced_qty = 0
|
||||||
|
@ -800,7 +796,6 @@ class mrp_production(osv.osv):
|
||||||
""" Changes state to In Production and writes starting date.
|
""" Changes state to In Production and writes starting date.
|
||||||
@return: True
|
@return: True
|
||||||
"""
|
"""
|
||||||
move_ids = []
|
|
||||||
self.write(cr, uid, ids, {'state': 'in_production', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S')})
|
self.write(cr, uid, ids, {'state': 'in_production', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
-
|
-
|
||||||
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1}
|
!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}: |
|
!python {model: procurement.order}: |
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
from osv import fields
|
from osv import fields
|
||||||
from osv import osv
|
from osv import osv
|
||||||
import ir
|
|
||||||
import datetime
|
import datetime
|
||||||
import netsvc
|
import netsvc
|
||||||
import time
|
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)
|
result = super(mrp_production_workcenter_line, self).write(cr, uid, ids, vals, context=context)
|
||||||
prod_obj = self.pool.get('mrp.production')
|
prod_obj = self.pool.get('mrp.production')
|
||||||
if vals.get('date_planned', False) and update:
|
if vals.get('date_planned', False) and update:
|
||||||
pids = {}
|
|
||||||
pids2 = {}
|
|
||||||
for prod in self.browse(cr, uid, ids, context=context):
|
for prod in self.browse(cr, uid, ids, context=context):
|
||||||
if prod.production_id.workcenter_lines:
|
if prod.production_id.workcenter_lines:
|
||||||
dstart = min(vals['date_planned'], prod.production_id.workcenter_lines[0]['date_planned'])
|
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'])
|
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']}))
|
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':
|
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)
|
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_start_working', cr)
|
||||||
|
|
||||||
|
|
||||||
if code.start_stop=='done':
|
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)
|
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')})
|
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':
|
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)
|
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_pause', cr)
|
||||||
|
|
||||||
if code.start_stop=='resume':
|
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)
|
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_resume', cr)
|
||||||
|
|
||||||
if code.start_stop=='cancel':
|
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)
|
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_cancel', cr)
|
||||||
|
|
||||||
if not self.check_operation(cr, uid, vals):
|
if not self.check_operation(cr, uid, vals):
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from mx import DateTime
|
|
||||||
from osv import osv, fields
|
from osv import osv, fields
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
import netsvc
|
import netsvc
|
||||||
|
|
|
@ -421,7 +421,7 @@ msgid ""
|
||||||
"reception of products."
|
"reception of products."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Preço Padrão: o preço é fixo e recalculado periodicamente (geralmente no "
|
"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."
|
"Preço Médio: o preço de custo é recalculado a cada recepção de produtos."
|
||||||
|
|
||||||
#. module: product
|
#. module: product
|
||||||
|
|
|
@ -399,7 +399,7 @@ msgid ""
|
||||||
"at the end of the year), Average Price: the cost price is recomputed at each "
|
"at the end of the year), Average Price: the cost price is recomputed at each "
|
||||||
"reception of products."
|
"reception of products."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"标准价格: 成本价格是定期重新计算(通常在年底).\r\n"
|
"标准价格: 成本价格是定期重新计算(通常在年底).\n"
|
||||||
"平均价格: 成本价格是在每次接收产品时重新计算."
|
"平均价格: 成本价格是在每次接收产品时重新计算."
|
||||||
|
|
||||||
#. module: product
|
#. module: product
|
||||||
|
@ -557,7 +557,7 @@ msgid ""
|
||||||
"and the reception of goods for this product and for the default supplier. It "
|
"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."
|
"is used by the scheduler to order requests based on reordering delays."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"产品供应在确认采购订单到接收产品之间的默认平均延迟. \r\n"
|
"产品供应在确认采购订单到接收产品之间的默认平均延迟. \n"
|
||||||
"用于在调度订单请求时要考虑的重订货延迟."
|
"用于在调度订单请求时要考虑的重订货延迟."
|
||||||
|
|
||||||
#. module: product
|
#. module: product
|
||||||
|
@ -671,7 +671,7 @@ msgid ""
|
||||||
"supplying. 'Make to Order': When needed, purchase or produce for the "
|
"supplying. 'Make to Order': When needed, purchase or produce for the "
|
||||||
"procurement request."
|
"procurement request."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"按库存生产: 在仓库或等待重新供应时得到需求.\r\n"
|
"按库存生产: 在仓库或等待重新供应时得到需求.\n"
|
||||||
" 按订单生产: 在采购或产品获得请求时得到需求."
|
" 按订单生产: 在采购或产品获得请求时得到需求."
|
||||||
|
|
||||||
#. module: product
|
#. module: product
|
||||||
|
@ -1214,7 +1214,7 @@ msgid ""
|
||||||
"The computed quantity will be a multiple of this value. Use 1.0 for products "
|
"The computed quantity will be a multiple of this value. Use 1.0 for products "
|
||||||
"that can not be split."
|
"that can not be split."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"这数量计算将乘于一个数值.\r\n"
|
"这数量计算将乘于一个数值.\n"
|
||||||
"产品使用1.0表示不能拆分."
|
"产品使用1.0表示不能拆分."
|
||||||
|
|
||||||
#. module: product
|
#. module: product
|
||||||
|
@ -1444,7 +1444,7 @@ msgid ""
|
||||||
"the delivery of the finished products. It's the time you promise to your "
|
"the delivery of the finished products. It's the time you promise to your "
|
||||||
"customers."
|
"customers."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"这是确认客户订单和交付的平均时间.\r\n"
|
"这是确认客户订单和交付的平均时间.\n"
|
||||||
"是承诺客户的时间."
|
"是承诺客户的时间."
|
||||||
|
|
||||||
#. module: product
|
#. module: product
|
||||||
|
@ -1668,7 +1668,7 @@ msgid ""
|
||||||
"reception of the products in your warehouse. Used by the scheduler for "
|
"reception of the products in your warehouse. Used by the scheduler for "
|
||||||
"automatic computation of the purchase order planning."
|
"automatic computation of the purchase order planning."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"延迟天数是确认采购订单到仓库接收产品之间的延迟天数.\r\n"
|
"延迟天数是确认采购订单到仓库接收产品之间的延迟天数.\n"
|
||||||
"用于制定采购订单计划时调度程序自动计算."
|
"用于制定采购订单计划时调度程序自动计算."
|
||||||
|
|
||||||
#. module: product
|
#. module: product
|
||||||
|
|
|
@ -21,13 +21,10 @@
|
||||||
|
|
||||||
from osv import osv, fields
|
from osv import osv, fields
|
||||||
import decimal_precision as dp
|
import decimal_precision as dp
|
||||||
import pooler
|
|
||||||
|
|
||||||
import math
|
import math
|
||||||
import logging
|
|
||||||
from _common import rounding
|
from _common import rounding
|
||||||
|
|
||||||
from tools import config
|
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
|
|
||||||
def is_pair(x):
|
def is_pair(x):
|
||||||
|
|
|
@ -81,7 +81,6 @@ class crm_make_sale(osv.osv_memory):
|
||||||
sale_line_obj = self.pool.get('sale.order.line')
|
sale_line_obj = self.pool.get('sale.order.line')
|
||||||
|
|
||||||
result = mod_obj._get_id(cr, uid, 'sale', 'view_sales_order_filter')
|
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 []
|
data = context and context.get('active_ids', []) or []
|
||||||
|
|
||||||
|
|
|
@ -2013,7 +2013,7 @@ msgid ""
|
||||||
"This stock location will be used, instead of the default one, as the "
|
"This stock location will be used, instead of the default one, as the "
|
||||||
"destination location for goods you send to this partner"
|
"destination location for goods you send to this partner"
|
||||||
msgstr ""
|
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"
|
"odredišna lokacija za robu koju šaljete ovom partneru"
|
||||||
|
|
||||||
#. module: stock
|
#. module: stock
|
||||||
|
@ -2151,8 +2151,8 @@ msgid ""
|
||||||
"instead of the default one, as the source location for stock moves generated "
|
"instead of the default one, as the source location for stock moves generated "
|
||||||
"by production orders"
|
"by production orders"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Za ovaj proizvod (šablon) biće korištena ova lokacija zaliha, \r\n"
|
"Za ovaj proizvod (šablon) biće korištena ova lokacija zaliha, \n"
|
||||||
"umjesto podrazumjevane, kao izvorna lokacija za premještanja zaliha \r\n"
|
"umjesto podrazumjevane, kao izvorna lokacija za premještanja zaliha \n"
|
||||||
"kada ga inicira nalog za proizvodnju"
|
"kada ga inicira nalog za proizvodnju"
|
||||||
|
|
||||||
#. module: stock
|
#. module: stock
|
||||||
|
@ -2238,7 +2238,7 @@ msgid ""
|
||||||
"by procurements"
|
"by procurements"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Za ovaj proizvod (šablon) biće korištena ova lokacija zaliha, umjesto "
|
"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"
|
"kada ga inicira nabavka"
|
||||||
|
|
||||||
#. module: stock
|
#. module: stock
|
||||||
|
|
|
@ -67,7 +67,6 @@ class product_product(osv.osv):
|
||||||
stock_output_acc = datas.get('stock_output_account', False)
|
stock_output_acc = datas.get('stock_output_account', False)
|
||||||
stock_input_acc = datas.get('stock_input_account', False)
|
stock_input_acc = datas.get('stock_input_account', False)
|
||||||
journal_id = datas.get('stock_journal', False)
|
journal_id = datas.get('stock_journal', False)
|
||||||
property_obj=self.pool.get('ir.property')
|
|
||||||
product_obj=self.browse(cr,uid,ids)[0]
|
product_obj=self.browse(cr,uid,ids)[0]
|
||||||
account_variation = product_obj.categ_id.property_stock_variation
|
account_variation = product_obj.categ_id.property_stock_variation
|
||||||
account_variation_id = account_variation and account_variation.id or False
|
account_variation_id = account_variation and account_variation.id or False
|
||||||
|
|
|
@ -23,7 +23,6 @@ from dateutil.relativedelta import relativedelta
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
from tools import config
|
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
import netsvc
|
import netsvc
|
||||||
import tools
|
import tools
|
||||||
|
@ -856,7 +855,6 @@ class stock_picking(osv.osv):
|
||||||
""" Gets payment term from partner.
|
""" Gets payment term from partner.
|
||||||
@return: Payment term
|
@return: Payment term
|
||||||
"""
|
"""
|
||||||
partner_obj = self.pool.get('res.partner')
|
|
||||||
partner = picking.address_id.partner_id
|
partner = picking.address_id.partner_id
|
||||||
return partner.property_payment_term and partner.property_payment_term.id or False
|
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')
|
price_type_obj = self.pool.get('product.price.type')
|
||||||
sequence_obj = self.pool.get('ir.sequence')
|
sequence_obj = self.pool.get('ir.sequence')
|
||||||
wf_service = netsvc.LocalService("workflow")
|
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):
|
for pick in self.browse(cr, uid, ids, context=context):
|
||||||
new_picking = None
|
new_picking = None
|
||||||
new_moves = []
|
|
||||||
complete, too_many, too_few = [], [], []
|
complete, too_many, too_few = [], [], []
|
||||||
move_product_qty = {}
|
move_product_qty = {}
|
||||||
for move in pick.move_lines:
|
for move in pick.move_lines:
|
||||||
|
@ -1197,7 +1191,7 @@ class stock_picking(osv.osv):
|
||||||
})
|
})
|
||||||
if product_qty != 0:
|
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_qty' : product_qty,
|
||||||
'product_uos_qty': product_qty, #TODO: put correct uos_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)
|
moves = self.browse(cr, uid, ids)
|
||||||
self.write(cr, uid, ids, {'state': 'confirmed'})
|
self.write(cr, uid, ids, {'state': 'confirmed'})
|
||||||
i = 0
|
|
||||||
|
|
||||||
def create_chained_picking(self, cr, uid, moves, context=None):
|
def create_chained_picking(self, cr, uid, moves, context=None):
|
||||||
new_moves = []
|
new_moves = []
|
||||||
|
@ -1815,7 +1808,6 @@ class stock_move(osv.osv):
|
||||||
|
|
||||||
def setlast_tracking(self, cr, uid, ids, context=None):
|
def setlast_tracking(self, cr, uid, ids, context=None):
|
||||||
tracking_obj = self.pool.get('stock.tracking')
|
tracking_obj = self.pool.get('stock.tracking')
|
||||||
tracking = context.get('tracking', False)
|
|
||||||
picking = self.browse(cr, uid, ids)[0].picking_id
|
picking = self.browse(cr, uid, ids)[0].picking_id
|
||||||
if picking:
|
if picking:
|
||||||
last_track = [line.tracking_id.id for line in picking.move_lines if line.tracking_id]
|
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
|
amount = q * move.price_unit
|
||||||
# Base computation on valuation price type
|
# Base computation on valuation price type
|
||||||
else:
|
else:
|
||||||
company_id = move.company_id.id
|
|
||||||
context['currency_id'] = move.company_id.currency_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)
|
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]
|
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.
|
""" Makes the move done and if all moves are done, it will finish the picking.
|
||||||
@return:
|
@return:
|
||||||
"""
|
"""
|
||||||
track_flag = False
|
|
||||||
picking_ids = []
|
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')
|
move_obj = self.pool.get('account.move')
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
@ -2205,12 +2192,7 @@ class stock_move(osv.osv):
|
||||||
users_obj = self.pool.get('res.users')
|
users_obj = self.pool.get('res.users')
|
||||||
uom_obj = self.pool.get('product.uom')
|
uom_obj = self.pool.get('product.uom')
|
||||||
price_type_obj = self.pool.get('product.price.type')
|
price_type_obj = self.pool.get('product.price.type')
|
||||||
sequence_obj = self.pool.get('ir.sequence')
|
|
||||||
wf_service = netsvc.LocalService("workflow")
|
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:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
@ -2303,7 +2285,6 @@ class stock_move(osv.osv):
|
||||||
picking_obj.action_move(cr, uid, [move.picking_id.id])
|
picking_obj.action_move(cr, uid, [move.picking_id.id])
|
||||||
wf_service.trg_validate(uid, 'stock.picking', move.picking_id.id, 'button_done', cr)
|
wf_service.trg_validate(uid, 'stock.picking', move.picking_id.id, 'button_done', cr)
|
||||||
|
|
||||||
ref = {}
|
|
||||||
done_move_ids = []
|
done_move_ids = []
|
||||||
for move in complete:
|
for move in complete:
|
||||||
done_move_ids.append(move.id)
|
done_move_ids.append(move.id)
|
||||||
|
@ -2345,7 +2326,6 @@ class stock_inventory(osv.osv):
|
||||||
context = {}
|
context = {}
|
||||||
for inv in self.browse(cr, uid, ids):
|
for inv in self.browse(cr, uid, ids):
|
||||||
move_ids = []
|
move_ids = []
|
||||||
move_line = []
|
|
||||||
for line in inv.inventory_line_id:
|
for line in inv.inventory_line_id:
|
||||||
pid = line.product_id.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):
|
def action_move(self, cr, uid, ids, context=None):
|
||||||
move_obj = self.pool.get('stock.move')
|
move_obj = self.pool.get('stock.move')
|
||||||
picking_obj = self.pool.get('stock.picking')
|
picking_obj = self.pool.get('stock.picking')
|
||||||
account_move_obj = self.pool.get('account.move')
|
|
||||||
for act in self.read(cr, uid, ids):
|
for act in self.read(cr, uid, ids):
|
||||||
move_lines = move_obj.browse(cr, uid, act['move_ids'])
|
move_lines = move_obj.browse(cr, uid, act['move_ids'])
|
||||||
for line in move_lines:
|
for line in move_lines:
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
from tools.translate import _
|
|
||||||
|
|
||||||
class stock_move_track(osv.osv_memory):
|
class stock_move_track(osv.osv_memory):
|
||||||
_name = "stock.move.track"
|
_name = "stock.move.track"
|
||||||
|
@ -220,7 +219,6 @@ class split_in_production_lot(osv.osv_memory):
|
||||||
@return:
|
@return:
|
||||||
"""
|
"""
|
||||||
prodlot_obj = self.pool.get('stock.production.lot')
|
prodlot_obj = self.pool.get('stock.production.lot')
|
||||||
ir_sequence_obj = self.pool.get('ir.sequence')
|
|
||||||
move_obj = self.pool.get('stock.move')
|
move_obj = self.pool.get('stock.move')
|
||||||
new_move = []
|
new_move = []
|
||||||
for data in self.browse(cr, uid, ids):
|
for data in self.browse(cr, uid, ids):
|
||||||
|
|
|
@ -36,7 +36,6 @@ class stock_partial_move(osv.osv_memory):
|
||||||
move_obj = self.pool.get('stock.move')
|
move_obj = self.pool.get('stock.move')
|
||||||
if not context:
|
if not context:
|
||||||
context={}
|
context={}
|
||||||
moveids = []
|
|
||||||
for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
|
for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
|
||||||
if m.state in ('done', 'cancel'):
|
if m.state in ('done', 'cancel'):
|
||||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delivery products which are already delivered !'))
|
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)])
|
move_ids = move_obj.search(cr, uid, [('id','in',move_ids)])
|
||||||
_moves_arch_lst = """<form string="Deliver Products">
|
_moves_arch_lst = """<form string="Deliver Products">
|
||||||
<separator colspan="4" string="Delivery Information"/>
|
<separator colspan="4" string="Delivery Information"/>
|
||||||
<field name="date" colspan="2"/>
|
<field name="date" colspan="2"/>
|
||||||
<separator colspan="4" string="Move Detail"/>
|
<separator colspan="4" string="Move Detail"/>
|
||||||
"""
|
"""
|
||||||
_moves_fields = result['fields']
|
_moves_fields = result['fields']
|
||||||
|
@ -147,7 +146,6 @@ class stock_partial_move(osv.osv_memory):
|
||||||
move_obj = self.pool.get('stock.move')
|
move_obj = self.pool.get('stock.move')
|
||||||
if not context:
|
if not context:
|
||||||
context={}
|
context={}
|
||||||
moveids = address_delivery = address_default = []
|
|
||||||
if 'date' in fields:
|
if 'date' in fields:
|
||||||
res.update({'date': time.strftime('%Y-%m-%d %H:%M:%S')})
|
res.update({'date': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||||
move_ids = context.get('active_ids', [])
|
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.
|
@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_obj = self.pool.get('stock.move')
|
||||||
move_ids = context.get('active_ids', False)
|
move_ids = context.get('active_ids', False)
|
||||||
partial = self.browse(cr, uid, ids[0], context)
|
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_price' : getattr(partial, 'move%s_product_price'%(m.id)),
|
||||||
'product_currency': getattr(partial, 'move%s_product_currency'%(m.id)).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 {}
|
return {}
|
||||||
|
|
||||||
stock_partial_move()
|
stock_partial_move()
|
||||||
|
|
|
@ -75,7 +75,7 @@ class stock_return_picking(osv.osv_memory):
|
||||||
self._columns['return%s'%(m.id)] = fields.float(string=m.name, required=True)
|
self._columns['return%s'%(m.id)] = fields.float(string=m.name, required=True)
|
||||||
if 'invoice_state' not in self._columns:
|
if 'invoice_state' not in self._columns:
|
||||||
self._columns['invoice_state'] = fields.selection([('2binvoiced', 'To be Invoiced'), ('none', 'None')], string='Invoice State', required=True)
|
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
|
||||||
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!'))
|
raise osv.except_osv(_('Warning!'),_('There is no product to return!'))
|
||||||
|
|
||||||
arch_lst.append('<field name="invoice_state"/>\n<newline/>')
|
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'))]}
|
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('<group col="2" colspan="4">')
|
||||||
arch_lst.append('<button icon="gtk-cancel" special="cancel" string="Cancel" />')
|
arch_lst.append('<button icon="gtk-cancel" special="cancel" string="Cancel" />')
|
||||||
|
|
|
@ -69,7 +69,7 @@ class stock_split_into(osv.osv_memory):
|
||||||
'state': move.state,
|
'state': move.state,
|
||||||
'product_uos': move.product_uom.id
|
'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 {}
|
return {}
|
||||||
stock_split_into()
|
stock_split_into()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue