-
+ Account Automatic Reconcile
@@ -47,29 +47,29 @@
For an invoice to be considered as paid, the invoice entries must be reconciled with counterparts, usually payments. With the automatic reconciliation functionality, OpenERP make its own search for entries to reconcile in a series of accounts. It tries to find entries for each partner where the amounts correspond.
-
+
Automatic reconcile unreconcileaccount.automatic.reconcileform
-
@@ -86,11 +86,11 @@
new
-
+
-
+
diff --git a/addons/account/wizard/account_central_journal_view.xml b/addons/account/wizard/account_central_journal_view.xml
index 6a9526c415e..9c9d687785c 100644
--- a/addons/account/wizard/account_central_journal_view.xml
+++ b/addons/account/wizard/account_central_journal_view.xml
@@ -2,27 +2,27 @@
-
+ Account central Journalaccount.central.journalform
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -35,12 +35,12 @@
new
-
+
-
-
\ No newline at end of file
+
+
diff --git a/addons/account/wizard/account_fiscalyear_close_state.py b/addons/account/wizard/account_fiscalyear_close_state.py
index 403abbcbe12..4d0479f8014 100644
--- a/addons/account/wizard/account_fiscalyear_close_state.py
+++ b/addons/account/wizard/account_fiscalyear_close_state.py
@@ -58,6 +58,11 @@ cancelled, please check the box !'))
'WHERE fiscalyear_id = %s', ('done', fy_id))
cr.execute('UPDATE account_fiscalyear ' \
'SET state = %s WHERE id = %s', ('done', fy_id))
+
+ # Log message for Fiscalyear
+ fy_pool = self.pool.get('account.fiscalyear')
+ fy_code = fy_pool.browse(cr, uid, fy_id, context=context).code
+ fy_pool.log(cr, uid, fy_id, "Fiscal year '%s' is closed, no more modification allowed." % (fy_code))
return {}
account_fiscalyear_close_state()
diff --git a/addons/account/wizard/account_general_journal_view.xml b/addons/account/wizard/account_general_journal_view.xml
index a3a54843396..711e3a85329 100644
--- a/addons/account/wizard/account_general_journal_view.xml
+++ b/addons/account/wizard/account_general_journal_view.xml
@@ -2,27 +2,27 @@
-
+ Account Genral Journalaccount.general.journalform
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -35,12 +35,12 @@
new
-
+
-
-
\ No newline at end of file
+
+
diff --git a/addons/account/wizard/account_general_ledger_report_view.xml b/addons/account/wizard/account_general_ledger_report_view.xml
index b06c24d501d..67526d51788 100644
--- a/addons/account/wizard/account_general_ledger_report_view.xml
+++ b/addons/account/wizard/account_general_ledger_report_view.xml
@@ -96,7 +96,7 @@
diff --git a/addons/account/wizard/account_invoice_state_view.xml b/addons/account/wizard/account_invoice_state_view.xml
index 8bdfb4ba8e2..1fd466a9dce 100644
--- a/addons/account/wizard/account_invoice_state_view.xml
+++ b/addons/account/wizard/account_invoice_state_view.xml
@@ -25,15 +25,15 @@
new
-
-
-
- Confirm Draft Invoices
- client_action_multi
-
- action
- account.invoice
-
+
+
+
+
+
+
+
+
+
account.invoice.cancel.form
@@ -59,15 +59,15 @@
new
-
-
-
- Cancel Selected Invoices
- client_action_multi
-
- action
- account.invoice
-
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/wizard/account_period_close.py b/addons/account/wizard/account_period_close.py
index f0f050e953c..56a4f2c5e35 100644
--- a/addons/account/wizard/account_period_close.py
+++ b/addons/account/wizard/account_period_close.py
@@ -46,6 +46,11 @@ class account_period_close(osv.osv_memory):
for id in context['active_ids']:
cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
cr.execute('update account_period set state=%s where id=%s', (mode, id))
+
+ # Log message for Period
+ period_pool = self.pool.get('account.period')
+ for period_id, name in period_pool.name_get(cr, uid, [id]):
+ period_pool.log(cr, uid, period_id, "Period '%s' is closed, no more modification allowed for this period." % (name))
return {}
account_period_close()
diff --git a/addons/account/wizard/account_pl_report_view.xml b/addons/account/wizard/account_pl_report_view.xml
index 47ad83a235e..219d41d312f 100644
--- a/addons/account/wizard/account_pl_report_view.xml
+++ b/addons/account/wizard/account_pl_report_view.xml
@@ -76,11 +76,6 @@
new
-
-
diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml
index 71f026237ac..560030be2f5 100644
--- a/addons/account/wizard/account_use_model_view.xml
+++ b/addons/account/wizard/account_use_model_view.xml
@@ -10,7 +10,8 @@
-
+
+
diff --git a/addons/account_coda/wizard/__init__.py b/addons/account_coda/wizard/__init__.py
index e9214ee1e44..950c9fc8d77 100644
--- a/addons/account_coda/wizard/__init__.py
+++ b/addons/account_coda/wizard/__init__.py
@@ -20,6 +20,7 @@
##############################################################################
import account_coda_import
+import coda_import
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_coda/wizard/coda_import.py b/addons/account_coda/wizard/coda_import.py
new file mode 100644
index 00000000000..39aa7b645cb
--- /dev/null
+++ b/addons/account_coda/wizard/coda_import.py
@@ -0,0 +1,347 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import pooler
+import time
+import datetime
+import wizard
+import netsvc
+import base64
+from osv import osv
+from tools.translate import _
+
+codawiz_form = """
+
+
+
+
+
+
+
+
+
+
+"""
+
+codawiz_fields = {
+ 'journal_id' : {
+ 'string':'Bank Journal',
+ 'type':'many2one',
+ 'relation':'account.journal',
+ 'required':True,
+
+ },
+ 'coda' : {
+ 'string':'Coda File',
+ 'type':'binary',
+ 'required':True,
+ },
+ 'def_payable' : {
+ 'string' : 'Default Payable Account',
+ 'type' : 'many2one',
+ 'relation': 'account.account',
+ 'required':True,
+ 'domain':[('type','=','payable')],
+ 'help': 'Set here the payable account that will be used, by default, if the partner is not found',
+ },
+ 'def_receivable' : {
+ 'string' : 'Default receivable Account',
+ 'type' : 'many2one',
+ 'relation': 'account.account',
+ 'required':True,
+ 'domain':[('type','=','receivable')],
+ 'help': 'Set here the receivable account that will be used, by default, if the partner is not found',
+ },
+ 'awaiting_account' : {
+ 'string' : 'Default Account for Unrecognized Movement',
+ 'type' : 'many2one',
+ 'relation': 'account.account',
+ 'required':True,
+ 'help': 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',
+
+ }
+
+}
+
+result_form = """
+
+
+
+
+"""
+
+result_fields = {
+
+ 'note' : {'string':'Log','type':'text'}
+
+}
+
+
+def _coda_parsing(self, cr, uid, data, context):
+ pool = pooler.get_pool(cr.dbname)
+ codafile = data['form']['coda']
+ journal_code = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context).code
+ def_pay_acc = data['form']['def_payable']
+ def_rec_acc = data['form']['def_receivable']
+
+ str_log = ""
+ err_log = "Errors:\n------\n"
+ nb_err=0
+ std_log=''
+ str_log1 = "Coda File is Imported : "
+ str_not=''
+ str_not1=''
+
+ bank_statements=[]
+ recordlist = base64.decodestring(codafile).split('\n')
+ recordlist.pop()
+ for line in recordlist:
+ if line[0] == '0':
+ # header data
+ bank_statement = {}
+ bank_statement["bank_statement_line"]={}
+ bank_statement_lines = {}
+ bank_statement['date'] = str2date(line[5:11])
+ bank_statement['journal_id']=data['form']['journal_id']
+ period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))])
+ bank_statement['period_id'] = period_id[0]
+ bank_statement['state']='draft'
+ elif line[0] == '1':
+ # old balance data
+ bal_start = list2float(line[43:58])
+ if line[42] == '1':
+ bal_start = - bal_start
+ bank_statement["balance_start"]= bal_start
+ bank_statement["acc_number"]=line[5:17]
+ bank_statement["acc_holder"]=line[64:90]
+ bank_statement['name'] = journal_code + ' ' + str(line[2:5])
+
+ elif line[0]=='2':
+ # movement data record 2
+ if line[1]=='1':
+ # movement data record 2.1
+ if bank_statement_lines.has_key(line[2:6]):
+ continue
+ st_line = {}
+ st_line['extra_note'] = ''
+ st_line['statement_id']=0
+ st_line['ref'] = line[2:10]
+ st_line['date'] = time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
+ st_line_amt = list2float(line[32:47])
+ if line[61]=='1':
+ st_line['toreconcile'] = True
+ st_line['name']=line[65:77]
+ else:
+ st_line['toreconcile'] = False
+ st_line['name']=line[62:115]
+
+ st_line['free_comm'] = st_line['name']
+ st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[47:53]),"%y/%m/%d")),
+ st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
+ st_line['partner_id']=0
+ if line[31] == '1':
+ st_line_amt = - st_line_amt
+ st_line['account_id'] = def_pay_acc
+ else:
+ st_line['account_id'] = def_rec_acc
+ st_line['amount'] = st_line_amt
+ bank_statement_lines[line[2:6]]=st_line
+ bank_statement["bank_statement_line"]=bank_statement_lines
+ elif line[1] == '2':
+ st_line_name = line[2:6]
+ bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
+
+ elif line[1] == '3':
+ # movement data record 3.1
+ st_line_name = line[2:6]
+ st_line_partner_acc = str(line[10:47]).strip()
+ cntry_number=line[10:47].strip()
+ contry_name=line[47:125].strip()
+ bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line_partner_acc)])
+ bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
+ if bank_ids:
+ bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context)
+ if line and bank.partner_id:
+ bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
+ if bank_statement_lines[st_line_name]['amount'] < 0 :
+ bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
+ else :
+ bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
+ else:
+ nb_err += 1
+ err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number,contry_name)
+ bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
+
+ bank_statement["bank_statement_line"]=bank_statement_lines
+ elif line[0]=='3':
+ if line[1] == '1':
+ st_line_name = line[2:6]
+ bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113]
+ elif line[1] == '2':
+ st_line_name = line[2:6]
+ bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115]
+ elif line[1] == '3':
+ st_line_name = line[2:6]
+ bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100]
+ elif line[0]=='8':
+ # new balance record
+ bal_end = list2float(line[42:57])
+ if line[41] == '1':
+ bal_end = - bal_end
+ bank_statement["balance_end_real"]= bal_end
+
+ elif line[0]=='9':
+ # footer record
+ bank_statements.append(bank_statement)
+ #end for
+ bkst_list=[]
+ for statement in bank_statements:
+ try:
+ bk_st_id = pool.get('account.bank.statement').create(cr,uid,{
+ 'journal_id': statement['journal_id'],
+ 'date':time.strftime('%Y-%m-%d',time.strptime(statement['date'],"%y/%m/%d")),
+ 'period_id':statement['period_id'],
+ 'balance_start': statement["balance_start"],
+ 'balance_end_real': statement["balance_end_real"],
+ 'state': 'draft',
+ 'name': statement['name'],
+ })
+ lines=statement["bank_statement_line"]
+ for value in lines:
+ line=lines[value]
+ reconcile_id = False
+ if line['toreconcile']:
+ name = line['name'][:3] + '/' + line['name'][3:7] + '/' + line['name'][7:]
+ rec_id = pool.get('account.move.line').search(cr, uid, [('name','=', name),('reconcile_id','=',False),('account_id.reconcile','=',True)])
+ if rec_id:
+ reconcile_id = pool.get('account.bank.statement.reconcile').create(cr, uid, {
+ 'line_ids': [(6, 0, rec_id)]
+ }, context=context)
+ mv = pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context)
+ if mv.partner_id:
+ line['partner_id'] = mv.partner_id.id
+ if line['amount'] < 0 :
+ line['account_id'] = mv.partner_id.property_account_payable.id
+ else :
+ line['account_id'] = mv.partner_id.property_account_receivable.id
+ str_not1 = ''
+ if line.has_key('contry_name') and line.has_key('cntry_number'):
+ str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"],line["cntry_number"],line["free_comm"]+line['extra_note'],line["val_date"][0],line["entry_date"][0])
+ id=pool.get('account.bank.statement.line').create(cr,uid,{
+ 'name':line['name'],
+ 'date': line['date'],
+ 'type':line['amount']>0 and 'customer' or 'supplier',
+ 'amount': line['amount'],
+ 'partner_id':line['partner_id'] or 0,
+ 'account_id':line['account_id'],
+ 'statement_id': bk_st_id,
+ 'reconcile_id': reconcile_id,
+ 'note':str_not1,
+ 'ref':line['ref'],
+ })
+
+ str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"],statement["acc_holder"])
+ std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
+ %(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
+ bkst_list.append(bk_st_id)
+
+ except osv.except_osv, e:
+ cr.rollback()
+ nb_err+=1
+ err_log += '\n Application Error : ' + str(e)
+ raise # REMOVEME
+
+ except Exception, e:
+ cr.rollback()
+ nb_err+=1
+ err_log += '\n System Error : '+str(e)
+ raise # REMOVEME
+ except :
+ cr.rollback()
+ nb_err+=1
+ err_log += '\n Unknown Error'
+ raise
+ err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
+ err_log += '\nNumber of error :'+ str(nb_err) +'\n'
+
+ pool.get('account.coda').create(cr, uid,{
+ 'name':codafile,
+ 'statement_ids': [(6, 0, bkst_list,)],
+ 'note':str_log1+str_not+std_log+err_log,
+ 'journal_id':data['form']['journal_id'],
+ 'date':time.strftime("%Y-%m-%d"),
+ 'user_id':uid,
+ })
+
+ return {'note':str_log1 + std_log + err_log ,'journal_id': data['form']['journal_id'], 'coda': data['form']['coda'],'statment_ids':bkst_list}
+
+
+def str2date(date_str):
+ return time.strftime("%y/%m/%d",time.strptime(date_str,"%d%m%y"))
+
+def str2float(str):
+ try:
+ return float(str)
+ except:
+ return 0.0
+
+def list2float(lst):
+ try:
+ return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
+ except:
+ return 0.0
+
+class coda_import(wizard.interface):
+ def _action_open_window(self, cr, uid, data, context):
+ form=data['form']
+ return {
+ 'domain':"[('id','in',%s)]"%(form['statment_ids']),
+ 'name': 'Statement',
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'account.bank.statement',
+ 'view_id': False,
+ 'type': 'ir.actions.act_window',
+ }
+ states = {
+ 'init' : {
+ 'actions' : [],
+ 'result' : {'type' : 'form',
+ 'arch' : codawiz_form,
+ 'fields' : codawiz_fields,
+ 'state' : [('end', '_Close'),('extraction', '_Ok') ]}
+ },
+ 'extraction' : {
+ 'actions' : [_coda_parsing],
+ 'result' : {'type' : 'form',
+ 'arch' : result_form,
+ 'fields' : result_fields,
+ 'state' : [('end', '_Close'),('open', '_Open Statement')]}
+ },
+ 'open': {
+ 'actions': [],
+ 'result': {'type': 'action', 'action': _action_open_window, 'state': 'end'}
+
+ },
+
+ }
+coda_import("account.coda_import")
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 7f74553f6bf..0f1885689c2 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -22,6 +22,7 @@
import time
from osv import fields
from osv import osv
+from tools.translate import _
journal2type = {
'cash':'rec_voucher',
@@ -367,7 +368,7 @@ class account_voucher(osv.osv):
'move_ids':[(6, 0,line_ids)]
}
- message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm")
+ message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirmed")
self.log(cr, uid, inv.id, message)
self.write(cr, uid, [inv.id], rec)
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index 29582fcf192..2677f7be5d6 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -139,12 +139,24 @@
+
+ account.voucher.graph
+ account.voucher
+ graph
+
+
+
+
+
+
+
+
Receivable Vouchersaccount.voucherform
- tree,form
+ tree,form,graph[('journal_id.type','=','sale')]{'type':'sale'}
@@ -158,7 +170,7 @@
Payable Vouchersaccount.voucherform
- tree,form
+ tree,form,graph[('journal_id.type','=','purchase')]{'type':'purchase'}
@@ -172,7 +184,7 @@
Journal Vouchersaccount.voucherform
- tree,form
+ tree,form,graph{'type':'general'}
diff --git a/addons/analytic/i18n/et.po b/addons/analytic/i18n/et.po
new file mode 100644
index 00000000000..9b745ea87e3
--- /dev/null
+++ b/addons/analytic/i18n/et.po
@@ -0,0 +1,266 @@
+# Estonian translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2010-06-18 10:59+0000\n"
+"PO-Revision-Date: 2010-07-22 20:10+0000\n"
+"Last-Translator: lyyser \n"
+"Language-Team: Estonian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-07-23 04:08+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: analytic
+#: field:account.analytic.account,child_ids:0
+msgid "Child Accounts"
+msgstr "Alamkontod"
+
+#. module: analytic
+#: help:account.analytic.line,amount_currency:0
+msgid ""
+"The amount expressed in the related account currency if not equal to the "
+"company one."
+msgstr ""
+
+#. module: analytic
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"Objekti nimi peab algama x_'ga ja ei tohi sisaldada ühtegi erisümbolit !"
+
+#. module: analytic
+#: field:account.analytic.account,name:0
+msgid "Account Name"
+msgstr "Konto nimi"
+
+#. module: analytic
+#: help:account.analytic.line,unit_amount:0
+msgid "Specifies the amount of quantity to count."
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,currency_id:0
+msgid "The related account currency if not equal to the company one."
+msgstr ""
+
+#. module: analytic
+#: model:ir.module.module,description:analytic.module_meta_information
+msgid ""
+"Module for defining analytic accounting object.\n"
+" "
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,state:0
+msgid "State"
+msgstr "Riik/Osariik"
+
+#. module: analytic
+#: field:account.analytic.account,user_id:0
+msgid "Account Manager"
+msgstr "Konto haldur"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Draft"
+msgstr "Mustand"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Closed"
+msgstr "Suletud"
+
+#. module: analytic
+#: field:account.analytic.account,debit:0
+msgid "Debit"
+msgstr "Deebet"
+
+#. module: analytic
+#: help:account.analytic.account,state:0
+msgid ""
+"* When an account is created its in 'Draft' state. "
+" \n"
+"* If any associated partner is there, it can be in 'Open' state. "
+" \n"
+"* If any pending balance is there it can be in 'Pending'. "
+" \n"
+"* And finally when all the transactions are over, it can be in 'Close' "
+"state. \n"
+"* The project can be in either if the states 'Template' and 'Running'.\n"
+" If it is template then we can make projects based on the template projects. "
+"If its in 'Running' state it is a normal project. "
+" \n"
+" If it is to be reviewed then the state is 'Pending'.\n"
+" When the project is completed the state is set to 'Done'."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,type:0
+msgid "Account Type"
+msgstr "Konto tüüp"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Template"
+msgstr "Mall"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Pending"
+msgstr "Ootel"
+
+#. module: analytic
+#: model:ir.model,name:analytic.model_account_analytic_line
+msgid "Analytic Line"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,description:0
+#: field:account.analytic.line,name:0
+msgid "Description"
+msgstr "Kirjeldus"
+
+#. module: analytic
+#: help:account.analytic.line,amount:0
+msgid ""
+"Calculated by multiplying the quantity and the price given in the Product's "
+"cost price."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,company_id:0
+#: field:account.analytic.line,company_id:0
+msgid "Company"
+msgstr "Ettevõte"
+
+#. module: analytic
+#: field:account.analytic.account,quantity_max:0
+msgid "Maximum Quantity"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,user_id:0
+msgid "User"
+msgstr "Kasutaja"
+
+#. module: analytic
+#: field:account.analytic.account,parent_id:0
+msgid "Parent Analytic Account"
+msgstr "Ülem analüütiline konto"
+
+#. module: analytic
+#: field:account.analytic.line,date:0
+msgid "Date"
+msgstr "Kuupäev"
+
+#. module: analytic
+#: field:account.analytic.account,currency_id:0
+#: field:account.analytic.line,currency_id:0
+msgid "Account currency"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,type:0
+msgid "View"
+msgstr "Vaade"
+
+#. module: analytic
+#: help:account.analytic.account,quantity_max:0
+msgid "Sets the higher limit of quantity of hours."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,credit:0
+msgid "Credit"
+msgstr "Krediit"
+
+#. module: analytic
+#: field:account.analytic.line,amount:0
+msgid "Amount"
+msgstr "Kogus"
+
+#. module: analytic
+#: field:account.analytic.account,contact_id:0
+msgid "Contact"
+msgstr "Kontakt"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Cancelled"
+msgstr "Katkestatud"
+
+#. module: analytic
+#: field:account.analytic.account,balance:0
+msgid "Balance"
+msgstr "Balanss"
+
+#. module: analytic
+#: field:account.analytic.account,date_start:0
+msgid "Date Start"
+msgstr "Alguskuupäev"
+
+#. module: analytic
+#: field:account.analytic.account,quantity:0
+#: field:account.analytic.line,unit_amount:0
+msgid "Quantity"
+msgstr "Kvantiteet"
+
+#. module: analytic
+#: field:account.analytic.account,date:0
+msgid "Date End"
+msgstr "Lõppkuupäev"
+
+#. module: analytic
+#: field:account.analytic.account,code:0
+msgid "Account Code"
+msgstr "Konto kood"
+
+#. module: analytic
+#: selection:account.analytic.account,type:0
+msgid "Normal"
+msgstr "Normaalne"
+
+#. module: analytic
+#: field:account.analytic.account,complete_name:0
+msgid "Full Account Name"
+msgstr "Täielik konto nimi"
+
+#. module: analytic
+#: field:account.analytic.line,account_id:0
+#: model:ir.model,name:analytic.model_account_analytic_account
+#: model:ir.module.module,shortdesc:analytic.module_meta_information
+msgid "Analytic Account"
+msgstr "Analüütiline konto"
+
+#. module: analytic
+#: field:account.analytic.account,company_currency_id:0
+msgid "Currency"
+msgstr "Rahaühik"
+
+#. module: analytic
+#: field:account.analytic.line,amount_currency:0
+msgid "Amount currency"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,partner_id:0
+msgid "Associated Partner"
+msgstr "Seotud partner"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Open"
+msgstr "Ava"
+
+#. module: analytic
+#: field:account.analytic.account,line_ids:0
+msgid "Analytic Entries"
+msgstr "Analüütilised kirjed"
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index a8cdba58975..674dc143334 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -1147,7 +1147,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it.")
}
-
_defaults = {
'state': 'tentative',
'class': 'public',
diff --git a/addons/base_setup/__openerp__.py b/addons/base_setup/__openerp__.py
index ee0cc6a8f56..6b4df476b4b 100644
--- a/addons/base_setup/__openerp__.py
+++ b/addons/base_setup/__openerp__.py
@@ -43,7 +43,9 @@
'init_xml': ['base_setup_data.xml'],
'update_xml': ['security/ir.model.access.csv',
'base_setup_installer.xml',
- 'base_setup_todo.xml','gtk_contact_form.xml'],
+ 'base_setup_todo.xml',
+# 'gtk_contact_form.xml'
+ ],
'demo_xml': ['base_setup_demo.xml'],
'installable': True,
'active': True,
diff --git a/addons/base_setup/todo.py b/addons/base_setup/todo.py
index 8050d220dae..04a20a6f32b 100644
--- a/addons/base_setup/todo.py
+++ b/addons/base_setup/todo.py
@@ -88,7 +88,7 @@ class base_setup_company(osv.osv_memory):
'city':fields.char('City', size=128),
'state_id':fields.selection(_get_all_states, 'State'),
'country_id':fields.selection(_get_all_countries, 'Country'),
- 'email':fields.char('E-mail', size=64, required=True),
+ 'email':fields.char('E-mail', size=64),
'phone':fields.char('Phone', size=64),
'currency':fields.many2one('res.currency', 'Currency', required=True),
'rml_header1':fields.char('Report Header', size=200,
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 4b1aad7cce9..478cd7b2986 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -301,6 +301,13 @@ class crm_case(object):
self.write(cr, uid, ids, {'state': 'cancel',
'active': True})
self._action(cr, uid, cases, 'cancel')
+ for case in cases:
+ message = "The " + self._description + " '" + case.name + "' has been Cancelled."
+ #TODO: Need to differentiate lead and opportunity
+# if hasattr(case, 'type'):
+# #TO CHECK: hasattr gives warning for other crm objects that don't have field 'type'
+# message = "The " + (case.type or 'Case').title() + " '" + case.name + "' has been Cancelled."
+ self.log(cr, uid, case.id, message)
return True
def case_pending(self, cr, uid, ids, *args):
diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml
index 6d8f4b7120f..20e430b5e88 100644
--- a/addons/crm/crm_installer_view.xml
+++ b/addons/crm/crm_installer_view.xml
@@ -41,7 +41,7 @@
-
+
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 2a469d88baa..9cb5f31d67e 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -198,8 +198,8 @@ class crm_lead(osv.osv, crm_case):
self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
- type = self.browse(cr, uid, id).type
- message = (_('The ') + type.title() or 'Lead') + " '" + name + "' "+ _("has been written as Open.")
+ type = self.browse(cr, uid, id).type or 'Lead'
+ message = (_('The ') + type.title()) + " '" + name + "' "+ _("has been Opened.")
self.log(cr, uid, id, message)
return res
@@ -216,7 +216,7 @@ class crm_lead(osv.osv, crm_case):
for (id, name) in self.name_get(cr, uid, ids):
lead = self.browse(cr, uid, id)
if lead.type == 'lead':
- message = _('The Lead') + " '" + name + "' "+ _("has been written as Closed.")
+ message = _('The Lead') + " '" + name + "' "+ _("has been Closed.")
self.log(cr, uid, id, message)
return res
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py
index 79a2c992cdf..798f746f9e3 100644
--- a/addons/crm/crm_meeting.py
+++ b/addons/crm/crm_meeting.py
@@ -122,7 +122,21 @@ class crm_meeting(osv.osv, crm_case):
}
return value
-
+
+ def case_open(self, cr, uid, ids, *args):
+ """Confirms meeting
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Meeting Ids
+ @param *args: Tuple Value for additional Params
+ """
+ res = super(crm_meeting, self).case_open(cr, uid, ids, args)
+ for (id, name) in self.name_get(cr, uid, ids):
+ message = _('The Meeting') + " '" + name + "' "+ _("has been Confirmed.")
+ self.log(cr, uid, id, message)
+ return res
+
crm_meeting()
class calendar_attendee(osv.osv):
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
index a1ca912e20f..c058732a3dd 100644
--- a/addons/crm/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -36,8 +36,6 @@ AVAILABLE_STATES = [
class crm_opportunity(osv.osv):
""" Opportunity Cases """
- _name = "crm.lead"
- _description = "Opportunity"
_order = "priority,date_action,id desc"
_inherit = 'crm.lead'
_columns = {
@@ -72,8 +70,10 @@ class crm_opportunity(osv.osv):
self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
- message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Won.")
- self.log(cr, uid, id, message)
+ opp = self.browse(cr, uid, id)
+ if opp.type == 'opportunity':
+ message = _('The Opportunity') + " '" + name + "' "+ _("has been Won.")
+ self.log(cr, uid, id, message)
return res
def case_mark_lost(self, cr, uid, ids, *args):
@@ -95,7 +95,7 @@ class crm_opportunity(osv.osv):
for (id, name) in self.name_get(cr, uid, ids):
opp = self.browse(cr, uid, id)
if opp.type == 'opportunity':
- message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Lost.")
+ message = _('The Opportunity') + " '" + name + "' "+ _("has been Lost.")
self.log(cr, uid, id, message)
return res
diff --git a/addons/crm/wizard/crm_forward_to_partner.py b/addons/crm/wizard/crm_forward_to_partner.py
index 2bd8aebe9c3..50cfc922104 100644
--- a/addons/crm/wizard/crm_forward_to_partner.py
+++ b/addons/crm/wizard/crm_forward_to_partner.py
@@ -233,7 +233,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
"Partner: %s" % (lead.partner_id and lead.partner_id.name_get()[0][1]),
"Contact: %s" % (pa.name or ''),
"Title: %s" % (pa.title or ''),
- "Function: %s" % (pa.function and pa.function.name_get()[0][1] or ''),
+ "Function: %s" % (pa.function or ''),
"Street: %s" % (pa.street or ''),
"Street2: %s" % (pa.street2 or ''),
"Zip: %s" % (pa.zip or ''),
@@ -244,6 +244,8 @@ class crm_lead_forward_to_partner(osv.osv_memory):
"Phone: %s" % (pa.phone or ''),
"Fax: %s" % (pa.fax or ''),
"Mobile: %s" % (pa.mobile or ''),
+ "Lead Category: %s" % (lead.categ_id and lead.categ_id.name or ''),
+ "Details: %s" % (lead.description or ''),
]
return "\n".join(body + ['---'])
diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py
index b453ebfc4aa..76a6073b58c 100644
--- a/addons/crm_claim/crm_claim.py
+++ b/addons/crm_claim/crm_claim.py
@@ -28,7 +28,7 @@ class crm_claim(osv.osv, crm.crm_case):
Crm claim
"""
_name = "crm.claim"
- _description = "Claim Cases"
+ _description = "Claim"
_order = "id desc"
_inherit = ['mailgate.thread']
_columns = {
diff --git a/addons/crm_fundraising/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py
index 99b8fc06dae..81e16a47ac3 100644
--- a/addons/crm_fundraising/crm_fundraising.py
+++ b/addons/crm_fundraising/crm_fundraising.py
@@ -26,7 +26,7 @@ class crm_fundraising(osv.osv, crm.crm_case):
""" Fund Raising Cases """
_name = "crm.fundraising"
- _description = "Fund Raising Cases"
+ _description = "Fund Raising"
_order = "id desc"
_inherit = ['mailgate.thread']
_columns = {
diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py
index 2894a429865..d4a1e9d59fc 100644
--- a/addons/crm_helpdesk/crm_helpdesk.py
+++ b/addons/crm_helpdesk/crm_helpdesk.py
@@ -27,7 +27,7 @@ class crm_helpdesk(osv.osv, crm.crm_case):
""" Helpdesk Cases """
_name = "crm.helpdesk"
- _description = "Helpdesk Cases"
+ _description = "Helpdesk"
_order = "id desc"
_inherit = ['mailgate.thread']
_columns = {
diff --git a/addons/hr/hr_department_view.xml b/addons/hr/hr_department_view.xml
index 6e268f06afe..1b96956394f 100644
--- a/addons/hr/hr_department_view.xml
+++ b/addons/hr/hr_department_view.xml
@@ -85,7 +85,7 @@
-
+
diff --git a/addons/hr/installer.py b/addons/hr/installer.py
index 2c300b0496b..7d6ade35d2c 100644
--- a/addons/hr/installer.py
+++ b/addons/hr/installer.py
@@ -46,9 +46,9 @@ class hr_installer(osv.osv_memory):
"performance review of employees."),
'hr_attendance': fields.boolean('Attendances (Sign In/Out)',
help="Simplifies the management of employee attendances."),
- 'hr_payroll': fields.boolean('Payroll' ,
+ 'hr_payroll': fields.boolean('Payroll',
help="Generic Payroll system"),
- 'hr_payroll_account': fields.boolean('Payroll with Accounting',
+ 'hr_payroll_account': fields.boolean('Payroll',
help="Generic Payroll system Integrated with Accountings."),
}
_defaults = {
diff --git a/addons/hr_evaluation/i18n/es.po b/addons/hr_evaluation/i18n/es.po
index 87a362033f9..94e7c6dc701 100644
--- a/addons/hr_evaluation/i18n/es.po
+++ b/addons/hr_evaluation/i18n/es.po
@@ -8,13 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-11-25 12:18+0000\n"
-"PO-Revision-Date: 2010-06-29 22:34+0000\n"
-"Last-Translator: Borja López Soilán (Pexego) \n"
+"PO-Revision-Date: 2010-07-23 19:03+0000\n"
+"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
+"\n"
"Language-Team: Spanish \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-07-01 03:45+0000\n"
+"X-Launchpad-Export-Date: 2010-07-24 03:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_evaluation
@@ -84,7 +85,7 @@ msgstr "Datos informales"
#. module: hr_evaluation
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr "Nombre de modelo inválido en la definición de acción."
+msgstr "Nombre de modelo no válido en la definición de la acción."
#. module: hr_evaluation
#: field:hr_evaluation.evaluation,employee_id:0
diff --git a/addons/hr_payroll/__init__.py b/addons/hr_payroll/__init__.py
index ee49b4e7794..c66b5ab7948 100644
--- a/addons/hr_payroll/__init__.py
+++ b/addons/hr_payroll/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#-*- coding:utf-8 -*-
##############################################################################
#
@@ -25,4 +24,4 @@ import hr_payroll
import report
import wizard
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_payroll/__openerp__.py b/addons/hr_payroll/__openerp__.py
index 3efa777885c..7575dcf9ad6 100644
--- a/addons/hr_payroll/__openerp__.py
+++ b/addons/hr_payroll/__openerp__.py
@@ -53,13 +53,11 @@
'wizard/hr_payroll_create_analytic.xml',
'wizard/hr_payroll_employees_detail.xml',
'wizard/hr_payroll_year_salary.xml',
-
],
'test': [
- 'test/payslip.yml',
- 'test/payment_advice.yml',
- 'test/payroll_register.yml',
-
+ 'test/payslip.yml',
+ 'test/payment_advice.yml',
+ 'test/payroll_register.yml',
],
'demo_xml': [
'hr_payroll_demo.xml'
diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py
index 753d3d6d017..22e5061023f 100644
--- a/addons/hr_payroll/hr_payroll.py
+++ b/addons/hr_payroll/hr_payroll.py
@@ -1145,27 +1145,6 @@ class hr_payslip_line(osv.osv):
_name = 'hr.payslip.line'
_description = 'Payslip Line'
-# def _calculate(self, cr, uid, ids, field_names, arg, context):
-# res = {}
-# obj = {}
-# for line in self.browse(cr, uid, ids, context):
-# obj['basic'] = line.slip_id.basic
-# amount = 0.0
-#
-# if line.amount_type == 'per' and line.base:
-# print 'XXXXXXXXXXXXXXXX : ', obj
-# amount = line.amount * eval(line.base, obj)
-# elif line.amount_type in ('fix', 'func'):
-# amount = line.amount
-
-# cd = line.category_id.code.lower()
-# obj[cd] = amount
-# print 'XXXXXXXXXXXXXXXXXX : ', cd
-#
-# res[line.id] = amount
-# print 'XXXXXXXXXXXX : ', obj
-# return res
-
def onchange_category(self, cr, uid, ids, category_id):
seq = 0
res = {
diff --git a/addons/hr_payroll/hr_payroll_wizard.xml b/addons/hr_payroll/hr_payroll_wizard.xml
index fe0264257e3..71267ddb742 100644
--- a/addons/hr_payroll/hr_payroll_wizard.xml
+++ b/addons/hr_payroll/hr_payroll_wizard.xml
@@ -25,16 +25,5 @@
parent="menu_hr_payroll_reporting"
name="Employee Salary Statement"
type="wizard"/>
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/hr_timesheet/i18n/ca.po b/addons/hr_timesheet/i18n/ca.po
index 2ecad7cc707..9c878ed02e2 100644
--- a/addons/hr_timesheet/i18n/ca.po
+++ b/addons/hr_timesheet/i18n/ca.po
@@ -7,13 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:12+0000\n"
-"Last-Translator: Raimon Esteve (Zikzakmedia) \n"
+"PO-Revision-Date: 2010-07-24 10:06+0000\n"
+"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
+"\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-06-22 04:09+0000\n"
+"X-Launchpad-Export-Date: 2010-07-25 04:07+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet
@@ -112,7 +113,7 @@ msgstr "Producte"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "août"
-msgstr ""
+msgstr "Agost"
#. module: hr_timesheet
#: field:hr.employee,journal_id:0
@@ -157,11 +158,9 @@ msgstr "Temps total"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "juillet"
-msgstr ""
+msgstr "Juliol"
#. module: hr_timesheet
-#: xsl:hr.analytical.timesheet:0
-#: xsl:hr.analytical.timesheet_users:0
#: model:ir.ui.menu,name:hr_timesheet.next_id_48
msgid "Timesheet"
msgstr "Full d'assistència"
@@ -171,14 +170,14 @@ msgstr "Full d'assistència"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "janvier"
-msgstr ""
+msgstr "Gener"
#. module: hr_timesheet
#: selection:hr.analytical.timesheet,init,month:0
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "juin"
-msgstr ""
+msgstr "Juny"
#. module: hr_timesheet
#: model:ir.actions.wizard,name:hr_timesheet.wizard_hr_timesheet_my
@@ -233,7 +232,7 @@ msgstr "XML invàlid per a la definició de la vista!"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "avril"
-msgstr ""
+msgstr "Abril"
#. module: hr_timesheet
#: field:hr.analytic.timesheet,line_id:0
@@ -255,7 +254,7 @@ msgstr "Selecciona usuaris"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "novembre"
-msgstr ""
+msgstr "Novembre"
#. module: hr_timesheet
#: wizard_view:hr_timesheet.si_so,sign_out:0
@@ -283,7 +282,7 @@ msgstr "Estat actual"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "octobre"
-msgstr ""
+msgstr "Octubre"
#. module: hr_timesheet
#: view:account.analytic.account:0
@@ -295,7 +294,7 @@ msgstr "Estadístiques d'anàlisis"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "décembre"
-msgstr ""
+msgstr "Desembre"
#. module: hr_timesheet
#: wizard_field:hr_timesheet.si_so,sign_in,info:0
@@ -345,7 +344,7 @@ msgstr "Recursos humans (codificació d'horaris)"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "mars"
-msgstr ""
+msgstr "Març"
#. module: hr_timesheet
#: xsl:hr.analytical.timesheet:0
@@ -358,7 +357,7 @@ msgstr "Total"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "mai"
-msgstr ""
+msgstr "Maig"
#. module: hr_timesheet
#: wizard_button:hr_timesheet.si_so,sign_out,si_result:0
@@ -375,7 +374,7 @@ msgstr "Canvia treball"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "février"
-msgstr ""
+msgstr "Febrer"
#. module: hr_timesheet
#: view:account.analytic.account:0
@@ -469,9 +468,105 @@ msgstr "Horari d'empleats"
#: selection:hr.analytical.timesheet.my,init,month:0
#: selection:hr.analytical.timesheet_users,init,month:0
msgid "septembre"
-msgstr ""
+msgstr "Setembre"
#. module: hr_timesheet
#: view:hr.employee:0
msgid "Timesheets"
msgstr "Horaris"
+
+#, python-format
+#~ msgid "Wed"
+#~ msgstr "Dc"
+
+#, python-format
+#~ msgid "No employee defined for your user !"
+#~ msgstr "No s'ha definit un empleat pel vostre usuari!"
+
+#, python-format
+#~ msgid "Mon"
+#~ msgstr "Dl"
+
+#, python-format
+#~ msgid "UserError"
+#~ msgstr "Error d'usuari"
+
+#, python-format
+#~ msgid "No cost unit defined for this employee !"
+#~ msgstr "No s'ha definit una unitat de cost per aquest empleat!"
+
+#, python-format
+#~ msgid "ValidateError"
+#~ msgstr "Error de validació"
+
+#, python-format
+#~ msgid "Sat"
+#~ msgstr "Ds"
+
+#, python-format
+#~ msgid "Sun"
+#~ msgstr "Dg"
+
+#, python-format
+#~ msgid "July"
+#~ msgstr "Juliol"
+
+#, python-format
+#~ msgid "Tue"
+#~ msgstr "Dt"
+
+#, python-format
+#~ msgid "March"
+#~ msgstr "Març"
+
+#, python-format
+#~ msgid "September"
+#~ msgstr "Setembre"
+
+#, python-format
+#~ msgid "December"
+#~ msgstr "Desembre"
+
+#, python-format
+#~ msgid "Fri"
+#~ msgstr "Dv"
+
+#, python-format
+#~ msgid "August"
+#~ msgstr "Agost"
+
+#, python-format
+#~ msgid "June"
+#~ msgstr "Juny"
+
+#, python-format
+#~ msgid "November"
+#~ msgstr "Novembre"
+
+#, python-format
+#~ msgid "October"
+#~ msgstr "Octubre"
+
+#, python-format
+#~ msgid "January"
+#~ msgstr "Gener"
+
+#, python-format
+#~ msgid "May"
+#~ msgstr "Maig"
+
+#, python-format
+#~ msgid "February"
+#~ msgstr "Febrer"
+
+#, python-format
+#~ msgid "Thu"
+#~ msgstr "Dj"
+
+#, python-format
+#~ msgid "April"
+#~ msgstr "Abril"
+
+#, python-format
+#~ msgid "UnknownError"
+#~ msgstr "Error desconegut"
diff --git a/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml b/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml
index 0598ad79670..7a7fbce1024 100644
--- a/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml
+++ b/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml
@@ -2,8 +2,6 @@
-
-
@@ -16,26 +14,26 @@
board.hr.timesheet.invoiceboard.board
- form
-
+ form
+
-
-
-
-
+
+
+
+
-
-
+
+ board.hr.timesheet.invoiceboard.board
- form
-
+ form
+
-
-
-
+
+
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
index b511c5cfe0e..b10c1cc32ac 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
@@ -84,7 +84,6 @@
-
account.analytic.line.tree.to_invoiceaccount.analytic.line
@@ -110,6 +109,11 @@
+
+
Entries to invoiceaccount.analytic.line
@@ -118,12 +122,11 @@
[('to_invoice','<>',False)]{"search_default_user_id":uid}OpenERP automatically group the entries to be invoiced so you can keep an eye on them on real time in one glance.
-
+ parent="menu_finance_periodical_processing_billing"/>
Uninvoiced Entries
diff --git a/addons/hr_timesheet_invoice/i18n/ro.po b/addons/hr_timesheet_invoice/i18n/ro.po
index 1f12bb1fe06..211c37809ca 100644
--- a/addons/hr_timesheet_invoice/i18n/ro.po
+++ b/addons/hr_timesheet_invoice/i18n/ro.po
@@ -1,30 +1,30 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
-# * hr_timesheet_invoice
+# * hr_timesheet_invoice
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-09-08 14:49+0000\n"
-"Last-Translator: filsys \n"
+"PO-Revision-Date: 2010-07-23 20:20+0000\n"
+"Last-Translator: Desen \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-06-22 04:11+0000\n"
+"X-Launchpad-Export-Date: 2010-07-24 03:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet_invoice
#: view:hr_timesheet_invoice.factor:0
msgid "Type of invoicing"
-msgstr ""
+msgstr "Tip de facturare"
#. module: hr_timesheet_invoice
#: rml:account.analytic.profit:0
msgid "Profit"
-msgstr ""
+msgstr "Profit"
#. module: hr_timesheet_invoice
#: wizard_view:hr.timesheet.invoice.create,init:0
@@ -39,17 +39,17 @@ msgstr ""
#. module: hr_timesheet_invoice
#: rml:account.analytic.profit:0
msgid "Income"
-msgstr ""
+msgstr "Venituri"
#. module: hr_timesheet_invoice
#: field:hr_timesheet_invoice.factor,customer_name:0
msgid "Visible name"
-msgstr ""
+msgstr "Nume vizibil"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.invoice.account.analytic.account.cost_ledger.report,init,date1:0
msgid "Start of period"
-msgstr ""
+msgstr "Începutul perioadei"
#. module: hr_timesheet_invoice
#: help:hr.timesheet.invoice.create,init,price:0
@@ -57,11 +57,13 @@ msgid ""
"The cost of each work done will be displayed on the invoice. You probably "
"don't want to check this."
msgstr ""
+"Costul fiecărei activități efectuate va fi tipărit pe factura. Probabil că "
+"nu doriți să bifați această opțiune."
#. module: hr_timesheet_invoice
#: model:ir.actions.wizard,name:hr_timesheet_invoice.hr_timesheet_invoice_create
msgid "Invoice analytic lines"
-msgstr ""
+msgstr "Detalii factură"
#. module: hr_timesheet_invoice
#: help:hr.timesheet.final.invoice.create,init,time:0
@@ -72,18 +74,18 @@ msgstr ""
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_draft_analytic_accounts
#: model:ir.ui.menu,name:hr_timesheet_invoice.menu_action_draft_analytic_accounts
msgid "Draft Analytic Accounts"
-msgstr ""
+msgstr "Conturi analitice în schiță"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.final.invoice.create,init,time:0
#: wizard_field:hr.timesheet.invoice.create,init,time:0
msgid "Time spent"
-msgstr ""
+msgstr "Timp consumat"
#. module: hr_timesheet_invoice
#: field:account.analytic.account,amount_invoiced:0
msgid "Invoiced Amount"
-msgstr ""
+msgstr "Valoarea Facturată"
#. module: hr_timesheet_invoice
#: help:account.analytic.account,to_invoice:0
diff --git a/addons/membership/test/test_membership.yml b/addons/membership/test/test_membership.yml
index bbeceed3d89..16ac0674ee8 100644
--- a/addons/membership/test/test_membership.yml
+++ b/addons/membership/test/test_membership.yml
@@ -1,101 +1,167 @@
- |
In Order to test the Membership in OpenERP, which allows us to manage all operations for managing memberships.
- |
- We have to create "Membership Products" to make it available for partner or customer to make membership with it.
- select product type to "service" type and membership field is ticked to visible this product while creating membership for the partner.
+ I'm creating "Golden Membership" which has Membership fee 80 EURO and It's started from 1st June to 31st Dec.
-
!record {model: product.product, id: product_product_membershipproduct0}:
categ_id: product.cat1
membership: 1
- membership_date_from: '2009-06-01'
- membership_date_to: '2010-06-01'
- name: Membership Products
+ membership_date_from: '2010-06-01'
+ membership_date_to: '2010-12-31'
+ name: Golden Membership
type: service
list_price: 80.00
- |
- I create new member "Mark Johnson" and I provide an address to this
- new customer, as well as an email "info@mycustomer.com".
+ "Mark Johnson" want to join "Golden Membership".
+- |
+ I'm creating new member "Mark Johnson".
-
!record {model: res.partner, id: res_partner_markjohnson0}:
address:
- city: paris
country_id: base.fr
- name: Arthur Grosbonnet
+ name: Mark Johnson
street: 1 rue Rockfeller
- type: default
+ type: invoice
zip: '75016'
- credit_limit: 0.0
- membership_amount: 0.0
name: Mark Johnson
- property_account_payable: account.a_pay
- property_account_receivable: account.a_recv
-
- |
- I check that "Current membership state" is set to "Non Member".
+ I'm checking "Current Membership State" of "Mark Johnson". It is an "Non Member" or not.
-
!assert {model: res.partner, id: res_partner_markjohnson0}:
- - membership_state == 'none'
-- |
- I can make it a Free member by selecting the "Free member" check box.
--
- !record {model: res.partner, id: membership.res_partner_markjohnson0}:
- free_member: 1
+ - membership_state == 'none', 'Member should be has "Current Membership State" in "Non Member".'
- |
- Now, I create Membership Invoices using wizard available on partner and Select Membership Product.
+ I'm doing to make membership invoice for "Mark Johnson" on joining "Golden Membership".
-
- !record {model: membership.invoice, id: membership_invoice_0}:
- product_id: membership.product_product_membershipproduct0
-
+ !python {model: res.partner}: |
+ self.create_membership_invoice(cr, uid, [ref("res_partner_markjohnson0")], product_id=ref("product_product_membershipproduct0"), datas={"amount":80.00})
- |
- I click on "Confirm" button of this wizard. and also check that address is defined or not for this partner in this function.
+ I'm checking "Current Membership State" of "Mark Johnson". It is an "Waiting Member" or not.
-
- !python {model: membership.invoice}: |
- self.membership_invoice(cr, uid, [ref("membership_invoice_0")], {"active_ids": [ref("membership.res_partner_markjohnson0")]})
-
+ !assert {model: res.partner, id: res_partner_markjohnson0}:
+ - membership_state == 'waiting', 'Member should be has "Current Membership State" in "Waiting Member".'
- |
- I check that Invoice is created for this members.
+ I'm Opening that Invoice which is created for "Mark Johnson".
-
!python {model: res.partner}: |
-
+ import netsvc
from tools.translate import _
- invoice_obj = self.pool.get('account.invoice')
- partner_obj = self.pool.get('res.partner')
- product_obj = self.pool.get('product.product')
- invoice_line_obj = self.pool.get('account.invoice.line')
+ invoice_pool = self.pool.get('account.invoice')
+ partner_pool = self.pool.get('res.partner')
+ membership_line_pool = self.pool.get('membership.membership_line')
+ membership_pool = self.pool.get('product.product')
- partner_id = self.browse(cr, uid, ref('res_partner_markjohnson0'))
- inv_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner_id.id), ('account_id', '=', partner_id.property_account_receivable.id)])
- invoice_id = invoice_obj.browse(cr, uid, inv_ids)[0]
- product = product_obj.browse(cr, uid, ref('product_product_membershipproduct0'), context=context)
- line_ids = invoice_line_obj.search(cr, uid, [('product_id', '=', product.id), ('invoice_id', '=', invoice_id.id)])
-
- assert line_ids, _('Invoices has not been generated for this Member!')
-
+ membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('res_partner_markjohnson0'))])
+ membership_lines = membership_line_pool.browse(cr, uid, membership_line_ids)
+ assert membership_lines, _('Membership is not registrated.')
+ membership_line = membership_lines[0]
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'account.invoice', membership_line.account_invoice_id.id, 'invoice_open', cr)
- |
- I check that the "Current membership state" will remain same untill opening the invoice.
+ I'm checking "Current membership state" of "Mark Johnson". It is an "Invoiced Member" or not.
-
!assert {model: res.partner, id: res_partner_markjohnson0}:
- - membership_state == 'free'
+ - membership_state == 'invoiced', 'Member should be has "Current Membership State" in "Invoiced Member".'
- |
- "Current membership state" of any member depends on the state of invoice.
- So, I check that invoice is in draft state then the "membership state" of a member is "Waiting member".
+ I'm doing to paid that invoice which is opened for "Mark Johnson".
-
- !python {model: membership.membership_line}: |
- partner_obj = self.pool.get('res.partner')
- inv_obj = self.pool.get('account.invoice')
+ !python {model: account.invoice}: |
+
+ from tools.translate import _
+ invoice_pool = self.pool.get('account.invoice')
+ partner_pool = self.pool.get('res.partner')
+ membership_line_pool = self.pool.get('membership.membership_line')
+ membership_pool = self.pool.get('product.product')
+ invoice_pay_pool = self.pool.get('account.invoice.pay')
- partner_id = partner_obj.browse(cr, uid, ref('res_partner_markjohnson0'))
- member_ids = self.search(cr, uid, [('partner', '=', partner_id.id)])
- current_id = self.browse(cr, uid, member_ids)[0]
-
- inv_ids = inv_obj.search(cr, uid, [('partner_id', '=', partner_id.id), ('account_id', '=', partner_id.property_account_receivable.id)])
- inv_id = inv_obj.browse(cr, uid, inv_ids)[0]
- if inv_id.state == 'draft':
- assert current_id.state == 'waiting'
+ membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('res_partner_markjohnson0'))])
+ membership_lines = membership_line_pool.browse(cr, uid, membership_line_ids)
+ assert membership_lines, _('Membership is not registrated.')
+ membership_line = membership_lines[0]
+ assert membership_line.account_invoice_id.state == 'open', _('Invoice should be Opened.')
+ pay_id = invoice_pay_pool.create(cr, uid, {'amount': 80, 'name': 'Payment of Membership', 'journal_id': ref('account.bank_journal')}, {'active_id': membership_line.account_invoice_id.id})
+ invoice_pay_pool.pay_and_reconcile(cr, uid, [pay_id], {'active_id': membership_line.account_invoice_id.id})
- |
- When the invoice is in open state it become Invoiced Member, When the invoice is in paid state the same "Current membership state" changed to Paid Member.
- Now, If we cancel the invoice "Current membership state" changed to Cancel Member.
-
-
\ No newline at end of file
+ I'm checking "Current membership state" of "Mark Johnson". It is an "Paid Member" or not.
+-
+ !assert {model: res.partner, id: res_partner_markjohnson0}:
+ - membership_state == 'paid', 'Member should be has "Current Membership State" in "Paid Member".'
+
+- |
+ I'm creating free member "Ms. Johnson" of "Golden Membership".
+-
+ !record {model: res.partner, id: res_partner_msjohnson0}:
+ address:
+ - city: paris
+ country_id: base.fr
+ name: Ms. Johnson
+ street: 1 rue Rockfeller
+ type: invoice
+ zip: '75016'
+ name: Ms. Johnson
+ free_member: True
+
+- |
+ I'm checking "Current membership state" of "Ms. Johnson". It is an "Free Member" or not.
+-
+ !assert {model: res.partner, id: res_partner_msjohnson0}:
+ - membership_state == 'free', 'Member should be has "Current Membership State" in "Free Member".'
+
+- |
+ I'm set "Mark Johnson" as a associated member of "Ms. Johnson" and also set Non free member.
+-
+ !python {model: res.partner}: |
+ self.write(cr, uid, [ref("res_partner_msjohnson0")], {'free_member': False, 'associate_member': ref("res_partner_markjohnson0")})
+
+- |
+ I'm checking "Current membership state" of "Ms. Johnson". It is an "Paid Member" or not.
+-
+ !assert {model: res.partner, id: res_partner_msjohnson0}:
+ - membership_state == 'paid', 'Member should be has "Current Membership State" in "Paid Member".'
+
+- |
+ I'm creating new "Silver Membership" which has Membership fee 50 EURO and It's started from 1st June to 31st Dec.
+-
+ !record {model: product.product, id: product_product_membershipproduct1}:
+ categ_id: product.cat1
+ membership: 1
+ membership_date_from: '2010-06-01'
+ membership_date_to: '2010-12-31'
+ name: Silver Membership
+ type: service
+ list_price: 50.00
+- |
+ I'm making invoice of "Mark Johnson" member on joining new membership "Silver Membership".
+-
+ !python {model: res.partner}: |
+ self.create_membership_invoice(cr, uid, [ref("res_partner_markjohnson0")], product_id=ref("product_product_membershipproduct1"), datas={"amount":50.00})
+- |
+ I'm checking "Current membership state" of "Mark Johnson". It is an "Old Member" or not.
+-
+ !assert {model: res.partner, id: res_partner_markjohnson0}:
+ - membership_state == 'old', 'Member should be has "Current Membership State" in "Old Member".'
+- |
+ I'm doing to make credit note of invoice which is paid by "Mark Johnson" to cancel membership.
+-
+ !python {model: account.invoice}: |
+ from tools.translate import _
+ invoice_pool = self.pool.get('account.invoice')
+ partner_pool = self.pool.get('res.partner')
+ membership_line_pool = self.pool.get('membership.membership_line')
+ membership_pool = self.pool.get('product.product')
+ invoice_refund_pool = self.pool.get('account.invoice.refund')
+
+ membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('res_partner_markjohnson0'))])
+ membership_lines = membership_line_pool.browse(cr, uid, membership_line_ids)
+ assert membership_lines, _('Membership is not registrated.')
+ membership_line = membership_lines[0]
+ refund_id = invoice_refund_pool.create(cr, uid, {'description': 'Refund of Membership'}, {'active_id': membership_line.account_invoice_id.id})
+ invoice_refund_pool.invoice_refund(cr, uid, [refund_id], {'active_id': membership_line.account_invoice_id.id, 'active_ids': [membership_line.account_invoice_id.id]})
+- |
+ I'm checking "Current membership state" of "Mark Johnson". It is an "Cancelled Member" or not.
+-
+ !assert {model: res.partner, id: res_partner_markjohnson0}:
+ - membership_state == 'canceled', 'Member should be has "Current Membership State" in "Cancelled Member".'
+
diff --git a/addons/mrp/__openerp__.py b/addons/mrp/__openerp__.py
index 5fc5456ee9a..2a282882099 100644
--- a/addons/mrp/__openerp__.py
+++ b/addons/mrp/__openerp__.py
@@ -72,7 +72,6 @@
'wizard/mrp_change_standard_price_view.xml',
# 'wizard/mrp_track_prod_view.xml',
'mrp_view.xml',
- 'mrp_wizard.xml',
'mrp_report.xml',
'company_view.xml',
'process/stockable_product_process.xml',
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index acfab2d6f09..cb2010a7352 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -48,10 +48,10 @@ class mrp_workcenter(osv.osv):
'time_cycle': fields.float('Time for 1 cycle (hour)', help="Time in hours for doing one cycle."),
'time_start': fields.float('Time before prod.', help="Time in hours for the setup."),
'time_stop': fields.float('Time after prod.', help="Time in hours for the cleaning."),
- 'costs_hour': fields.float('Cost per hour'),
+ 'costs_hour': fields.float('Cost per hour', help="Specify Cost of Workcenter per hour."),
'costs_hour_account_id': fields.many2one('account.analytic.account', 'Hour Account', domain=[('type','<>','view')],
help="Complete this only if you want automatic analytic accounting entries on production orders."),
- 'costs_cycle': fields.float('Cost per cycle'),
+ 'costs_cycle': fields.float('Cost per cycle', help="Specify Cost of Workcenter per cycle."),
'costs_cycle_account_id': fields.many2one('account.analytic.account', 'Cycle Account', domain=[('type','<>','view')],
help="Complete this only if you want automatic analytic accounting entries on production orders."),
'costs_journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'),
@@ -208,7 +208,7 @@ class mrp_bom(osv.osv):
'active': lambda *a: 1,
'product_efficiency': lambda *a: 1.0,
'product_qty': lambda *a: 1.0,
- 'product_rounding': lambda *a: 1.0,
+ 'product_rounding': lambda *a: 0.0,
'type': lambda *a: 'normal',
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.bom', context=c),
}
@@ -269,11 +269,11 @@ class mrp_bom(osv.osv):
max_prop = prop
return result
- def _bom_explode(self, cr, uid, bom, factor, properties, addthis=False, level=0):
+ def _bom_explode(self, cr, uid, bom, factor, properties=[], addthis=False, level=0):
""" Finds Products and Workcenters for related BoM for manufacturing order.
@param bom: BoM of particular product.
@param factor: Factor of product UoM.
- @param properties: A dictionary for contextual values.
+ @param properties: A List of properties Ids.
@param addthis: If BoM found then True else False.
@param level: Depth level to find BoM lines starts from 10.
@return: result: List of dictionaries containing product details.
@@ -635,13 +635,11 @@ class mrp_production(osv.osv):
move_obj.write(cr, uid, [production.move_prod_id.id],
{'location_id': production.location_dest_id.id})
- message = ("%s %s %s %s %s %s") % (
- _('Manufacturing Order '),
- name,
- _("scheduled the"),
- datetime.strptime(production.date_planned,'%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d'),
- _("for"),
- production.product_id.name)
+ message = ("Manufacturing Order '%s' for %s %s is Ready to produce.") % (
+ name,
+ production.product_qty,
+ production.product_id.name,
+ )
self.log(cr, uid, production_id, message)
return True
@@ -740,7 +738,7 @@ class mrp_production(osv.osv):
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production', production_id, 'button_produce_done', cr)
- message = _('Manufacturing order ') + " '" + production.name + "' "+ _("is finished.")
+ message = str(production_qty) + " '[" + production.product_id.code + '] ' + production.product_id.name + _("' have been manufactured for ") + production.name
self.log(cr, uid, production_id, message)
return True
@@ -910,7 +908,16 @@ class mrp_production(osv.osv):
proc_ids.append(proc_id)
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
self.write(cr, uid, [production.id], {'picking_id': picking_id, 'move_lines': [(6,0,moves)], 'state':'confirmed'})
- message = _('Manufacturing order ') + " '" + production.name + "' "+ _("is confirmed.")
+ message = ("%s '%s' %s %s %s %s %s %s.") % (
+ _('Manufacturing Order'),
+ production.name,
+ _('for'),
+ production.product_qty,
+ production.product_id.name,
+ _('scheduled for date '),
+ datetime.strptime(production.date_planned,'%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d'),
+ _('is waiting')
+ )
self.log(cr, uid, production.id, message)
return picking_id
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 9d645a17095..ca003b33daa 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -155,10 +155,10 @@
-
+
-
-
+
+
@@ -204,6 +204,7 @@
form
+ Work Centers are units of manufacture consisting of one or several people and/or machines that can be considered as a unit for the purposes of forecasting capacity and planning.
@@ -299,8 +301,8 @@
-
+
@@ -314,8 +316,8 @@
-
+
@@ -398,6 +400,7 @@
form[('bom_id','=',False)]
+ Master Bills of Materials are documents that describe the list of raw materials used to make a finished product. You can generate documents for a product manufacturing (defining each manufacturing step) or you could define a single multi-level bill of materials.Bill of Material Components
@@ -405,6 +408,7 @@
mrp.bomform[('bom_id','!=',False)]
+ Bills of materials Components are components and sub-product used to create master bills of materials.
@@ -762,6 +766,7 @@
{'search_default_Current':1}
+ Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, Open ERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.
@@ -772,6 +777,7 @@
formgantt,tree,form,calendar,graph[('state','in',('ready','confirmed','in_production'))]
+ Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials or BoM) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, Open ERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.
diff --git a/addons/mrp/mrp_wizard.xml b/addons/mrp/mrp_wizard.xml
deleted file mode 100644
index f7bfdcd7395..00000000000
--- a/addons/mrp/mrp_wizard.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml
index 8172c61e84f..18dc07e4b78 100644
--- a/addons/mrp/report/mrp_production_order_view.xml
+++ b/addons/mrp/report/mrp_production_order_view.xml
@@ -109,8 +109,7 @@
tree,graph
- {'search_default_Product': 1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}
-
+ {'search_default_Product': 1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}
diff --git a/addons/mrp/report/mrp_report_view.xml b/addons/mrp/report/mrp_report_view.xml
index cf66f93f0e4..5f28f2ce6f4 100644
--- a/addons/mrp/report/mrp_report_view.xml
+++ b/addons/mrp/report/mrp_report_view.xml
@@ -49,6 +49,7 @@
report.workcenter.loadformgraph,tree
+ Work Center Load is a projection of load in a work center given a period. The load is express in hour and cycle (for machines).
@@ -100,6 +101,7 @@
report.mrp.inoutformgraph,tree
+ Weekly Stock Value Variation enables you to track stock value evolution as a result of manufacturing activities (consumption of raw materials, production of finished goods, added accounting value of stock by the creation of value following the transformation of products).
diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py
index 0a6a21de971..ca8e9b9c0b7 100644
--- a/addons/mrp/report/price.py
+++ b/addons/mrp/report/price.py
@@ -31,75 +31,68 @@ from tools.translate import _
class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context={}):
number = (datas.get('form', False) and datas['form']['number']) or 1
-
- def process_bom(bom, currency_id):
+ pool = pooler.get_pool(cr.dbname)
+ product_pool = pool.get('product.product')
+ product_uom_pool = pool.get('product.uom')
+ supplier_info_pool = pool.get('product.supplierinfo')
+ workcenter_pool = pool.get('mrp.workcenter')
+ user_pool = pool.get('res.users')
+ bom_pool = pool.get('mrp.bom')
+ def process_bom(bom, currency_id, factor=1):
xml = ''
sum = 0
sum_strd = 0
- prod = pooler.get_pool(cr.dbname).get('product.product').browse(cr, uid, bom['product_id'])
+ prod = product_pool.browse(cr, uid, bom['product_id'])
prod_name = bom['name']
- prod_qtty = bom['product_qty']
- prod_uom = prod.uom_id.name
+ prod_qtty = factor * bom['product_qty']
+ product_uom = product_uom_pool.browse(cr, uid, bom['product_uom'], context=context)
level = 1
- main_sp_price = ''
- main_sp_name = ''
- main_strd_price = ''
- main_strd_price = ''
- if prod.seller_ids and prod.seller_ids[0] :
- main_sp_name = '' + prod.seller_ids[0].name.name + '\r\n'
- pricelist_id = prod.seller_ids[0].name.property_product_pricelist_purchase.id
- if pricelist_id:
- pricelist_obj = pooler.get_pool(cr.dbname).get('product.pricelist')
- price = pricelist_obj.price_get(cr,uid,[pricelist_id], prod.id, number*prod_qtty or 1.0).setdefault(pricelist_id, 0)
- price = pooler.get_pool(cr.dbname).get('res.currency').compute(cr, uid, pricelist_obj.browse(cr, uid, pricelist_id).currency_id.id, currency_id, price)
- else:
- price = 0
- main_sp_price = '%.2f' % price + '\r\n'
+ main_sp_price, main_sp_name , main_strd_price = '','',''
+ sellers, sellers_price = '',''
+
+ if prod.seller_id:
+ main_sp_name = "%s\r\n" %(prod.seller_id.name)
+ price = supplier_info_pool.price_get(cr, uid, prod.seller_id.id, prod.id, number*prod_qtty)[prod.seller_id.id]
+ price = product_uom_pool._compute_price(cr, uid, prod.uom_id.id, price, to_uom_id=product_uom.id)
+ main_sp_price = '%s\r\n' %(str(price))
sum += prod_qtty*price
+ std_price = product_uom_pool._compute_price(cr, uid, prod.uom_id.id, prod.standard_price, to_uom_id=product_uom.id)
+ main_strd_price = str(std_price) + '\r\n'
+ sum_strd = prod_qtty*std_price
- main_strd_price = '%.2f' % prod.standard_price + '\r\n'
- sum_strd = prod_qtty*prod.standard_price
-
- sellers = ''
- sellers_price = ''
for seller_id in prod.seller_ids:
sellers += '- '+ seller_id.name.name +'\r\n'
- pricelist_id = seller_id.name.property_product_pricelist_purchase.id
- if pricelist_id:
- pricelist_obj = pooler.get_pool(cr.dbname).get('product.pricelist')
- price = pricelist_obj.price_get(cr,uid,[pricelist_id], prod.id, number*prod_qtty or 1.0).setdefault(pricelist_id, 0)
- price = pooler.get_pool(cr.dbname).get('res.currency').compute(cr, uid, pricelist_obj.browse(cr, uid, pricelist_id).currency_id.id, currency_id, price)
- else:
- price = 0
- sellers_price += '%.2f' % price + '\r\n'
+ price = supplier_info_pool.price_get(cr, uid, seller_id.name.id, prod.id, number*prod_qtty)[seller_id.name.id]
+ price = product_uom_pool._compute_price(cr, uid, prod.uom_id.id, price, to_uom_id=product_uom.id)
+ sellers_price += '' + str(price) + '\r\n'
xml += "
-
-
-
- My CashBoxes
- account.bank.statement
- form
- tree,form
-
- [('user_id','=',uid)]
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
-
-
-
-
- My Cashboxes to Close
- account.bank.statement
- form
- tree,form
-
- [('state','=','open'), ('user_id','=',uid)]
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
-
-
- account.bank.statement.form
- account.bank.statement
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
- account.bank.statement.tree
- account.bank.statement
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Open a CashBox
- account.bank.statement
- form
-
- [('state','=','draft'),('user_id','=',uid)]
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
-
-
-
-
- account.bank.statment.select
- account.bank.statement
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- All Cashboxes
- ir.actions.act_window
- account.bank.statement
- form
-
- {'search_default_Today':1}
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
-
- All My Cashboxes
- ir.actions.act_window
- account.bank.statement
- form
- [('user_id','=',uid)]
-
-
-
- tree
-
-
-
-
-
-
- form
-
-
-
-
-
-
-
- Cashboxes to Close
- ir.actions.act_window
- account.bank.statement
- form
- tree,form
- [('state','=','draft')]
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
-
-
+
+
+
+ Cash Register
+ ir.actions.act_window
+ account.bank.statement
+ form
+ form,tree
+
+
+ [('journal_id.type', '=', 'cash')]
+
+
+
+ tree
+
+
+
+
+
+ form
+
+
+
+
+
+ All Register
+ ir.actions.act_window
+ account.bank.statement
+ form
+ form,tree
+
+
+
+
+
+ tree
+
+
+
+
+
+ form
+
+
+
+
+
+
+
+
+
+
-
+
-
-
diff --git a/addons/point_of_sale/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py
index fe57e6642f2..fce971fe2af 100644
--- a/addons/point_of_sale/wizard/pos_box_entries.py
+++ b/addons/point_of_sale/wizard/pos_box_entries.py
@@ -35,14 +35,16 @@ def get_journal(self, cr, uid, context):
"""
obj = self.pool.get('account.journal')
+ statement_obj = self.pool.get('account.bank.statement')
user = self.pool.get('res.users').browse(cr, uid, uid)
ids = obj.search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', user.company_id.id)])
- res = obj.read(cr, uid, ids, ['id', 'name'], context)
- res = [(r['id'], r['name']) for r in res]
- res.insert(0, ('', ''))
+ obj_ids= statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', 'in', ids)])
+ res_obj = obj.read(cr, uid, ids, ['journal_id'], context)
+ res_obj = [(r1['id'])for r1 in res_obj]
+ res = statement_obj.read(cr, uid, obj_ids, ['journal_id'], context)
+ res = [(r['journal_id']) for r in res]
return res
-
class pos_box_entries(osv.osv_memory):
_name = 'pos.box.entries'
_description = 'Pos Box Entries'
@@ -62,15 +64,15 @@ class pos_box_entries(osv.osv_memory):
obj = self.pool.get('product.product')
ids = obj.search(cr, uid, [('income_pdt', '=', True)])
res = obj.read(cr, uid, ids, ['id', 'name'], context)
- res = [(r['id'], r['name']) for r in res]
+ res = [(r['id'],r['name']) for r in res]
res.insert(0, ('', ''))
return res
_columns = {
- 'name': fields.char('Name', size=32, required=True),
- 'journal_id': fields.selection(get_journal, "Journal", required=True),
+ 'name': fields.char('Description', size=32, required=True),
+ 'journal_id': fields.selection(get_journal, "Register", required=True),
'product_id': fields.selection(_get_income_product, "Operation", required=True),
'amount': fields.float('Amount', digits=(16, 2)),
'ref': fields.char('Ref', size=32),
diff --git a/addons/point_of_sale/wizard/pos_box_entries.xml b/addons/point_of_sale/wizard/pos_box_entries.xml
index e0f0a21402f..75dea51e4a2 100644
--- a/addons/point_of_sale/wizard/pos_box_entries.xml
+++ b/addons/point_of_sale/wizard/pos_box_entries.xml
@@ -1,8 +1,8 @@
-
+
-
+
Box Entriespos.box.entries
@@ -14,11 +14,11 @@
-
+
-
@@ -31,8 +31,8 @@
pos.box.entriesformform
- new
+ new
-
+
-
+
diff --git a/addons/point_of_sale/wizard/pos_box_out.py b/addons/point_of_sale/wizard/pos_box_out.py
index ea5768e5099..c4871a2f03a 100644
--- a/addons/point_of_sale/wizard/pos_box_out.py
+++ b/addons/point_of_sale/wizard/pos_box_out.py
@@ -49,8 +49,8 @@ class pos_box_out(osv.osv_memory):
return res
_columns = {
- 'name': fields.char('Name', size=32, required=True),
- 'journal_id': fields.selection(pos_box_entries.get_journal, "Journal", required=True),
+ 'name': fields.char('Description', size=32, required=True),
+ 'journal_id': fields.selection(pos_box_entries.get_journal, "Register", required=True),
'product_id': fields.selection(_get_expense_product, "Operation", required=True),
'amount': fields.float('Amount', digits=(16, 2)),
'ref': fields.char('Ref', size=32),
@@ -62,12 +62,12 @@ class pos_box_out(osv.osv_memory):
def get_out(self, cr, uid, ids, context):
"""
- Create the entries in the CashBox .
- @param self: The object pointer.
- @param cr: A database cursor
- @param uid: ID of the user currently logged in
- @param context: A standard dictionary
- @return :Return of operation of product
+ Create the entries in the CashBox .
+ @param self: The object pointer.
+ @param cr: A database cursor
+ @param uid: ID of the user currently logged in
+ @param context: A standard dictionary
+ @return :Return of operation of product
"""
args = {}
statement_obj = self.pool.get('account.bank.statement')
diff --git a/addons/point_of_sale/wizard/pos_box_out.xml b/addons/point_of_sale/wizard/pos_box_out.xml
index c634b4cf997..9922f211c6e 100644
--- a/addons/point_of_sale/wizard/pos_box_out.xml
+++ b/addons/point_of_sale/wizard/pos_box_out.xml
@@ -1,8 +1,8 @@
-
+
-
+
Box Outpos.box.out
@@ -14,11 +14,11 @@
-
+
-
@@ -31,8 +31,8 @@
pos.box.outformform
- new
+ new
-
+
-
+
diff --git a/addons/point_of_sale/wizard/pos_close_statement.py b/addons/point_of_sale/wizard/pos_close_statement.py
index ca07180974b..22c3e77ad63 100644
--- a/addons/point_of_sale/wizard/pos_close_statement.py
+++ b/addons/point_of_sale/wizard/pos_close_statement.py
@@ -22,7 +22,6 @@
from osv import osv
from tools.translate import _
-
class pos_close_statement(osv.osv_memory):
_name = 'pos.close.statement'
_description = 'Close Statements'
@@ -38,27 +37,55 @@ class pos_close_statement(osv.osv_memory):
"""
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
list_statement = []
+ mod_obj = self.pool.get('ir.model.data')
statement_obj = self.pool.get('account.bank.statement')
journal_obj = self.pool.get('account.journal')
- journal_lst = journal_obj.search(cr, uid, [('company_id', '=', company_id), ('auto_cash', '=', True), ('check_dtls', '=', False)])
- journal_ids = journal_obj.browse(cr, uid, journal_lst)
+ user_obj="""select DISTINCT journal_id from pos_journal_users where user_id=%d"""%(uid)
+ cr.execute(user_obj)
+ user_journals1= cr.fetchall()
+ lst1=map(lambda x1:x1[0],user_journals1)
+ journal_ids = journal_obj.browse(cr, uid, lst1)
+
for journal in journal_ids:
ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)])
- list_statement = ids
- statement_obj.button_confirm(cr, uid, ids, context)
- if not list_statement:
- return {}
+ sql = """ select id from account_journal
+ where auto_cash = 'True'
+ and company_id =%d and id =%d"""%(company_id,journal.id)
+ cr.execute(sql)
+ user_journals= cr.fetchall()
+ lst=map(lambda x1:x1[0],user_journals)
+ journal_ids1 = journal_obj.browse(cr, uid, lst)
+ #list_statement=[]
+
+ for journal1 in journal_ids1:
+ ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)])
+ if not ids:
+ raise osv.except_osv(_('Message'), _('Journals are allready closed'))
+ else:
+ list_statement.append(ids[0])
+ if not journal.check_dtls:
+ statement_obj.button_confirm_bank(cr, uid, ids, context)
+ # if not list_statement:
+ # return {}
+ # model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_bank_statement_tree')], context=context)
+ # resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
+
+ data_obj = self.pool.get('ir.model.data')
+ id2 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_tree')
+ id3 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_form2')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ if id3:
+ id3 = data_obj.browse(cr, uid, id3, context=context).res_id
return {
- 'domain': "[('id','in', list_statement)]",
+ 'domain': "[('id','in'," + str(list_statement) + ")]",
'name': 'Close Statements',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.bank.statement',
- 'view_id': False,
- 'type': 'ir.actions.act_window'
-}
+ 'views': [(id2, 'tree'),(id3, 'form')],
+ 'type': 'ir.actions.act_window'}
pos_close_statement()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py
index 7fb33ba7f09..8db05d32f53 100644
--- a/addons/point_of_sale/wizard/pos_open_statement.py
+++ b/addons/point_of_sale/wizard/pos_open_statement.py
@@ -23,7 +23,6 @@ from osv import osv
from tools.translate import _
import time
-
class pos_open_statement(osv.osv_memory):
_name = 'pos.open.statement'
_description = 'Open Statements'
@@ -38,67 +37,91 @@ class pos_open_statement(osv.osv_memory):
@return : Blank Directory
"""
list_statement = []
+ mod_obj = self.pool.get('ir.model.data')
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
statement_obj = self.pool.get('account.bank.statement')
singer_obj = self.pool.get('singer.statement')
sequence_obj = self.pool.get('ir.sequence')
journal_obj = self.pool.get('account.journal')
- journal_lst = journal_obj.search(cr, uid, [('company_id', '=', company_id), ('auto_cash', '=', True)])
- journal_ids = journal_obj.browse(cr, uid, journal_lst)
+ user_obj="""select DISTINCT journal_id from pos_journal_users where user_id=%d"""%(uid)
+ cr.execute(user_obj)
+ user_journals1= cr.fetchall()
+ lst1=map(lambda x1:x1[0],user_journals1)
+ journal_ids = journal_obj.browse(cr, uid, lst1)
+
for journal in journal_ids:
ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)])
- if len(ids):
- raise osv.except_osv(_('Message'), _('You can not open a Cashbox for "%s". \n Please close the cashbox related to. ' % (journal.name)))
- sql = """ Select id from account_bank_statement
- where journal_id=%d
- and company_id =%d
- order by id desc limit 1""" % (journal.id, company_id)
+ sql = """ select id from account_journal
+ where auto_cash = 'True'
+ and company_id =%d and id =%d"""%(company_id,journal.id)
cr.execute(sql)
- st_id = cr.fetchone()
- number = ''
- if journal.statement_sequence_id:
- number = sequence_obj.get_id(cr, uid, journal.id)
- else:
- number = sequence_obj.get(cr, uid,
- 'account.bank.statement')
+ user_journals= cr.fetchall()
+ lst=map(lambda x1:x1[0],user_journals)
+ journal_ids1 = journal_obj.browse(cr, uid, lst)
- # statement_id=statement_obj.create(cr,uid,{'journal_id':journal.id,
- # 'company_id':company_id,
- # 'user_id':uid,
- # 'state':'open',
- # 'name':number
- # })
- period = statement_obj._get_period(cr, uid, context) or None
- cr.execute("INSERT INTO account_bank_statement(journal_id,company_id,user_id,state,name, period_id,date) VALUES(%d,%d,%d,'open','%s',%d,'%s')"%(journal.id, company_id, uid, number, period, time.strftime('%Y-%m-%d %H:%M:%S')))
- cr.execute("select id from account_bank_statement where journal_id=%d and company_id=%d and user_id=%d and state='open' and name='%s'"%(journal.id, company_id, uid, number))
- statement_id = cr.fetchone()[0]
- if st_id:
- statemt_id = statement_obj.browse(cr, uid, st_id[0])
- list_statement.append(statemt_id.id)
- if statemt_id and statemt_id.ending_details_ids:
- statement_obj.write(cr, uid, [statement_id], {
- 'balance_start': statemt_id.balance_end,
- 'state': 'open',
- })
- if statemt_id.ending_details_ids:
- for i in statemt_id.ending_details_ids:
- c = singer_obj.create(cr, uid, {
- 'pieces': i.pieces,
- 'number': i.number,
- 'starting_id': statement_id,
- })
- return {
- 'domain': "[('id','in', ["+','.join(map(str,list_statement))+"])]",
- 'name': 'Open Statement',
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'account.bank.statement',
- 'view_id': False, # TODO: REFERENCE RIGHT VIEWS
- 'type': 'ir.actions.act_window'
-}
- return {}
+ for journal1 in journal_ids1:
+ ids1 = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)])
+ if len(ids):
+ raise osv.except_osv(_('Message'), _('You can not open a Cashbox for "%s". \n Please close the cashbox related to. ' %(journal.name)))
+ sql = """ Select id from account_bank_statement
+ where journal_id =%d
+ and company_id =%d
+ order by id desc limit 1""" %(journal.id, company_id)
+ cr.execute(sql)
+ st_id = cr.fetchone()
+ number = ''
+ if journal.sequence_id:
+ number = sequence_obj.get_id(cr, uid, journal.id)
+ else:
+ number = sequence_obj.get(cr, uid,
+ 'account.bank.statement')
+ statement_id=statement_obj.create(cr,uid,{'journal_id':journal.id,
+ 'company_id':company_id,
+ 'user_id':uid,
+ 'state':'open',
+ 'name':number
+ })
+ statement_obj.button_open(cr,uid,[statement_id],context)
+ # period = statement_obj._get_period(cr, uid, context) or None
+ # cr.execute("INSERT INTO account_bank_statement(journal_id,company_id,user_id,state,name, period_id,date) VALUES(%d,%d,%d,'open','%s',%d,'%s')"%(journal.id, company_id, uid, number, period, time.strftime('%Y-%m-%d %H:%M:%S')))
+ # cr.commit()
+ # cr.execute("select id from account_bank_statement where journal_id=%d and company_id=%d and user_id=%d and state='open' and name='%s'"%(journal.id, company_id, uid, number))
+ # statement_id = cr.fetchone()[0]
+ # print "statement_id",statement_id
+ # if st_id:
+ # statemt_id = statement_obj.browse(cr, uid, st_id[0])
+ # list_statement.append(statemt_id.id)
+ # if statemt_id and statemt_id.ending_details_ids:
+ # statement_obj.write(cr, uid, [statement_id], {
+ # 'balance_start': statemt_id.balance_end,
+ # 'state': 'open',
+ # })
+ # if statemt_id.ending_details_ids:
+ # for i in statemt_id.ending_details_ids:
+ # c = statement_obj.create(cr, uid, {
+ # 'pieces': i.pieces,
+ # 'number': i.number,
+ # 'starting_id': statement_id,
+ # })
+ data_obj = self.pool.get('ir.model.data')
+ id2 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_tree')
+ id3 = data_obj._get_id(cr, uid, 'account', 'view_bank_statement_form2')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ if id3:
+ id3 = data_obj.browse(cr, uid, id3, context=context).res_id
+
+ return {
+# 'domain': "[('id','in', ["+','.join(map(str,list_statement))+"])]",
+ 'domain': "[('state','=','open')]",
+ 'name': 'Open Statement',
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'account.bank.statement',
+ 'views': [(id2, 'tree'),(id3, 'form')],
+ 'type': 'ir.actions.act_window'
+}
pos_open_statement()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py
index cd8a85ea8c2..403e92b11b8 100644
--- a/addons/point_of_sale/wizard/pos_payment.py
+++ b/addons/point_of_sale/wizard/pos_payment.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
@@ -31,31 +31,31 @@ import pos_receipt
class pos_make_payment(osv.osv_memory):
_name = 'pos.make.payment'
_description = 'Point of Sale Payment'
-
+
def default_get(self, cr, uid, fields, context):
- """
+ """
To get default values for the object.
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param fields: List of fields for which we want default values
- @param context: A standard dictionary
- @return: A dictionary which of fields with values.
+ @param fields: List of fields for which we want default values
+ @param context: A standard dictionary
+ @return: A dictionary which of fields with values.
"""
res = super(pos_make_payment, self).default_get(cr, uid, fields, context=context)
-
- active_id = context and context.get('active_id',False)
- if active_id:
+
+ active_id = context and context.get('active_id',False)
+ if active_id:
j_obj = self.pool.get('account.journal')
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
journal = j_obj.search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', company_id)])
-
+
if journal:
journal = journal[0]
else:
journal = None
wf_service = netsvc.LocalService("workflow")
-
+
order_obj=self.pool.get('pos.order')
order = order_obj.browse(cr, uid, active_id, context)
#get amount to pay
@@ -66,50 +66,50 @@ class pos_make_payment(osv.osv_memory):
elif order.amount_paid > 0.0:
order_obj.write(cr, uid, [active_id], {'state': 'advance'})
invoice_wanted_checked = False
-
+
current_date = time.strftime('%Y-%m-%d')
-
+
if 'journal' in fields:
- res.update({'journal':journal})
+ res.update({'journal':journal})
if 'amount' in fields:
- res.update({'amount':amount})
+ res.update({'amount':amount})
if 'invoice_wanted' in fields:
- res.update({'invoice_wanted':invoice_wanted_checked})
+ res.update({'invoice_wanted':invoice_wanted_checked})
if 'payment_date' in fields:
res.update({'payment_date':current_date})
- if 'payment_name' in fields:
- res.update({'payment_name':'Payment'})
+ if 'payment_name' in fields:
+ res.update({'payment_name':'Payment'})
return res
-
+
def view_init(self, cr, uid, fields_list, context=None):
res = super(pos_make_payment, self).view_init(cr, uid, fields_list, context=context)
- active_id = context and context.get('active_id', False) or False
+ active_id = context and context.get('active_id', False) or False
if active_id:
order = self.pool.get('pos.order').browse(cr, uid, active_id)
if not order.lines:
raise osv.except_osv('Error!','No order lines defined for this sale ')
return True
-
+
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
- """
+ """
Changes the view dynamically
-
+
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param context: A standard dictionary
-
+ @param context: A standard dictionary
+
@return: New arch of view.
-
+
"""
-
-
+
+
result = super(pos_make_payment, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
active_model = context.get('active_model')
active_id = context.get('active_id', False)
if not active_id or (active_model and active_model != 'pos.order'):
- return result
-
+ return result
+
order = self.pool.get('pos.order').browse(cr, uid, active_id)
if order.amount_total == order.amount_paid:
result['arch'] = """
@@ -120,22 +120,23 @@ class pos_make_payment(osv.osv_memory):
- """
+ """
return result
def check(self, cr, uid, ids, context):
-
+
"""Check the order:
if the order is not paid: continue payment,
if the order is paid print invoice (if wanted) or ticket.
"""
- active_id = context and context.get('active_id',False)
+ active_id = context and context.get('active_id',False)
order_obj = self.pool.get('pos.order')
- jrnl_obj = self.pool.get('account.journal')
+ jrnl_obj = self.pool.get('account.journal')
order = order_obj.browse(cr, uid, active_id, context)
+ order_name = order.name
amount = order.amount_total - order.amount_paid
data = self.read(cr, uid, ids)[0]
-
+
# Todo need to check ...
if amount !=0.0:
invoice_wanted = data['invoice_wanted']
@@ -143,61 +144,140 @@ class pos_make_payment(osv.osv_memory):
if data.get('journal',False):
jrnl_used=jrnl_obj.browse(cr, uid, data['journal'])
order_obj.write(cr, uid, [active_id], {'invoice_wanted': invoice_wanted})
- order_obj.add_payment(cr, uid, active_id, data, context=context)
+ order_obj.add_payment(cr, uid, active_id, data, context=context)
+
+ res_obj = self.pool.get('res.company')
+ inv_ref = self.pool.get('account.invoice')
+ inv_line_ref = self.pool.get('account.invoice.line')
+ product_obj= self.pool.get('product.product')
+ inv_ids = []
+ for order in self.pool.get('pos.order').browse(cr, uid, ids, context):
+# curr_c = order.user_salesman_id.company_id
+ make_obj = self.pool.get('pos.make.payment').browse(cr, uid, uid)
+ if invoice_wanted:
+ if order.invoice_id:
+ inv_ids.append(order.invoice_id.id)
+# continue
+# if not make_obj.partner_id:
+# raise osv.except_osv(_('Error'), _('Please provide a partner for the sale.'))
+ acc= make_obj.partner_id.property_account_receivable.id
+ inv = {
+ 'name': 'Invoice from POS: '+order_name,
+ 'origin': order_name,
+ 'account_id':acc,
+ 'journal_id':order.sale_journal.id or None,
+ 'type': 'out_invoice',
+ 'reference': order.name,
+ 'partner_id': make_obj.partner_id.id,
+ 'comment': order.note or '',
+ }
+ inv.update(inv_ref.onchange_partner_id(cr, uid, [], 'out_invoice', make_obj.partner_id.id)['value'])
+ if not inv.get('account_id', None):
+ inv['account_id'] = acc
+ inv_id = inv_ref.create(cr, uid, inv, context)
+ self.write(cr, uid, [order.id], {'invoice_id': inv_id, 'state': 'invoiced'})
+ inv_ids.append(inv_id)
+ for line in order.lines:
+ inv_line = {
+ 'invoice_id': inv_id,
+ 'product_id': line.product_id.id,
+ 'quantity': line.qty,
+ }
+ inv_name = product_obj.name_get(cr, uid, [line.product_id.id], context=context)[0][1]
+
+ inv_line.update(inv_line_ref.product_id_change(cr, uid, [],
+ line.product_id.id,
+ line.product_id.uom_id.id,
+ line.qty, partner_id = make_obj.partner_id.id, fposition_id=make_obj.partner_id.property_account_position.id)['value'])
+# inv_line['price_unit'] = line.price_unit
+# inv_line['discount'] = line.discount
+# inv_line['account_id'] = acc
+# inv_line['name'] = inv_name
+ inv_line['price_unit'] = amount
+ inv_line['discount'] = line.discount
+ inv_line['account_id'] = acc
+ inv_line['name'] = inv_name
+ inv_line['invoice_line_tax_id'] = ('invoice_line_tax_id' in inv_line)\
+ and [(6, 0, inv_line['invoice_line_tax_id'])] or []
+ inv_line_ref.create(cr, uid, inv_line, context)
+ for i in inv_ids:
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'account.invoice', i, 'invoice_open', cr)
+# return inv_ids
# Todo need to check
# if amount<=0.0:
# context.update({'flag':True})
# order_obj.action_paid(cr,uid,[active_id],context)
- if order_obj.test_paid(cr, uid, [active_id]):
- if order.partner_id and order.invoice_wanted:
- return self.create_invoice(cr, uid, ids, context)
- else:
- context.update({'flag': True})
- order_obj.action_paid(cr, uid, [active_id], context)
+
+# def test_paid(self, cr, uid, ids, context=None):
+# """ Test all amount is paid for this order
+# @return: True
+# """
+# for order in self.browse(cr, uid, ids, context):
+# if order.lines and not order.amount_total:
+# return True
+# if (not order.lines) or (not order.statement_ids) or \
+# Decimal(str(order.amount_total))!=Decimal(str(order.amount_paid)):
+# return False
+# return True
+# if order_obj.test_paid(cr, uid, [active_id]):
+ if order_obj.browse(cr, uid, [active_id]):
+ if make_obj.partner_id and make_obj.invoice_wanted:
+ order_obj.write(cr, uid, [active_id],{'state':'paid'})
if context.get('return'):
- order_obj.write(cr, uid, [active_id],{'state':'done'})
+ order_obj.write(cr, uid, [active_id],{'state':'done'})
else:
- order_obj.write(cr, uid, [active_id],{'state':'paid'})
- return self.print_report(cr, uid, ids, context)
+ order_obj.write(cr, uid, [active_id],{'state':'paid'})
+ return self.print_report(cr, uid, ids, context)
+# return self.create_invoice(cr, uid, ids, context)
+ else:
+ context.update({'flag': True})
+ order_obj.action_paid(cr, uid, [active_id], context)
+ if context.get('return'):
+ order_obj.write(cr, uid, [active_id],{'state':'done'})
+ else:
+ order_obj.write(cr, uid, [active_id],{'state':'paid'})
+ return self.print_report(cr, uid, ids, context)
if order.amount_paid > 0.0:
context.update({'flag': True})
# Todo need to check
- order_obj.action_paid(cr, uid, [active_id], context)
+ order_obj.action_paid(cr, uid, [active_id], context)
self.pool.get('pos.order').write(cr, uid, [active_id],{'state':'advance'})
- return self.print_report(cr, uid, ids, context)
- return {}
+ return self.print_report(cr, uid, ids, context)
+# return {}
+ return inv_ids
+
-
def create_invoice(self, cr, uid, ids, context):
-
+
+ """
+ Create a invoice
"""
- Create a invoice
- """
wf_service = netsvc.LocalService("workflow")
- active_ids = [context and context.get('active_id',False)]
+ active_ids = [context and context.get('active_id',False)]
for i in active_ids:
wf_service.trg_validate(uid, 'pos.order', i, 'invoice', cr)
- datas = {'ids' : context.get('active_id', [])}
- return {
+ datas = {'ids' : context.get('active_id', [])}
+ return {
'type' : 'ir.actions.report.xml',
'report_name':'pos.invoice',
- 'datas' : datas,
- }
-
+ 'datas' : datas,
+ }
+
def print_report(self, cr, uid, ids, context=None):
- """
- @summary: To get the date and print the report
+ """
+ @summary: To get the date and print the report
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param context: A standard dictionary
+ @param context: A standard dictionary
@return : retrun report
- """
+ """
if not context:
context={}
- active_id=context.get('active_id',[])
+ active_id=context.get('active_id',[])
datas = {'ids' : [active_id]}
- res = {}
+ res = {}
datas['form'] = res
return {
@@ -207,7 +287,7 @@ class pos_make_payment(osv.osv_memory):
}
_columns = {
- 'journal':fields.selection(pos_box_entries.get_journal, "Journal",required=True),
+ 'journal':fields.selection(pos_box_entries.get_journal, "Cash Register",required=True),
'product_id': fields.many2one('product.product', "Acompte"),
'amount':fields.float('Amount', digits=(16,2) ,required= True),
'payment_name': fields.char('Payment name', size=32, required=True),
@@ -215,8 +295,15 @@ class pos_make_payment(osv.osv_memory):
'is_acc': fields.boolean('Accompte'),
'invoice_wanted': fields.boolean('Invoice'),
'num_sale':fields.char('Num.File', size=32),
+ 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist'),
+ 'partner_id': fields.many2one('res.partner', 'Customer'),
+ 'invoice_id': fields.many2one('account.invoice', 'Invoice'),
+ 'state': fields.selection([('draft', 'Draft'), ('payment', 'Payment'),
+ ('advance','Advance'),
+ ('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced'), ('cancel', 'Cancel')],
+ 'State', readonly=True, ),
}
-
+
pos_make_payment()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/wizard/pos_payment.xml b/addons/point_of_sale/wizard/pos_payment.xml
index 6608f837a63..ad71d177357 100644
--- a/addons/point_of_sale/wizard/pos_payment.xml
+++ b/addons/point_of_sale/wizard/pos_payment.xml
@@ -12,11 +12,11 @@
form
-
-
+
+
-
+
@@ -24,6 +24,11 @@
+
+
+
+
+
@@ -42,4 +47,4 @@
-
\ No newline at end of file
+
diff --git a/addons/point_of_sale/wizard/pos_receipt.py b/addons/point_of_sale/wizard/pos_receipt.py
index daf63fd6674..33252f20606 100644
--- a/addons/point_of_sale/wizard/pos_receipt.py
+++ b/addons/point_of_sale/wizard/pos_receipt.py
@@ -41,10 +41,10 @@ class pos_receipt(osv.osv_memory):
@return: New arch of view with new columns.
"""
order_lst = self. pool.get('pos.order').browse(cr, uid, context['active_id'])
- for order in order_lst:
- if order.state_2 in ('to_verify'):
- raise osv.except_osv(_('Error!', 'Can not print the receipt because of discount and/or payment '))
- True
+# for order in order_lst:
+# if order.state_2 in ('to_verify'):
+# raise osv.except_osv(_('Error!', 'Can not print the receipt because of discount and/or payment '))
+# True
def print_report(self, cr, uid, ids, context=None):
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index 840c5f74d67..4aad723b2f9 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -291,8 +291,7 @@ class procurement_order(osv.osv):
if not procurement.product_id.seller_ids:
cr.execute('update procurement_order set message=%s where id=%s', (_('No supplier defined for this product !'), procurement.id))
return False
- partner_list = sorted([(partner_id.sequence, partner_id) for partner_id in procurement.product_id.seller_ids if partner_id and partner_id.sequence])
- partner = partner_list and partner_list[0] and partner_list[0][1] and partner_list[0][1].name or False
+ partner = procurement.product_id.seller_id #Taken Main Supplier of Product of Procurement.
if user.company_id and user.company_id.partner_id:
if partner.id == user.company_id.partner_id.id:
diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml
index fff13e36330..11c1287152c 100644
--- a/addons/procurement/procurement_view.xml
+++ b/addons/procurement/procurement_view.xml
@@ -70,7 +70,7 @@
-
+
@@ -119,6 +119,7 @@
{'search_default_current':1}{'search_default_Current':1}
+ The procurement order will schedule a proposal for automatic procurement for the product concerned. This procurement will start a task, a purchase order form for the supplier or a production depending on the product configuration.
@@ -139,6 +140,7 @@
formtree,form[('state','=','exception')]
+ For each customer order line or raw materials in a manufacturing order, there is a procurement form . In normal system use, procurement orders are automatically generated by Open ERP. But if there are configuration problems, the system can remain blocked by a procurement without generating a corresponding document. It is a procurement exception. Some problems are link to timing and will be correct automatically by the system. If there is no procurement rule, the exception must be corrected manually.
@@ -255,18 +257,18 @@
-
+
+
+
+
+
+
diff --git a/addons/product/product.py b/addons/product/product.py
index cbb2ffefd67..8029f8309d3 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -59,7 +59,7 @@ class product_uom(osv.osv):
def _factor_inv_write(self, cursor, user, id, name, value, arg, context):
return self.write(cursor, user, id, {'factor': self._compute_factor_inv(value)}, context=context)
-
+
def create(self, cr, uid, data, context={}):
if 'factor_inv' in data:
if data['factor_inv'] <> 1:
@@ -180,7 +180,7 @@ class product_category(osv.osv):
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Category Type'),
}
-
+
_defaults = {
'type' : lambda *a : 'normal',
@@ -212,14 +212,18 @@ product_category()
class product_template(osv.osv):
_name = "product.template"
_description = "Product Template"
- def _calc_seller_delay(self, cr, uid, ids, name, arg, context={}):
+ def _calc_seller(self, cr, uid, ids, fields, arg, context={}):
result = {}
for product in self.browse(cr, uid, ids, context):
+ for field in fields:
+ result[product.id] = {field:False}
+ result[product.id]['seller_delay'] = 1
if product.seller_ids:
partner_list = sorted([(partner_id.sequence, partner_id) for partner_id in product.seller_ids if partner_id and partner_id.sequence])
- result[product.id] = partner_list and partner_list[0] and partner_list[0][1] and partner_list[0][1].delay or False
- else:
- result[product.id] = 1
+ main_supplier = partner_list and partner_list[0] and partner_list[0][1] or False
+ result[product.id]['seller_delay'] = main_supplier and main_supplier.delay or 1
+ result[product.id]['seller_qty'] = main_supplier and main_supplier.qty or 0.0
+ result[product.id]['seller_id'] = main_supplier and main_supplier.name.id or False
return result
_columns = {
@@ -230,8 +234,8 @@ class product_template(osv.osv):
'description_sale': fields.text('Sale Description',translate=True),
'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Will change the way procurements are processed. Consumables are stockable products with infinite stock, or for use when you have no inventory management in the system."),
'supply_method': fields.selection([('produce','Produce'),('buy','Buy')], 'Supply method', required=True, help="Produce will generate production order or tasks, according to the product type. Purchase will trigger purchase orders when requested."),
- 'sale_delay': fields.float('Customer Lead Time', help="This is the average time between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
- 'produce_delay': fields.float('Manufacturing Lead Time', help="Average time to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different lead times will be summed for all levels and purchase orders."),
+ 'sale_delay': fields.float('Customer Lead Time', help="This is the average delay in days between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
+ 'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different lead times will be summed for all levels and purchase orders."),
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
'rental': fields.boolean('Can be Rent'),
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
@@ -254,7 +258,9 @@ class product_template(osv.osv):
help='Coefficient to convert UOM to UOS\n'
' uos = uom * coeff'),
'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type', required=True),
- 'seller_delay': fields.function(_calc_seller_delay, method=True, type='integer', string='Supplier Lead Time', help="This is the average delay in days between the purchase order confirmation 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."),
+ 'seller_delay': fields.function(_calc_seller, method=True, type='integer', string='Supplier Lead Time', multi="seller_delay", help="This is the average delay in days between the purchase order confirmation 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."),
+ 'seller_qty': fields.function(_calc_seller, method=True, type='float', string='Supplier Quantity', multi="seller_qty", help="This is minimum quantity to purchase from Main Supplier."),
+ 'seller_id': fields.function(_calc_seller, method=True, type='many2one', relation="res.partner", string='Main Supplier', help="Main Supplier who has highest priority in Supplier List.", multi="seller_id"),
'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Partners'),
'loc_rack': fields.char('Rack', size=16),
'loc_row': fields.char('Row', size=16),
@@ -616,12 +622,32 @@ product_packaging()
class product_supplierinfo(osv.osv):
_name = "product.supplierinfo"
_description = "Information about a product supplier"
+ def _calc_qty(self, cr, uid, ids, fields, arg, context={}):
+ result = {}
+ product_uom_pool = self.pool.get('product.uom')
+ for supplier_info in self.browse(cr, uid, ids, context):
+ for field in fields:
+ result[supplier_info.id] = {field:False}
+ if supplier_info.product_uom.id:
+ qty = product_uom_pool._compute_qty(cr, uid, supplier_info.product_uom.id, supplier_info.min_qty, to_uom_id=supplier_info.product_id.uom_id.id)
+ else:
+ qty = supplier_info.min_qty
+ result[supplier_info.id]['qty'] = qty
+ return result
+
+ def _get_uom_id(self, cr, uid, *args):
+ cr.execute('select id from product_uom order by id limit 1')
+ res = cr.fetchone()
+ return res and res[0] or False
+
_columns = {
'name' : fields.many2one('res.partner', 'Supplier', required=True, ondelete='cascade', help="Supplier of this product"),
'product_name': fields.char('Supplier Product Name', size=128, help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."),
'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),
- 'qty' : fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the default unit of measure."),
+ 'product_uom': fields.many2one('product.uom', string="UOM", help="Supplier Product UoM."),
+ 'min_qty': fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the default unit of measure."),
+ 'qty': fields.function(_calc_qty, method=True, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Uom."),
'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),
'delay' : fields.integer('Delivery Lead Time', required=True, help="Lead time in days between the confirmation of the purchase order and the reception of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning."),
'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),
@@ -633,6 +659,55 @@ class product_supplierinfo(osv.osv):
'delay': lambda *a: 1,
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'product.supplierinfo', context=c)
}
+ def _check_uom(self, cr, uid, ids):
+ for supplier_info in self.browse(cr, uid, ids):
+ if supplier_info.product_uom and supplier_info.product_uom.category_id.id <> supplier_info.product_id.uom_id.category_id.id:
+ return False
+ return True
+
+ _constraints = [
+ (_check_uom, 'Error: The default UOM and the Supplier Product UOM must be in the same category.', ['product_uom']),
+ ]
+ def price_get(self, cr, uid, supplier_ids, product_id, product_qty=1, context=None):
+ """
+ Calculate price from supplier pricelist.
+ @param supplier_ids: Ids of res.partner object.
+ @param product_id: Id of product.
+ @param product_qty: specify quantity to purchase.
+ """
+ if not context:
+ context = {}
+ if type(supplier_ids) in (int,long,):
+ supplier_ids = [supplier_ids]
+ res = {}
+ product_pool = self.pool.get('product.product')
+ partner_pool = self.pool.get('res.partner')
+ pricelist_pool = self.pool.get('product.pricelist')
+ currency_pool = self.pool.get('res.currency')
+ currency_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id.id
+ for supplier in partner_pool.browse(cr, uid, supplier_ids, context=context):
+ # Compute price from standard price of product
+ price = product_pool.price_get(cr, uid, [product_id], 'standard_price')[product_id]
+
+ # Compute price from Purchase pricelist of supplier
+ pricelist_id = supplier.property_product_pricelist_purchase.id
+ if pricelist_id:
+ price = pricelist_pool.price_get(cr, uid, [pricelist_id], product_id, product_qty).setdefault(pricelist_id, 0)
+ price = currency_pool.compute(cr, uid, pricelist_pool.browse(cr, uid, pricelist_id).currency_id.id, currency_id, price)
+
+ # Compute price from supplier pricelist which are in Supplier Information
+ supplier_info_ids = self.search(cr, uid, [('name','=',supplier.id),('product_id','=',product_id)])
+ if supplier_info_ids:
+ cr.execute('SELECT * ' \
+ 'FROM pricelist_partnerinfo ' \
+ 'WHERE suppinfo_id IN %s' \
+ 'AND min_quantity <= %s ' \
+ 'ORDER BY min_quantity DESC LIMIT 1', (tuple(supplier_info_ids),product_qty,))
+ res2 = cr.dictfetchone()
+ if res2:
+ price = res2['price']
+ res[supplier.id] = price
+ return res
_order = 'sequence'
product_supplierinfo()
diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml
index a2405f33b52..1dd0bca9d00 100644
--- a/addons/product/product_demo.xml
+++ b/addons/product/product_demo.xml
@@ -356,114 +356,133 @@
10
+ 1510
+ 151
+ 111
+ 111
+ 121
+ 121
+ 121
+ 111
+ 111
+ 111
+ 111
+ 111
+ 111
+ 1101
+ 1101
+ 11010
+ 11010
+ 11010
+ 110
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index f8620931b5e..7b95054a4b7 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -149,6 +149,8 @@
+
+
@@ -453,8 +455,10 @@
-
+
+
+
diff --git a/addons/product/report/product_pricelist.py b/addons/product/report/product_pricelist.py
index 328d8d5707f..76bf07ad96a 100644
--- a/addons/product/report/product_pricelist.py
+++ b/addons/product/report/product_pricelist.py
@@ -23,7 +23,7 @@ import time
from report import report_sxw
from osv import osv
import pooler
-
+from tools.translate import _
class product_pricelist(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(product_pricelist, self).__init__(cr, uid, name, context=context)
diff --git a/addons/product/wizard/product_price.py b/addons/product/wizard/product_price.py
index e5d73945c13..efca2fb6cc1 100644
--- a/addons/product/wizard/product_price.py
+++ b/addons/product/wizard/product_price.py
@@ -44,18 +44,14 @@ class product_price_list(osv.osv_memory):
}
def print_report(self, cr, uid, ids, context=None):
-
"""
- To get the date and print the report
- @param self: The object pointer.
- @param cr: A database cursor
- @param uid: ID of the user currently logged in
- @param context: A standard dictionary
- @return : return report
+ To get the date and print the report
+ @return : return report
"""
datas = {'ids': context.get('active_ids', [])}
res = self.read(cr, uid, ids, ['price_list','qty1', 'qty2','qty3','qty4','qty5'], context)
res = res and res[0] or {}
+ price_dict = self.pool.get('product.pricelist').price_get(cr, uid, [res['price_list']], 1, 1.0)
datas['form'] = res
return {
'type': 'ir.actions.report.xml',
diff --git a/addons/product/wizard/product_price_view.xml b/addons/product/wizard/product_price_view.xml
index a253a0e00af..bd5b06e30a1 100644
--- a/addons/product/wizard/product_price_view.xml
+++ b/addons/product/wizard/product_price_view.xml
@@ -5,11 +5,12 @@
- Price List
+ Price per unitproduct.price_listform
-
+
+
@@ -19,15 +20,17 @@
-
+
diff --git a/addons/product_manufacturer/i18n/fr.po b/addons/product_manufacturer/i18n/fr.po
new file mode 100644
index 00000000000..20ab19206f6
--- /dev/null
+++ b/addons/product_manufacturer/i18n/fr.po
@@ -0,0 +1,105 @@
+# French translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-25 13:27+0000\n"
+"PO-Revision-Date: 2010-07-22 09:16+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-07-23 04:08+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: product_electronic
+#: model:ir.module.module,description:product_electronic.module_meta_information
+msgid "A module that add manufacturers and attributes on the product form"
+msgstr ""
+
+#. module: product_electronic
+#: field:product.product,manufacturer_pref:0
+msgid "Manufacturer product code"
+msgstr ""
+
+#. module: product_electronic
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: product_electronic
+#: view:product.electronic.attribute:0
+msgid "Product Template Name"
+msgstr ""
+
+#. module: product_electronic
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: product_electronic
+#: model:ir.model,name:product_electronic.model_product_electronic_attribute
+msgid "Product attributes"
+msgstr ""
+
+#. module: product_electronic
+#: view:product.product:0
+msgid "Manufacturing data"
+msgstr ""
+
+#. module: product_electronic
+#: view:product.product:0
+msgid "Product reference"
+msgstr ""
+
+#. module: product_electronic
+#: field:product.electronic.attribute,name:0
+msgid "Attribute"
+msgstr ""
+
+#. module: product_electronic
+#: field:product.electronic.attribute,product_id:0
+msgid "Product"
+msgstr ""
+
+#. module: product_electronic
+#: field:product.electronic.attribute,value:0
+msgid "Value"
+msgstr ""
+
+#. module: product_electronic
+#: view:product.product:0
+msgid "Manufacturing Data"
+msgstr ""
+
+#. module: product_electronic
+#: view:product.product:0
+msgid "Product name"
+msgstr ""
+
+#. module: product_electronic
+#: view:product.product:0
+#: field:product.product,attribute_ids:0
+msgid "Attributes"
+msgstr ""
+
+#. module: product_electronic
+#: model:ir.module.module,shortdesc:product_electronic.module_meta_information
+msgid "Products Attributes & Manufacturers"
+msgstr ""
+
+#. module: product_electronic
+#: field:product.product,manufacturer_pname:0
+msgid "Manufacturer product name"
+msgstr ""
+
+#. module: product_electronic
+#: field:product.product,manufacturer:0
+msgid "Manufacturer"
+msgstr ""
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index dfdf85080fe..2ffdd78e284 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -311,7 +311,7 @@ class purchase_order(osv.osv):
'product_id': ol.product_id.id or False,
'uos_id': ol.product_uom.id or False,
'invoice_line_tax_id': [(6, 0, [x.id for x in ol.taxes_id])],
- 'account_analytic_id': ol.account_analytic_id.id,
+ 'account_analytic_id': ol.account_analytic_id.id or False,
})
def action_cancel_draft(self, cr, uid, ids, *args):
@@ -344,7 +344,7 @@ class purchase_order(osv.osv):
if not a:
raise osv.except_osv(_('Error !'), _('There is no expense account defined for this product: "%s" (id:%d)') % (ol.product_id.name, ol.product_id.id,))
else:
- a = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category')
+ a = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category').id
fpos = o.fiscal_position or False
a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, a)
il.append(self.inv_line_create(cr, uid, a, ol))
@@ -746,23 +746,24 @@ class procurement_order(osv.osv):
po_obj = self.pool.get('purchase.order')
for procurement in self.browse(cr, uid, ids):
res_id = procurement.move_id.id
- partner = procurement.product_id.seller_ids[0].name
+ partner = procurement.product_id.seller_id # Taken Main Supplier of Product of Procurement.
+ seller_qty = procurement.product_id.seller_qty
+ seller_delay = int(procurement.product_id.seller_delay)
partner_id = partner.id
- partner_rec = procurement.product_id.seller_ids[0]
address_id = partner_obj.address_get(cr, uid, [partner_id], ['delivery'])['delivery']
pricelist_id = partner.property_product_pricelist_purchase.id
uom_id = procurement.product_id.uom_po_id.id
qty = uom_obj._compute_qty(cr, uid, procurement.product_uom.id, procurement.product_qty, uom_id)
- if procurement.product_id.seller_ids[0].qty:
- qty = max(qty,partner_rec.qty)
+ if seller_qty:
+ qty = max(qty,seller_qty)
price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, False, {'uom': uom_id})[pricelist_id]
newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S')
newdate = newdate - DateTime.RelativeDateTime(days=company.po_lead)
- newdate = newdate - partner_rec.delay
+ newdate = newdate - seller_delay
#Passing partner_id to context for purchase order line integrity of Line name
context.update({'lang': partner.lang, 'partner_id': partner_id})
diff --git a/addons/resource/resource_view.xml b/addons/resource/resource_view.xml
index e84fa6fc34d..98afe8f5a03 100644
--- a/addons/resource/resource_view.xml
+++ b/addons/resource/resource_view.xml
@@ -78,8 +78,7 @@
-
-
+
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index b726b05a19f..9b0f555fc80 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -561,13 +561,12 @@ class sale_order(osv.osv):
wf_service.trg_validate(uid, 'account.invoice', inv, 'invoice_cancel', cr)
sale_order_line_obj.write(cr, uid, [l.id for l in sale.order_line],
{'state': 'cancel'})
+ message = _('Sale order') + " '" + sale.name + _(" is cancelled")
+ self.log(cr, uid, sale.id, message)
self.write(cr, uid, ids, {'state': 'cancel'})
- message = _('Sale order') + " '" + sale.name + "' "+ _("created on")+" '" +sale.create_date + _(" is cancelled")
- self.log(cr, uid, id, message)
return True
def action_wait(self, cr, uid, ids, *args):
- product=[]
product_obj = self.pool.get('product.product')
for o in self.browse(cr, uid, ids):
if (o.order_policy == 'manual'):
@@ -575,11 +574,8 @@ class sale_order(osv.osv):
else:
self.write(cr, uid, [o.id], {'state': 'progress', 'date_confirm': time.strftime('%Y-%m-%d')})
self.pool.get('sale.order.line').button_confirm(cr, uid, [x.id for x in o.order_line])
- for line in o.order_line:
- product.append(line.product_id.default_code)
- params = ', '.join(map(lambda x : str(x),product))
- message = _('Sale order ') + " '" + o.name + "' "+ _("created on")+" '" +o.create_date + "' "+_("for")+" '" +params + "' "+_("is confirmed")
- self.log(cr, uid, id, message)
+ message = _('Quotation') + " '" + o.name + "' "+ _("is converted to Sale order")
+ self.log(cr, uid, o.id, message)
return True
def procurement_lines_get(self, cr, uid, ids, *args):
@@ -951,9 +947,6 @@ class sale_order_line(osv.osv):
def button_confirm(self, cr, uid, ids, context=None):
if context is None:
context = {}
- for (id,name) in self.name_get(cr, uid, ids):
- message = _('Sale order line') + " '" + name + "' "+ _("is confirmed")
- self.log(cr, uid, id, message)
return self.write(cr, uid, ids, {'state': 'confirmed'})
def button_done(self, cr, uid, ids, context=None):
@@ -963,8 +956,6 @@ class sale_order_line(osv.osv):
res = self.write(cr, uid, ids, {'state': 'done'})
for line in self.browse(cr, uid, ids, context=context):
wf_service.trg_write(uid, 'sale.order', line.order_id.id, cr)
- message = _('Sale order line') + " '" + line.name + "' "+_("is done")
- self.log(cr, uid, id, message)
return res
def uos_change(self, cr, uid, ids, product_uos, product_uos_qty=0, product_id=None):
diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml
index ee19895b58d..10b7606533f 100644
--- a/addons/stock/product_view.xml
+++ b/addons/stock/product_view.xml
@@ -62,9 +62,8 @@
-
-
-
+
+
diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml
index 677cdfbcfc0..96af61ca205 100644
--- a/addons/stock/report/picking.rml
+++ b/addons/stock/report/picking.rml
@@ -150,10 +150,10 @@
- [[ picking.sale_id and picking.sale_id.partner_shipping_id and 'Shipping Address :' or removeParentNode('para') ]]
- [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]]
- [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]]
- [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.zip) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]]
+ [[ picking.address_id and 'Shipping Address :' or removeParentNode('para') ]]
+ [[ ( picking.address_id and picking.address_id.title) or '' ]] [[ (picking.address_id and picking.address_id.name) or '' ]]
+ [[ (picking.address_id and picking.address_id.street) or '' ]]
+ [[ (picking.address_id and picking.address_id.zip) or '' ]] [[ (picking.address_id and picking.address_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] [[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]]
@@ -241,7 +241,7 @@
- [[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') ]]
+ [[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') or removeParentNode('section') ]]
@@ -267,10 +267,11 @@
-
- [[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]]
+
+ [[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('s') ]]Non Assigned Products: [[ ( move_lines.state == 'assigned' or move_lines.state == 'done' or move_lines.state == 'confirmed' ) and removeParentNode('para') ]][[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]]
+
[[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]]
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 4e62e10f637..83f828203f6 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -536,16 +536,7 @@ class stock_picking(osv.osv):
if ('name' not in vals) or (vals.get('name')=='/'):
seq_obj_name = 'stock.picking.' + vals['type']
vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name)
- type_list = {
- 'out':_('Picking List'),
- 'in':_('Reception'),
- 'internal': _('Internal Picking'),
- 'delivery': _('Delivery Order')
- }
new_id = super(stock_picking, self).create(cr, user, vals, context)
- if not vals.get('auto_picking', False):
- message = type_list.get(vals.get('type', False), _('Picking')) + " '" + (vals['name'] or "n/a") + _(" with origin")+" '" + (vals.get('origin') or "n/a") + "' "+ _("is created.")
- self.log(cr, user, new_id, message)
return new_id
_columns = {
@@ -626,6 +617,9 @@ class stock_picking(osv.osv):
for r in picking.move_lines:
if r.state == 'draft':
todo.append(r.id)
+
+ self.log_picking(cr, uid, ids, context=context)
+
todo = self.action_explode(cr, uid, todo, context)
if len(todo):
self.pool.get('stock.move').action_confirm(cr, uid, todo, context=context)
@@ -710,16 +704,8 @@ class stock_picking(osv.osv):
""" Changes picking state to assigned.
@return: True
"""
- for pick in self.browse(cr, uid, ids, context=context):
- type_list = {
- 'out':'Picking List',
- 'in':'Reception',
- 'internal': 'Internal picking',
- 'delivery': 'Delivery order'
- }
- message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or 'n/a') + "' "+ _("is ready to be processed.")
- self.log(cr, uid, id, message)
self.write(cr, uid, ids, {'state': 'assigned'})
+ self.log_picking(cr, uid, ids, context=context)
return True
def test_finnished(self, cr, uid, ids):
@@ -758,8 +744,7 @@ class stock_picking(osv.osv):
ids2 = [move.id for move in pick.move_lines]
self.pool.get('stock.move').action_cancel(cr, uid, ids2, context)
self.write(cr, uid, ids, {'state': 'cancel', 'invoice_state': 'none'})
- message = _('Picking') + " '" + pick.name + "' "+_("is cancelled")
- self.log(cr, uid, id, message)
+ self.log_picking(cr, uid, ids, context=context)
return True
#
@@ -1190,6 +1175,31 @@ class stock_picking(osv.osv):
return res
+ def log_picking(self, cr, uid, ids, context=None):
+ """ This function will create log messages for picking.
+ @param cr: the database cursor
+ @param uid: the current user's ID for security checks,
+ @param ids: List of Picking Ids
+ @param context: A standard dictionary for contextual values
+ """
+ for pick in self.browse(cr, uid, ids, context=context):
+ type_list = {
+ 'out':'Picking List',
+ 'in':'Reception',
+ 'internal': 'Internal picking',
+ 'delivery': 'Delivery order'
+ }
+ message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or 'n/a') + "' "
+ state_list = {
+ 'confirmed': "is scheduled for the '" + datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d') + "'.",
+ 'assigned': 'is ready to process.',
+ 'cancel': 'is Cancelled.',
+ 'done': 'is processed.',
+ }
+ message += state_list[pick.state]
+ self.log(cr, uid, pick.id, message)
+ return True
+
stock_picking()
class stock_production_lot(osv.osv):
@@ -1844,8 +1854,6 @@ class stock_move(osv.osv):
'ref': move.picking_id and move.picking_id.name,
})
- message = _('Move line') + " '" + move.name + "' "+ _("is processed.")
- self.log(cr, uid, move.id, message)
# This can be removed
#tracking_lot = False
#if context:
@@ -1865,9 +1873,7 @@ class stock_move(osv.osv):
for pick_id in picking_ids:
wf_service.trg_write(uid, 'stock.picking', pick_id, cr)
- for (id,name) in picking_obj.name_get(cr, uid, picking_ids):
- message = _('Document') + " '" + name + "' "+ _("is processed.")
- self.log(cr, uid, id, message)
+ picking_obj.log_picking(cr, uid, picking_ids, context=context)
return True
def create_account_move(self, cr, uid, move,account_id, account_variation, amount, context=None):
@@ -1940,8 +1946,11 @@ class stock_move(osv.osv):
new_move = self.copy(cr, uid, move.id, default_val)
#self.write(cr, uid, [new_move], {'move_history_ids':[(4,move.id)]}) #TODO : to track scrap moves
res += [new_move]
- message = _('Product ') + " '" + move.product_id.name + "' "+ _("is scraped with") + " '" + str(move.product_qty) + "' "+ _("quantity.")
+ product_obj = self.pool.get('product.product')
+ for (id, name) in product_obj.name_get(cr, uid, [move.product_id.id]):
+ message = _('Product ') + " '" + name + "' "+ _("is scraped with") + " '" + str(move.product_qty) + "' "+ _("quantity.")
self.log(cr, uid, move.id, message)
+
self.action_done(cr, uid, res)
return res
@@ -2068,8 +2077,12 @@ class stock_move(osv.osv):
}
self.write(cr, uid, [move.id], update_val)
- message = _('Product ') + " '" + move.product_id.name + "' "+ _("is consumed with") + " '" + str(move.product_qty) + "' "+ _("quantity.")
- self.log(cr, uid, move.id, message)
+
+ product_obj = self.pool.get('product.product')
+ for new_move in self.browse(cr, uid, res, context=context):
+ for (id, name) in product_obj.name_get(cr, uid, [new_move.product_id.id]):
+ message = _('Product ') + " '" + name + "' "+ _("is consumed with") + " '" + str(new_move.product_qty) + "' "+ _("quantity.")
+ self.log(cr, uid, new_move.id, message)
self.action_done(cr, uid, res)
return res
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 2eb218da275..5668ed673d4 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -896,7 +896,6 @@
-