bzr revid: rvalyi@gmail.com-20100722153256-ewi0pmwi81udmbkb
This commit is contained in:
Raphaël Valyi
2010-07-22 12:32:56 -03:00
72 changed files with 4069 additions and 2040 deletions
+1
View File
@@ -335,6 +335,7 @@ class account_bank_statement(osv.osv):
if st.journal_id.entry_posted:
account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
self.log(cr, uid, st.id, 'Statement %s is confirmed and entries are created.' % st.name)
done.append(st.id)
self.write(cr, uid, done, {'state':'confirm'}, context=context)
return True
+762 -261
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -7,13 +7,13 @@ 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: 2010-07-18 14:54+0000\n"
"PO-Revision-Date: 2010-07-21 07:21+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\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-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -3719,7 +3719,7 @@ msgstr "Wprowadzanie zapisów"
#: wizard_view:account.invoice.refund,init:0
#: model:ir.actions.wizard,name:account.wizard_invoice_refund
msgid "Credit Note"
msgstr "Nota kredytowa"
msgstr "Korekta"
#. module: account
#: model:ir.actions.todo,note:account.config_fiscalyear
@@ -4426,7 +4426,7 @@ msgstr "Zaksięgowano"
#: view:account.tax:0
#: view:account.tax.template:0
msgid "Credit Notes"
msgstr "Nota kredytowa"
msgstr "Korekty"
#. module: account
#: field:account.config.wizard,date2:0
+8 -8
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-07-16 01:13+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
"PO-Revision-Date: 2010-07-22 01:32+0000\n"
"Last-Translator: digitalsatori <Unknown>\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-07-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -35,7 +35,7 @@ msgstr "未支付的采购发票"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_entries
msgid "Entries Encoding"
msgstr "录入的记录"
msgstr "分录录入"
#. module: account
#: model:ir.actions.todo,note:account.config_wizard_account_base_setup_form
@@ -55,7 +55,7 @@ msgstr "资产"
#. module: account
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "在动作定义使用了无效的模块名。"
msgstr "在动作定义使用了无效的模式名称。"
#. module: account
#: help:account.journal,currency:0
@@ -87,14 +87,14 @@ msgstr "对账结果"
#. module: account
#: model:ir.actions.act_window,name:account.act_account_acount_move_line_open_unreconciled
msgid "Unreconciled entries"
msgstr "取消核销"
msgstr "未对账分录"
#. module: account
#: field:account.invoice.tax,base_code_id:0
#: field:account.tax,base_code_id:0
#: field:account.tax.template,base_code_id:0
msgid "Base Code"
msgstr "基于的税务"
msgstr ""
#. module: account
#: view:account.account:0
@@ -115,7 +115,7 @@ msgstr "上级科目"
#. module: account
#: selection:account.move,type:0
msgid "Journal Voucher"
msgstr "原始凭证集合"
msgstr ""
#. module: account
#: field:account.invoice,residual:0
@@ -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()
@@ -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()
@@ -10,7 +10,8 @@
<form string="Create Entries From Models">
<group height="240" width="510">
<separator string="This wizard will create recurring accounting entries" colspan="4"/>
<field name="model"/>
<label string="Select recurring to create a manualy recurring accounting entries" width="400"/>
<field name="model" colspan="4" nolabel="1"/>
<separator colspan="4"/>
<group colspan="4" col="2">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
+1
View File
@@ -20,6 +20,7 @@
##############################################################################
import account_coda_import
import coda_import
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+340
View File
@@ -0,0 +1,340 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import pooler
import time
import datetime
import wizard
import netsvc
import base64
from osv import osv
from tools.translate import _
codawiz_form = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Select your bank journal :" />
<field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
<newline />
<field name="def_payable" /> <field name="def_receivable" />
<newline />
<field name="awaiting_account" />
<separator string="Clic on 'New' to select your file :" colspan="4"/>
<field name="coda"/>
</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 = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="500"/>
</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)
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:
+2 -1
View File
@@ -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)
+46 -46
View File
@@ -1,43 +1,43 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_contact
#
# * base_contact
# Giedrius Slavinskas <giedrius.slavinskas@gmail.com>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Project-Id-Version: OpenERP Server 5.0.1\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-07-20 21:26+0000\n"
"PO-Revision-Date: 2010-07-21 07:52+0000\n"
"Last-Translator: Giedrius Slavinskas <giedrius.slavinskas@gmail.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-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: lt\n"
#. module: base_contact
#: field:res.partner.job,sequence_contact:0
msgid "Contact Seq."
msgstr "Kontaktų seka"
msgstr "Kontakto seka"
#. module: base_contact
#: model:ir.model,name:base_contact.model_res_partner_contact
msgid "res.partner.contact"
msgstr "res.partner.contact"
msgstr "Partnerių kontaktai"
#. module: base_contact
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Objekto pavadinimas turi prasidėti su x_ ir jame negali būti specialių "
"simbolių!"
"Objekto pavadinimas turi prasidėti x_ ir neturėti jokių specialių simbolių !"
#. module: base_contact
#: field:res.partner.job,function_id:0
msgid "Partner Function"
msgstr ""
msgstr "Partnerio pareigos"
#. module: base_contact
#: model:ir.actions.act_window,name:base_contact.action_partner_contact_form
@@ -52,7 +52,7 @@ msgstr "Kontaktai"
#. module: base_contact
#: field:res.partner.job,sequence_partner:0
msgid "Partner Seq."
msgstr "Partnerių seka"
msgstr "Partnerio seka"
#. module: base_contact
#: selection:res.partner.job,state:0
@@ -92,22 +92,22 @@ msgstr ""
#. module: base_contact
#: view:res.partner.address:0
msgid "# of Contacts"
msgstr ""
msgstr "Kontaktai"
#. module: base_contact
#: help:res.partner.job,other:0
msgid "Additional phone field"
msgstr ""
msgstr "Papildomos informacijos laukas"
#. module: base_contact
#: model:process.node,name:base_contact.process_node_function0
msgid "Function"
msgstr "Funkcija"
msgstr "Adresas"
#. module: base_contact
#: field:res.partner.job,fax:0
msgid "Fax"
msgstr ""
msgstr "Faksas"
#. module: base_contact
#: field:res.partner.contact,lang_id:0
@@ -117,7 +117,7 @@ msgstr "Kalba"
#. module: base_contact
#: field:res.partner.job,phone:0
msgid "Phone"
msgstr "Tel. Nr."
msgstr "Telefonas"
#. module: base_contact
#: model:process.transition,note:base_contact.process_transition_contacttofunction0
@@ -127,12 +127,12 @@ msgstr ""
#. module: base_contact
#: field:res.partner.contact,title:0
msgid "Title"
msgstr ""
msgstr "Antraštė"
#. module: base_contact
#: view:res.partner.job:0
msgid "Contact Functions"
msgstr ""
msgstr "Kontaktų pareigos"
#. module: base_contact
#: model:ir.module.module,shortdesc:base_contact.module_meta_information
@@ -144,7 +144,7 @@ msgstr ""
msgid ""
"Order of importance of this job title in the list of job title of the linked "
"partner"
msgstr ""
msgstr "Pareigos pagal svarbumą susijusiam partneriui."
#. module: base_contact
#: field:res.partner.contact,email:0
@@ -155,7 +155,7 @@ msgstr "El. paštas"
#. module: base_contact
#: field:res.partner.job,date_stop:0
msgid "Date Stop"
msgstr ""
msgstr "Pabaigos data"
#. module: base_contact
#: view:res.partner:0
@@ -167,25 +167,25 @@ msgstr "Adresas"
#: model:ir.actions.act_window,name:base_contact.action_res_partner_job
#: model:ir.ui.menu,name:base_contact.menu_action_res_partner_job
msgid "Contact's Jobs"
msgstr ""
msgstr "Kontaktų pareigos"
#. module: base_contact
#: field:res.partner.contact,country_id:0
msgid "Nationality"
msgstr ""
msgstr "Tautybė"
#. module: base_contact
#: help:res.partner.job,sequence_contact:0
msgid ""
"Order of importance of this address in the list of addresses of the linked "
"contact"
msgstr ""
msgstr "Adresai pagal svarbumą sąraše."
#. module: base_contact
#: field:res.partner.address,job_id:0
#: field:res.partner.contact,job_id:0
msgid "Main Job"
msgstr ""
msgstr "Pagrindinės pareigos"
#. module: base_contact
#: view:res.partner:0
@@ -195,17 +195,17 @@ msgstr "Kategorijos"
#. module: base_contact
#: field:res.partner.contact,function_id:0
msgid "Main Function"
msgstr ""
msgstr "Pagrindinė funkcija"
#. module: base_contact
#: model:process.transition,note:base_contact.process_transition_partnertoaddress0
msgid "Define partners and their addresses."
msgstr ""
msgstr "Pasirinkite partnerius ir jų adresus"
#. module: base_contact
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Netinkamas XML peržiūros struktūrai!"
#. module: base_contact
#: model:process.process,name:base_contact.process_process_basecontactprocess0
@@ -215,58 +215,58 @@ msgstr ""
#. module: base_contact
#: view:res.partner.contact:0
msgid "Seq."
msgstr ""
msgstr "Seka"
#. module: base_contact
#: field:res.partner.job,extension:0
msgid "Extension"
msgstr ""
msgstr "Papildomas telefonas"
#. module: base_contact
#: field:res.partner.contact,mobile:0
msgid "Mobile"
msgstr "Mob. tel."
msgstr "Mobilus telefonas"
#. module: base_contact
#: help:res.partner.job,extension:0
msgid "Internal/External extension phone number"
msgstr ""
msgstr "Vidinis/išorinis papildomas telefono numeris"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_contacts0
msgid "People you work with."
msgstr ""
msgstr "Bendradarbiai"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Extra Information"
msgstr ""
msgstr "Papildoma informacija"
#. module: base_contact
#: view:res.partner.contact:0
#: field:res.partner.contact,job_ids:0
msgid "Functions and Addresses"
msgstr ""
msgstr "Pareigos ir adresai"
#. module: base_contact
#: field:res.partner.contact,active:0
msgid "Active"
msgstr ""
msgstr "Aktyvus"
#. module: base_contact
#: field:res.partner.job,contact_id:0
msgid "Contact"
msgstr "Kontaktai"
msgstr "Kontaktas"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_partners0
msgid "Companies you work with."
msgstr ""
msgstr "Įmonė kurioje jūs dirbate."
#. module: base_contact
#: field:res.partner.contact,partner_id:0
msgid "Main Employer"
msgstr ""
msgstr "Pagrindinis darbdavys"
#. module: base_contact
#: model:process.transition,name:base_contact.process_transition_functiontoaddress0
@@ -281,7 +281,7 @@ msgstr "Partnerių kontaktai"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Partner Contact"
msgstr "Partnerio kontaktas"
msgstr "Partnerio kontaktai"
#. module: base_contact
#: model:process.node,name:base_contact.process_node_partners0
@@ -297,12 +297,12 @@ msgstr "Adresai"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_addresses0
msgid "Working and private addresses."
msgstr ""
msgstr "Darbo ir asmeninis adresai."
#. module: base_contact
#: field:res.partner.contact,name:0
msgid "Last Name"
msgstr ""
msgstr "Pavardė"
#. module: base_contact
#: field:res.partner.job,state:0
@@ -313,22 +313,22 @@ msgstr "Būsena"
#: view:res.partner.contact:0
#: view:res.partner.job:0
msgid "General"
msgstr "Bendras"
msgstr "Bendrasis"
#. module: base_contact
#: selection:res.partner.job,state:0
msgid "Past"
msgstr ""
msgstr "Buvęs"
#. module: base_contact
#: view:res.partner.contact:0
msgid "General Information"
msgstr "Bendra informacija"
msgstr "Bendroji informacija"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_function0
msgid "Jobs at a same partner address."
msgstr ""
msgstr "Darbai su to paties partnerio adresu."
#. module: base_contact
#: field:res.partner.job,name:0
@@ -348,7 +348,7 @@ msgstr ""
#. module: base_contact
#: field:res.partner.contact,website:0
msgid "Website"
msgstr "Interneto svetainė"
msgstr "Svetainė"
#. module: base_contact
#: field:res.partner.contact,birthdate:0
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board
+7
View File
@@ -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):
+3 -3
View File
@@ -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
+15 -1
View File
@@ -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):
+5 -5
View File
@@ -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
+360 -330
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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 = {
+1 -1
View File
@@ -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 = {
+1 -1
View File
@@ -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 = {
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document
+10 -10
View File
@@ -7,13 +7,13 @@ 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: 2010-02-14 11:31+0000\n"
"Last-Translator: Paulius Sladkevičius <Unknown>\n"
"PO-Revision-Date: 2010-07-21 07:35+0000\n"
"Last-Translator: Giedrius Slavinskas <giedrius.slavinskas@gmail.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:15+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr
@@ -31,7 +31,7 @@ msgstr "Darbo laiko kategorijos"
#. module: hr
#: constraint:hr.department:0
msgid "Error! You can not create recursive departments."
msgstr "Klaida ! Jūs negalite sukurti pasikartojančių padalinių"
msgstr "Klaida! Negalima sukurti pasikartojančių padalinių."
#. module: hr
#: field:hr.employee,sinid:0
@@ -179,7 +179,7 @@ msgstr "Pavaldiniai"
#. module: hr
#: model:ir.ui.menu,name:hr.menu_hr_reporting
msgid "Reporting"
msgstr "Ataskaitos"
msgstr ""
#. module: hr
#: field:hr.department,member_ids:0
@@ -199,7 +199,7 @@ msgstr "Užpildyti kontaktine informaciją"
#. module: hr
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Netinkamas XML peržiūros architektūrai!"
#. module: hr
#: selection:hr.employee,marital:0
@@ -242,7 +242,7 @@ msgstr "Vyras"
#. module: hr
#: model:process.transition,note:hr.process_transition_employeeuser0
msgid "Create openerp user"
msgstr "Sukurti OpenERP vartotoją"
msgstr "Sukurti OpenERP naudotoją"
#. module: hr
#: view:hr.employee.category:0
@@ -366,7 +366,7 @@ msgstr "Darbovietės adresas"
#. module: hr
#: field:hr.employee,marital:0
msgid "Marital Status"
msgstr "Šeiminė padėtis"
msgstr "Šeimyninė padėtis"
#. module: hr
#: model:ir.model,name:hr.model_hr_timesheet
@@ -383,8 +383,8 @@ msgstr "Asmeninė informacija"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Objekto pavadinimas turi prasidėti su x_ ir jame negali būti specialių "
"simbolių!"
"Objekto pavadinimas turi prasidėti su x_ ir jame negali būti specialiųjų "
"ženklų!"
#. module: hr
#: view:hr.timesheet:0
+1 -2
View File
@@ -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:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+3 -5
View File
@@ -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'
-21
View File
@@ -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 = {
-11
View File
@@ -25,16 +25,5 @@
parent="menu_hr_payroll_reporting"
name="Employee Salary Statement"
type="wizard"/>
<!-- <wizard id="wizard_payroll_analysis"-->
<!-- menu="False" -->
<!-- model="account.analytic.account" -->
<!-- name="payroll.analysis" -->
<!-- string="Create Analytic Structure"/>-->
<!-- <menuitem id="menu_wizard_payroll_analysis" -->
<!-- action="wizard_payroll_analysis" -->
<!-- parent="payroll_configure" -->
<!-- name="Create Analytic Structure"-->
<!-- type="wizard"/>-->
</data>
</openerp>
+3 -3
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-07-21 03:42+0000\n"
"PO-Revision-Date: 2010-07-21 03:44+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.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-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet
@@ -444,7 +444,7 @@ msgstr "用户"
#. module: hr_timesheet
#: model:product.uom.categ,name:hr_timesheet.uom_categ_wtime
msgid "Working Time"
msgstr "工作的时间"
msgstr "工作时间"
#. module: hr_timesheet
#: view:account.analytic.account:0
+57 -65
View File
@@ -1,19 +1,19 @@
# 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.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-20 08:29+0000\n"
"PO-Revision-Date: 2010-07-21 06:01+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.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:11+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet_invoice
@@ -34,7 +34,7 @@ msgstr "强制使用特定产品"
#. module: hr_timesheet_invoice
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "在这动作定义中有无效的模块名"
msgstr "在动作定义中使用了无效的模快名。"
#. module: hr_timesheet_invoice
#: rml:account.analytic.profit:0
@@ -49,14 +49,14 @@ msgstr "可见的名称"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.invoice.account.analytic.account.cost_ledger.report,init,date1:0
msgid "Start of period"
msgstr "期初日期"
msgstr "开始会计期间"
#. module: hr_timesheet_invoice
#: help:hr.timesheet.invoice.create,init,price:0
msgid ""
"The cost of each work done will be displayed on the invoice. You probably "
"don't want to check this."
msgstr "每个工作的成本将显示在发票上.你可能不想检查它"
msgstr "每个完成工作的成本将显示在发票上. 你可能不想核对它"
#. module: hr_timesheet_invoice
#: model:ir.actions.wizard,name:hr_timesheet_invoice.hr_timesheet_invoice_create
@@ -72,7 +72,7 @@ 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 "辅助核算项草稿"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.final.invoice.create,init,time:0
@@ -83,7 +83,7 @@ msgstr "花费的时间"
#. module: hr_timesheet_invoice
#: field:account.analytic.account,amount_invoiced:0
msgid "Invoiced Amount"
msgstr "开发票金额"
msgstr "已开票金额"
#. module: hr_timesheet_invoice
#: help:account.analytic.account,to_invoice:0
@@ -91,24 +91,22 @@ msgid ""
"Check this field if you plan to automatically generate invoices based on the "
"costs in this analytic account: timesheets, expenses, ...You can configure "
"an automatic invoice rate on analytic accounts."
msgstr ""
"如果你计划自动生成发票基于成本在辅助核算项目:时间表、费用....选择这字段你能设"
"定自动发票的辅助核算项目"
msgstr "勾选此项, 如果你打算根据在辅助核算项目:时间表、费用....的花费自动生成发票. 你能设定辅助核算项的花费生成发票."
#. module: hr_timesheet_invoice
#: help:hr.timesheet.invoice.create,init,name:0
msgid "The detail of each work done will be displayed on the invoice"
msgstr "每个工作的详情将显示在发票上"
msgstr "每个完成工作的细节将显示在发票上"
#. module: hr_timesheet_invoice
#: wizard_view:hr.timesheet.invoice.account.analytic.account.cost_ledger.report,init:0
msgid "Select period"
msgstr "销售周期"
msgstr "选择会计期间"
#. module: hr_timesheet_invoice
#: rml:account.analytic.profit:0
msgid "Period to enddate"
msgstr "周期的结束日期"
msgstr "会计期间的结束日期"
#. module: hr_timesheet_invoice
#: wizard_button:hr.timesheet.invoice.create,init,create:0
@@ -118,12 +116,12 @@ msgstr "创建发票"
#. module: hr_timesheet_invoice
#: rml:account.analytic.profit:0
msgid "Period from startdate"
msgstr "周期的开始日期"
msgstr "会计期间的开始日期"
#. module: hr_timesheet_invoice
#: help:hr.timesheet.invoice.create,init,time:0
msgid "The time of each work done will be displayed on the invoice"
msgstr "每个工作完成的时间将显示在发票上"
msgstr "每个完成工作的时间将显示在发票上"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.final.invoice.create,init,balance_product:0
@@ -143,13 +141,13 @@ msgstr "你想看详情每一发票行?"
#. module: hr_timesheet_invoice
#: rml:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
msgid "Date or Code"
msgstr "日期代码"
msgstr "日期或者代码"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_hr_analytic_timesheet_open_tree
#: model:ir.ui.menu,name:hr_timesheet_invoice.menu_hr_analytic_timesheet_tree
msgid "Entries to invoice"
msgstr "凭证开发票"
msgstr "分录开发票"
#. module: hr_timesheet_invoice
#: wizard_view:account.analytic.profit,init:0
@@ -171,7 +169,7 @@ msgstr "打印"
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_open_analytic_accounts
#: model:ir.ui.menu,name:hr_timesheet_invoice.menu_action_open_analytic_accounts
msgid "Open Analytic Accounts"
msgstr "待处理辅助核算项目"
msgstr "待处理辅助核算项"
#. module: hr_timesheet_invoice
#: wizard_view:hr.timesheet.invoice.create,init:0
@@ -193,12 +191,12 @@ msgstr "销售价格表"
#. module: hr_timesheet_invoice
#: help:hr.timesheet.final.invoice.create,init,name:0
msgid "Display detail of work in the invoice line."
msgstr "显示发票行的工作详情"
msgstr "显示发票行的工作细节"
#. module: hr_timesheet_invoice
#: rml:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
msgid "J.C. or Move name"
msgstr "成本分类账或凭证名称"
msgstr "成本分录集合或凭证名称"
#. module: hr_timesheet_invoice
#: rml:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
@@ -208,7 +206,7 @@ msgstr "打印日期"
#. module: hr_timesheet_invoice
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "无效XML视图结构!"
msgstr "无效的视图结构xml文件!"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_hr_timesheet_invoice_factor_form
@@ -225,18 +223,18 @@ msgstr "理论"
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_hr_analytic_timesheet_tree_invoiced_my
#: model:ir.ui.menu,name:hr_timesheet_invoice.menu_hr_analytic_timesheet_tree_invoiced_my
msgid "My Uninvoiced Entries"
msgstr "我未开票项目"
msgstr "未开发票条目"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.final.invoice.create,init,name:0
#: wizard_field:hr.timesheet.invoice.create,init,name:0
msgid "Name of entry"
msgstr "凭证名称"
msgstr "条目名称"
#. module: hr_timesheet_invoice
#: rml:account.analytic.profit:0
msgid "Employee or Journal Name"
msgstr "员工或分类帐名称"
msgstr "员工或记录集合名称"
#. module: hr_timesheet_invoice
#: rml:account.analytic.profit:0
@@ -248,7 +246,7 @@ msgstr "货币"
msgid ""
"Complete this field only if you want to force to use a specific product. "
"Keep empty to use the real product that comes from the cost."
msgstr "如果你想强制使用特定的产品只有完成这字段如果留空使用实际产品来自成本"
msgstr "如果你想强制使用特定的产品只有填入该字段. 留空使用来自成本的实际产品"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_hr_analytic_timesheet_tree_invoiced
@@ -289,7 +287,7 @@ msgstr "状态"
#. module: hr_timesheet_invoice
#: rml:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
msgid "Period to"
msgstr "周期到"
msgstr "会计期间到"
#. module: hr_timesheet_invoice
#: help:hr.timesheet.final.invoice.create,init,balance_product:0
@@ -306,7 +304,7 @@ msgstr "成本分类账"
#. module: hr_timesheet_invoice
#: help:hr.timesheet.final.invoice.create,init,date:0
msgid "Display date in the history of works"
msgstr "显示这工作的日志日期"
msgstr "在这工作日志显示日期"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.final.invoice.create,init,date:0
@@ -327,7 +325,7 @@ msgstr "有效"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.invoice.create,init,accounts:0
msgid "Analytic Accounts"
msgstr "辅助核算项目"
msgstr "辅助核算项"
#. module: hr_timesheet_invoice
#: rml:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
@@ -342,12 +340,12 @@ msgstr "贷方"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.invoice.account.analytic.account.cost_ledger.report,init,date2:0
msgid "End of period"
msgstr "周期结束日期"
msgstr "会计期间结束"
#. module: hr_timesheet_invoice
#: rml:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
msgid "Balance"
msgstr "结余"
msgstr "差额"
#. module: hr_timesheet_invoice
#: field:account.analytic.account,to_invoice:0
@@ -372,7 +370,7 @@ msgstr "你想显示这工作发票的详细资料"
#. module: hr_timesheet_invoice
#: rml:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
msgid "Period from"
msgstr "周期从"
msgstr "会计期间从"
#. module: hr_timesheet_invoice
#: field:account.analytic.account,amount_max:0
@@ -416,7 +414,7 @@ msgstr "显示这项成本在你再开的发票"
#. module: hr_timesheet_invoice
#: wizard_view:hr.timesheet.invoice.create,init:0
msgid "Choose accounts you want to invoice"
msgstr "选择你想要开发票的科目"
msgstr "选择你想要开发票的帐目"
#. module: hr_timesheet_invoice
#: wizard_field:hr.timesheet.invoice.create,init,product:0
@@ -426,7 +424,7 @@ msgstr "产品"
#. module: hr_timesheet_invoice
#: rml:account.analytic.profit:0
msgid "%"
msgstr ""
msgstr "%"
#. module: hr_timesheet_invoice
#: field:hr_timesheet_invoice.factor,name:0
@@ -436,7 +434,7 @@ msgstr "内部名称"
#. module: hr_timesheet_invoice
#: wizard_field:account.analytic.profit,init,journal_ids:0
msgid "Journal"
msgstr "分类帐"
msgstr "记录集合"
#. module: hr_timesheet_invoice
#: rml:account.analytic.profit:0
@@ -446,13 +444,13 @@ msgstr "单位"
#. module: hr_timesheet_invoice
#: model:ir.module.module,shortdesc:hr_timesheet_invoice.module_meta_information
msgid "Invoice on analytic lines"
msgstr "辅助核算的发票"
msgstr "辅助核算明细的发票"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_pending_analytic_accounts
#: model:ir.ui.menu,name:hr_timesheet_invoice.menu_action_pending_analytic_accounts
msgid "Pending Analytic Accounts"
msgstr "未决的辅助核算项目"
msgstr "未决的辅助核算项"
#. module: hr_timesheet_invoice
#: view:account.analytic.account:0
@@ -473,7 +471,7 @@ msgstr "发票类型"
#. module: hr_timesheet_invoice
#: field:account.analytic.line,to_invoice:0
msgid "Invoicing"
msgstr "计价折扣"
msgstr "开发票"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_open_invoice_analytic_accounts
@@ -511,7 +509,7 @@ msgstr "状态"
#. module: hr_timesheet_invoice
#: field:report.analytic.account.close,date_deadline:0
msgid "Deadline"
msgstr "截止期限"
msgstr "截止日期"
#. module: hr_timesheet_invoice
#: model:ir.module.module,shortdesc:hr_timesheet_invoice.module_meta_information
@@ -538,7 +536,7 @@ msgstr "数量"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice
msgid "Lines to Invoice"
msgstr "辅助核算开发票"
msgstr "开发票"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_account_analytic_line_to_invoice
@@ -560,7 +558,7 @@ msgstr "辅助核算 - 报表"
#. module: hr_timesheet_invoice
#: field:report.account.analytic.line.to.invoice,name:0
msgid "Month"
msgstr "月"
msgstr "月份"
#. module: hr_timesheet_invoice
#: field:report.account.analytic.line.to.invoice,amount:0
@@ -581,7 +579,7 @@ msgstr "计量单位"
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_account_date_stat_my
#: model:ir.ui.menu,name:report_timesheet_invoice.menu_report_timesheet_account_date_my
msgid "My daily timesheets by account"
msgstr "我的科目每天时间表"
msgstr "按科目(项)我的每天时间表"
#. module: hr_timesheet_invoice
#: view:report_timesheet.user:0
@@ -592,18 +590,18 @@ msgstr "用户时间表"
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_account_stat_all
#: model:ir.ui.menu,name:report_timesheet_invoice.menu_report_timesheet_account_all
msgid "Timesheet by Account"
msgstr "科目时间表"
msgstr "科目(项)时间表"
#. module: hr_timesheet_invoice
#: view:report_timesheet.account:0
msgid "Timesheet by account"
msgstr "科目时间表"
msgstr "科目(项)时间表"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.act_res_users_2_report_timesheet_invoice
#: model:ir.model,name:report_timesheet_invoice.model_report_timesheet_invoice
msgid "Costs to invoice"
msgstr "成本开发票"
msgstr "成本发票"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_user_stat_my
@@ -625,12 +623,12 @@ msgstr "时间表"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.act_res_users_2_report_timehsheet_account
msgid "Timesheets per account"
msgstr "每科目时间表"
msgstr "每科目(项)时间表"
#. module: hr_timesheet_invoice
#: view:report_timesheet.invoice:0
msgid "Timesheets to invoice"
msgstr "时间表开发票"
msgstr "时间表发票"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.act_res_users_2_report_timesheet_user
@@ -641,7 +639,7 @@ msgstr "每天时间表"
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_account_date_stat_all
#: model:ir.ui.menu,name:report_timesheet_invoice.menu_report_timesheet_account_date_all
msgid "Daily Timesheet by Account"
msgstr "科目每日时间表"
msgstr "科目(项)每日时间表"
#. module: hr_timesheet_invoice
#: field:random.timesheet.lines,name:0 field:report.random.timesheet,name:0
@@ -652,7 +650,7 @@ msgstr "说明"
#: model:ir.model,name:report_timesheet_invoice.model_report_timesheet_account
#: view:report_timesheet.account:0
msgid "Timesheet per account"
msgstr "每科目时间表"
msgstr "每科目(项)时间表"
#. module: hr_timesheet_invoice
#: model:ir.module.module,shortdesc:report_timesheet.module_meta_information
@@ -667,13 +665,13 @@ msgstr "发票时间表"
#. module: hr_timesheet_invoice
#: model:ir.ui.menu,name:report_timesheet_invoice.next_id_69
msgid "This Month"
msgstr "本月"
msgstr "这月"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_account_stat_my
#: model:ir.ui.menu,name:report_timesheet_invoice.menu_report_timesheet_account_my
msgid "My timesheets by account"
msgstr "我的科目时间表"
msgstr "我的科目(项)时间表"
#. module: hr_timesheet_invoice
#: model:ir.model,name:report_timesheet_invoice.model_report_random_timesheet
@@ -698,7 +696,7 @@ msgstr "任意时间表"
#. module: hr_timesheet_invoice
#: view:report_timesheet.account.date:0
msgid "Daily timesheet by account"
msgstr "科目每日时间表"
msgstr "科目(项)每日时间表"
#. module: hr_timesheet_invoice
#: view:random.timesheet.lines:0
@@ -746,20 +744,20 @@ msgstr "每天时间表"
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_invoice_stat_my
#: model:ir.ui.menu,name:report_timesheet_invoice.menu_report_timesheet_invoice_my
msgid "My timesheets to invoice"
msgstr "我的时间表开发票"
msgstr "我的时间表发票"
#. module: hr_timesheet_invoice
#: model:ir.model,name:report_timesheet_invoice.model_report_timesheet_account_date
#: view:report_timesheet.account.date:0
msgid "Daily timesheet per account"
msgstr "科目每日时间表"
msgstr "科目(项)每日时间表"
#. module: hr_timesheet_invoice
#: model:ir.module.module,description:report_timesheet.module_meta_information
msgid ""
"Module to add timesheet views like\n"
" All Month, Timesheet By User, Timesheet Of Month, Timesheet By Account"
msgstr "模块增加时间表视图如:所有月份,用户时间表,月度时间表,科目时间表"
msgstr "模块增加时间表视图如: 所有月份, 用户时间表, 月度时间表, 科目时间表"
#. module: hr_timesheet_invoice
#: field:random.timesheet.lines,analytic_account_id:0
@@ -767,12 +765,12 @@ msgstr "模块增加时间表视图如:所有月份,用户时间表,月度时间
#: field:report_timesheet.account,account_id:0
#: field:report_timesheet.account.date,account_id:0
msgid "Analytic Account"
msgstr "辅助核算项目"
msgstr "辅助核算项"
#. module: hr_timesheet_invoice
#: field:report_timesheet.invoice,manager_id:0
msgid "Manager"
msgstr "管理者"
msgstr "经理"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_user_stat
@@ -782,8 +780,8 @@ msgstr "用户时间表(这月)"
#~ msgid ""
#~ "\n"
#~ "Module to generate invoices based on costs (human resources, "
#~ "expenses, ...).\n"
#~ "Module to generate invoices based on costs (human resources, expenses, "
#~ "...).\n"
#~ "You can define price lists in analytic account, make some theoretical "
#~ "revenue\n"
#~ "reports, eso."
@@ -794,9 +792,3 @@ msgstr "用户时间表(这月)"
#~ msgid "Invoice on analytic entries"
#~ msgstr "辅助核算凭证发票"
#~ msgid "A report on analytic lines, costs by products, months and accounts."
#~ msgstr "辅助核算明细的报表:产品成本,月度和科目"
#~ msgid "All Months"
#~ msgstr "所有月份"
+30 -30
View File
@@ -7,26 +7,26 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-20 08:29+0000\n"
"PO-Revision-Date: 2010-07-21 08:13+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.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:12+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_review0
msgid "Review end of day check day is complete"
msgstr "审查结束每天检查完成"
msgstr "完成每天检查审查结束"
#. module: hr_timesheet_sheet
#: constraint:hr_timesheet_sheet.sheet:0
msgid ""
"You can not have 2 timesheets that overlaps !\n"
"Please use the menu 'My Current Timesheet' to avoid this problem."
msgstr "你不能有两个重叠的时间表请使用菜单\"我的当前时间表\"来避免这问题"
msgstr "你不能有两个重叠的时间表! 请使用菜单\"我的当前时间表\"来避免这问题"
#. module: hr_timesheet_sheet
#: field:hr.analytic.timesheet,sheet_id:0
@@ -39,7 +39,7 @@ msgstr "表"
#. module: hr_timesheet_sheet
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "在这动作定义中有无效的模块名"
msgstr "在动作定义中使用了无效的模快名。"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,total_attendance:0
@@ -106,7 +106,7 @@ msgstr "确认"
#. module: hr_timesheet_sheet
#: selection:res.company,timesheet_range:0
msgid "Day"
msgstr "日"
msgstr "天"
#. module: hr_timesheet_sheet
#: selection:hr_timesheet_sheet.sheet,state_attendance:0
@@ -132,7 +132,7 @@ msgstr "你必须选择一个当前日期是在时间表的日期中"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet.day:0
msgid "Total Difference"
msgstr "差合计"
msgstr "差异合计"
#. module: hr_timesheet_sheet
#: model:process.transition,name:hr_timesheet_sheet.process_transition_phonecallencoding0
@@ -159,7 +159,7 @@ msgstr "允许在签出签入的差和计算时间表.如果你不想控制设
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet.day:0
msgid "Timesheet by Days"
msgstr "时间表按天"
msgstr "时间表按的多天"
#. module: hr_timesheet_sheet
#: model:process.transition,note:hr_timesheet_sheet.process_transition_confirmtimesheet0
@@ -169,7 +169,7 @@ msgstr "时间表确认结束在这周/月"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet.account,name:0
msgid "Analytic Account"
msgstr "辅助核算项目"
msgstr "辅助核算项"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet.day,total_timesheet:0
@@ -184,7 +184,7 @@ msgstr "日期从"
#. module: hr_timesheet_sheet
#: model:process.process,name:hr_timesheet_sheet.process_process_hrtimesheetprocess0
msgid "Hr Timesheet Process"
msgstr "人力资源时间表处理"
msgstr "人力资源时间表进程"
#. module: hr_timesheet_sheet
#: model:process.node,name:hr_timesheet_sheet.process_node_analyticcost0
@@ -194,7 +194,7 @@ msgstr "辅助核算成本"
#. module: hr_timesheet_sheet
#: selection:hr_timesheet_sheet.sheet,state:0
msgid "Confirmed"
msgstr "确认"
msgstr "已确认"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet.day,total_attendance:0
@@ -217,7 +217,7 @@ msgstr "时间表明细"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_timesheetline0
msgid "Encode your timesheet line"
msgstr "编码你的时间表明细"
msgstr "你的时间表明细编码"
#. module: hr_timesheet_sheet
#: model:process.transition,name:hr_timesheet_sheet.process_transition_confirmtimesheet0
@@ -237,7 +237,7 @@ msgstr "新的"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_timesheetconfirming0
msgid "Timesheet sheet confirm at the end of the period"
msgstr "时间表表确认的结束周期"
msgstr "时间表表确认的结束期间"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet.account,total:0
@@ -252,7 +252,7 @@ msgstr "时间表明细"
#. module: hr_timesheet_sheet
#: model:process.transition,note:hr_timesheet_sheet.process_transition_confirmtimesheetsheet0
msgid "Confirm timesheet at the end of the period"
msgstr "确认时间表周期的结束"
msgstr "确认时间表的结束期间"
#. module: hr_timesheet_sheet
#: selection:hr_timesheet_sheet.sheet,state_attendance:0
@@ -277,7 +277,7 @@ msgstr "周"
#. module: hr_timesheet_sheet
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "无效XML视图结构!"
msgstr "无效的视图结构xml文件!"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
@@ -288,7 +288,7 @@ msgstr "每天视图"
#: model:ir.model,name:hr_timesheet_sheet.model_hr_timesheet_sheet_sheet_account
#: model:ir.model,name:hr_timesheet_sheet.model_hr_timesheet_sheet_sheet_day
msgid "Timesheets by period"
msgstr "时间表周期"
msgstr "时间表期间"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
@@ -331,7 +331,7 @@ msgstr "在这周的发票"
#. module: hr_timesheet_sheet
#: selection:res.company,timesheet_range:0
msgid "Month"
msgstr "月"
msgstr "月份"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_drafttimesheetsheet0
@@ -383,7 +383,7 @@ msgstr "当前状态"
#. module: hr_timesheet_sheet
#: model:process.transition,name:hr_timesheet_sheet.process_transition_invoiceontimesheet0
msgid "Invoice on timesheet"
msgstr "这时间表的发票"
msgstr "时间表的发票"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_invoiceonwork0
@@ -393,7 +393,7 @@ msgstr "发票基于时间表"
#. module: hr_timesheet_sheet
#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_timesheet_sheet_sheet_by_day
msgid "Timesheet by Account"
msgstr "科目时间表"
msgstr "科目(项)时间表"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet.day,name:0
@@ -419,13 +419,13 @@ msgstr "时间表批准"
#. module: hr_timesheet_sheet
#: field:res.company,timesheet_max_difference:0
msgid "Timesheet allowed difference"
msgstr "时间表允许差"
msgstr "时间表允许差异"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
#: field:hr_timesheet_sheet.sheet,period_ids:0
msgid "Period"
msgstr "周期"
msgstr "期间"
#. module: hr_timesheet_sheet
#: selection:hr_timesheet_sheet.sheet,state:0
@@ -450,7 +450,7 @@ msgstr "时间表明细"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet.account:0
msgid "Timesheet by Accounts"
msgstr "时间表科目"
msgstr "时间表项"
#. module: hr_timesheet_sheet
#: constraint:ir.model:0
@@ -466,7 +466,7 @@ msgstr "项目管理批准的时间表"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_phonecall0
msgid "Whatever time u spent for phone call"
msgstr "无论什么时间你花费的电话呼叫"
msgstr "你花费的电话呼叫时间"
#. module: hr_timesheet_sheet
#: model:process.transition,name:hr_timesheet_sheet.process_transition_validatetimesheet0
@@ -504,14 +504,14 @@ msgstr "签出"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
msgid "By Day"
msgstr "日间"
msgstr "按天"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,total_difference:0
#: field:hr_timesheet_sheet.sheet,total_difference_day:0
#: field:hr_timesheet_sheet.sheet.day,total_difference:0
msgid "Difference"
msgstr "差别"
msgstr "差异"
#. module: hr_timesheet_sheet
#: model:ir.model,name:hr_timesheet_sheet.model_hr_timesheet_sheet_sheet
@@ -526,7 +526,7 @@ msgstr "缺席"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_confirmedtimesheet0
msgid "At the end of the period (week/month)"
msgstr "在此周期结束:周/月"
msgstr "在此期间结束周/月"
#. module: hr_timesheet_sheet
#: model:process.transition,note:hr_timesheet_sheet.process_transition_timesheetdraft0
@@ -541,7 +541,7 @@ msgstr "已创建的辅助核算成本"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet.account,invoice_rate:0
msgid "Invoice rate"
msgstr "发票率"
msgstr "发票税率"
#. module: hr_timesheet_sheet
#: model:process.transition,note:hr_timesheet_sheet.process_transition_phonecallencoding0
@@ -556,7 +556,7 @@ msgstr "你工作审查结束日期"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,account_ids:0
msgid "Analytic accounts"
msgstr "辅助核算项目"
msgstr "辅助核算项"
#. module: hr_timesheet_sheet
#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_timesheet_sheet_form_my
@@ -578,7 +578,7 @@ msgstr "当前日期"
#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_timesheet_sheet_unvalidate
#: model:ir.ui.menu,name:hr_timesheet_sheet.menu_hr_timesheet_sheet_unvalidate
msgid "Unvalidated Timesheets"
msgstr "不可用的时间表"
msgstr "不确认的时间表"
#. module: hr_timesheet_sheet
#: selection:res.company,timesheet_range:0
@@ -594,7 +594,7 @@ msgstr "合计"
#: model:ir.actions.wizard,name:hr_timesheet_sheet.act_hr_timesheet_sheet_form_department_validate
#: model:ir.ui.menu,name:hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_department_validate
msgid "My Department's Timesheet to Validate"
msgstr "批准我部门的时间表"
msgstr "确认我部门的时间表"
#~ msgid ""
#~ "\n"
+31 -30
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-20 08:31+0000\n"
"PO-Revision-Date: 2010-07-21 08:35+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.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:08+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: idea
@@ -39,12 +39,12 @@ msgstr "统计"
#: model:ir.actions.act_window,name:idea.action_idea_idea_my_idea
#: model:ir.ui.menu,name:idea.menu_idea_idea_my_idea
msgid "My Ideas"
msgstr "我的创意"
msgstr "我的构想"
#. module: idea
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "在这动作定义中有无效的模块名"
msgstr "在动作定义中使用了无效的模快名。"
#. module: idea
#: selection:idea.idea,my_vote:0
@@ -57,14 +57,14 @@ msgstr "没投票"
#: model:ir.actions.act_window,name:idea.action_idea_idea_open_my
#: model:ir.ui.menu,name:idea.menu_idea_idea_open_my
msgid "My Open Ideas"
msgstr "我待处理的创意"
msgstr "我的待处理构想"
#. module: idea
#: model:ir.actions.act_window,name:idea.action_idea_idea
#: model:ir.ui.menu,name:idea.menu_ideas
#: model:ir.ui.menu,name:idea.menu_ideas1
msgid "Ideas"
msgstr "创意"
msgstr "构想"
#. module: idea
#: field:idea.category,child_ids:0
@@ -74,19 +74,19 @@ msgstr "子分类"
#. module: idea
#: view:idea.idea:0
msgid "New Idea"
msgstr "新的创意"
msgstr "新的构想"
#. module: idea
#: model:ir.actions.act_window,name:idea.action_idea_category_tree
#: model:ir.ui.menu,name:idea.menu_idea_category_tree
msgid "Ideas by Categories"
msgstr "创意分类"
msgstr "构想分类"
#. module: idea
#: field:idea.vote,score:0
#: field:idea.vote.stat,score:0
msgid "Score"
msgstr "得分"
msgstr "评分"
#. module: idea
#: selection:idea.idea,state:0
@@ -96,7 +96,7 @@ msgstr "草稿"
#. module: idea
#: model:ir.actions.act_window,name:idea.action_idea_vote
msgid "Idea's vote"
msgstr "创意投票"
msgstr "构想投票"
#. module: idea
#: model:ir.actions.act_window,name:idea.action_idea_vote_stat
@@ -107,17 +107,17 @@ msgstr "统计投票"
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr "对象名必须要以X_开头并且不能含有特殊字符!"
msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
#. module: idea
#: model:ir.model,name:idea.model_idea_category
msgid "Category for an idea"
msgstr "创意分类"
msgstr "构想分类"
#. module: idea
#: model:ir.module.module,shortdesc:idea.module_meta_information
msgid "Idea Manager"
msgstr "创意管理"
msgstr "构想管理"
#. module: idea
#: model:ir.ui.menu,name:idea.menu_idea_vote_stat
@@ -156,17 +156,17 @@ msgstr "一般"
#. module: idea
#: model:ir.ui.menu,name:idea.menu_reporting
msgid "Reporting"
msgstr "内部报表"
msgstr "报表"
#. module: idea
#: model:ir.model,name:idea.model_idea_vote_stat
msgid "Idea Votes Statistics"
msgstr "创意投票统计"
msgstr "构想投票统计"
#. module: idea
#: model:ir.model,name:idea.model_idea_vote
msgid "idea.vote"
msgstr "创意投票"
msgstr "构想投票"
#. module: idea
#: field:idea.comment,user_id:0
@@ -203,7 +203,7 @@ msgstr "我的投票"
#. module: idea
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "无效XML视图结构!"
msgstr "无效的视图结构xml文件!"
#. module: idea
#: view:idea.vote:0
@@ -220,14 +220,15 @@ msgid ""
"managers can obtain an easy view on best ideas from all the users. Once "
"installed, check the menu 'Ideas' in the 'Tools' main menu."
msgstr ""
"这模块允许你在创新的企业里简单和有效地使用.它允许每个人去表达不同的主题,其他用户能评价这些创意和对特定的创意进行投票.每个创意所得投票决定得分.\n"
"管理人员可以很容易得到所有用户创意.一旦安装,在工具主菜单查看创意菜单."
"这模块允许你在企业创新里简单和有效地使用.\r\n"
"它允许每个人对不同注意表达构想, 其它用户能评价这些构想和对具体的构想进行投票. 每个构想根据不同投票决定得分.\r\n"
"管理人员可以很容易得到所有用户对构想的评价."
#. module: idea
#: field:idea.comment,create_date:0
#: field:idea.idea,create_date:0
msgid "Creation date"
msgstr "建立日期"
msgstr "创建日期"
#. module: idea
#: field:idea.idea,count_votes:0
@@ -242,13 +243,13 @@ msgstr "投票数"
#. module: idea
#: model:ir.model,name:idea.model_idea_idea
msgid "idea.idea"
msgstr "创意"
msgstr ""
#. module: idea
#: model:ir.actions.act_window,name:idea.action_idea_idea_draft_my
#: model:ir.ui.menu,name:idea.menu_idea_idea_draft_my
msgid "My Draft Ideas"
msgstr "我的创意草稿"
msgstr "我的构想草稿"
#. module: idea
#: field:idea.idea,vote_ids:0
@@ -266,7 +267,7 @@ msgstr "坏"
#: view:idea.idea:0
#: model:ir.ui.menu,name:idea.menu_idea_idea
msgid "All Ideas"
msgstr "所有创意"
msgstr "所有构想"
#. module: idea
#: view:idea.comment:0
@@ -284,12 +285,12 @@ msgstr "评论数"
#. module: idea
#: field:idea.idea,title:0
msgid "Idea Summary"
msgstr "创意摘要"
msgstr "构想摘要"
#. module: idea
#: view:idea.category:0
msgid "Category of ideas"
msgstr "创意分类"
msgstr "构想分类"
#. module: idea
#: field:idea.category,summary:0
@@ -301,13 +302,13 @@ msgstr "摘要"
#: model:ir.actions.act_window,name:idea.action_idea_idea_open
#: model:ir.ui.menu,name:idea.menu_idea_idea_open
msgid "Open Ideas"
msgstr "待处理的创意"
msgstr "待处理的构想"
#. module: idea
#: view:idea.idea:0
#: view:idea.vote.stat:0
msgid "vote_stat of ideas"
msgstr "开始对创意投票"
msgstr "开始对构想投票"
#. module: idea
#: view:idea.comment:0
@@ -337,7 +338,7 @@ msgstr "工具"
#: field:idea.vote,idea_id:0
#: field:idea.vote.stat,idea_id:0
msgid "Idea"
msgstr "创意"
msgstr "构想"
#. module: idea
#: selection:idea.idea,my_vote:0
@@ -364,7 +365,7 @@ msgstr "取消"
#. module: idea
#: view:idea.idea:0
msgid "Close"
msgstr "结束"
msgstr "关闭"
#. module: idea
#: field:idea.idea,vote_avg:0
@@ -379,7 +380,7 @@ msgstr "待处理"
#. module: idea
#: help:idea.idea,description:0
msgid "Content of the idea"
msgstr "这创意的内容"
msgstr "构想的内容"
#~ msgid "Accepted"
#~ msgstr "已同意"
+128 -62
View File
@@ -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.
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".'
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:42+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: lt\n"
+51 -50
View File
@@ -7,13 +7,13 @@ 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: 2010-07-18 15:01+0000\n"
"PO-Revision-Date: 2010-07-21 18:55+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\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-07-21 03:42+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp
@@ -33,9 +33,9 @@ msgid ""
"under 0. You should probably not use this option, we suggest using a MTO "
"configuration on products."
msgstr ""
"Wyzwala automatyczne nabycie dla wszystkich produktów o zapasie poniżej 0. "
"Prawdopodobnie nie powinieneś stosować tej opcji. Sugerujemy ustawienie "
"konfiguracji produktów 'Na zamówienie'."
"Wyzwala automatyczne zapotrzebowanie dla wszystkich produktów o zapasie "
"poniżej 0. Prawdopodobnie nie powinieneś stosować tej opcji. Sugerujemy "
"ustawienie konfiguracji produktów 'Na zamówienie'."
#. module: mrp
#: model:ir.module.module,shortdesc:mrp.module_meta_information
@@ -62,7 +62,7 @@ msgstr "Oblicz tylko reguły minimalnych zapasów"
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action5
#: model:ir.ui.menu,name:mrp.menu_mrp_procurement_action5
msgid "Exceptions Procurements"
msgstr "Wyjątki nabycia"
msgstr "Wyjątki zapotrzebowania"
#. module: mrp
#: view:mrp.routing.workcenter:0
@@ -173,7 +173,7 @@ msgstr "Pytaj o nowe produkty"
#. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_reordering
msgid "Automatic Procurements"
msgstr "Automatyczne nabycia"
msgstr "Automatyczne zapotrzebowania"
#. module: mrp
#: wizard_field:change_production_qty,confirm,product_qty:0
@@ -257,7 +257,7 @@ msgstr "Zestaw / Fantom"
#. module: mrp
#: wizard_view:mrp.procurement.compute,init:0
msgid "This wizard will schedule procurements."
msgstr "Ten kreator zaplanuje nabycia."
msgstr "Ten kreator zaplanuje zapotrzebowania."
#. module: mrp
#: field:mrp.bom,position:0
@@ -299,7 +299,7 @@ msgid ""
"procurement to bring the virtual stock to the Max Quantity."
msgstr ""
"Kiedy zapas wirtualny będzie poniżej ilości minimalnej, to Open ERP "
"wygeneruje nabycie, aby zapas wzrósł do wartości maksymalnej."
"wygeneruje zapotrzebowanie, aby zapas wzrósł do wartości maksymalnej."
#. module: mrp
#: model:process.transition,name:mrp.process_transition_stockmts0
@@ -330,7 +330,7 @@ msgstr "Nie pilne"
#. module: mrp
#: model:process.transition,name:mrp.process_transition_procureserviceproduct0
msgid "Procure Service Product"
msgstr "Nabycie usługi"
msgstr "Zapotrzebowanie na usługę"
#. module: mrp
#: view:mrp.production:0
@@ -341,7 +341,7 @@ msgstr "Potwierdź produkcję"
#: model:process.node,name:mrp.process_node_purchaseprocure0
#: field:stock.move,procurements:0
msgid "Procurements"
msgstr "Nabycia"
msgstr "Zapotrzebowania"
#. module: mrp
#: model:ir.model,name:mrp.model_mrp_production_product_line
@@ -361,7 +361,7 @@ msgstr "Szczegóły"
#. module: mrp
#: model:process.process,name:mrp.process_process_procurementprocess0
msgid "Procurement Process"
msgstr "Proces nabycia"
msgstr "Proces zapotrzebowania"
#. module: mrp
#: field:mrp.production,date_planned_date:0
@@ -431,7 +431,7 @@ msgstr "Drukuj cenę produktu"
#. module: mrp
#: wizard_view:product.product.procurement,done:0
msgid "Make Procurement"
msgstr "Wykonaj nabycie"
msgstr "Wykonaj zapotrzebowanie"
#. module: mrp
#: field:mrp.bom.revision,date:0
@@ -494,7 +494,7 @@ msgstr "JS produktu"
#. module: mrp
#: model:process.transition,name:mrp.process_transition_productionprocureproducts0
msgid "Production Procure Products"
msgstr "Nabycie z produkcji"
msgstr "Zapotrzebowanie produktów z produkcji"
#. module: mrp
#: model:process.process,name:mrp.process_process_serviceproductprocess0
@@ -504,7 +504,7 @@ msgstr "Proces usługi"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_purchaseprocure0
msgid "Procurement convert into the draft purchase order."
msgstr "Nabycie zmienia się w projekt zamówienia zakupu."
msgstr "Zapotrzebowanie zmienia się w projekt zamówienia zakupu."
#. module: mrp
#: field:mrp.procurement,message:0
@@ -553,7 +553,7 @@ msgstr "Czas produkcji"
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action4
#: model:ir.ui.menu,name:mrp.menu_mrp_procurement_action4
msgid "Exceptions Procurements to Fix"
msgstr "Wyjątki nabycia do poprawienia"
msgstr "Wyjątki zapotrzebowania do poprawienia"
#. module: mrp
#: selection:mrp.procurement,state:0
@@ -695,7 +695,7 @@ msgstr "Hierarchia Zest. Mat."
#. module: mrp
#: view:mrp.procurement:0
msgid "Procurement Lines"
msgstr "Pozycje nabycia"
msgstr "Pozycje zapotrzebowania"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_servicemts0
@@ -745,8 +745,8 @@ msgid ""
"This wizard will planify the procurement for this product. This procurement "
"may generate task, production orders or purchase orders."
msgstr ""
"Ten kreator zaplanuje nabycie dla tego produktu. Nabycie może wygenerować "
"zadania, zamówienia produkcji lub zamówienia zakupu."
"Ten kreator zaplanuje zapotrzebowanie dla tego produktu. Zapotrzebowanie "
"może wygenerować zadania, zamówienia produkcji lub zamówienia zakupu."
#. module: mrp
#: model:process.node,note:mrp.process_node_mts0
@@ -761,7 +761,7 @@ msgstr "Zamówienie usług Rejestrowanych"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_minimumstockprocure0
msgid "From minimum stock rules, it goes for procure product."
msgstr "Z reguł minimalnych zapasów jest tworzone nabycie produktu."
msgstr "Z reguł minimalnych zapasów jest tworzone zapotrzebowanie produktu."
#. module: mrp
#: model:process.node,name:mrp.process_node_stockproduct0
@@ -918,7 +918,7 @@ msgstr "Jednostka miary wielkości"
#. module: mrp
#: view:mrp.procurement:0
msgid "Run procurement"
msgstr "Uruchom nabycie"
msgstr "Uruchom zapotrzebowanie"
#. module: mrp
#: help:res.company,schedule_range:0
@@ -927,9 +927,9 @@ msgid ""
"procurements. All procurement that are not between today and today+range are "
"skipped for futur computation."
msgstr ""
"To jest rama czasowa do obliczeń planisty. Wszystkie babycia, które nie "
"znajdują się dzisiaj a dzisiaj + zakres planowania są pomijane w "
"obliczeniach."
"To jest rama czasowa do obliczeń planisty. Wszystkie zapotrzebowania, "
"których daty są poza zakresem od (dzisiaj) do (dzisiaj + zakres planowania) "
"są pomijane w obliczeniach."
#. module: mrp
#: field:mrp.workcenter,time_efficiency:0
@@ -969,7 +969,7 @@ msgstr "Jednostka miary"
#. module: mrp
#: field:mrp.procurement,procure_method:0
msgid "Procurement Method"
msgstr "Metoda nabycia"
msgstr "Metoda zpotrzebowania"
#. module: mrp
#: field:mrp.workcenter,costs_journal_id:0
@@ -986,7 +986,7 @@ msgstr "Na tydzień"
#: wizard_button:mrp.procurement.compute.all,init,compute:0
#: wizard_button:mrp.procurement.orderpoint.compute,init,compute:0
msgid "Compute Procurements"
msgstr "Oblicz nabycia"
msgstr "Oblicz zapotrzebowania"
#. module: mrp
#: model:process.node,note:mrp.process_node_stock0
@@ -1001,7 +1001,7 @@ msgstr "Zatwierdź"
#. module: mrp
#: model:process.transition,name:mrp.process_transition_purchaseprocure0
msgid "Procurement Purchase"
msgstr "Nabycie przez zakup"
msgstr "Zapotrzebowanie zakupu"
#. module: mrp
#: field:mrp.production.workcenter.line,hour:0
@@ -1092,7 +1092,7 @@ msgstr "Strefa magazynowa"
#: model:ir.actions.act_window,name:mrp.mrp_procurement_new
#: model:ir.ui.menu,name:mrp.menu_mrp_procurement_new
msgid "New Procurement"
msgstr "Nowe nabycie"
msgstr "Nowe zapotrzebowanie"
#. module: mrp
#: rml:mrp.production.order:0
@@ -1120,7 +1120,7 @@ msgstr "Planowana data"
#. module: mrp
#: model:process.node,note:mrp.process_node_purchaseprocure0
msgid "Procurement orders"
msgstr "Zamówienia nabycia"
msgstr "Zapotrzebowania"
#. module: mrp
#: model:process.node,name:mrp.process_node_mts0
@@ -1146,12 +1146,12 @@ msgstr "Ilość maks."
#: model:ir.model,name:mrp.model_mrp_procurement
#: view:mrp.procurement:0
msgid "Procurement"
msgstr "Nabycie"
msgstr "Zapotrzebowanie"
#. module: mrp
#: model:ir.actions.wizard,name:mrp.product_procurement_wizard
msgid "Procurement Request"
msgstr ""
msgstr "Utwórz zapotrzebowanie"
#. module: mrp
#: model:ir.actions.wizard,name:mrp.wizard_price
@@ -1161,7 +1161,7 @@ msgstr "Struktura kosztów produktu"
#. module: mrp
#: model:process.transition,name:mrp.process_transition_minimumstockprocure0
msgid "Minimum Stock Procure"
msgstr "Nabycie zapasu minimalnego"
msgstr "Zapotrzebowanie z zapasu minimalnego"
#. module: mrp
#: help:res.company,po_lead:0
@@ -1191,7 +1191,7 @@ msgstr ""
#. module: mrp
#: model:process.node,note:mrp.process_node_productionorder0
msgid "Procurement for raw materials."
msgstr "Nabycie dla materiałów do produkcji."
msgstr "Zapotrzebowanie na materiały do produkcji."
#. module: mrp
#: view:mrp.procurement:0
@@ -1203,7 +1203,7 @@ msgstr "Uwaga"
#. module: mrp
#: model:process.transition,name:mrp.process_transition_procurestockableproduct0
msgid "Procure Stockable Product"
msgstr ""
msgstr "Zapotrzebowanie na produkty rejestrowane"
#. module: mrp
#: field:mrp.bom,method:0
@@ -1231,7 +1231,7 @@ msgstr "Aktywne"
#. module: mrp
#: model:process.node,name:mrp.process_node_procureproducts0
msgid "Procure Products"
msgstr "Nabądź produkty"
msgstr "Zapotrzebowanie na produkty"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_property_action
@@ -1267,7 +1267,8 @@ msgstr "Definiuj strukturę produktu z produktami ubocznymi lub komponentami."
msgid ""
"Procurement is created if the product quantity is lower than the minimum "
"limit."
msgstr "Nabycie jest tworzone gdy ilość produktu jest niższa niż minimum."
msgstr ""
"Zapotrzebowanie jest tworzone, gdy ilość produktu jest niższa niż minimum."
#. module: mrp
#: field:mrp.procurement,date_close:0
@@ -1309,7 +1310,7 @@ msgstr "Wykonano"
#. module: mrp
#: help:stock.warehouse.orderpoint,qty_multiple:0
msgid "The procurement quantity will by rounded up to this multiple."
msgstr "Ilość nabycia będzie zaokrąglona do tej wielokrotności."
msgstr "Ilość zapotrzebowania będzie zaokrąglona do tej wielokrotności."
#. module: mrp
#: field:stock.warehouse.orderpoint,logic:0
@@ -1327,7 +1328,7 @@ msgstr ""
#. module: mrp
#: model:process.node,note:mrp.process_node_procureproducts0
msgid "Central document to procure products"
msgstr "Centralny dokument do nabycia produktów"
msgstr "Centralny dokument na zapotrzebowanie produktów"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_production_action3
@@ -1389,7 +1390,7 @@ msgid ""
"Reference of the document that created this procurement.\n"
"This is automatically completed by Open ERP."
msgstr ""
"Oznaczenie dokumentu, który utworzył to nabycie\n"
"Oznaczenie dokumentu, który utworzył to zapotrzebowanie\n"
"Jest automatycznie wypełniane przez OpenERP."
#. module: mrp
@@ -1457,8 +1458,8 @@ msgid ""
"If you encode manually a procurement, you probably want to use a make to "
"order method."
msgstr ""
"Jeśli wprowadziłeś nabycie ręcznie, to prawdopodobnie chcesz zastosowac "
"metodę 'Na zamówienie'."
"Jeśli wprowadziłeś zapotrzebowanie ręcznie, to prawdopodobnie chcesz "
"zastosować metodę 'Na zamówienie'."
#. module: mrp
#: rml:mrp.production.order:0
@@ -1495,7 +1496,7 @@ msgstr ""
#. module: mrp
#: model:process.transition,note:mrp.process_transition_procurestockableproduct0
msgid "if Product type is Stockable in procurement order"
msgstr "Jeśli w zamówieniu nabycia produkt jest typu Rejestrowany."
msgstr "Jeśli w zapotrzebowaniu produkt jest typu Rejestrowany."
#. module: mrp
#: model:ir.model,name:mrp.model_mrp_production_workcenter_line
@@ -1582,7 +1583,7 @@ msgstr "Kategorie właściwości"
#: model:ir.actions.wizard,name:mrp.wiz_mrp_proc1
#: model:ir.ui.menu,name:mrp.menu_wiz_mrp_proc1
msgid "Compute Procurements Only"
msgstr "Oblicz tylko nabycia"
msgstr "Oblicz tylko zapotrzebowania"
#. module: mrp
#: field:mrp.production,product_uos_qty:0
@@ -1604,7 +1605,7 @@ msgstr "Ważne do"
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action11
#: model:ir.ui.menu,name:mrp.menu_mrp_procurement_action11
msgid "Temporary Procurement Exceptions"
msgstr "Tymczasowe wyjątki nabycia"
msgstr "Tymczasowe wyjątki zapotrzebowania"
#. module: mrp
#: field:mrp.bom,date_start:0
@@ -1711,7 +1712,7 @@ msgstr "Liczba godzin"
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action
#: model:ir.ui.menu,name:mrp.menu_mrp_procurement_action
msgid "Procurement Orders"
msgstr "Zamówienia nabycia"
msgstr "Zapotrzebowania"
#. module: mrp
#: model:ir.model,name:mrp.model_mrp_property
@@ -1809,7 +1810,7 @@ msgstr "Normalne"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_productionprocureproducts0
msgid "When any procuere products, it comes into the prpcurement orders"
msgstr "Wszystkie nabycia produktów stają się zamówieniami nabycia"
msgstr "Kiedy produkt jest potrzebny, to powstaje zapotrzebowanie"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_production_action2
@@ -1820,7 +1821,7 @@ msgstr "Zamówienia produkcji do rozpoczęcia"
#. module: mrp
#: view:mrp.procurement:0
msgid "Procurement Reason"
msgstr "Powód nabycia"
msgstr "Powód zapotrzebowania"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_billofmaterialrouting0
@@ -1848,7 +1849,7 @@ msgstr "Zestawienia materiałowe"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_procureserviceproduct0
msgid "In procurement order, if product type is service"
msgstr "W zamówieniach nabycia, jeśli typ produktu jest Usługa"
msgstr "W zapotrzebowaniach, jeśli typ produktu jest Usługa"
#. module: mrp
#: selection:mrp.procurement,procure_method:0
@@ -1939,7 +1940,7 @@ msgstr "Produkowanie"
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action3
#: model:ir.ui.menu,name:mrp.menu_mrp_procurement_action3
msgid "Unscheduled procurements"
msgstr "Nabycia nie zaplanowane"
msgstr "Zapotrzebowania nie zaplanowane"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_bom_tree_action
@@ -1960,7 +1961,7 @@ msgstr "Czas czyszczenia w godzinach"
#. module: mrp
#: view:mrp.procurement:0
msgid "Procurement Details"
msgstr "Szczegóły nabycia"
msgstr "Szczegóły zapotrzebowania"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_bom0
+6
View File
@@ -204,6 +204,7 @@
<field name="view_type">form</field>
<field name="view_id" ref="mrp_workcenter_tree_view"/>
<field name="search_view_id" ref="view_mrp_workcenter_search"/>
<field name="help">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.</field>
</record>
<!--
@@ -278,6 +279,7 @@
<field name="res_model">mrp.routing</field>
<field name="view_type">form</field>
<field name="view_id" ref="mrp_routing_tree_view"/>
<field name="help">Routings define the assembly operations to be done in work centers for manufacturing a certain product. They are usually attached to bills of materials which will define the assembly of products required for manufacture or for finished products.</field>
</record>
<!-- <menuitem name="Routings" id="menu_mrp_routing_and_workcenters" parent="mrp.menu_mrp_bom" groups="base.group_extended"
sequence="100" />-->
@@ -398,6 +400,7 @@
<field name="view_type">form</field>
<field name="domain">[('bom_id','=',False)]</field>
<field name="search_view_id" ref="view_mrp_bom_filter"/>
<field name="help">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.</field>
</record>
<record id="mrp_bom_form_action2" model="ir.actions.act_window">
<field name="name">Bill of Material Components</field>
@@ -405,6 +408,7 @@
<field name="res_model">mrp.bom</field>
<field name="view_type">form</field>
<field name="domain">[('bom_id','!=',False)]</field>
<field name="help">Bills of materials Components are components and sub-product used to create master bills of materials.</field>
</record>
<!-- BOM menus -->
@@ -762,6 +766,7 @@
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_production_filter"/>
<field name="context">{'search_default_Current':1}</field>
<field name="help">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.</field>
</record>
<menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_manufacturing" sequence="1"/>
@@ -772,6 +777,7 @@
<field name="view_type">form</field>
<field name="view_mode">gantt,tree,form,calendar,graph</field>
<field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
<field name="help">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.</field>
</record>
<record id="mrp_production_action2" model="ir.actions.act_window">
@@ -109,8 +109,7 @@
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_report_mrp_production_order_tree"/>
<field name="search_view_id" ref="view_report_mrp_production_order_filter"/>
<field name="context">{'search_default_Product': 1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'search_default_Product': 1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<record model="ir.actions.act_window.view" id="action_report_mrp_production_order_tree">
+2
View File
@@ -49,6 +49,7 @@
<field name="res_model">report.workcenter.load</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="help">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).</field>
</record>
<menuitem id="next_id_77" name="Reporting"
parent="base.menu_mrp_root" sequence="49"/>
@@ -100,6 +101,7 @@
<field name="res_model">report.mrp.inout</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="help">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).</field>
</record>
<menuitem action="action_report_in_out_picking_tree" id="menu_report_in_out_picking" parent="next_id_77"/>
@@ -194,6 +194,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,gantt,calendar,graph</field>
<field name="search_view_id" ref="view_mrp_production_workcenter_form_view_filter"/>
<field name="help">Work Orders are manufacturing operations required to produce or assemble products. The different work orders will have different impacts on the costs of manufacture and planning depending on the available workload.</field>
</record>
<record model="ir.actions.act_window" id="mrp_production_wc_action_planning">
@@ -203,6 +204,7 @@
<field name="view_type">form</field>
<field name="domain">[('production_state','in',('ready','confirmed','in_production'))]</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="help">To manufacture or assemble products, as well as using raw materials and finished product you must also handle manufacturing operations. Manufacturing operations are often called work orders. The different operations will have different impacts on the costs of manufacture and planning depending on the available workload.</field>
</record>
-1
View File
@@ -22,7 +22,6 @@
import pos
import account_bank_statement
import pos_account_bank_statement
import wizard
import report
+2 -1
View File
@@ -67,6 +67,7 @@ Main features :
# 'pos_wizard.xml',
'pos_view.xml',
'report/report_pos_order_view.xml',
'report/report_cash_register_view.xml',
'pos_sequence.xml',
'posrule_data.xml',
'pos_data.xml',
@@ -76,7 +77,7 @@ Main features :
'statement_data.xml',
],
'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml'],
'test':['test/pos_test.yml',],
# 'test':['test/pos_test.yml',],
'installable': True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+50 -214
View File
@@ -20,13 +20,13 @@
#
##############################################################################
from osv import osv, fields
import time
from osv import osv
from osv import fields
from mx import DateTime
from decimal import Decimal
from tools.translate import _
class account_journal(osv.osv):
_inherit = 'account.journal'
@@ -34,230 +34,66 @@ class account_journal(osv.osv):
'auto_cash': fields.boolean('Automatic Opening', help="This field authorize the automatic creation of the cashbox"),
'special_journal':fields.boolean('Special Journal', help="Will put all the orders in waiting status till being accepted"),
'check_dtls': fields.boolean('Check Details', help="This field authorize Validation of Cashbox without checking ending details"),
'statement_sequence_id': fields.many2one('ir.sequence', 'Statement Sequence', \
help="The sequence used for statement numbers in this journal."),
}
'journal_users': fields.many2many('res.users','pos_journal_users','journal_id','user_id','Users'),
}
_defaults = {
'check_dtls': lambda *a:True,
'auto_cash': lambda *a:True,
}
}
account_journal()
class singer_statement(osv.osv):
""" Singer Statements """
_name = 'singer.statement'
_description = 'Statement'
def _sub_total(self, cr, uid, ids, name, arg, context=None):
""" Calculates Sub total"
@param name: Names of fields.
@param arg: User defined arguments
@return: Dictionary of values.
"""
res = {}
for obj in self.browse(cr, uid, ids):
res[obj.id] = obj.pieces * obj.number
return res
def on_change_sub(self, cr, uid, ids, pieces, number,*a):
""" Calculates Sub total on change of number
@param pieces: Names of fields.
@param number:
"""
sub=pieces*number
return {'value':{'subtotal': sub or 0.0}}
_columns = {
'pieces': fields.float('Values', digits=(16,2)),
'number': fields.integer('Number'),
'subtotal': fields.function(_sub_total, method=True, string='Sub Total', type='float',digits=(16,2)),
'starting_id': fields.many2one('account.bank.statement',ondelete='cascade'),
'ending_id': fields.many2one('account.bank.statement',ondelete='cascade'),
}
singer_statement()
class account_bank_statement(osv.osv):
class account_cash_statement(osv.osv):
_inherit = 'account.bank.statement'
def _get_starting_balance(self, cr, uid, ids, name, arg, context=None):
""" Find starting balance "
@param name: Names of fields.
@param arg: User defined arguments
@return: Dictionary of values.
"""
res ={}
for statement in self.browse(cr, uid, ids):
amount_total=0.0
for line in statement.starting_details_ids:
amount_total+= line.pieces * line.number
res[statement.id]=amount_total
return res
def _equal_balance(self, cr, uid, ids, statement, context={}):
def _get_sum_entry_encoding(self, cr, uid, ids, name, arg, context=None):
""" Find encoding total of statements "
@param name: Names of fields.
@param arg: User defined arguments
@return: Dictionary of values.
"""
res2={}
for statement in self.browse(cr, uid, ids):
encoding_total=0.0
for line in statement.line_ids:
encoding_total+= line.amount
res2[statement.id]=encoding_total
return res2
def _default_journal_id(self, cr, uid, context={}):
""" To get default journal for the object"
@param name: Names of fields.
@return: journal
"""
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
journal = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('auto_cash','=',False), ('company_id', '=', company_id)])
if journal:
return journal[0]
else:
if not statement.journal_id.check_dtls:
return True
if statement.journal_id.check_dtls and (statement.balance_end != statement.balance_end_cash):
return False
else:
return True
def _user_allow(self, cr, uid, ids, statement, context={}):
res = False
uids = []
for user in statement.journal_id.journal_users:
uids.append(user.id)
if uid in uids:
res = True
return res
account_cash_statement()
class account_bank_statement_line(osv.osv):
def _default_company(self, cr, uid, context={}):
""" To get default company for the object"
@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 bank statement ids
@param context: A standard dictionary for contextual values
@return: company
"""
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
_inherit = 'account.bank.statement.line'
_columns = {
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
'balance_start': fields.function(_get_starting_balance, method=True, string='Starting Balance', type='float',digits=(16,2)),
# 'balance_start': fields.float('Starting Balance',digits=(16,2)),
# 'balance_end': fields.float('Balance',digits=(16,2)),
'state': fields.selection([('draft', 'Draft'),('confirm', 'Confirm'),('open','Open')],
'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"),
'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, string="Total of Entry encoding"),
'date':fields.datetime("Opening Date"),
'closing_date':fields.datetime("Closing Date"),
'starting_details_ids': fields.one2many('singer.statement', 'starting_id', string='Starting Details'),
'ending_details_ids': fields.one2many('singer.statement', 'ending_id', string='Ending Details'),
'name': fields.char('Name', size=64, required=True, readonly=True),
'company_id':fields.many2one('res.company', 'Company', required=True),
}
_defaults = {
'state': lambda *a: 'draft',
'name': lambda *a: '/',
'date': lambda *a:time.strftime("%Y-%m-%d %H:%M:%S"),
'journal_id': _default_journal_id,
}
def create(self, cr, uid, vals, context=None):
company_id = vals and vals.get('company_id',False)
if company_id:
open_jrnl = self.search(cr, uid, [('company_id', '=', vals['company_id']), ('journal_id', '=', vals['journal_id']), ('state', '=', 'open')])
if open_jrnl:
raise osv.except_osv('Error', u'Une caisse de type espèce est déjà ouverte')
if 'starting_details_ids' in vals:
vals['starting_details_ids'] = starting_details_ids = map(list, vals['starting_details_ids'])
for i in starting_details_ids:
if i and i[0] and i[1]:
i[0], i[1] = 0, 0
res = super(account_bank_statement, self).create(cr, uid, vals, context=context)
return res
def onchange_journal_id(self, cursor, user, statement_id, journal_id, context=None):
""" Changes balance start and starting details if journal_id changes"
@param statement_id: Changed statement_id
@param journal_id: Changed journal_id
@return: Dictionary of changed values
"""
id_s=[]
if not journal_id:
return {'value': {'balance_start': 0.0}}
balance_start=0.0
cash_obj = self.pool.get('singer.statement')
statement_obj = self.pool.get('account.bank.statement')
cursor.execute("Select a.id from account_bank_statement a where journal_id=%d and user_id=%d order by a.id desc limit 1"%(journal_id,user))
res2=cursor.fetchone()
res2=res2 and res2[0] or None
if res2:
statmt_id=statement_obj.browse(cursor,user,res2)
check_det=statmt_id.journal_id.check_dtls
if not check_det:
balance_start=statmt_id.balance_end_real or 0.0
return {'value': {'balance_start': balance_start}}
cursor.execute("Select a.id from account_bank_statement a, singer_statement s where journal_id=%d and user_id=%d order by a.id desc limit 1"%(journal_id,user))
res1=cursor.fetchone()
res1=res1 and res1[0] or None
if res1:
cursor.execute("Select sum(ss.pieces*ss.number),ss.ending_id from singer_statement ss, account_bank_statement s where ss.ending_id=s.id and s.journal_id=%d and s.user_id=%d and s.id=%d group by ss.ending_id,s.id order by s.id desc"%(journal_id,user, res1))
res = cursor.fetchone()
balance_start = res and res[0] or 0.0
cash_end=res and res[1] or None
id_s=statement_obj.browse(cursor,user,cash_end).ending_details_ids
new=[]
if id_s:
for s in id_s:
new.append(s.id)
return {'value': {'balance_start': balance_start, 'starting_details_ids':new}}
def button_open(self, cr, uid, ids, context=None):
""" Changes statement state to Running.
@return: True
"""
obj_inv = self.browse(cr, uid, ids)[0]
s_id=obj_inv.journal_id
if s_id.statement_sequence_id:
s_id=s_id.id
number = self.pool.get('ir.sequence').get_id(cr, uid, s_id)
else:
number = self.pool.get('ir.sequence').get(cr, uid,
'account.bank.statement')
self.write(cr, uid, ids, {'date':time.strftime("%Y-%m-%d %H:%M:%S"), 'state':'open', 'name':number})
return True
def button_confirm(self, cr, uid, ids, context={}):
""" Check the starting and ending detail of statement
@return: True
"""
val = 0.0
val2 = 0.0
val_statement_line = 0.0
diff = self.pool.get('res.users').browse(cr,uid,uid).company_id.max_diff or 0.0
for statement in self.browse(cr, uid, ids):
bal = statement.balance_end
bal_st=statement.balance_start
for st in statement.line_ids:
val_statement_line += st.amount
for stat in statement.starting_details_ids:
val2 += stat.subtotal
for stat in statement.ending_details_ids:
val += stat.subtotal
if statement.journal_id.check_dtls:
if Decimal(str(val)).quantize(Decimal('.001')) != (Decimal(str(val_statement_line)) + Decimal(str(val2))).quantize(Decimal('.001')):
raise osv.except_osv(_('Invalid action !'), _(' You can not confirm your cashbox, Please enter ending details, missing value matches to "%s"')%(abs(Decimal(str(val))-(Decimal(str(val_statement_line))+Decimal(str(val2))))))
self.write(cr, uid, statement.id, {'balance_end_real':Decimal(str(val_statement_line))+Decimal(str(val2)),'closing_date':time.strftime("%Y-%m-%d %H:%M:%S"),'state':'draft'})
# self.write(cr, uid, statement.id, {'balance_end_real':bal_st+val_statement_line,'closing_date':time.strftime("%Y-%m-%d %H:%M:%S"),'state':'draft'})
return super(account_bank_statement, self).button_confirm(cr, uid, ids, context={})
def button_cancel(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'draft'}, context=context)
account_bank_statement()
#class singer_account_bank_statement_line(osv.osv):
# _inherit = 'account.bank.statement.line'
# _columns = {
# 'pos_statement_id': fields.many2one('pos.order',ondelete='cascade'),
# }
#
#singer_account_bank_statement_line()
'company_id': _default_company,
}
account_bank_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+48 -32
View File
@@ -287,8 +287,8 @@ class pos_order(osv.osv):
'date_validation': fields.function(_get_date_payment, method=True, string='Validation Date', type='date', store=True),
'date_payment': fields.function(_get_date_payment2, method=True, string='Payment Date', type='date', store=True),
'date_validity': fields.date('Validity Date', required=True),
'user_id': fields.many2one('res.users', 'Connected Salesman', readonly=True),
'user_salesman_id': fields.many2one('res.users', 'Salesman', required=True),
'user_id': fields.many2one('res.users', 'Connected Salesman'),
'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True),
'sale_manager': fields.many2one('res.users', 'Salesman Manager'),
'amount_tax': fields.function(_amount_all, method=True, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'amount_total': fields.function(_amount_total, method=True, string='Total'),
@@ -298,7 +298,7 @@ class pos_order(osv.osv):
'price_type': fields.selection([
('tax_excluded','Tax excluded')
], 'Price method', required=True),
'statement_ids': fields.one2many('account.bank.statement.line','pos_statement_id','Payments'),
'statement_ids': fields.one2many('account.bank.statement.line','pos_statement_id','Payments',states={'draft': [('readonly', False)]},readonly=True),
'payments': fields.one2many('pos.payment', 'order_id', 'Order Payments', states={'draft': [('readonly', False)]}, readonly=True),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
'partner_id': fields.many2one( 'res.partner', 'Customer', change_default=True, select=1, states={'draft': [('readonly', False)], 'paid': [('readonly', False)]}),
@@ -311,8 +311,7 @@ class pos_order(osv.osv):
'pickings': fields.one2many('stock.picking', 'pos_order', 'Picking', readonly=True),
'picking_id': fields.many2one('stock.picking', 'Last Output Picking', readonly=True),
'first_name': fields.char('First Name', size=64),
'state_2': fields.function(_get_v,type='selection',selection=[('to_verify', 'To Verify'), ('accepted', 'Accepted'),
('refused', 'Refused')], string='State', readonly=True, method=True, store=True),
# 'state_2': fields.function(_get_v,type='selection',selection=[('to_verify', 'To Verify'), ('accepted', 'Accepted'),('refused', 'Refused')], string='State', readonly=True, method=True, store=True),
'note': fields.text('Internal Notes'),
'nb_print': fields.integer('Number of Print', readonly=True),
'sale_journal': fields.many2one('account.journal', 'Journal', required=True, states={'draft': [('readonly', False)]}, readonly=True, ),
@@ -355,7 +354,7 @@ class pos_order(osv.osv):
'sale_manager': lambda self, cr, uid, context: uid,
'state': lambda *a: 'draft',
'price_type': lambda *a: 'tax_excluded',
'state_2': lambda *a: 'to_verify',
# 'state_2': lambda *a: 'to_verify',
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'pos.order'),
'date_order': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'date_validity': lambda *a: (DateTime.now() + DateTime.RelativeDateTime(months=+6)).strftime('%Y-%m-%d'),
@@ -558,26 +557,26 @@ class pos_order(osv.osv):
raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!'))
return True
def button_validate(self, cr, uid, ids, *args):
""" Check the access for the sale order and update the date_validation
@return: True
"""
res_obj = self.pool.get('res.company')
try:
part_company=res_obj.browse(cr,uid,uid) and res_obj.browse(cr,uid,uid).parent_id and res_obj.browse(cr,uid,uid).parent_id.id or None
except Exception, e:
raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!'))
if part_company:
raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!'))
for order in self.browse(cr, uid, ids):
if not order.date_validation:
cr.execute("select max(date) from account_bank_statement_line where pos_statement_id=%d"%(order.id))
val=cr.fetchone()
val=val and val[0] or None
if val:
cr.execute("Update pos_order set date_validation='%s', state_2 ='%s' where id = %d"%(val, 'accepted', order.id))
return True
# def button_validate(self, cr, uid, ids, *args):
#
# """ Check the access for the sale order and update the date_validation
# @return: True
# """
# res_obj = self.pool.get('res.company')
# try:
# part_company=res_obj.browse(cr,uid,uid) and res_obj.browse(cr,uid,uid).parent_id and res_obj.browse######(cr,uid,uid).parent_id.id or None
# except Exception, e:
# raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!'))
# if part_company:
# raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!'))
# for order in self.browse(cr, uid, ids):
# if not order.date_validation:
# cr.execute("select max(date) from account_bank_statement_line where pos_statement_id=%d"%(order.id))
# val=cr.fetchone()
# val=val and val[0] or None
# if val:
# cr.execute("Update pos_order set date_validation='%s', state_2 ='%s' where id = %d"%(val, 'accepted', order.id))
# return True
def cancel_order(self, cr, uid, ids, context=None):
@@ -603,8 +602,8 @@ class pos_order(osv.osv):
if not order.num_sale and data['num_sale']:
self.write(cr,uid,order_id,{'num_sale': data['num_sale']})
ids_new=[]
if order.invoice_wanted and not order.partner_id:
raise osv.except_osv(_('Error'), _('Cannot create invoice without a partner.'))
# if order.invoice_wanted and not order.partner_id:
# raise osv.except_osv(_('Error'), _('Cannot create invoice without a partner.'))
args = {
'amount': data['amount'],
}
@@ -705,7 +704,7 @@ class pos_order(osv.osv):
product_obj= self.pool.get('product.product')
inv_ids = []
for order in self.browse(cr, uid, ids, context):
for order in self.pool.get('pos.order').browse(cr, uid, ids, context):
curr_c = order.user_salesman_id.company_id
if order.invoice_id:
inv_ids.append(order.invoice_id.id)
@@ -1072,8 +1071,8 @@ class pos_order_line(osv.osv):
else:
res[line.id]=line.price_unit*line.qty
res[line.id] = res[line.id] + tax_amount
return res
def _amount_line(self, cr, uid, ids, field_name, arg, context):
res = {}
@@ -1107,7 +1106,8 @@ class pos_order_line(osv.osv):
def onchange_product_id(self, cr, uid, ids, pricelist, product_id, qty=0, partner_id=False):
price = self.price_by_product(cr, uid, ids, pricelist, product_id, qty, partner_id)
self.write(cr,uid,ids,{'price_unit':price})
return {'value': {'price_unit': price}, 'qty': 1}
pos_stot = (price * qty)
return {'value': {'price_unit': price,'price_subtotal_incl': pos_stot}}
def onchange_subtotal(self, cr, uid, ids, discount, price, pricelist,qty,partner_id, product_id,*a):
prod_obj = self.pool.get('product.product')
@@ -1121,6 +1121,11 @@ class pos_order_line(osv.osv):
return {'value':{'discount':disc, 'price_unit':price_f}}
return {}
def onchange_dis(self, cr, uid,ids, qty, price_subtotal_incl, discount,*a):
price_sub = price_subtotal_incl
sub_total_discount = price_sub-(price_subtotal_incl*(discount*0.01))
return {'value': {'price_subtotal_incl':sub_total_discount}}
def onchange_ded(self, cr, uid,ids, val_ded,price_u,*a):
pos_order = self.pool.get('pos.order.line')
res_obj = self.pool.get('res.users')
@@ -1149,7 +1154,7 @@ class pos_order_line(osv.osv):
else:
return {'value': {'notice':'Minimum Discount','price_ded':price*discount*0.01 or 0.0 }}
else :
return {'value': {'notice':'No Discount', 'price_ded':price*discount*0.01 or 0.0 }}
return {'value': {'notice':'No Discount', 'price_ded':price*discount*0.01 or 0.0}}
_columns = {
'name': fields.char('Line Description', size=512),
'company_id':fields.many2one('res.company', 'Company', required=True),
@@ -1176,6 +1181,17 @@ class pos_order_line(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
}
# def _check_qty(self, cr, uid, ids):
# lines = self.browse(cr, uid, ids)
# for line in lines:
# if line.qty <= 0:
# return False
# return True
# _constraints = [
# (_check_qty, 'Order quantity cannot be negative or zero !', ['qty']),
# ]
def create(self, cr, user, vals, context={}):
if vals.get('product_id'):
return super(pos_order_line, self).create(cr, user, vals, context)
@@ -1,67 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
import time
import netsvc
class account_bank_statement(osv.osv):
_inherit = 'account.bank.statement'
_columns = {
'company_id':fields.many2one('res.company', 'Company', required=True),
}
_defaults = {
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
}
account_bank_statement()
class account_bank_statement_line(osv.osv):
def _default_company(self, cr, uid, context={}):
""" To get default company for the object"
@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 bank statement ids
@param context: A standard dictionary for contextual values
@return: company
"""
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
_inherit = 'account.bank.statement.line'
_columns = {
'company_id':fields.many2one('res.company', 'Company', required=True),
}
_defaults = {
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
}
account_bank_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+45 -42
View File
@@ -12,9 +12,9 @@
<field name="arch" type="xml">
<form string="Sales Order POS">
<group col="6" colspan="4">
<field name="user_salesman_id" />
<!--field name="user_salesman_id" />
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)"/>
<field name="contract_number" groups="base.group_extended"/>
<field name="contract_number" groups="base.group_extended"/> -->
</group>
<notebook colspan="4">
@@ -22,19 +22,20 @@
<field name="lines" colspan="4" nolabel="1">
<tree string="Order lines" editable="bottom">
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275" />
<field name="qty" />
<field name="qty_rfd" groups="base.group_extended"/>
<field name="qty"/>
<!--<field name="qty" on_change="onchange_qty(qty,price_unit)"/>-->
<!--field name="qty_rfd" groups="base.group_extended"/-->
<field name="discount" on_change="onchange_discount(discount,price_unit)" />
<field name="price_ded" on_change="onchange_ded(price_ded, price_unit)" />
<field name="price_ded" on_change="onchange_ded(price_ded, price_subtotal_incl,price_unit)" invisible="1"/>
<field name="price_unit" readonly="1"/>
<field name="notice"/>
<field name="serial_number"/>
<field name="notice" on_change="onchange_dis(qty,price_subtotal_incl,discount)"/>
<!--field name="serial_number"/-->
<field name="price_subtotal" />
<field name="price_subtotal_incl"/>
<field name="price_subtotal_incl" sum="Subtotal"/>
</tree>
<form string="Order lines" >
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275"/>
<field name="qty" />
<field name="qty"/>
<field name="qty_rfd" groups="base.group_extended"/>
<field name="discount" on_change="onchange_discount(discount,price_unit)" />
<field name="price_ded" on_change="onchange_ded(price_ded, price_unit)" />
@@ -47,24 +48,24 @@
<group colspan="4" col="7">
<field name="amount_tax"/>
<field name="amount_total"/>
<button name="%(action_pos_discount)d" string="D_iscount" icon="gtk-execute" type="action" states="draft"/>
<button name="dummy_button" string="Compute" icon="gtk-execute" type="object" />
<!--button name="%(action_pos_discount)d" string="D_iscount" type="action" states="draft"/>
<button name="dummy_button" string="Compute" type="object" /-->
</group>
<group colspan="4" col="9" groups="base.group_extended">
<separator colspan="4" string="Validation of the Sale"/>
<newline/>
<field name="state_2" />
<button name="button_validate"
string="Accept"
type="object"
icon="gtk-ok"
states="paid, draft"
attrs="{'invisible':[('state_2','=','accepted')]}"/>
</group>
<!-- <group colspan="4" col="9" groups="base.group_extended">-->
<!-- <separator colspan="4" string="Validation of the Sale"/>-->
<!-- <newline/>-->
<!-- <field name="state_2" />-->
<!-- <button name="button_validate"-->
<!-- string="Accept"-->
<!-- type="object"-->
<!-- icon="gtk-ok"-->
<!-- states="paid, draft"-->
<!-- attrs="{'invisible':[('state_2','=','accepted')]}"/>-->
<!-- </group>-->
<separator colspan="4" string="Actions"/>
<group colspan="4" col="6">
<field name="state"/>
<field name="state" />
<button name="%(action_pos_payment)d" string="Ma_ke Payment" icon="gtk-ok" type="action" states="draft,advance" />
<button name="%(action_report_pos_receipt)d" string="_Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/>
<button name="set_to_draft" string="Set to draft" states="paid" icon="gtk-execute" type="object" />
@@ -76,11 +77,12 @@
<page string="Order and Payment">
<group colspan="2" col="2" name="Type">
<separator string="Order Information" colspan="4"/>
<field name="user_salesman_id" />
<field name="company_id" groups="base.group_multi_company"/>
<field name="shop_id" widget="selection" />
<field name="name"/>
<field name="user_id" />
<field name="sale_manager" />
<field name="user_id" string="Salesman"/>
<!--field name="sale_manager" /-->
<field name="price_type" />
</group>
<group colspan="2" col="2" name="Type">
@@ -91,13 +93,14 @@
<field name="type_rec" colspan="4"/>
</group>
<group colspan="4">
<separator string="Invoicing" colspan="4"/>
<field name="sale_journal" domain="[('type','=','sale'),('company_id','=',company_id)]"/>
<field name="pricelist_id" domain="[('type','=','sale')]"/>
<field name="invoice_id"/>
<group colspan="2" col="4">
<button name="invoice" icon="gtk-execute" string="Create _Invoice" states="paid"/>
</group>
<!-- <separator string="Invoicing" colspan="4"/>-->
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)" invisible="1"/>
<field name="sale_journal" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
<field name="pricelist_id" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
<!-- <field name="invoice_id"/>-->
<!-- <group colspan="2" col="4">-->
<!-- <button name="invoice" icon="gtk-execute" string="Create _Invoice" states="paid"/>-->
<!-- </group>-->
</group>
<field name="statement_ids" colspan="4" nolabel="1">
@@ -172,9 +175,9 @@
</field>
</record>
<menuitem name="Point of Sale" id="menu_point_of_sale" parent="menu_point_root" sequence="1" />
<menuitem name="Daily Operations" id="menu_point_of_sale" parent="menu_point_root" sequence="3" />
<menuitem name="Sales Order" parent="menu_point_of_sale" id="menu_point_ofsale" action="action_pos_pos_form" sequence="1"/>
<menuitem name="Products" id="menu_point_of_sale_product" parent="menu_point_root" sequence="29" />
<menuitem name="Products" id="menu_point_of_sale_product" parent="menu_point_root" sequence="15" />
<menuitem action="product.product_normal_action" id="menu_pos_products" parent="menu_point_of_sale_product" sequence="2" name="Products"/>
@@ -186,7 +189,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_pos_order_tree"/>
<field name="domain">['|',('state_2','=','to_verify'),('state','=','advance')]</field>
<field name="domain">['|',('state','=','advance')]</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="view_pos_order_filter"/>
@@ -743,7 +746,7 @@
</record>
<menuitem name="Configuration" parent="menu_point_root"
id="menu_point_config_product" sequence="6"/>
id="menu_point_config_product" sequence="25"/>
<record model="ir.actions.act_window" id="action_product_input">
<field name="name">Products</field>
@@ -795,16 +798,16 @@
action="action_product_output"
id="products_for_output_operations"/>
<menuitem name="Register Management" parent="menu_point_root"
id="menu_point_config" sequence="3"/>
<!-- <menuitem name="Register Management" parent="menu_point_root"-->
<!-- id="menu_point_config" sequence="4"/>-->
<menuitem
name="Input Operations" parent="menu_point_config"
name="Input Operations" parent="menu_point_of_sale"
string="Refloat"
action="action_box_entries"
id="menu_wizard_enter_jrnl" sequence="3" />
id="menu_wizard_enter_jrnl" sequence="2" />
<menuitem
name="Output Operations" parent="menu_point_config"
name="Output Operations" parent="menu_point_of_sale"
string="Refloat"
action="action_box_out"
id="menu_wizard_enter_jrnl2" sequence="3" />
@@ -860,7 +863,7 @@
</record>
<!-- Miscelleanous Operations/Reporting -->
<menuitem name="Reporting" parent="menu_point_root" id="menu_point_rep" sequence="30"/>
<menuitem name="Reporting" parent="menu_point_root" id="menu_point_rep" sequence="20"/>
<menuitem name="Registers" parent="menu_point_rep" id="menu_point_report_register" sequence="0" />
<menuitem name="Sales" parent="menu_point_rep" id="menu_point_report_sale" sequence="1" />
+1
View File
@@ -38,5 +38,6 @@ import pos_receipt_with_remboursment
import pos_receipt_without_remboursment
import point_of_sale_report
import report_pos_order
import report_cash_register
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class report_cash_register(osv.osv):
_name = "report.cash.register"
_description = "Point of Sale Cash Register Analysis"
_auto = False
_columns ={
'date': fields.date('Create Date', readonly=True),
'year': fields.char('Year', size=4),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'state':fields.selection([('draft', 'Draft'),('confirm', 'Confirmed')],'State'),
'journal_id': fields.many2one('account.journal', 'Journal'),
'balance_start': fields.float('Opening Balance'),
'balance_end_real': fields.float('Closing Balance'),
}
_order = 'date desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_cash_register')
cr.execute("""
create or replace view report_cash_register as (
select
min(s.id) as id,
to_date(to_char(s.create_date, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
s.user_id as user_id,
s.journal_id as journal_id,
s.state as state,
s.balance_start as balance_start,
s.balance_end_real as balance_end_real,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
to_char(s.create_date, 'YYYY-MM-DD') as day
from account_bank_statement as s where s.user_id=1
group by
s.user_id,s.journal_id, s.balance_start, s.balance_end_real,s.state,to_char(s.create_date, 'dd-MM-YYYY'),
to_char(s.create_date, 'YYYY'),
to_char(s.create_date, 'MM'),
to_char(s.create_date, 'YYYY-MM-DD'))""")
report_cash_register()
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_report_cash_register_tree" model="ir.ui.view">
<field name="name">report.cash.register.tree</field>
<field name="model">report.cash.register</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Point of Sale Cash Register Analysis">
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="state" invisible="1"/>
<field name="year" invisible="1"/>
<field name="month" invisible="1"/>
<field name="day" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="balance_start" />
<field name="balance_end_real" />
</tree>
</field>
</record>
<record id="view_report_cash_register_search" model="ir.ui.view">
<field name="name">report.cash.register.search</field>
<field name="model">report.cash.register</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Point of Sale Cash Register Analysis">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Cash Analysis created last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Cash Analysis created in last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Cash Analysis created last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today"
string=" Today "
name="today"
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d'))]"
help="Cash Analysis created by today"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=',('draft'))]"/>
<filter icon="terp-camera_test"
string="Confirm"
domain="[('state','=',('confirm'))]"/>
<separator orientation="vertical"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Sales"
help="My Sales"
domain="[('user_id','=',uid)]"/>
</field>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="10" col="12">
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="action_report_cash_register_all" model="ir.actions.act_window">
<field name="name">Cash Register Analysis</field>
<field name="res_model">report.cash.register</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_report_cash_register_search"/>
<field name="context">{'search_default_today':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<menuitem action="action_report_cash_register_all" id="menu_report_cash_register_all" parent="menu_point_rep"/>
</data>
</openerp>
+36 -43
View File
@@ -28,8 +28,6 @@ class report_pos_order(osv.osv):
_auto = False
_columns ={
'date': fields.date('Date Order', readonly=True),
'date_validation': fields.date('Date Confirm', readonly=True),
'date_payment': fields.date('Date Confirm', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
@@ -41,8 +39,8 @@ class report_pos_order(osv.osv):
('advance','Advance'),
('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced'), ('cancel', 'Cancel')],
'State'),
'state_2': fields.function([('to_verify', 'To Verify'), ('accepted', 'Accepted'),
('refused', 'Refused')], string='State'),
# 'state_2': fields.function([('to_verify', 'To Verify'), ('accepted', 'Accepted'),
# ('refused', 'Refused')], string='State'),
'user_id':fields.many2one('res.users', 'Salesman', readonly=True),
'price_total':fields.float('Total Price', readonly=True),
'total_discount':fields.float('Total Discount', readonly=True),
@@ -50,53 +48,48 @@ class report_pos_order(osv.osv):
'shop_id':fields.many2one('sale.shop', 'Shop', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'product_qty':fields.float('# of Qty', readonly=True),
'product_qty':fields.integer('# of Qty', readonly=True),
'journal_id': fields.many2one('account.journal', 'Journal'),
'statement_journal_id': fields.many2one('account.journal','Cash Register'),
'delay_validation': fields.integer('Delay Validation'),
'delay_payment': fields.integer('Delay Payment'),
'date_validation': fields.date('Validation Date', required=True),
'date_payment': fields.date('Payment Date', required=True),
}
_order = 'date desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_pos_order')
cr.execute("""
create or replace view report_pos_order as (
select el.*,
(select 1) as nbr,
to_date(to_char(po.date_order, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
po.date_validation as date_validation,
po.date_payment as date_payment,
to_char(po.date_order, 'YYYY') as year,
to_char(po.date_order, 'MM') as month,
to_char(po.date_order, 'YYYY-MM-DD') as day,
(date(po.date_order)-date(po.date_validation)) as delay_validation,
(date(po.date_order)-date(po.date_payment)) as delay_payment,
po.partner_id as partner_id,
po.state as state,
po.state_2 as state_2,
po.user_id as user_id,
po.shop_id as shop_id,
po.company_id as company_id,
po.sale_journal as journal_id,
aj.id as statement_journal_id
from
pos_order as po,account_bank_statement_line absl,account_journal as aj,
( select pl.id as id,
pl.product_id as product_id,
pl.qty as product_qty,
sum(pl.qty * pl.price_unit)- sum(pl.qty * pl.price_ded) as price_total,
sum(pl.qty * pl.price_ded) as total_discount,
((sum(pl.qty * pl.price_unit)-sum(pl.qty * pl.price_ded))/sum(pl.qty)*count(pl.qty))::decimal(16,2) as average_price,
pl.order_id
from
pos_order_line as pl
left join product_template pt on (pt.id=pl.product_id)
group by
pl.id,pl.order_id, pl.qty,pl.product_id) el
where po.id = el.order_id and absl.pos_statement_id = po.id and aj.name = absl.journal_id
)
""")
select
min(l.id) as id,
count(*) as nbr,
to_date(to_char(s.date_order, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
sum(l.qty * u.factor) as product_qty,
sum(l.qty * l.price_unit) as price_total,
sum(l.qty * l.price_ded) as total_discount,
(sum(l.qty*l.price_unit)/sum(l.qty * u.factor))::decimal(16,2) as average_price,
sum(cast(to_char(date_trunc('day',s.date_validation) - date_trunc('day',s.date_order),'DD') as int)) as delay_validation,
sum(cast(to_char(date_trunc('day',s.date_payment) - date_trunc('day',s.date_order),'DD') as int)) as delay_payment,
to_char(s.date_order, 'YYYY') as year,
to_char(s.date_order, 'MM') as month,
to_char(s.date_order, 'YYYY-MM-DD') as day,
s.partner_id as partner_id,
s.state as state,
s.user_id as user_id,
s.shop_id as shop_id,
s.company_id as company_id,
s.sale_journal as journal_id,
l.product_id as product_id,
s.date_validation,
s.date_payment
from pos_order_line as l
left join pos_order s on (s.id=l.order_id)
left join product_template pt on (pt.id=l.product_id)
left join product_uom u on (u.id=pt.uom_id)
group by
to_char(s.date_order, 'dd-MM-YYYY'),to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),
to_char(s.date_order, 'YYYY-MM-DD'), s.partner_id,s.state,
s.user_id,s.shop_id,s.company_id,s.sale_journal,l.product_id,s.date_validation,
s.date_payment)""")
report_pos_order()
@@ -8,26 +8,25 @@
<field name="arch" type="xml">
<tree string="Point of Sale Analysis">
<field name="date" invisible="1"/>
<field name="date_validation" invisible="1"/>
<field name="date_payment" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="shop_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="statement_journal_id" invisible="1"/>
<!--<field name="journal_id" invisible="1"/>-->
<field name="date_validation" invisible="1"/>
<field name="date_payment" invisible="1"/>
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
<field name="nbr" sum="# of Lines"/>
<field name="product_qty" sum="# of Qty"/>
<field name="price_total" sum="Total Price"/>
<field name="average_price" sum="Average Price"/>
<field name="total_discount" sum="Total Discount"/>
<field name="average_price" avg="Average Price"/>
<field name="price_total" sum="Total Price"/>
<field name="delay_validation"/>
<field name="delay_payment"/>
<field name="state" invisible="1"/>
<!--<field name="state" invisible="1"/>-->
</tree>
</field>
</record>
@@ -58,9 +57,6 @@
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d'))]"
help="POS ordered created by today"/>
<separator orientation="vertical"/>
<filter icon="terp-dolar"
string="Accepted"
domain="[('state_2','=',('to_verify'))]" groups="base.group_extended"/>
<filter icon="terp-dolar"
string="Invoiced"
domain="[('state','=',('invoiced'))]"/>
@@ -82,16 +78,18 @@
<filter string="Customer" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<!--<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>-->
<separator orientation="vertical"/>
<filter string="Cash Register" icon="terp-folder-orange" context="{'group_by':'statement_journal_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<!--<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>-->
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="date_validation"/>
<field name="date_payment"/>
</group>
</search>
</field>
</record>
@@ -102,9 +100,9 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_report_pos_order_search"/>
<field name="context">{'search_default_today':1,'search_default_User':1}</field>
<field name="context">{'search_default_today':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<menuitem action="action_report_pos_order_all" id="menu_report_pos_order_all" parent="menu_point_rep" sequence="1"/>
</data>
</openerp>
</openerp>
@@ -17,5 +17,37 @@
"access_report_sales_by_user_pos_month","report.sales.by.user.pos.month","model_report_sales_by_user_pos_month","point_of_sale.group_pos_user",1,0,0,0
"access_report_sales_by_margin_pos","report.sales.by.margin.pos","model_report_sales_by_margin_pos","point_of_sale.group_pos_user",1,0,0,0
"access_report_sales_by_margin_pos_month","report.sales.by.margin.pos.month","model_report_sales_by_margin_pos_month","point_of_sale.group_pos_user",1,0,0,0
"access_singer_statement","singer.statement","model_singer_statement","point_of_sale.group_pos_user",1,0,0,0
"access_add_product","pos.add.product ","model_pos_add_product","point_of_sale.group_pos_user",1,0,0,0
"access_pos_confirm","pos.confirm","model_pos_confirm","point_of_sale.group_pos_user",1,0,0,0
"access_pos_discount","pos.discount","model_pos_discount","point_of_sale.group_pos_user",1,0,0,0
"access_pos_get_sale","pos.get.sale","model_pos_get_sale","point_of_sale.group_pos_user",1,0,0,0
"access_pos_close_statement","pos.open.statement","model_pos_open_statement","point_of_sale.group_pos_user",1,1,1,0
"access_pos_open_statement","pos.close.statement","model_pos_close_statement","point_of_sale.group_pos_user",1,1,1,0
"acess_pos_box_entries ","pos.box.entries ","model_pos_box_entries","point_of_sale.group_pos_user",1,0,0,0
"access_pos_box_out","pos.box.out","model_pos_box_out","point_of_sale.group_pos_user",1,0,0,0
"access_pos_details ","pos.details ","model_pos_details","point_of_sale.group_pos_user",1,0,0,0
"access_pos_sale_user","pos.sale.user","model_pos_sale_user","point_of_sale.group_pos_user",1,0,0,0
"access_pos_sale_user_today","pos.sales.user.today","model_pos_sales_user_today","point_of_sale.group_pos_user",1,0,0,0
"access_pos_sales_user_today_current_user","pos.sales.user.today.current_user","model_pos_sales_user_today_current_user","point_of_sale.group_pos_user",1,0,0,0
"access_all_closed_cashbox_of_the_day","all.closed.cashbox.of.the.day","model_all_closed_cashbox_of_the_day","point_of_sale.group_pos_user",1,0,0,0
"access_pos_receipt","pos.receipt ","model_pos_receipt","point_of_sale.group_pos_user",1,0,0,0
"access_pos_payment_report_user","pos.payment.report.user","model_pos_payment_report_user","point_of_sale.group_pos_user",1,0,0,0
"access_pos_payment_report_date ","pos.payment.report.date ","model_pos_payment_report_date","point_of_sale.group_pos_user",1,0,0,0
"access_pos_make_payment","pos.make.payment","model_pos_make_payment","point_of_sale.group_pos_user",1,1,1,0
"access_pos_scan_product","pos.scan.product","model_pos_scan_product","point_of_sale.group_pos_user",1,0,0,0
"access_pos_payment_report","pos.payment.report","model_pos_payment_report","point_of_sale.group_pos_user",1,0,0,0
"access_report_pos_order","report.pos.order","model_report_pos_order","point_of_sale.group_pos_user",1,0,0,0
"access_pos_return","pos.return","model_pos_return","point_of_sale.group_pos_user",1,0,0,0
"access_account_bank_statement","account.bank.statement","account.model_account_bank_statement","point_of_sale.group_pos_user",1,1,1,0
"access_account_bank_statement_line","account.bank.statement.line","account.model_account_bank_statement_line","point_of_sale.group_pos_user",1,1,1,0
"access_account_period","account.period","account.model_account_period","point_of_sale.group_pos_user",1,1,1,0
"access_account_fiscalyear","account.fiscalyear","account.model_account_fiscalyear","point_of_sale.group_pos_user",1,1,1,0
"access_account_cashbox_line","account.cashbox.line","account.model_account_cashbox_line","point_of_sale.group_pos_user",1,1,1,0
"access_product_product","product.product","product.model_product_product","point_of_sale.group_pos_user",1,1,1,0
"access_account_move_line","account.move.line","account.model_account_move_line","point_of_sale.group_pos_user",1,1,1,0
"access_account_move","account.move","account.model_account_move","point_of_sale.group_pos_user",1,1,1,0
"access_account_journal","account.journal","account.model_account_journal","point_of_sale.group_pos_user",1,1,1,0
"access_account_journal_view","account.journal.view","account.model_account_journal_view","point_of_sale.group_pos_user",1,1,1,0
"access_account_analytic_line","account.analytic.line","analytic.model_account_analytic_line","point_of_sale.group_pos_user",1,1,1,0
"access_account_analytic_account","account.analytic.account","analytic.model_account_analytic_account","point_of_sale.group_pos_user",1,1,1,0
"access_account_journal_column","account.journal.column","account.model_account_journal_column","point_of_sale.group_pos_user",1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
17 access_report_sales_by_user_pos_month report.sales.by.user.pos.month model_report_sales_by_user_pos_month point_of_sale.group_pos_user 1 0 0 0
18 access_report_sales_by_margin_pos report.sales.by.margin.pos model_report_sales_by_margin_pos point_of_sale.group_pos_user 1 0 0 0
19 access_report_sales_by_margin_pos_month report.sales.by.margin.pos.month model_report_sales_by_margin_pos_month point_of_sale.group_pos_user 1 0 0 0
20 access_singer_statement access_add_product singer.statement pos.add.product model_singer_statement model_pos_add_product point_of_sale.group_pos_user 1 0 0 0
21 access_pos_confirm pos.confirm model_pos_confirm point_of_sale.group_pos_user 1 0 0 0
22 access_pos_discount pos.discount model_pos_discount point_of_sale.group_pos_user 1 0 0 0
23 access_pos_get_sale pos.get.sale model_pos_get_sale point_of_sale.group_pos_user 1 0 0 0
24 access_pos_close_statement pos.open.statement model_pos_open_statement point_of_sale.group_pos_user 1 1 1 0
25 access_pos_open_statement pos.close.statement model_pos_close_statement point_of_sale.group_pos_user 1 1 1 0
26 acess_pos_box_entries pos.box.entries model_pos_box_entries point_of_sale.group_pos_user 1 0 0 0
27 access_pos_box_out pos.box.out model_pos_box_out point_of_sale.group_pos_user 1 0 0 0
28 access_pos_details pos.details model_pos_details point_of_sale.group_pos_user 1 0 0 0
29 access_pos_sale_user pos.sale.user model_pos_sale_user point_of_sale.group_pos_user 1 0 0 0
30 access_pos_sale_user_today pos.sales.user.today model_pos_sales_user_today point_of_sale.group_pos_user 1 0 0 0
31 access_pos_sales_user_today_current_user pos.sales.user.today.current_user model_pos_sales_user_today_current_user point_of_sale.group_pos_user 1 0 0 0
32 access_all_closed_cashbox_of_the_day all.closed.cashbox.of.the.day model_all_closed_cashbox_of_the_day point_of_sale.group_pos_user 1 0 0 0
33 access_pos_receipt pos.receipt model_pos_receipt point_of_sale.group_pos_user 1 0 0 0
34 access_pos_payment_report_user pos.payment.report.user model_pos_payment_report_user point_of_sale.group_pos_user 1 0 0 0
35 access_pos_payment_report_date pos.payment.report.date model_pos_payment_report_date point_of_sale.group_pos_user 1 0 0 0
36 access_pos_make_payment pos.make.payment model_pos_make_payment point_of_sale.group_pos_user 1 1 1 0
37 access_pos_scan_product pos.scan.product model_pos_scan_product point_of_sale.group_pos_user 1 0 0 0
38 access_pos_payment_report pos.payment.report model_pos_payment_report point_of_sale.group_pos_user 1 0 0 0
39 access_report_pos_order report.pos.order model_report_pos_order point_of_sale.group_pos_user 1 0 0 0
40 access_pos_return pos.return model_pos_return point_of_sale.group_pos_user 1 0 0 0
41 access_account_bank_statement account.bank.statement account.model_account_bank_statement point_of_sale.group_pos_user 1 1 1 0
42 access_account_bank_statement_line account.bank.statement.line account.model_account_bank_statement_line point_of_sale.group_pos_user 1 1 1 0
43 access_account_period account.period account.model_account_period point_of_sale.group_pos_user 1 1 1 0
44 access_account_fiscalyear account.fiscalyear account.model_account_fiscalyear point_of_sale.group_pos_user 1 1 1 0
45 access_account_cashbox_line account.cashbox.line account.model_account_cashbox_line point_of_sale.group_pos_user 1 1 1 0
46 access_product_product product.product product.model_product_product point_of_sale.group_pos_user 1 1 1 0
47 access_account_move_line account.move.line account.model_account_move_line point_of_sale.group_pos_user 1 1 1 0
48 access_account_move account.move account.model_account_move point_of_sale.group_pos_user 1 1 1 0
49 access_account_journal account.journal account.model_account_journal point_of_sale.group_pos_user 1 1 1 0
50 access_account_journal_view account.journal.view account.model_account_journal_view point_of_sale.group_pos_user 1 1 1 0
51 access_account_analytic_line account.analytic.line analytic.model_account_analytic_line point_of_sale.group_pos_user 1 1 1 0
52 access_account_analytic_account account.analytic.account analytic.model_account_analytic_account point_of_sale.group_pos_user 1 1 1 0
53 access_account_journal_column account.journal.column account.model_account_journal_column point_of_sale.group_pos_user 1 1 1 0
@@ -1,7 +1,69 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record id="pos_visa_journal" model="account.journal">
<field name="name">Visa Journal</field>
<field name="code">VIJ</field>
<field name="type">cash</field>
<field name="view_id" ref="account.account_journal_view"/>
<field name="sequence_id" ref="account.sequence_sale_journal"/>
<field model="account.account" name="default_credit_account_id" ref="account.a_sale"/>
<field model="account.account" name="default_debit_account_id" ref="account.a_sale"/>
<field name="user_id" ref="base.user_root"/>
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
<record id="pos_cash_journal" model="account.journal">
<field name="name">Cash Journal</field>
<field name="code">CAJ</field>
<field name="type">cash</field>
<field name="view_id" ref="account.account_journal_view"/>
<field name="sequence_id" ref="account.sequence_sale_journal"/>
<field model="account.account" name="default_credit_account_id" ref="account.a_sale"/>
<field model="account.account" name="default_debit_account_id" ref="account.a_sale"/>
<field name="user_id" ref="base.user_root"/>
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
<record id="pos_bankcard_journal" model="account.journal">
<field name="name">Bancontact Journal</field>
<field name="code">BACJ</field>
<field name="type">cash</field>
<field name="view_id" ref="account.account_journal_view"/>
<field name="sequence_id" ref="account.sequence_sale_journal"/>
<field model="account.account" name="default_credit_account_id" ref="account.a_sale"/>
<field model="account.account" name="default_debit_account_id" ref="account.a_sale"/>
<field name="user_id" ref="base.user_root"/>
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
<record id="account.sales_journal" model="account.journal">
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
<record id="account.refund_sales_journal" model="account.journal">
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
<record id="account.expenses_journal" model="account.journal">
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
<record id="account.refund_expenses_journal" model="account.journal">
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
<record id="account.bank_journal" model="account.journal">
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
<record id="account.check_journal" model="account.journal">
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
<record id="stock.stock_journal" model="account.journal">
<field eval="[(6,0,[ref('base.user_root')])]" name="journal_users"/>
</record>
</data>
</openerp>
+90 -456
View File
@@ -1,480 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_account_journal_form">
<field name="name">Journal</field>
<record model="ir.ui.view" id="view_account_journal_pos_user_form">
<field name="name">POS Journal</field>
<field name="model">account.journal</field>
<field name="type">form</field>
<field name="priority">10</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="invoice_sequence_id" position="after">
<field name="statement_sequence_id"/>
<field name="auto_cash"/>
<field name="check_dtls"/>
<field name="special_journal"/>
</field>
</field>
</record>
<!-- Bank Statement -->
<record id="view_bank_statement_tree" model="ir.ui.view">
<field name="name">account.bank.statement.tree</field>
<field name="model">account.bank.statement</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state in ('open');blue:state in ('draft')" string="Statement">
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="balance_end"/>
<field name="user_id"/>
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
<button type="object" string="Confirm" name="button_confirm" states="open" icon="terp-gtk-go-back-rtl"/>
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
</tree>
</field>
</record>
<record id="view_bank_statement_form2" model="ir.ui.view">
<field name="name">account.bank.statement.form</field>
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Statement">
<field name="name" select="1"/>
<field name="user_id" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" domain="[('type','=','cash'),('auto_cash','=',False)]" select="1" />
<newline/>
<field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="closing_date" select="1" attrs="{'readonly':[('state','=','confirm')]}"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<notebook colspan="4">
<page string="Starting Details">
<field name="starting_details_ids" nolabel = "1" colspan="4">
<tree string = "Starting Details" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Ending Details">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>
</form>
</field>
</page>
<page string="Ending Details">
<field name="ending_details_ids" nolabel = "1" colspan="4">
<tree string = "Ending Details" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Ending Details">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>
</form>
</field>
</page>
<page string="Entry encoding">
<field colspan="4" name="line_ids" nolabel="1">
<tree editable="bottom" string="Statement lines">
<field name="name"/>
<field name="ref"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field name="amount"/>
</tree>
<form string="Statement lines">
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field name="amount"/>
<field name="name"/>
<field name="ref"/>
<separator colspan="4" string="Notes"/>
<field colspan="4" name="note" nolabel="1"/>
</form>
</field>
</page>
</notebook>
<group col="7" colspan="4">
<field name="state" colspan="4"/>
<field name="total_entry_encoding"/>
<xpath expr="//notebook[last()]" position="inside">
<page string="Point of Sale">
<group col="6" colspan="4">
<separator colspan="6" string="Extended Configureation"/>
<field name="check_dtls"/>
<field name="auto_cash"/>
<field name="special_journal"/>
</group>
<group colspan="4">
<button name="button_dummy" states="draft" icon="gtk-execute" string="Compute"/>
<button name="button_confirm" states="open" icon="terp-gtk-go-back-rtl" string="Close CashBox" type="object"/>
<button name="button_open" states="draft" icon="terp-camera_test" string="Open CashBox" type="object"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel" groups="base.group_extended"/>
</group>
</form>
</field>
</record>
<record id="view_bank_statement_form1" model="ir.ui.view">
<field name="name">account.bank.statement.form</field>
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Statement">
<field name="name" select="1"/>
<field name="user_id" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" domain="[('type','=','cash')]" select="1" readonly="1"/>
<newline/>
<field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="closing_date" select="1" attrs="{'readonly':[('state','=','confirm')]}"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<notebook colspan="4">
<page string="Details">
<field name="ending_details_ids" nolabel = "1" colspan="4">
<tree string = "Ending Details" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Ending Details">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>
</form>
</field>
<separator colspan="4" string="Users"/>
<field name="journal_users" nolabel="1" colspan="4"/>
</page>
<page string="Entry encoding">
<field colspan="4" name="line_ids" nolabel="1">
<tree editable="bottom" string="Statement lines">
<field name="name"/>
<field name="ref"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field name="amount"/>
</tree>
<form string="Statement lines">
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field name="amount"/>
<field name="name"/>
<field name="ref"/>
<separator colspan="4" string="Notes"/>
<field colspan="4" name="note" nolabel="1"/>
</form>
</field>
</page>
</notebook>
<group col="7" colspan="4">
<field name="state" colspan="4"/>
<field name="total_entry_encoding"/>
</group>
<group colspan="4">
<button name="button_dummy" states="draft" icon="gtk-execute" string="Compute"/>
<button name="button_confirm" states="open" icon="terp-gtk-go-back-rtl" string="Close CashBox" type="object"/>
<button name="button_open" states="draft" icon="terp-camera_test" string="Open CashBox" type="object"/>
<button name="button_cancel" states="confirm" icon="gtk-cancel" string="Cancel" type="object" groups="base.group_extended"/>
</group>
</form>
</field>
</record>
<record id="action_bank_statement_tree_all" model="ir.actions.act_window">
<field name="name">My CashBoxes</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_bank_statement_tree"/>
<field name="domain">[('user_id','=',uid)]</field>
</record>
<record model="ir.actions.act_window.view" id="act_statement1_all">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_bank_statement_tree"/>
<field name="act_window_id" ref="action_bank_statement_tree_all"/>
</record>
<record model="ir.actions.act_window.view" id="act_statement2_all">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_bank_statement_form1"/>
<field name="act_window_id" ref="action_bank_statement_tree_all"/>
</record>
<!-- <menuitem action="action_bank_statement_tree_all" id="menu_statement_tree_all" parent="point_of_sale.menu_point_root" sequence="2"/-->
<!-- <menuitem action="action_bank_statement_tree_all" id="menu_statement_tree_all" parent="point_of_sale.menu_point_root" sequence="2"/>
-->
<menuitem name="Cashboxes" parent="point_of_sale.menu_point_root" id="menu_statement_tree_all" sequence="3"/>
<record id="action_bank_statement_tree1" model="ir.actions.act_window">
<field name="name">My Cashboxes to Close</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_bank_statement_tree"/>
<field name="domain">[('state','=','open'), ('user_id','=',uid)]</field>
</record>
<record model="ir.actions.act_window.view" id="act_statement1">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_bank_statement_tree"/>
<field name="act_window_id" ref="action_bank_statement_tree1"/>
</record>
<record model="ir.actions.act_window.view" id="act_statement2">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_bank_statement_form1"/>
<field name="act_window_id" ref="action_bank_statement_tree1"/>
</record>
<!-- <menuitem action="action_bank_statement_tree1" id="menu_statement_tree1" parent="menu_statement_tree_all" sequence="2"/>-->
<record id="view_bank_statement_form3" model="ir.ui.view">
<field name="name">account.bank.statement.form</field>
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Statement">
<field name="name" select="1"/>
<field name="user_id" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" domain="[('type','=','cash')]" select="1" readonly="1"/>
<newline/>
<field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="closing_date" select="1" attrs="{'readonly':[('state','=','confirm')]}"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<notebook colspan="4">
<page string="Entry encoding">
<field colspan="4" name="line_ids" nolabel="1">
<tree editable="bottom" string="Statement lines">
<field name="name"/>
<field name="ref"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field name="amount" />
</tree>
<form string="Statement lines">
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field name="amount"/>
<field name="name"/>
<field name="ref"/>
<separator colspan="4" string="Notes"/>
<field colspan="4" name="note" nolabel="1"/>
</form>
</field>
</page>
<page string="Starting Details">
<field name="balance_end" colspan="4" nolabel="1"/>
<newline/>
<field name="starting_details_ids" nolabel = "1" colspan="4">
<tree string = "Starting Details" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Starting Details">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number)"/>
<field name="subtotal"/>
</form>
</field>
</page>
<page string="Ending Details">
<field name="ending_details_ids" nolabel = "1" colspan="4">
<tree string = "Ending Details" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Ending Details">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number)"/>
<field name="subtotal"/>
</form>
</field>
</page>
</notebook>
<group col="7" colspan="4">
<field name="state" colspan="4"/>
<field name="total_entry_encoding"/>
</group>
<group colspan="4">
<button name="button_dummy" states="draft" icon="gtk-execute" string="Compute"/>
<button name="button_confirm" states="open" icon="terp-gtk-go-back-rtl" string="Close CashBox" type="object"/>
<button name="button_open" states="draft" icon="terp-camera_test" string="Open CashBox" type="object"/>
<button name="button_cancel" states="confirm" icon="gtk-cancel" string="Cancel" type="object" groups="base.group_extended"/>
</group>
</form>
</xpath>
</field>
</record>
<record id="view_bank_statement_tree2" model="ir.ui.view">
<field name="name">account.bank.statement.tree</field>
<field name="model">account.bank.statement</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end)" string="Statement">
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="balance_end"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="action_bank_statement_treenew" model="ir.actions.act_window">
<field name="name">Open a CashBox</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_bank_statement_form2"/>
<field name="domain">[('state','=','draft'),('user_id','=',uid)]</field>
</record>
<record model="ir.actions.act_window.view" id="act_statement12">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_bank_statement_tree2"/>
<field name="act_window_id" ref="action_bank_statement_treenew"/>
</record>
<record model="ir.actions.act_window.view" id="act_statement22">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_bank_statement_form2"/>
<field name="act_window_id" ref="action_bank_statement_treenew"/>
</record>
<!-- <menuitem action="action_bank_statement_treenew" id="menu_statement_tree2" parent="menu_statement_tree_all" sequence="1"/>-->
<menuitem action="action_bank_statement_treenew" id="menu_statement_tree2" parent="menu_statement_tree_all" sequence="1"/>
<record id="view_account_bank_statment_filter" model="ir.ui.view">
<field name="name">account.bank.statment.select</field>
<field name="model">account.bank.statement</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Cashbox">
<group col='9' colspan='4'>
<filter icon="terp-camera_test" string="Open"
domain="[('state','=','open')]"
help="All open cashboxes"/>
<filter icon="terp-dialog-close" string="To Close"
domain="[('state','=','draft')]"
help="All cashboxes to close"/>
<filter icon="terp-go-today" name="Today" string="Today"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d 23:59:59'))]"
help="All cashboxes to opened today"/>
<separator orientation="vertical"/>
<field name="name"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="20">
<filter string="Journal" icon="terp-folder-blue" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_pos_account_bank_statment">
<field name="name">All Cashboxes</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="context">{'search_default_Today':1}</field>
<field name="search_view_id" ref="view_account_bank_statment_filter"/>
</record>
<record model="ir.actions.act_window.view" id="act_statement_a1">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_bank_statement_tree"/>
<field name="act_window_id" ref="action_pos_account_bank_statment"/>
</record>
<record model="ir.actions.act_window.view" id="act_statement_a2">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_bank_statement_form3"/>
<field name="act_window_id" ref="action_pos_account_bank_statment"/>
</record>
<menuitem name="All Cashboxes" parent="menu_statement_tree_all"
action="action_pos_account_bank_statment" id="menu_pos_bank_statment_tree" groups="base.group_extended" sequence="4"/>
<record model="ir.actions.act_window" id="action_my_all_pos_account_bank_statment">
<field name="name">All My Cashboxes</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="domain">[('user_id','=',uid)]</field>
</record>
<record model="ir.actions.act_window.view" id="act_my_all_statement_a1">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_bank_statement_tree"/>
<field name="act_window_id" ref="action_my_all_pos_account_bank_statment"/>
</record>
<record model="ir.actions.act_window.view" id="act_my_all_statement_a2">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_bank_statement_form1"/>
<field name="act_window_id" ref="action_my_all_pos_account_bank_statment"/>
</record>
<!-- <menuitem name="All My Cashboxes" parent="menu_statement_tree_all"-->
<!-- action="action_my_all_pos_account_bank_statment" id="menu_my_pos_bank_statment_tree" sequence="3"/>-->
<record model="ir.actions.act_window" id="action_cashboxes_to_close">
<field name="name">Cashboxes to Close</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','draft')]</field>
</record>
<record model="ir.actions.act_window.view" id="act_statement_a5">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_bank_statement_tree"/>
<field name="act_window_id" ref="action_cashboxes_to_close"/>
</record>
<record model="ir.actions.act_window.view" id="act_statement_a6">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_bank_statement_form1"/>
<field name="act_window_id" ref="action_cashboxes_to_close"/>
</record>
<!-- <menuitem name="Cashboxes to Close" parent="menu_statement_tree_all"-->
<!-- action="action_cashboxes_to_close" id="menu_cashboxes_to_close_tree" groups="base.group_extended"/>-->
<menuitem name="Cash Register" parent="point_of_sale.menu_point_root" id="menu_cash_register" sequence="4"/>
<menuitem
name="Open Registers" parent="point_of_sale.menu_point_config"
string="Open Register"
name="All Cash Registers"
parent="menu_cash_register"
action="account.action_view_bank_statement_tree"
id="menu_all_menu_cash_register"
sequence="4"
/>
<record id="action_new_bank_statement_tree" model="ir.actions.act_window">
<field name="name">Cash Register</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="account.view_bank_statement_form2"/>
<field name="search_view_id" ref="account.view_account_bank_statement_filter"/>
<field name="domain">[('journal_id.type', '=', 'cash')]</field>
</record>
<record model="ir.actions.act_window.view" id="act_cash_statement1_all">
<field name="sequence" eval="5"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="account.view_bank_statement_tree"/>
<field name="act_window_id" ref="action_new_bank_statement_tree"/>
</record>
<record model="ir.actions.act_window.view" id="act_cash_statement2_all">
<field name="sequence" eval="0"/>
<field name="view_mode">form</field>
<field name="view_id" ref="account.view_bank_statement_form2"/>
<field name="act_window_id" ref="action_new_bank_statement_tree"/>
</record>
<record id="action_new_bank_statement_all_tree" model="ir.actions.act_window">
<field name="name">All Register</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="account.view_bank_statement_form2"/>
<field name="search_view_id" ref="account.view_account_bank_statement_filter"/>
</record>
<record model="ir.actions.act_window.view" id="act_cash_statement_all_register1">
<field name="sequence" eval="0"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="account.view_bank_statement_tree"/>
<field name="act_window_id" ref="action_new_bank_statement_all_tree"/>
</record>
<record model="ir.actions.act_window.view" id="act_cash_statement_all_register">
<field name="sequence" eval="5"/>
<field name="view_mode">form</field>
<field name="view_id" ref="account.view_bank_statement_form2"/>
<field name="act_window_id" ref="action_new_bank_statement_all_tree"/>
</record>
<menuitem
name="All Registers"
parent="menu_cash_register"
action="action_new_bank_statement_all_tree"
id="menu_all_menu_all_register"
sequence="4"
/>
<menuitem
name="Open a Cash Registers"
parent="menu_cash_register"
action="action_new_bank_statement_tree"
id="menu_new_cash_register"
sequence="3"
/>
<menuitem name="Opening Operations" parent="point_of_sale.menu_point_root"
id="menu_point_open_config" sequence="1"/>
<menuitem
name="Open my Cash Registers" parent="menu_point_open_config"
string="Open my Cash Register"
action="action_pos_open_statement"
id="menu_open_statement" sequence="1" />
<menuitem icon="STOCK_PRINT"
action="action_report_all_closed_cashbox_of_the_day"
id="menu_all_closed_cashbox_of_the_day"
parent="menu_statement_tree_all"/>
<menuitem name="Closing Operations" parent="point_of_sale.menu_point_root"
id="menu_point_close_config" sequence="3"/>
<menuitem
name="Close Register" parent="point_of_sale.menu_point_config"
string="Close Register"
name="Close my Cash Register" parent="menu_point_close_config"
string="Close my Cash Register"
action="action_pos_close_statement"
id="menu_close_statement" sequence="2" />
<menuitem icon="STOCK_PRINT"
action="action_report_all_closed_cashbox_of_the_day"
id="menu_all_closed_cashbox_of_the_day"
parent="menu_point_report_register"/>
</data>
</openerp>
@@ -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),
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data>
<!-- Box Entries -->
<record id="view_box_entries" model="ir.ui.view">
<field name="name">Box Entries</field>
<field name="model">pos.box.entries</field>
@@ -14,11 +14,11 @@
<field name="journal_id"/>
<field name="product_id"/>
<field name="amount"/>
<field name="ref"/>
<!-- <field name="ref"/>-->
<group colspan="4" col="2">
<button icon='gtk-cancel' special="cancel"
string="Close" />
<button name="get_in" string="Make Entries in the CashBox"
<button name="get_in" string="Take Money"
colspan="1" type="object" icon="gtk-ok" />
</group>
</form>
@@ -31,8 +31,8 @@
<field name="res_model">pos.box.entries</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="target">new</field>
</record>
</data>
</openerp>
</openerp>
+8 -8
View File
@@ -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')
+7 -7
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data>
<!-- Box Entries -->
<record id="view_pos_box_out" model="ir.ui.view">
<field name="name">Box Out</field>
<field name="model">pos.box.out</field>
@@ -14,11 +14,11 @@
<field name="journal_id"/>
<field name="product_id"/>
<field name="amount"/>
<field name="ref"/>
<!-- <field name="ref"/>-->
<group colspan="4" col="2">
<button icon='gtk-cancel' special="cancel"
string="Close" />
<button name="get_out" string="Make Entries in the CashBox"
<button name="get_out" string="Put Money"
colspan="1" type="object" icon="gtk-ok" />
</group>
</form>
@@ -31,8 +31,8 @@
<field name="res_model">pos.box.out</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="target">new</field>
</record>
</data>
</openerp>
</openerp>
@@ -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:
@@ -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:
+154 -67
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -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 <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -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'] = """ <form string="Make Payment" colspan="4">
@@ -120,22 +120,23 @@ class pos_make_payment(osv.osv_memory):
<button name="print_report" string="Print Receipt" type="object" icon="gtk-print"/>
</group>
</form>
"""
"""
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:
+9 -4
View File
@@ -12,11 +12,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Add payment :">
<group colspan="4" >
<field name="amount" />
<group colspan="4" width="600" height="230">
<field name="journal"/>
<field name="amount" />
<field name="payment_date" />
<field name="payment_name" />
<!--field name="payment_name" /-->
<field name="invoice_wanted" />
<field name="num_sale" />
<field name="is_acc" />
@@ -24,6 +24,11 @@
<field name="product_id" attrs="{'required':[('is_acc', '=', True)]}" domain="[('type','=','service')]"/>
</group>
<newline/>
<group attrs="{'invisible':[('invoice_wanted','=',False)]}" colspan="4">
<field name="partner_id" attrs="{'required':[('invoice_wanted', '=', True)]}" colspan="2"/>
<field name="pricelist_id" attrs="{'required':[('invoice_wanted', '=', True)]}" colspan="2"/>
</group>
<newline/>
<group col="2" colspan="4">
<button icon='gtk-cancel' special="cancel" string="Cancel" />
<button name="check" string="Make Payment" colspan="1" type="object" icon="gtk-ok"/>
@@ -42,4 +47,4 @@
</record>
</data>
</openerp>
+4 -4
View File
@@ -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):
+9 -7
View File
@@ -70,7 +70,7 @@
<group colspan="4" groups="base.group_extended">
<separator colspan="4" string="Properties" />
<field colspan="4" name="property_ids" nolabel="1"/>
</group>
</group>
</page>
<page string="Notes">
<separator colspan="4" string="Note" />
@@ -119,6 +119,7 @@
<field name="context">{'search_default_current':1}</field>
<field name="search_view_id" ref="view_procurement_filter"/>
<field name="context">{'search_default_Current':1}</field>
<field name="help">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.</field>
</record>
<record id="procurement_action3" model="ir.actions.act_window">
@@ -139,6 +140,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','exception')]</field>
<field name="help"> 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.</field>
</record>
<record id="procurement_action4" model="ir.actions.act_window">
@@ -261,12 +263,12 @@
res_model="stock.warehouse.orderpoint"
src_model="procurement.order"/>
<act_window
domain="[('id', '=', product_id)]"
id="act_product_product_2_stock_warehouse_orderpoint"
name="Product"
res_model="product.product"
src_model="procurement.order"/>
<!-- <act_window-->
<!-- domain="[('id', '=', product_id)]"-->
<!-- id="act_product_product_2_stock_warehouse_orderpoint"-->
<!-- name="Product"-->
<!-- res_model="product.product"-->
<!-- src_model="procurement.order"/>-->
</data>
</openerp>
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: lt\n"
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -305,13 +305,13 @@ class purchase_order(osv.osv):
def inv_line_create(self, cr, uid, a, ol):
return (0, False, {
'name': ol.name,
'account_id': a,
'account_id': a.id,
'price_unit': ol.price_unit or 0.0,
'quantity': ol.product_qty,
'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):
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
+4 -13
View File
@@ -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):
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:42+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: lt\n"
+2 -3
View File
@@ -62,9 +62,8 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="standard_price" position="replace">
<label string="Cost Price" align="1.0"/>
<group col="2" colspan="1">
<field name="standard_price" readonly="True" nolabel="1"/>
<group col="4" colspan="2">
<field name="standard_price" readonly="True"/>
<button name="%(action_view_change_standard_price)d" string="Change Price" type="action" icon="gtk-execute"/>
</group>
</field>
+8 -7
View File
@@ -150,10 +150,10 @@
</para>
</td>
<td>
<para style="terp_tblheader_Details">[[ picking.sale_id and picking.sale_id.partner_shipping_id and 'Shipping Address :' or removeParentNode('para') ]] </para>
<para style="terp_default_9">[[ (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 '' ]] </para>
<para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] </para>
<para style="terp_default_9">[[ (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 '' ]] </para>
<para style="terp_tblheader_Details">[[ picking.address_id and 'Shipping Address :' or removeParentNode('para') ]] </para>
<para style="terp_default_9">[[ ( picking.address_id and picking.address_id.title) or '' ]] [[ (picking.address_id and picking.address_id.name) or '' ]] </para>
<para style="terp_default_9">[[ (picking.address_id and picking.address_id.street) or '' ]] </para>
<para style="terp_default_9">[[ (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 '' ]] </para>
<para style="terp_default_9">[[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]]</para>
</td>
</tr>
@@ -241,7 +241,7 @@
<font color="white"> </font>
</para>
<section>
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') ]]</para>
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') or removeParentNode('section') ]]</para>
<blockTable colWidths="257.0,58.0,61.0,46.0,26.0,74.0" style="Move_Line_Contect_Assign_State">
<tr>
<td>
@@ -267,10 +267,11 @@
<para style="terp_default_2">
<font color="white"> </font>
</para>
</section>
<para style="terp_default_5cm_Above_Space">[[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]]</para>
<para style="terp_default_5cm_Above_Space">[[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('s') ]]</para>
<para style="terp_default_Bold_9">Non Assigned Products: [[ ( move_lines.state == 'assigned' or move_lines.state == 'done' or move_lines.state == 'confirmed' ) and removeParentNode('para') ]]</para>
<para style="terp_default_1cm_above_space">[[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]]</para>
</section>
<section>
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]]</para>
<blockTable colWidths="257.0,57.0,62.0,46.0,26.0,74.0" style="Move_Line_Content_Other_State">
+86
View File
@@ -0,0 +1,86 @@
# Serbian 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 <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-26 06:05+0000\n"
"PO-Revision-Date: 2010-07-21 07:40+0000\n"
"Last-Translator: novta <Unknown>\n"
"Language-Team: Serbian <sr@li.org>\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-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: thunderbird
#: field:tinythunderbird.partner,copy_to:0
msgid "Copy To"
msgstr "Kopiraj u"
#. module: thunderbird
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Ime objekta mora da počne sa x_ i ne sme da sadrži specijalne karaktere !"
#. module: thunderbird
#: field:tinythunderbird.partner,description:0
msgid "Description"
msgstr "Opis"
#. module: thunderbird
#: field:tinythunderbird.partner,reference:0
msgid "Reference"
msgstr "Referenca"
#. module: thunderbird
#: model:ir.model,name:thunderbird.model_tinythunderbird_partner
msgid "Thunderbid mails"
msgstr "Thunderbird pisma"
#. module: thunderbird
#: field:tinythunderbird.partner,attachments:0
msgid "Attached Files"
msgstr "Prikačeni fajlovi"
#. module: thunderbird
#: field:tinythunderbird.partner,res_user_id:0
msgid "User"
msgstr "Korisnik"
#. module: thunderbird
#: field:tinythunderbird.partner,receiver:0
msgid "Receiver"
msgstr "Primalac"
#. module: thunderbird
#: field:tinythunderbird.partner,date:0
msgid "Date"
msgstr "Datum"
#. module: thunderbird
#: field:tinythunderbird.partner,title:0
msgid "Subject"
msgstr "Tema"
#. module: thunderbird
#: code:addons/thunderbird/partner/partner.py:0
#, python-format
msgid "Archive"
msgstr "Arhiva"
#. module: thunderbird
#: model:ir.module.module,shortdesc:thunderbird.module_meta_information
msgid "Thunderbird Interface"
msgstr "Thunderbird interfejs"
#. module: thunderbird
#: field:tinythunderbird.partner,sender:0
msgid "Sender"
msgstr "Pošiljalac"
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: lt\n"
+4 -4
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 12:13+0000\n"
"Last-Translator: Dragan Životić <dragan_zivotic@yahoo.com>\n"
"PO-Revision-Date: 2010-07-21 08:12+0000\n"
"Last-Translator: novta <Unknown>\n"
"Language-Team: Serbian <sr@li.org>\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:17+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: wiki
@@ -90,7 +90,7 @@ msgstr "Wiki Konfiguracija"
#. module: wiki
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Pogrešno ime modela u definiciji akcije."
#. module: wiki
#: field:wiki.groups,name:0