[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
bzr revid: mtr@mtr-20100628131619-qd9wal2coffonm4b
This commit is contained in:
commit
419568e347
|
@ -25,6 +25,7 @@ import project
|
|||
import partner
|
||||
import invoice
|
||||
import account_bank_statement
|
||||
import account_cash_statement
|
||||
import account_move_line
|
||||
import account_analytic_line
|
||||
import wizard
|
||||
|
@ -33,4 +34,4 @@ import product
|
|||
import sequence
|
||||
import company
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
"name" : "Accounting and Financial Management",
|
||||
"version" : "1.1",
|
||||
|
@ -119,6 +117,8 @@ module named account_vouchers
|
|||
'report/account_account_report_view.xml',
|
||||
'report/account_analytic_entries_report_view.xml',
|
||||
'board_account_view.xml',
|
||||
"wizard/account_pl_report_view.xml",
|
||||
"wizard/account_bs_report_view.xml"
|
||||
],
|
||||
'demo_xml': [
|
||||
#'demo/price_accuracy00.yml',
|
||||
|
@ -145,4 +145,4 @@ module named account_vouchers
|
|||
'active': False,
|
||||
'certificate': '0080331923549',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -586,7 +586,7 @@ class account_journal_column(osv.osv):
|
|||
for col in cols:
|
||||
if col in ('period_id', 'journal_id'):
|
||||
continue
|
||||
|
||||
|
||||
result.append( (col, cols[col].string) )
|
||||
result.sort()
|
||||
return result
|
||||
|
@ -687,8 +687,7 @@ class account_fiscalyear(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Fiscal Year', size=64, required=True),
|
||||
'code': fields.char('Code', size=6, required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company',
|
||||
help="Keep empty if the fiscal year belongs to several companies.", required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'date_start': fields.date('Start Date', required=True),
|
||||
'date_stop': fields.date('End Date', required=True),
|
||||
'period_ids': fields.one2many('account.period', 'fiscalyear_id', 'Periods'),
|
||||
|
@ -772,7 +771,7 @@ class account_period(osv.osv):
|
|||
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
|
||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True,
|
||||
help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'),
|
||||
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
|
||||
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company'),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
|
|
|
@ -303,6 +303,13 @@ class account_bank_statement(osv.osv):
|
|||
_('Ledger Posting line "%s" is not valid') % line.name)
|
||||
|
||||
if move.reconcile_id and move.reconcile_id.line_ids:
|
||||
## Search if move has already a partial reconciliation
|
||||
previous_partial = False
|
||||
for line_reconcile_move in move.reconcile_id.line_ids:
|
||||
if line_reconcile_move.reconcile_partial_id:
|
||||
previous_partial = True
|
||||
break
|
||||
##
|
||||
torec += map(lambda x: x.id, move.reconcile_id.line_ids)
|
||||
#try:
|
||||
if abs(move.reconcile_amount-move.amount)<0.0001:
|
||||
|
@ -312,8 +319,14 @@ class account_bank_statement(osv.osv):
|
|||
for entry in move.reconcile_id.line_new_ids:
|
||||
writeoff_acc_id = entry.account_id.id
|
||||
break
|
||||
|
||||
account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context)
|
||||
## If we have already a partial reconciliation
|
||||
## We need to make a partial reconciliation
|
||||
## To add this amount to previous paid amount
|
||||
if previous_partial:
|
||||
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
|
||||
## If it's the first reconciliation, we do a full reconciliation as regular
|
||||
else:
|
||||
account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context)
|
||||
else:
|
||||
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
|
||||
#except:
|
||||
|
|
|
@ -0,0 +1,459 @@
|
|||
# encoding: utf-8
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 PC Solutions (<http://pcsol.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
|
||||
from mx import DateTime
|
||||
from decimal import Decimal
|
||||
from tools.translate import _
|
||||
|
||||
class account_cashbox_line(osv.osv):
|
||||
|
||||
""" Cash Box Details """
|
||||
|
||||
_name = 'account.cashbox.line'
|
||||
_description = 'CashBox Line'
|
||||
|
||||
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'),
|
||||
}
|
||||
account_cashbox_line()
|
||||
|
||||
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 _balance_end_cash(self, cr, uid, ids, name, arg, context=None):
|
||||
""" Find ending 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.ending_details_ids:
|
||||
amount_total+= line.pieces * line.number
|
||||
res[statement.id]=amount_total
|
||||
return res
|
||||
|
||||
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'), ('company_id', '=', company_id)])
|
||||
if journal:
|
||||
return journal[0]
|
||||
else:
|
||||
return False
|
||||
|
||||
def _end_balance(self, cursor, user, ids, name, attr, context=None):
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
res_users_obj = self.pool.get('res.users')
|
||||
|
||||
res = {}
|
||||
|
||||
company_currency_id = res_users_obj.browse(cursor, user, user,
|
||||
context=context).company_id.currency_id.id
|
||||
|
||||
statements = self.browse(cursor, user, ids, context=context)
|
||||
for statement in statements:
|
||||
res[statement.id] = statement.balance_start
|
||||
currency_id = statement.currency.id
|
||||
for line in statement.move_line_ids:
|
||||
if line.debit > 0:
|
||||
if line.account_id.id == \
|
||||
statement.journal_id.default_debit_account_id.id:
|
||||
res[statement.id] += res_currency_obj.compute(cursor,
|
||||
user, company_currency_id, currency_id,
|
||||
line.debit, context=context)
|
||||
else:
|
||||
if line.account_id.id == \
|
||||
statement.journal_id.default_credit_account_id.id:
|
||||
res[statement.id] -= res_currency_obj.compute(cursor,
|
||||
user, company_currency_id, currency_id,
|
||||
line.credit, context=context)
|
||||
if statement.state in ('draft', 'open'):
|
||||
for line in statement.line_ids:
|
||||
res[statement.id] += line.amount
|
||||
for r in res:
|
||||
res[r] = round(res[r], 2)
|
||||
return res
|
||||
|
||||
def _get_company(self, cr, uid, ids, context={}):
|
||||
user_pool = self.pool.get('res.users')
|
||||
company_pool = self.pool.get('res.company')
|
||||
user = user_pool.browse(cr, uid, uid, uid)
|
||||
company_id = user.company_id and user.company_id.id
|
||||
if not company_id:
|
||||
company_id = company_pool.search(cr, uid, [])[0]
|
||||
|
||||
return company_id
|
||||
|
||||
_columns = {
|
||||
'company_id':fields.many2one('res.company', 'Company', required=False),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
|
||||
'balance_start': fields.function(_get_starting_balance, store=True, method=True, string='Opening Balance', type='float',digits=(16,2), help="Opening balance based on cashBox"),
|
||||
'balance_end_real': fields.float('Closing Balance', digits=(16,2), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"),
|
||||
'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, store=True, string="Cash Transaction", help="Total cash transactions"),
|
||||
'date':fields.datetime("Open On"),
|
||||
'closing_date':fields.datetime("Closed On"),
|
||||
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on transactions"),
|
||||
'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', help="Closing balance based on cashBox"),
|
||||
'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'),
|
||||
'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
|
||||
'name': fields.char('Name', size=64, required=True, readonly=True),
|
||||
'user_id':fields.many2one('res.users', 'Responsible', required=False),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
'name': lambda *a: '/',
|
||||
'date': lambda *a:time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'journal_id': _default_journal_id,
|
||||
'user_id': lambda self, cr, uid, context=None: uid,
|
||||
'company_id': _get_company
|
||||
}
|
||||
|
||||
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_cash_statement, self).create(cr, uid, vals, context=context)
|
||||
return res
|
||||
|
||||
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context={}):
|
||||
""" 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
|
||||
"""
|
||||
|
||||
cash_pool = self.pool.get('account.cashbox.line')
|
||||
statement_pool = self.pool.get('account.bank.statement')
|
||||
|
||||
res = {}
|
||||
balance_start = 0.0
|
||||
|
||||
if not journal_id:
|
||||
res.update({
|
||||
'balance_start': balance_start
|
||||
})
|
||||
return res
|
||||
|
||||
|
||||
res = super(account_cash_statement, self).onchange_journal_id(cr, uid, statement_id, journal_id, context)
|
||||
return res
|
||||
|
||||
def button_open(self, cr, uid, ids, context=None):
|
||||
|
||||
""" Changes statement state to Running.
|
||||
@return: True
|
||||
"""
|
||||
cash_pool = self.pool.get('account.cashbox.line')
|
||||
statement_pool = self.pool.get('account.bank.statement')
|
||||
|
||||
statement = statement_pool.browse(cr, uid, ids[0])
|
||||
number = self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement')
|
||||
|
||||
if len(statement.starting_details_ids) > 0:
|
||||
sid = []
|
||||
for line in statement.starting_details_ids:
|
||||
sid.append(line.id)
|
||||
|
||||
cash_pool.unlink(cr, uid, sid)
|
||||
|
||||
cr.execute("select id from account_bank_statement where journal_id=%s and user_id=%s and state=%s order by id desc limit 1", (statement.journal_id.id, uid, 'confirm'))
|
||||
rs = cr.fetchone()
|
||||
rs = rs and rs[0] or None
|
||||
if rs:
|
||||
statement = statement_pool.browse(cr, uid, rs)
|
||||
balance_start = statement.balance_end_real or 0.0
|
||||
open_ids = cash_pool.search(cr, uid, [('ending_id','=',statement.id)])
|
||||
for sid in open_ids:
|
||||
default = {
|
||||
'ending_id': False,
|
||||
'starting_id':ids[0]
|
||||
}
|
||||
cash_pool.copy(cr, uid, sid, default)
|
||||
|
||||
vals = {
|
||||
'date':time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'state':'open',
|
||||
'name':number
|
||||
}
|
||||
|
||||
self.write(cr, uid, ids, vals)
|
||||
return True
|
||||
|
||||
def button_confirm(self, cr, uid, ids, context={}):
|
||||
|
||||
""" Check the starting and ending detail of statement
|
||||
@return: True
|
||||
"""
|
||||
done = []
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
res_users_obj = self.pool.get('res.users')
|
||||
account_move_obj = self.pool.get('account.move')
|
||||
account_move_line_obj = self.pool.get('account.move.line')
|
||||
account_bank_statement_line_obj = self.pool.get('account.bank.statement.line')
|
||||
|
||||
company_currency_id = res_users_obj.browse(cr, uid, uid, context=context).company_id.currency_id.id
|
||||
|
||||
for st in self.browse(cr, uid, ids, context):
|
||||
if not st.state == 'open':
|
||||
continue
|
||||
|
||||
if st.balance_end != st.balance_end_cash:
|
||||
raise osv.except_osv(_('Error !'), _('Cash balance is not matching with closing balance !'))
|
||||
|
||||
if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001):
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The statement balance is incorrect !\n') +
|
||||
_('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
|
||||
if (not st.journal_id.default_credit_account_id) \
|
||||
or (not st.journal_id.default_debit_account_id):
|
||||
raise osv.except_osv(_('Configuration Error !'),
|
||||
_('Please verify that an account is defined in the journal.'))
|
||||
|
||||
for line in st.move_line_ids:
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The account entries lines are not in valid state.'))
|
||||
# for bank.statement.lines
|
||||
# In line we get reconcile_id on bank.ste.rec.
|
||||
# in bank stat.rec we get line_new_ids on bank.stat.rec.line
|
||||
for move in st.line_ids:
|
||||
context.update({'date':move.date})
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'date': move.date,
|
||||
}, context=context)
|
||||
account_bank_statement_line_obj.write(cr, uid, [move.id], {
|
||||
'move_ids': [(4,move_id, False)]
|
||||
})
|
||||
if not move.amount:
|
||||
continue
|
||||
|
||||
torec = []
|
||||
if move.amount >= 0:
|
||||
account_id = st.journal_id.default_credit_account_id.id
|
||||
else:
|
||||
account_id = st.journal_id.default_debit_account_id.id
|
||||
acc_cur = ((move.amount<=0) and st.journal_id.default_debit_account_id) or move.account_id
|
||||
amount = res_currency_obj.compute(cr, uid, st.currency.id,
|
||||
company_currency_id, move.amount, context=context,
|
||||
account=acc_cur)
|
||||
if move.reconcile_id and move.reconcile_id.line_new_ids:
|
||||
for newline in move.reconcile_id.line_new_ids:
|
||||
amount += newline.amount
|
||||
|
||||
val = {
|
||||
'name': move.name,
|
||||
'date': move.date,
|
||||
'ref': move.ref,
|
||||
'move_id': move_id,
|
||||
'partner_id': ((move.partner_id) and move.partner_id.id) or False,
|
||||
'account_id': (move.account_id) and move.account_id.id,
|
||||
'credit': ((amount>0) and amount) or 0.0,
|
||||
'debit': ((amount<0) and -amount) or 0.0,
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'currency_id': st.currency.id,
|
||||
}
|
||||
|
||||
amount = res_currency_obj.compute(cr, uid, st.currency.id,
|
||||
company_currency_id, move.amount, context=context,
|
||||
account=acc_cur)
|
||||
if st.currency.id <> company_currency_id:
|
||||
amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
|
||||
st.currency.id, amount, context=context,
|
||||
account=acc_cur)
|
||||
val['amount_currency'] = -amount_cur
|
||||
|
||||
if move.account_id and move.account_id.currency_id and move.account_id.currency_id.id <> company_currency_id:
|
||||
val['currency_id'] = move.account_id.currency_id.id
|
||||
if company_currency_id==move.account_id.currency_id.id:
|
||||
amount_cur = move.amount
|
||||
else:
|
||||
amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
|
||||
move.account_id.currency_id.id, amount, context=context,
|
||||
account=acc_cur)
|
||||
val['amount_currency'] = amount_cur
|
||||
|
||||
torec.append(account_move_line_obj.create(cr, uid, val , context=context))
|
||||
|
||||
if move.reconcile_id and move.reconcile_id.line_new_ids:
|
||||
for newline in move.reconcile_id.line_new_ids:
|
||||
account_move_line_obj.create(cr, uid, {
|
||||
'name': newline.name or move.name,
|
||||
'date': move.date,
|
||||
'ref': move.ref,
|
||||
'move_id': move_id,
|
||||
'partner_id': ((move.partner_id) and move.partner_id.id) or False,
|
||||
'account_id': (newline.account_id) and newline.account_id.id,
|
||||
'debit': newline.amount>0 and newline.amount or 0.0,
|
||||
'credit': newline.amount<0 and -newline.amount or 0.0,
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'analytic_account_id':newline.analytic_id and newline.analytic_id.id or False,
|
||||
|
||||
}, context=context)
|
||||
|
||||
# Fill the secondary amount/currency
|
||||
# if currency is not the same than the company
|
||||
amount_currency = False
|
||||
currency_id = False
|
||||
if st.currency.id <> company_currency_id:
|
||||
amount_currency = move.amount
|
||||
currency_id = st.currency.id
|
||||
account_move_line_obj.create(cr, uid, {
|
||||
'name': move.name,
|
||||
'date': move.date,
|
||||
'ref': move.ref,
|
||||
'move_id': move_id,
|
||||
'partner_id': ((move.partner_id) and move.partner_id.id) or False,
|
||||
'account_id': account_id,
|
||||
'credit': ((amount < 0) and -amount) or 0.0,
|
||||
'debit': ((amount > 0) and amount) or 0.0,
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'amount_currency': amount_currency,
|
||||
'currency_id': currency_id,
|
||||
}, context=context)
|
||||
|
||||
for line in account_move_line_obj.browse(cr, uid, [x.id for x in
|
||||
account_move_obj.browse(cr, uid, move_id,
|
||||
context=context).line_id],
|
||||
context=context):
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('Ledger Posting line "%s" is not valid') % line.name)
|
||||
|
||||
if move.reconcile_id and move.reconcile_id.line_ids:
|
||||
torec += map(lambda x: x.id, move.reconcile_id.line_ids)
|
||||
#try:
|
||||
if abs(move.reconcile_amount-move.amount)<0.0001:
|
||||
|
||||
writeoff_acc_id = False
|
||||
#There should only be one write-off account!
|
||||
for entry in move.reconcile_id.line_new_ids:
|
||||
writeoff_acc_id = entry.account_id.id
|
||||
break
|
||||
|
||||
account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context)
|
||||
else:
|
||||
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
|
||||
#except:
|
||||
# raise osv.except_osv(_('Error !'), _('Unable to reconcile entry "%s": %.2f') % (move.name, move.amount))
|
||||
|
||||
if st.journal_id.entry_posted:
|
||||
account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
|
||||
done.append(st.id)
|
||||
self.write(cr, uid, done, {'state':'confirm'}, context=context)
|
||||
return True
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
done = []
|
||||
for st in self.browse(cr, uid, ids, context):
|
||||
ids = []
|
||||
for line in st.line_ids:
|
||||
ids += [x.id for x in line.move_ids]
|
||||
self.pool.get('account.move').unlink(cr, uid, ids, context)
|
||||
done.append(st.id)
|
||||
self.write(cr, uid, done, {'state':'draft'}, context=context)
|
||||
return True
|
||||
|
||||
account_cash_statement()
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
</separator>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">You can enhance OpenERP's basic accounting support with a few additional OpenERP applications.</attribute>
|
||||
<attribute name="string">From this screen, you can configure your accounting system. Choose a Chart of Account matched to your accounting system or the Generic Chart of Account which allows you to configure which suit your needs.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
|
|
|
@ -2,30 +2,30 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
|
||||
<menuitem id="menu_finance_receivables" name="Receivables" parent="menu_finance" sequence="1"/>
|
||||
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="2"/>
|
||||
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
|
||||
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Journal Entries Validation" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
|
||||
<!-- <menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>-->
|
||||
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Journal Entries Validation" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
|
||||
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_generic_report" name="Management Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_generic_report" name="Management Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
<!-- <menuitem id="menu_finance_configuration1" name="Configuration" parent="menu_finance" sequence="80"/>-->
|
||||
<!-- <menuitem id="base.menu_action_currency_form" parent="menu_finance_configuration" sequence="20"/>-->
|
||||
<!-- <menuitem id="menu_finance_accounting1" name="Financial Accounting" parent="menu_finance_configuration" sequence="80"/>-->
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
|
||||
groups="group_account_user"/>
|
||||
<menuitem id="account.menu_finance_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing" sequence="15"/>
|
||||
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15"/>
|
||||
|
||||
<!-- <menuitem id="menu_finance_periodical_processing11" name="Periodical Processing" parent="account.menu_finance"-->
|
||||
<!-- sequence="3"-->
|
||||
|
|
|
@ -801,15 +801,19 @@ class account_move_line(osv.osv):
|
|||
ids = journal_pool.search(cr, uid, [])
|
||||
journals = journal_pool.browse(cr, uid, ids)
|
||||
all_journal = [None]
|
||||
common_fields = {}
|
||||
total = len(journals)
|
||||
for journal in journals:
|
||||
all_journal.append(journal.id)
|
||||
for field in journal.view_id.columns_id:
|
||||
if not field.field in fields:
|
||||
fields[field.field] = [None, journal.id]
|
||||
fields[field.field] = [journal.id]
|
||||
fld.append((field.field, field.sequence))
|
||||
flds.append(field.field)
|
||||
common_fields[field.field] = 1
|
||||
else:
|
||||
fields.get(field.field).append(journal.id)
|
||||
common_fields[field.field] = common_fields[field.field] + 1
|
||||
|
||||
fld.append(('period_id', 3))
|
||||
fld.append(('journal_id', 10))
|
||||
|
@ -831,6 +835,10 @@ class account_move_line(osv.osv):
|
|||
|
||||
for field_it in fld:
|
||||
field = field_it[0]
|
||||
|
||||
if common_fields.get(field) == total:
|
||||
fields.get(field).append(None)
|
||||
|
||||
if field=='state':
|
||||
state = 'colors="red:state==\'draft\'"'
|
||||
|
||||
|
|
|
@ -61,21 +61,6 @@
|
|||
parent="menu_tax_report"
|
||||
type="wizard"/> -->
|
||||
|
||||
|
||||
<record id="action_tax_code_tree" model="ir.actions.act_window">
|
||||
<field name="name">Chart of Taxes</field>
|
||||
<field name="res_model">account.tax.code</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="view_tax_code_tree"/>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_tax_code_tree"
|
||||
id="menu_action_tax_code_tree"
|
||||
parent="menu_tax_report"
|
||||
sequence="12"/>
|
||||
|
||||
|
||||
<report id="account_account_balance_compare"
|
||||
string="Account balance"
|
||||
model="account.account"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
<!-- This file must be loaded _after_ account_demo.xml ! -->
|
||||
<record id="test_invoice_1" model="account.invoice">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
|
@ -44,14 +44,14 @@
|
|||
<test expr="state">open</test>
|
||||
</assert>
|
||||
<function model="account.invoice" name="pay_and_reconcile">
|
||||
<!-- ids = --> <value eval="[ref('test_invoice_1')]"/>
|
||||
<!-- pay_amount = --> <value eval="1850"/>
|
||||
<!-- pay_account_id = --> <value eval="ref('cash')"/>
|
||||
<!-- period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- pay_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- writeoff_acc_id = --> <value eval="ref('cash')"/>
|
||||
<!-- writeoff_period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- writeoff_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- ids = --> <value eval="[ref('test_invoice_1')]"/>
|
||||
<!-- pay_amount = --> <value eval="1850"/>
|
||||
<!-- pay_account_id = --> <value eval="ref('cash')"/>
|
||||
<!-- period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- pay_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- writeoff_acc_id = --> <value eval="ref('cash')"/>
|
||||
<!-- writeoff_period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- writeoff_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
</function>
|
||||
|
||||
<assert id="test_invoice_1" model="account.invoice" string="Test invoice 1 is now paid">
|
||||
|
|
|
@ -405,12 +405,16 @@
|
|||
<search string="Search Statement">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Statement"/>
|
||||
<filter icon="terp-check" string="Poster" domain="[('state','=','confirm')]" help="Confirm confirm"/>
|
||||
<filter icon="terp-check" string="Posted" domain="[('state','=','confirm')]" help="Confirm confirm"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
<group expand="0" string="Group By..." colspan="12" col="10">
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -460,22 +464,22 @@
|
|||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Statement">
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="journal_id" on_change="onchange_journal_id(journal_id)"/>
|
||||
<field name="currency"/>
|
||||
<field name="period_id"/>
|
||||
<group colspan="2" col="3">
|
||||
<!-- <button name="%(action_view_account_statement_from_invoice)d"
|
||||
string="Import Invoice" type="action" attrs="{'invisible':[('state','=','confirm')]}" icon="gtk-open"/>-->
|
||||
<button name="button_import_invoice" string="Import Invoice" attrs="{'invisible':[('state','=','confirm')]}" type="object" icon="gtk-apply"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<field name="balance_start"/>
|
||||
<form string="Bank Statement">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1"/>
|
||||
<!-- <field name="currency"/>-->
|
||||
<field name="period_id"/>
|
||||
<!-- <group colspan="2" col="3">-->
|
||||
<!-- <button name="%(action_view_account_statement_from_invoice)d"-->
|
||||
<!-- string="Import Invoice" type="action" attrs="{'invisible':[('state','=','confirm')]}" icon="gtk-open"/>-->
|
||||
<!-- <button name="button_import_invoice" string="Import Invoice" attrs="{'invisible':[('state','=','confirm')]}" type="object" icon="gtk-apply"/>-->
|
||||
<!-- </group>-->
|
||||
<field name="balance_start"/>
|
||||
<field name="balance_end_real"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Entry encoding">
|
||||
<page string="Transaction">
|
||||
<field colspan="4" name="line_ids" nolabel="1">
|
||||
<tree editable="bottom" string="Statement lines">
|
||||
<field name="sequence" invisible="1"/>
|
||||
|
@ -504,7 +508,7 @@
|
|||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Real Entries">
|
||||
<page string="Accounting Entries">
|
||||
<field colspan="4" name="move_line_ids" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
@ -523,6 +527,7 @@
|
|||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
|
||||
</record>
|
||||
<menuitem string="Bank Statements" action="action_bank_statement_tree" id="menu_bank_statement_tree" parent="menu_finance_bank_and_cash" sequence="7"/>
|
||||
|
||||
|
@ -714,7 +719,7 @@
|
|||
<field name="view_id" ref="view_tax_code_tree"/>
|
||||
</record>
|
||||
<menuitem id="next_id_27" name="Taxes" parent="account.menu_finance_accounting"/>
|
||||
<menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="menu_low_level" sequence="12"/>
|
||||
<menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="menu_low_level" sequence="12"/>
|
||||
|
||||
|
||||
<!--
|
||||
|
@ -818,6 +823,18 @@
|
|||
</record>
|
||||
<menuitem action="action_tax_form" id="menu_action_tax_form" parent="next_id_27"/>
|
||||
|
||||
<record id="action_tax_code_tree" model="ir.actions.act_window">
|
||||
<field name="name">Chart of Taxes</field>
|
||||
<field name="res_model">account.tax.code</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="view_tax_code_tree"/>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_tax_code_tree"
|
||||
id="menu_action_tax_code_tree"
|
||||
parent="menu_finance_charts"
|
||||
sequence="12"/>
|
||||
<!-- <wizard id="action_move_journal_line_form" menu="False" model="account.move.line" name="account.move.journal" string="Entries by Line"/-->
|
||||
|
||||
<!--
|
||||
|
@ -1162,6 +1179,14 @@
|
|||
<field name="search_view_id" ref="view_account_move_filter"/>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
domain="[('move_id','=',active_id)]"
|
||||
id="act_account_move_to_account_move_line_open"
|
||||
name="Journal Items"
|
||||
context="{'move_id':active_id}"
|
||||
res_model="account.move.line"
|
||||
src_model="account.move"/>
|
||||
|
||||
<record id="action_move_to_review" model="ir.actions.act_window">
|
||||
<field name="name">Journal Entries to Review</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
@ -1231,16 +1256,6 @@
|
|||
<field name="view_mode">form</field>
|
||||
<field name="act_window_id" ref="action_move_line_search"/>
|
||||
</record>
|
||||
<record id="action_move_line_search_view3" model="ir.actions.act_window">
|
||||
<field name="name">Cash Registers</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.move.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_move_line_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_line_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'cash')]</field>
|
||||
</record>
|
||||
<record id="action_move_line_search_view4" model="ir.actions.act_window">
|
||||
<field name="name">Check Registers</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
@ -1251,7 +1266,7 @@
|
|||
<field name="search_view_id" ref="view_account_move_line_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
|
||||
</record>
|
||||
<menuitem action="action_move_line_search_view3" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash"/>
|
||||
|
||||
<menuitem action="action_move_line_search_view4" id="journal_bank_move_lines" parent="menu_finance_bank_and_cash"/>
|
||||
|
||||
<!-- <menuitem action="action_move_line_search" id="menu_action_move_line_search" parent="account.next_id_29"/>-->
|
||||
|
@ -1338,17 +1353,17 @@
|
|||
id="menu_action_account_bank_reconcile_check_tree"
|
||||
parent="periodical_processing_reconciliation" groups="group_account_user" />
|
||||
|
||||
<act_window
|
||||
context="{'search_default_next_partner':1}"
|
||||
<act_window
|
||||
context="{'search_default_next_partner':1}"
|
||||
id="action_account_manual_reconcile" name="Entry Lines"
|
||||
res_model="account.move.line"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
name="Manual Reconcilication" icon="STOCK_EXECUTE"
|
||||
action="action_account_manual_reconcile"
|
||||
id="menu_manual_reconcile"
|
||||
parent="account.periodical_processing_reconciliation"/>
|
||||
<menuitem
|
||||
name="Manual Reconcilication" icon="STOCK_EXECUTE"
|
||||
action="action_account_manual_reconcile"
|
||||
id="menu_manual_reconcile"
|
||||
parent="account.periodical_processing_reconciliation"/>
|
||||
|
||||
|
||||
<act_window
|
||||
|
@ -1407,7 +1422,7 @@
|
|||
<field name="model">account.model.line</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Entry Model Line">
|
||||
<tree string="Entry Model Line" editable="bottom">
|
||||
<field name="sequence"/>
|
||||
<field name="ref"/>
|
||||
<field name="name"/>
|
||||
|
@ -1415,6 +1430,8 @@
|
|||
<field name="partner_id"/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="date"/>
|
||||
<field name="date_maturity"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -1450,7 +1467,7 @@
|
|||
<field name="name" select="1"/>
|
||||
<field name="ref" select="1"/>
|
||||
<field name="journal_id" select="1"/>
|
||||
<field colspan="4" name="lines_id" widget="one2many_list" nolabel="1"/>
|
||||
<field colspan="4" nolabel="1" name="lines_id" height="250" widget="one2many_list"/>
|
||||
<separator string="Legend" colspan="4"/>
|
||||
<field name="legend" colspan="4" nolabel="1"/>
|
||||
<group col="1" colspan="4">
|
||||
|
@ -1471,17 +1488,16 @@
|
|||
</field>
|
||||
</record>
|
||||
<record id="action_model_form" model="ir.actions.act_window">
|
||||
<field name="name">Define Models</field>
|
||||
<field name="name">Define Recurring</field>
|
||||
<field name="res_model">account.model</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_model_form" id="menu_action_model_form" parent="account.menu_finance_recurrent_entries"/>
|
||||
|
||||
<menuitem action="action_model_form" id="menu_action_model_form" parent="account.menu_configuration_misc"/>
|
||||
|
||||
<!--
|
||||
# Payment Terms
|
||||
-->
|
||||
# Payment Terms
|
||||
-->
|
||||
|
||||
<record id="view_payment_term_line_tree" model="ir.ui.view">
|
||||
<field name="name">account.payment.term.line.tree</field>
|
||||
|
@ -1739,8 +1755,6 @@
|
|||
|
||||
<act_window domain="[('journal_id', '=', active_id)]" id="act_account_journal_2_account_move_line" name="Entry lines" res_model="account.move.line" src_model="account.journal"/>
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_partner_account_move_unreconciled" name="Unreconciled Receivables & Payables" res_model="account.move.line" src_model="res.partner"/>
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable'])]" id="act_account_partner_account_move_all" name="Receivables & Payables" res_model="account.move.line" src_model="res.partner"/>
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="All Account Entries" res_model="account.move.line" src_model="res.partner"/>
|
||||
|
@ -2262,6 +2276,157 @@
|
|||
sequence="4"
|
||||
/>
|
||||
|
||||
<!-- Cash 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" select="1"/>
|
||||
<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">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" 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" />
|
||||
<field name="user_id" select="1" readonly="1"/>
|
||||
<field name="period_id" select="1"/>
|
||||
<field name="balance_end_real"/>
|
||||
</group>
|
||||
|
||||
<notebook colspan="4">
|
||||
<page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
|
||||
<field colspan="4" name="line_ids" nolabel="1">
|
||||
<tree editable="bottom" string="Statement lines">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="date"/>
|
||||
<field name="ref"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency, {'amount': amount})"/>
|
||||
<field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/>
|
||||
<field name="amount"/>
|
||||
<field context="{'partner_id': partner_id, 'amount': amount, 'account_id': account_id, 'currency_id': parent.currency, 'journal_id': parent.journal_id, 'date':date}" name="reconcile_id"/>
|
||||
<field invisible="1" name="reconcile_amount"/>
|
||||
</tree>
|
||||
<form string="Statement lines">
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
|
||||
<field domain="[('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id"/>
|
||||
<field name="amount"/>
|
||||
<field context="{'partner_id':partner_id,'amount':amount,'account_id':account_id,'currency_id': parent.currency,'journal_id':parent.journal_id, 'date':date}" name="reconcile_id"/>
|
||||
<field name="ref"/>
|
||||
<field name="sequence"/>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Cash Box">
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','=','draft')]}">
|
||||
<tree string = "Opening Balance" 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 = "Opening Balance">
|
||||
<field name="pieces"/>
|
||||
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
|
||||
<field name="subtotal"/>
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','=','draft')]}">
|
||||
<tree string = "Closing Balance" 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 = "Closing Balance">
|
||||
<field name="pieces"/>
|
||||
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
|
||||
<field name="subtotal"/>
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Accounting Entries" attrs="{'invisible': [('state','!=','confirm')]}">
|
||||
<field colspan="4" name="move_line_ids" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="6" colspan="4">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="closing_date" select="1" attrs="{'readonly':[('state','=','confirm')]}"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Opening Balance" colspan="4"/>
|
||||
<field name="balance_start"/>
|
||||
<field name="total_entry_encoding"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Closing Balance" colspan="4"/>
|
||||
<field name="balance_end" string="Approx"/>
|
||||
<field name="balance_end_cash" string="Cash Balance"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" colspan="4"/>
|
||||
<button name="button_confirm" states="open" string="Close CashBox" icon="terp-check" type="object"/>
|
||||
<button name="button_open" states="draft" string="Open CashBox" icon="terp-document-new" type="object"/>
|
||||
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_view_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">tree,form</field>
|
||||
<field name="view_id" ref="view_bank_statement_tree"/>
|
||||
<field name="search_view_id" ref="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="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_bank_statement_tree"/>
|
||||
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="act_cash_statement2_all">
|
||||
<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_view_bank_statement_tree"/>
|
||||
</record>
|
||||
<menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- <wizard-->
|
||||
<!-- string="Account balance-Compare Years"-->
|
||||
<!-- model="account.account"-->
|
||||
<!-- name="account.balance.account.balance.report"-->
|
||||
<!-- keyword="client_print_multi"-->
|
||||
<!-- id="wizard_account_balance_compare_report"/>-->
|
||||
<!-- <wizard-->
|
||||
<!-- string="Account balance-Compare Years"-->
|
||||
<!-- model="account.account"-->
|
||||
<!-- name="account.balance.account.balance.report"-->
|
||||
<!-- keyword="client_print_multi"-->
|
||||
<!-- id="wizard_account_balance_compare_report"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_invoice_refund" model="account.invoice" name="account.invoice.refund" string="Credit Note" groups="base.group_user"/> -->
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
|||
<!-- report-related wizards -->
|
||||
<!-- <wizard id="wizard_partner_balance_report" menu="False" model="res.partner" name="account.partner.balance.report" string="Partner Balance"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_partner_balance_report" id="menu_partner_balance" parent="account.next_id_22" type="wizard"/> -->
|
||||
<menuitem id="next_id_22" name="Partner Accounts" parent="menu_finance_generic_reporting" sequence="1"/>
|
||||
<menuitem id="next_id_22" name="Partner Accounts" parent="menu_finance_generic_reporting" sequence="1"/>
|
||||
<!--<wizard id="wizard_third_party_ledger" menu="False" model="res.partner" name="account.third_party_ledger.report" string="Partner Ledger"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_third_party_ledger" id="menu_third_party_ledger" parent="account.next_id_22" type="wizard"/> -->
|
||||
|
||||
|
@ -94,30 +94,30 @@
|
|||
|
||||
<wizard id="wizard_validate_account_moves_line" menu="True" model="account.move.line" name="account.move_line.validate" string="Validate Ledger Postings"/>-->
|
||||
|
||||
<!-- Use Models -->
|
||||
<!-- Use Models -->
|
||||
<!-- <wizard string="Create Entries From Models" model="account.model" name="account_use_models" menu="False" id="wizard_account_use_model"/>-->
|
||||
<!-- <menuitem action="wizard_account_use_model" type="wizard" parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>-->
|
||||
|
||||
<!-- <wizard string="Create Entries From Models" model="account.move.line" name="account_use_models" menu="True" id="wizard_line_account_use_model"/>-->
|
||||
|
||||
<!-- account.invoice -->
|
||||
<!-- account.invoice -->
|
||||
<!-- <wizard string="Open State" model="account.invoice" name="account.wizard_paid_open" menu="False" id="wizard_paid_open" groups="base.group_user"/> -->
|
||||
|
||||
<!-- generic report wizard -->
|
||||
<!-- <wizard id="wizard_account_balance_report" menu="False" model="account.account" name="account.account.balance.report" string="Account Balance"/>-->
|
||||
<!-- generic report wizard -->
|
||||
<!-- <wizard id="wizard_account_balance_report" menu="False" model="account.account" name="account.account.balance.report" string="Account Balance"/>-->
|
||||
<!-- <menuitem icon="STOCK_PRINT" action="wizard_account_balance_report" id="menu_account_balance_report" parent="account.menu_generic_report" type="wizard"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_general_ledger" menu="False" model="account.account" name="account.general.ledger.report" string="General Ledger"/>
|
||||
<!-- <wizard id="wizard_general_ledger" menu="False" model="account.account" name="account.general.ledger.report" string="General Ledger"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_general_ledger" id="menu_general_ledger" parent="account.menu_generic_report" type="wizard"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_print_journal" menu="False" model="account.journal.period" name="account.print.journal.report" string="Print Journal" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_print_journal" id="menu_print_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_print_journal" id="menu_print_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
|
||||
<wizard id="wizard_central_journal" menu="False" model="account.journal.period" name="account.central.journal.report" string="Print Central Journal" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_central_journal" id="menu_central_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_central_journal" id="menu_central_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
|
||||
<wizard id="wizard_general_journal" menu="False" model="account.journal.period" name="account.general.journal.report" string="Print General Journal" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_general_journal" id="menu_general_journal" parent="account.menu_generic_report" type="wizard" />-->
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_general_journal" id="menu_general_journal" parent="account.menu_generic_report" type="wizard" />-->
|
||||
|
||||
<!-- <wizard id="wizard_invoice_currency_change" model="account.invoice" name="account.invoice.currency_change" string="Change Currency" groups="base.group_user"/>-->
|
||||
</data>
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
Administrator shortcut
|
||||
Demo user startup menu
|
||||
-->
|
||||
<record id="sc_account_dash" model="ir.ui.view_sc">
|
||||
<!-- <record id="sc_account_dash" model="ir.ui.view_sc">
|
||||
<field name="name">Accounting dashboard</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="sequence">0</field>
|
||||
<field name="res_id" ref="menu_board_account"/>
|
||||
</record>
|
||||
</record> -->
|
||||
<record id="base.user_root" model="res.users">
|
||||
<field name="action_id" ref="open_board_account"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,72 +1,72 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
|
||||
<!-- Types -->
|
||||
<record model="account.account.type" id="conf_account_type_receivable" >
|
||||
<field name="name">Receivable</field>
|
||||
<field name="code">receivable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<!-- Types -->
|
||||
<record model="account.account.type" id="conf_account_type_receivable" >
|
||||
<field name="name">Receivable</field>
|
||||
<field name="code">receivable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_payable" >
|
||||
<field name="name">Payable</field>
|
||||
<field name="code">payable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_payable" >
|
||||
<field name="name">Payable</field>
|
||||
<field name="code">payable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_view">
|
||||
<field name="name">View</field>
|
||||
<field name="code">view</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_view">
|
||||
<field name="name">View</field>
|
||||
<field name="code">view</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_income" >
|
||||
<field name="name">Income</field>
|
||||
<field name="code">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_income" >
|
||||
<field name="name">Income</field>
|
||||
<field name="code">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_expense">
|
||||
<field name="name">Expense</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_expense">
|
||||
<field name="name">Expense</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_tax">
|
||||
<field name="name">Tax</field>
|
||||
<field name="code">tax</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_tax">
|
||||
<field name="name">Tax</field>
|
||||
<field name="code">tax</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_cash">
|
||||
<field name="name">Cash</field>
|
||||
<field name="code">cash</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_cash">
|
||||
<field name="name">Cash</field>
|
||||
<field name="code">cash</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_asset">
|
||||
<field name="name">Asset</field>
|
||||
<field name="code">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_asset">
|
||||
<field name="name">Asset</field>
|
||||
<field name="code">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_equity">
|
||||
<field name="name">Equity</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_equity">
|
||||
<field name="name">Equity</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_bnk">
|
||||
<field name="name">Bank</field>
|
||||
<field name="code">bank</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_chk">
|
||||
<field name="name">Check</field>
|
||||
<field name="code">check</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_bnk">
|
||||
<field name="name">Bank</field>
|
||||
<field name="code">bank</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_chk">
|
||||
<field name="name">Check</field>
|
||||
<field name="code">check</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
|||
<!-- Balance Sheet -->
|
||||
|
||||
<record id="conf_bal" model="account.account.template">
|
||||
<field name="code">1</field>
|
||||
<field name="code">1</field>
|
||||
<field name="name">Balance Sheet</field>
|
||||
<field ref="conf_chart0" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
@ -90,7 +90,7 @@
|
|||
</record>
|
||||
|
||||
<record id="conf_fas" model="account.account.template">
|
||||
<field name="code">10</field>
|
||||
<field name="code">10</field>
|
||||
<field name="name">Fixed Assets</field>
|
||||
<field ref="conf_bal" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
@ -98,7 +98,7 @@
|
|||
</record>
|
||||
|
||||
<record id="conf_xfa" model="account.account.template">
|
||||
<field name="code">100</field>
|
||||
<field name="code">100</field>
|
||||
<field name="name">Fixed Asset Account</field>
|
||||
<field ref="conf_fas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
|
@ -106,7 +106,7 @@
|
|||
</record>
|
||||
|
||||
<record id="conf_nca" model="account.account.template">
|
||||
<field name="code">11</field>
|
||||
<field name="code">11</field>
|
||||
<field name="name">Net Current Assets</field>
|
||||
<field ref="conf_bal" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
@ -114,9 +114,9 @@
|
|||
</record>
|
||||
|
||||
<record id="conf_cas" model="account.account.template">
|
||||
<field name="code">110</field>
|
||||
<field name="code">110</field>
|
||||
<field name="name">Current Assets</field>
|
||||
<field ref="conf_nca" name="parent_id"/>
|
||||
<field ref="conf_nca" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="conf_account_type_view"/>
|
||||
</record>
|
||||
|
@ -143,7 +143,7 @@
|
|||
</record> -->
|
||||
|
||||
<record id="conf_ova" model="account.account.template">
|
||||
<field name="code">1103</field>
|
||||
<field name="code">1103</field>
|
||||
<field name="name">Output VAT</field>
|
||||
<field ref="conf_cas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
|
@ -151,7 +151,7 @@
|
|||
</record>
|
||||
|
||||
<record id="conf_bnk" model="account.account.template">
|
||||
<field name="code">1104</field>
|
||||
<field name="code">1104</field>
|
||||
<field name="name">Bank Current Account</field>
|
||||
<field ref="conf_cas" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
@ -167,7 +167,7 @@
|
|||
</record>
|
||||
|
||||
<record id="conf_cli" model="account.account.template">
|
||||
<field name="code">111</field>
|
||||
<field name="code">111</field>
|
||||
<field name="name">Current Liabilities</field>
|
||||
<field ref="conf_nca" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
@ -188,7 +188,7 @@
|
|||
</record>-->
|
||||
|
||||
<record id="conf_iva" model="account.account.template">
|
||||
<field name="code">1112</field>
|
||||
<field name="code">1112</field>
|
||||
<field name="name">Input VAT</field>
|
||||
<field ref="conf_cli" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
|
@ -198,7 +198,7 @@
|
|||
<!-- Profit and Loss -->
|
||||
|
||||
<record id="conf_gpf" model="account.account.template">
|
||||
<field name="code">2</field>
|
||||
<field name="code">2</field>
|
||||
<field name="name">Profit and Loss</field>
|
||||
<field ref="conf_chart0" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
@ -206,7 +206,7 @@
|
|||
</record>
|
||||
|
||||
<record id="conf_rev" model="account.account.template">
|
||||
<field name="code">20</field>
|
||||
<field name="code">20</field>
|
||||
<field name="name">Revenue</field>
|
||||
<field ref="conf_gpf" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
@ -226,7 +226,7 @@
|
|||
</record> -->
|
||||
|
||||
<record id="conf_cos" model="account.account.template">
|
||||
<field name="code">21</field>
|
||||
<field name="code">21</field>
|
||||
<field name="name">Cost of Sales</field>
|
||||
<field ref="conf_gpf" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
@ -242,7 +242,7 @@
|
|||
</record>
|
||||
|
||||
<record id="conf_ovr" model="account.account.template">
|
||||
<field name="code">22</field>
|
||||
<field name="code">22</field>
|
||||
<field name="name">Overheads</field>
|
||||
<field ref="conf_gpf" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
@ -381,22 +381,22 @@
|
|||
<field name="parent_id" ref="vat_code_base_sales"/>
|
||||
</record>
|
||||
|
||||
<record id="configurable_chart_template" model="account.chart.template">
|
||||
<record id="configurable_chart_template" model="account.chart.template">
|
||||
<field name="name">Configurable Account Chart Template</field>
|
||||
<field name="account_root_id" ref="conf_chart0"/>
|
||||
<field name="tax_code_root_id" ref="vat_code_chart_root"/>
|
||||
<field name="bank_account_view_id" ref="conf_bnk"/>
|
||||
<field name="bank_account_view_id" ref="conf_bnk"/>
|
||||
<field name="property_account_receivable" ref="conf_a_recv"/>
|
||||
<field name="property_account_payable" ref="conf_a_pay"/>
|
||||
<field name="property_account_expense_categ" ref="conf_a_expense"/>
|
||||
<field name="property_account_income_categ" ref="conf_a_sale"/>
|
||||
</record>
|
||||
|
||||
<!-- VAT Codes -->
|
||||
<!-- VAT Codes -->
|
||||
<!-- Purchases + Input VAT -->
|
||||
|
||||
<record id="ivats" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT S</field>
|
||||
<field eval="0.15" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
@ -410,7 +410,7 @@
|
|||
</record>
|
||||
|
||||
<record id="ivatr" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT R</field>
|
||||
<field eval="0.005" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
@ -424,7 +424,7 @@
|
|||
</record>
|
||||
|
||||
<record id="ivatz" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT Z</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
@ -434,7 +434,7 @@
|
|||
</record>
|
||||
|
||||
<record id="ivatx" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT X</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
@ -444,7 +444,7 @@
|
|||
</record>
|
||||
|
||||
<record id="ivato" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT O</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
@ -456,7 +456,7 @@
|
|||
<!-- Sales + Output VAT -->
|
||||
|
||||
<record id="ovats" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT S</field>
|
||||
<field eval="0.15" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
@ -470,7 +470,7 @@
|
|||
</record>
|
||||
|
||||
<record id="ovatr" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT R</field>
|
||||
<field eval="0.005" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
@ -484,7 +484,7 @@
|
|||
</record>
|
||||
|
||||
<record id="ovatz" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT Z</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
@ -494,7 +494,7 @@
|
|||
</record>
|
||||
|
||||
<record id="ovatx" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT X</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
@ -504,7 +504,7 @@
|
|||
</record>
|
||||
|
||||
<record id="ovato" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT O</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
|
|
@ -7,14 +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-06-23 17:24+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"PO-Revision-Date: 2010-06-24 10:03+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\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-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
@ -806,7 +805,7 @@ msgstr "Cuenta de la empresa"
|
|||
#. module: account
|
||||
#: wizard_view:account.subscription.generate,init:0
|
||||
msgid "Generate entries before:"
|
||||
msgstr "Generar asientos antes:"
|
||||
msgstr "Generar asientos hasta:"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.analytic.account.cost_ledger:0
|
||||
|
@ -3680,7 +3679,7 @@ msgstr ""
|
|||
#: wizard_field:account.invoice.pay,addendum,comment:0
|
||||
#: wizard_field:account.invoice.pay,init,name:0
|
||||
msgid "Entry Name"
|
||||
msgstr "Núm. asiento"
|
||||
msgstr "Descripción"
|
||||
|
||||
#. module: account
|
||||
#: help:account.invoice,account_id:0
|
||||
|
|
|
@ -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-05-09 18:34+0000\n"
|
||||
"PO-Revision-Date: 2010-06-25 18:22+0000\n"
|
||||
"Last-Translator: lyyser <logard.1961@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:04+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
@ -466,7 +466,7 @@ msgstr "Panga võrdlus"
|
|||
#. module: account
|
||||
#: rml:account.invoice:0
|
||||
msgid "Disc.(%)"
|
||||
msgstr ""
|
||||
msgstr "Allah. (%)"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.general.ledger:0
|
||||
|
@ -732,7 +732,7 @@ msgstr "Välja nimi"
|
|||
#: field:account.tax.code,sign:0
|
||||
#: field:account.tax.code.template,sign:0
|
||||
msgid "Sign for parent"
|
||||
msgstr ""
|
||||
msgstr "Logi vanemana"
|
||||
|
||||
#. module: account
|
||||
#: field:account.fiscalyear,end_journal_period_id:0
|
||||
|
|
|
@ -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: 2010-05-14 17:04+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 09:57+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
"Language-Team: Galician <gl@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:04+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
@ -2047,7 +2047,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: field:account.journal,invoice_sequence_id:0
|
||||
msgid "Invoice Sequence"
|
||||
msgstr ""
|
||||
msgstr "Secuencia de factura"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.automatic.reconcile,init:0
|
||||
|
@ -3597,7 +3597,7 @@ msgstr ""
|
|||
#: wizard_field:account.invoice.pay,addendum,comment:0
|
||||
#: wizard_field:account.invoice.pay,init,name:0
|
||||
msgid "Entry Name"
|
||||
msgstr ""
|
||||
msgstr "Descripción"
|
||||
|
||||
#. module: account
|
||||
#: help:account.invoice,account_id:0
|
||||
|
@ -5064,7 +5064,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: model:ir.model,name:account.model_fiscalyear_seq
|
||||
msgid "Maintains Invoice sequences with Fiscal Year"
|
||||
msgstr ""
|
||||
msgstr "Mantén secuencias de facturas con exercicio fiscal"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.account.balance.report,checktype,display_account:0
|
||||
|
|
|
@ -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-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -72,8 +72,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook>
|
||||
<page string="Accounting" position="inside">
|
||||
<page string="Notes" position="before">
|
||||
<page string="Accounting">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Customer Accounting Properties" colspan="2"/>
|
||||
<field name="property_account_receivable" groups="account.group_account_user" />
|
||||
|
@ -121,7 +121,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -2,43 +2,43 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_analytic_chart_view" model="ir.ui.view">
|
||||
<field name="name">Account Analytic Chart</field>
|
||||
<field name="model">account.analytic.chart</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Account Charts">
|
||||
<separator string="Select the Period for Analysis" colspan="4"/>
|
||||
<field name="from_date"/>
|
||||
<newline/>
|
||||
<field name="to_date"/>
|
||||
<newline/>
|
||||
<label string="(Keep empty to open the current situation)" align="0.0" colspan="3"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="analytic_account_chart_open_window" string="Open Charts" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_analytic_chart_view" model="ir.ui.view">
|
||||
<field name="name">Chart of Analytic Accounts</field>
|
||||
<field name="model">account.analytic.chart</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Account Charts">
|
||||
<separator string="Select the Period for Analysis" colspan="4"/>
|
||||
<field name="from_date"/>
|
||||
<newline/>
|
||||
<field name="to_date"/>
|
||||
<newline/>
|
||||
<label string="(Keep empty to open the current situation)" align="0.0" colspan="3"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="analytic_account_chart_open_window" string="Open Charts" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_analytic_chart" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Chart of Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.chart</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_analytic_chart_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<record id="action_account_analytic_chart" model="ir.actions.act_window">
|
||||
<field name="name">Chart of Analytic Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.chart</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_analytic_chart_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Analytic Chart of Accounts"
|
||||
parent="account.menu_finance_charts"
|
||||
action="action_account_analytic_chart"
|
||||
id="menu_action_analytic_account_tree2"
|
||||
icon="STOCK_INDENT"/>
|
||||
<menuitem
|
||||
name="Chart of Analytic Accounts"
|
||||
parent="account.menu_finance_charts"
|
||||
action="action_account_analytic_chart"
|
||||
id="menu_action_analytic_account_tree2"
|
||||
icon="STOCK_INDENT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -40,5 +40,7 @@ import account_account_report
|
|||
import account_entries_report
|
||||
import account_analytic_entries_report
|
||||
import voucher_print
|
||||
import report_bs
|
||||
import report_pl
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
<field name="product_id" invisible="1"/>
|
||||
<field name="uom_name" invisible="not context.get('set_visible',False)"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="nbr" sum="# of Lines"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="period_id" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
|
@ -29,6 +27,8 @@
|
|||
<field name="address_invoice_id" invisible="1"/>
|
||||
<field name="partner_bank" invisible="1"/>
|
||||
<field name="account_id" invisible="1"/>
|
||||
<field name="nbr" sum="# of Lines"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="reconciled" sum="# Reconciled"/>
|
||||
<field name="price_average" avg="Average Price"/>
|
||||
<field name="price_total" sum="Total Price"/>
|
||||
|
@ -57,31 +57,31 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Invoices Analysis">
|
||||
<group col="10" colspan="12">
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices of last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices of last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices of last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices of last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Current"
|
||||
icon="terp-check"
|
||||
domain="[('state','in',('draft','open'))]"
|
||||
help = "Draft and Open Invoices"/>
|
||||
<filter string="Pro-forma"
|
||||
icon="terp-check"
|
||||
domain="[('state','=','proforma'),('state','=','proforma2')]"
|
||||
help = "Pro-forma Invoices"/>
|
||||
<filter string="Current"
|
||||
domain="[('state', '=' ,'open')]"
|
||||
help = "open Invoices"/>
|
||||
<filter string="Done"
|
||||
icon="terp-check"
|
||||
domain="[('state','in',('draft','open'))]"
|
||||
help = "Draft and Open Invoices"/>
|
||||
<filter string="Pro-forma"
|
||||
icon="terp-check"
|
||||
domain="[('state','=','proforma'),('state','=','proforma2')]"
|
||||
help = "Pro-forma Invoices"/>
|
||||
<filter string="Current"
|
||||
domain="[('state', '=' ,'open')]"
|
||||
help = "open Invoices"/>
|
||||
<filter string="Done"
|
||||
icon="terp-dialog-close"
|
||||
domain="[('state','=','paid')]"
|
||||
help = "Done Invoices"/>
|
||||
|
@ -89,14 +89,14 @@
|
|||
<field name="partner_id"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-dolar"
|
||||
string="My Invoices"
|
||||
help="My Invoices"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
string="My Invoices"
|
||||
help="My Invoices"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Salesman" name='User' icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Salesman" name='user' icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True}"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -111,9 +111,9 @@
|
|||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<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'}"/>
|
||||
<filter string="Day" name="day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" name="month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" name="year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
|
@ -139,11 +139,19 @@
|
|||
<field name="res_model">account.invoice.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="context">{'search_default_month':1,'search_default_product':1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_report_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_statistic_report_statement" sequence="0"/>
|
||||
|
||||
<act_window
|
||||
domain="[('partner_id', '=', active_id)]"
|
||||
id="act_account_invoice_partner_relation"
|
||||
name="Monthly Turnover"
|
||||
context="{'search_default_month':1,'search_default_user':1,'group_by_no_leaf':1,'group_by':[]}"
|
||||
res_model="account.invoice.report"
|
||||
src_model="res.partner"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<blockTableStyle id="tbl_header">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
|
||||
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
|
@ -103,7 +103,7 @@
|
|||
<td><para style="P9">Balance</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<section>
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
<blockTable rowHeights="0.65cm" colWidths="66.0,124.0,70.0,40.0,80.0,59.0,52.0,54.0" style="tbl_content">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
|
@ -137,9 +137,9 @@
|
|||
<td><para style="P4">[[ formatLang(line['progress']) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<blockTable colWidths="72.0,93.0,66.0,40.0,100.0,50.0,50.0,50.0,40.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
</stylesheet>
|
||||
<story>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
|
||||
|
||||
<blockTable colWidths="66.0,35.0,150.0, 90.0,60.0,335.0,50.0,69.0,72.0,64.0,58.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="date">Date</para></td>
|
||||
|
@ -99,11 +99,11 @@
|
|||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Currency</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<section>
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
|
||||
|
||||
<blockTable rowHeights="0.65cm" colWidths="66.0,35.0,150.0, 90.0,60.0,335.0,50.0,69.0,72.0,64.0,58.0" style="tbl_content">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -143,9 +143,9 @@
|
|||
<td><para style="P4_content">[[ formatLang(line['amount_currency'] or 0.00)]] [[ line['currency_code'] ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<blockTable colWidths="66.0,35.0,166.0,90.0,60.0,378.0,50.0,69.0,72.0,64.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="date">Date</para></td>
|
||||
|
@ -160,11 +160,11 @@
|
|||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Balance</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
|
||||
|
||||
<blockTable rowHeights="0.65cm" colWidths="66.0,35.0,166.0,90.0,60.0,378.0,50.0,69.0,72.0,64.0" style="tbl_content">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -201,7 +201,7 @@
|
|||
<td><para style="P4_content">[[ formatLang(line['progress']) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
|
|
|
@ -24,7 +24,7 @@ import time
|
|||
import mx.DateTime
|
||||
import rml_parse
|
||||
from report import report_sxw
|
||||
from account_report_india.report import report_pl
|
||||
from account.report import report_pl
|
||||
|
||||
class report_balancesheet_horizontal(rml_parse.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
|
@ -195,9 +195,9 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
|
|||
return comp_obj.name
|
||||
|
||||
report_sxw.report_sxw('report.account.balancesheet.horizontal', 'account.account',
|
||||
'addons/account_report_india/report/report_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal,
|
||||
'addons/account/report/report_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal,
|
||||
header=False)
|
||||
|
||||
report_sxw.report_sxw('report.account.balancesheet', 'account.account',
|
||||
'addons/account_report_india/report/report_balance_sheet.rml',parser=report_balancesheet_horizontal,
|
||||
'addons/account/report/report_balance_sheet.rml',parser=report_balancesheet_horizontal,
|
||||
header=False)
|
|
@ -170,8 +170,8 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
|
|||
return comp_obj.name
|
||||
|
||||
report_sxw.report_sxw('report.pl.account.horizontal', 'account.account',
|
||||
'addons/account_report_india/report/report_pl_account_horizontal.rml',parser=report_pl_account_horizontal, header=False)
|
||||
'addons/account/report/report_pl_account_horizontal.rml',parser=report_pl_account_horizontal, header=False)
|
||||
|
||||
report_sxw.report_sxw('report.pl.account', 'account.account',
|
||||
'addons/account_report_india/report/report_pl_account.rml',parser=report_pl_account_horizontal, header=False)
|
||||
'addons/account/report/report_pl_account.rml',parser=report_pl_account_horizontal, header=False)
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><openerp><data noupdate="0">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp><data>
|
||||
|
||||
<record id="group_account_invoice" model="res.groups">
|
||||
<field name="name">Finance / Invoice</field>
|
||||
|
|
|
@ -58,6 +58,8 @@ import account_central_journal
|
|||
import account_general_journal
|
||||
import account_change_currency
|
||||
|
||||
import account_bs_report
|
||||
import account_pl_report
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
|
|
|
@ -8,14 +8,16 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select period">
|
||||
<group width="660" height="480">
|
||||
<field name="company_id"/>
|
||||
<field name="display_account" required = "True"/>
|
||||
<newline/>
|
||||
<field name="fiscalyear"/>
|
||||
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
|
||||
<field name="display_type"/>
|
||||
<newline/>
|
||||
<separator string="Filters" colspan="4"/>
|
||||
<field name="state" required="True"/>
|
||||
<newline/>
|
||||
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
|
||||
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
|
||||
<separator string="Date Filter" colspan="4"/>
|
||||
|
@ -27,12 +29,12 @@
|
|||
<field name="periods" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_pl_report_view" model="ir.ui.view">
|
||||
<field name="name">Select period</field>
|
||||
<field name="model">account.pl.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select period">
|
||||
<field name="company_id"/>
|
||||
<field name="display_account" required = "True"/>
|
||||
<newline/>
|
||||
<field name="fiscalyear"/>
|
||||
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
|
||||
<field name="display_type"/>
|
||||
<newline/>
|
||||
<separator string="Filters" colspan="4"/>
|
||||
<field name="state" required="True"/>
|
||||
<newline/>
|
||||
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
|
||||
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
|
||||
<separator string="Date Filter" colspan="4"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
|
||||
<separator string="Filter on Periods" colspan="4"/>
|
||||
<field name="periods" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_pl_report" model="ir.actions.act_window">
|
||||
<field name="name">Account Profit And Loss</field>
|
||||
<field name="res_model">account.pl.report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_pl_report_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="account_pl_report_account_view" model="ir.ui.view">
|
||||
<field name="name">Account Chart</field>
|
||||
<field name="model">account.pl.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Chart">
|
||||
<field name="Account_list"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_pl_balance_account_report" model="ir.actions.act_window">
|
||||
<field name="name">Select Account</field>
|
||||
<field name="res_model">account.pl.report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="account_pl_report_account_view"/>
|
||||
<field name="context">{'record_id':active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="final_accounting_reports"
|
||||
name="Accounting Reports"/>
|
||||
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
name="Profit And Loss"
|
||||
action="action_pl_balance_account_report"
|
||||
id="menu_account_pl_report"
|
||||
parent="final_accounting_reports"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -2,37 +2,37 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_subscription_generate" model="ir.ui.view">
|
||||
<record id="view_account_subscription_generate" model="ir.ui.view">
|
||||
<field name="name">account.subscription.generate.form</field>
|
||||
<field name="model">account.subscription.generate</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Subscription Compute">
|
||||
<group colspan="4" >
|
||||
<separator string="Generate entries before:" colspan="4"/>
|
||||
<field name="date"/>
|
||||
<group colspan="4" >
|
||||
<separator string="Generate entries before:" colspan="4"/>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
<button icon="gtk-execute" string="Compute Entry Dates"
|
||||
name="action_generate" type="object" />
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
<button icon="gtk-execute" string="Compute Entry Dates"
|
||||
name="action_generate" type="object" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_account_subscription_generate" model="ir.actions.act_window">
|
||||
<field name="name">Create Subscription Entries</field>
|
||||
<field name="name">Automatic Recurring</field>
|
||||
<field name="res_model">account.subscription.generate</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_account_subscription_generate"/>
|
||||
<field name="target">new</field>
|
||||
<field name="view_id" ref="view_account_subscription_generate"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_subscription_generate" id="menu_generate_subscription" parent="menu_finance_periodical_processing" />
|
||||
<menuitem action="action_account_subscription_generate" id="menu_generate_subscription" parent="account.menu_finance_recurrent_entries" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -2,89 +2,88 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_use_model" model="ir.ui.view">
|
||||
<record id="view_account_use_model" model="ir.ui.view">
|
||||
<field name="name">account.use.model.form</field>
|
||||
<field name="model">account.use.model</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Entries From Models">
|
||||
<group height="250" width="470">
|
||||
<separator string="This wizard will create entries from Models" colspan="4"/>
|
||||
<separator string="Account Models" colspan="4"/>
|
||||
<field name="model" nolabel="1"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="2">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Create Entries" name="create_entries" type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<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"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="2">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Create Entries" name="create_entries" type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_account_use_model" model="ir.actions.act_window">
|
||||
<field name="name">Create Entries From Models</field>
|
||||
<record id="action_view_account_use_model" model="ir.actions.act_window">
|
||||
<field name="name">Manual Recurring</field>
|
||||
<field name="res_model">account.use.model</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_account_use_model"/>
|
||||
<field name="target">new</field>
|
||||
<field name="context">{'model_line':'model_line'}</field>
|
||||
<field name="view_id" ref="view_account_use_model"/>
|
||||
<field name="target">new</field>
|
||||
<field name="context">{'model_line':'model_line'}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="action_account_use_model_values">
|
||||
<field name="model_id" ref="account.model_account_move_line" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Create Entries From Models</field>
|
||||
<field name="name">Manual Recurring</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_use_model'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.move.line</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_view_account_use_model" name="Create Entries From Models"
|
||||
parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>
|
||||
<menuitem action="action_view_account_use_model"
|
||||
parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>
|
||||
|
||||
<record id="view_account_use_model_open_entry" model="ir.ui.view">
|
||||
<record id="view_account_use_model_open_entry" model="ir.ui.view">
|
||||
<field name="name">account.use.model.open.entry.form</field>
|
||||
<field name="model">account.use.model</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Use Model">
|
||||
<group colspan="4" col="6">
|
||||
<label string = "Entry Lines Created." colspan="2"/>
|
||||
<newline/>
|
||||
<button icon="gtk-ok" special="cancel" string="Ok"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open" name="open_moves" type="object" default_focus='1'/>
|
||||
<group colspan="4" col="6">
|
||||
<label string = "Entry Lines Created." colspan="2"/>
|
||||
<newline/>
|
||||
<button icon="gtk-ok" special="cancel" string="Ok"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open" name="open_moves" type="object" default_focus='1'/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_use_model_create_entry" model="ir.ui.view">
|
||||
<record id="view_account_use_model_create_entry" model="ir.ui.view">
|
||||
<field name="name">account.use.model.create.entry.form</field>
|
||||
<field name="model">account.use.model</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Use Model">
|
||||
<group colspan="4" col="6">
|
||||
<label string = "Are you sure you want to create entries?" colspan="2"/>
|
||||
<newline/>
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Ok" name="create_entries" type="object" default_focus='1'/>
|
||||
<group colspan="4" col="6">
|
||||
<label string = "Are you sure you want to create entries?" colspan="2"/>
|
||||
<newline/>
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Ok" name="create_entries" type="object" default_focus='1'/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_use_model_create_entry" model="ir.actions.act_window">
|
||||
<field name="name">Create Entries From Models</field>
|
||||
<record id="action_account_use_model_create_entry" model="ir.actions.act_window">
|
||||
<field name="name">Manual Recurring</field>
|
||||
<field name="res_model">account.use.model</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_account_use_model_create_entry"/>
|
||||
<field name="target">new</field>
|
||||
<field name="view_id" ref="view_account_use_model_create_entry"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -2,23 +2,22 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!--Account Moves-->
|
||||
<!--Account Moves-->
|
||||
<record id="validate_account_move_view" model="ir.ui.view">
|
||||
<field name="name">Validate Account Move</field>
|
||||
<field name="model">validate.account.move</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Validate Account Entries">
|
||||
<separator string="Select Period and Journal for Validation" colspan="4"/>
|
||||
<field name="journal_id"/>
|
||||
<newline/>
|
||||
<field name="period_id"/>
|
||||
<separator string="Information" colspan="4"/>
|
||||
<label string="All draft account entries in this journal and period will be validated. It means you won't be able to modify their accouting fields." colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-camera_test" string="Validate" name="validate_move" type="object"/>
|
||||
</group>
|
||||
<form string="Validate Account Entries">
|
||||
<separator string="Validate Journal Entries of a Journal" colspan="4"/>
|
||||
<label string="All draft account entries in this journal and period will be validated. It means you won't be able to modify their accouting fields." colspan="4"/>
|
||||
<field name="journal_id"/>
|
||||
<newline/>
|
||||
<field name="period_id"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-camera_test" string="Validate" name="validate_move" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -33,38 +32,38 @@
|
|||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Validate Ledger Postings"
|
||||
parent="periodical_processing_journal_entries_validation"
|
||||
action="action_validate_account_move"
|
||||
id="menu_validate_account_moves"
|
||||
/>
|
||||
name="Validate Ledger Postings"
|
||||
parent="periodical_processing_journal_entries_validation"
|
||||
action="action_validate_account_move"
|
||||
id="menu_validate_account_moves"
|
||||
/>
|
||||
|
||||
<!--Account Move lines-->
|
||||
<record id="validate_account_move_line_view" model="ir.ui.view">
|
||||
<record id="validate_account_move_line_view" model="ir.ui.view">
|
||||
<field name="name">Validate Ledger Postings</field>
|
||||
<field name="model">validate.account.move.lines</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Validate Moves">
|
||||
<separator string="Validate Ledger Postings" colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="validate_move_lines" string="Validate" type="object" icon="gtk-go-forward" default_focus="1"/>
|
||||
</form>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="validate_move_lines" string="Validate" type="object" icon="gtk-go-forward" default_focus="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_validate_account_move_line" model="ir.actions.act_window">
|
||||
<record id="action_validate_account_move_line" model="ir.actions.act_window">
|
||||
<field name="name">Validate Ledger Postings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">validate.account.move.lines</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="validate_account_move_line_view"/>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="validate_account_move_line_values">
|
||||
<record model="ir.values" id="validate_account_move_line_values">
|
||||
<field name="model_id" ref="account.model_account_move_line" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Validate Ledger Postings</field>
|
||||
|
|
|
@ -26,7 +26,7 @@ from osv import fields,osv
|
|||
#----------------------------------------------------------
|
||||
class stock_picking(osv.osv):
|
||||
_inherit = "stock.picking"
|
||||
_description = "Packing List"
|
||||
_description = "Picking List"
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, journal_id=False,
|
||||
group=False, type='out_invoice', context=None):
|
||||
|
|
|
@ -14,7 +14,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-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_budget
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="True">
|
||||
|
||||
<data>
|
||||
|
||||
<!-- deactivate minimal account -->
|
||||
<record id="account.minimal_0" model="account.account">
|
||||
<field eval="False" name="active"/>
|
||||
|
@ -21,6 +21,6 @@
|
|||
<record id="account.a_sale" model="account.account">
|
||||
<field eval="False" name="active"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
# Spanish 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-24 13:11+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 09:42+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
"Language-Team: Spanish <es@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-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,journal_id:0
|
||||
#: wizard_field:account.coda_import,init,journal_id:0
|
||||
msgid "Bank Journal"
|
||||
msgstr "Diario bancario"
|
||||
|
||||
#. module: account_coda
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"¡El objeto debe empezar con x_ y no puede contener ningún carácter especial!"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,extraction,note:0
|
||||
msgid "Log"
|
||||
msgstr "Registro"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_button:account.coda_import,extraction,open:0
|
||||
msgid "_Open Statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
|
||||
msgid "Account CODA"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,name:0
|
||||
msgid "Coda file"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,init:0
|
||||
msgid "Clic on 'New' to select your file :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
|
||||
msgid "Import Coda File"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Nombre de modelo inválido en la definición de acción."
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,note:0
|
||||
msgid "Import log"
|
||||
msgstr "Registro de importación"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,init,def_receivable:0
|
||||
msgid "Default receivable Account"
|
||||
msgstr "Cuenta a recibir por defecto"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.module.module,description:account_coda.module_meta_information
|
||||
msgid ""
|
||||
"Module provides functionality to import\n"
|
||||
" bank statements from .csv file.\n"
|
||||
" Import coda file wizard is used to import bank statements."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_button:account.coda_import,extraction,end:0
|
||||
msgid "_Close"
|
||||
msgstr "_Cerrar"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,statement_id:0
|
||||
msgid "Generated Bank Statement"
|
||||
msgstr "Extracto bancario generado"
|
||||
|
||||
#. module: account_coda
|
||||
#: view:account.coda:0
|
||||
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
|
||||
#: model:ir.actions.act_window,name:account_coda.action_account_coda
|
||||
msgid "Coda import"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,user_id:0
|
||||
msgid "User"
|
||||
msgstr "Usuario"
|
||||
|
||||
#. module: account_coda
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "¡XML inválido para la estructura de la vista!"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.model,name:account_coda.model_account_coda
|
||||
msgid "coda for an Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,init,def_payable:0
|
||||
msgid "Default Payable Account"
|
||||
msgstr "Cuenta a pagar por defecto"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.ui.menu,name:account_coda.menu_account_coda
|
||||
msgid "Coda Statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
|
||||
msgid "Import Coda Statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_button:account.coda_import,init,extraction:0
|
||||
msgid "_Ok"
|
||||
msgstr "_Aceptar"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,extraction:0
|
||||
#: wizard_view:account.coda_import,init:0
|
||||
msgid "Import Coda Statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.bank.statement,coda_id:0
|
||||
msgid "Coda"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,extraction:0
|
||||
msgid "Results :"
|
||||
msgstr "Resultados :"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,init,coda:0
|
||||
msgid "Coda File"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,date:0
|
||||
msgid "Import Date"
|
||||
msgstr "Fecha de importación"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,init:0
|
||||
msgid "Select your bank journal :"
|
||||
msgstr "Seleccione su diario bancario :"
|
|
@ -271,7 +271,7 @@ class account_followup_print_all(osv.osv_memory):
|
|||
data['followup_id'] = 'followup_id' in context and context['followup_id'] or False
|
||||
date = 'date' in context and context['date'] or data['date']
|
||||
for id in to_update.keys():
|
||||
if to_update[id]['partner_id'] in data['partner_ids'][0][2]:
|
||||
if to_update[id]['partner_id'] in data['partner_ids']:
|
||||
cr.execute(
|
||||
"UPDATE account_move_line "\
|
||||
"SET followup_line_id=%s, followup_date=%s "\
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
<data noupdate="0">
|
||||
|
||||
<!--<wizard string="Send followups"
|
||||
name="account_followup.followup.print.all"
|
||||
|
@ -13,23 +13,23 @@
|
|||
type="wizard" />-->
|
||||
|
||||
|
||||
<record id="view_account_followup_print" model="ir.ui.view">
|
||||
<record id="view_account_followup_print" model="ir.ui.view">
|
||||
<field name="name">account.followup.print.form</field>
|
||||
<field name="model">account.followup.print</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Send followups">
|
||||
<group col="4" colspan="6">
|
||||
<field name="followup_id"/>
|
||||
<field name="date"/>
|
||||
<newline/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="do_continue" string="Continue" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Send followups">
|
||||
<group col="4" colspan="6">
|
||||
<field name="followup_id"/>
|
||||
<field name="date"/>
|
||||
<newline/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="do_continue" string="Continue" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="account_followup_print_values">
|
||||
<record model="ir.values" id="account_followup_print_values">
|
||||
<field name="model_id" ref="model_account_followup_followup" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Send followups</field>
|
||||
|
@ -60,61 +60,61 @@
|
|||
|
||||
<!-- Screen2 -->
|
||||
|
||||
<record id="view_account_followup_print_all" model="ir.ui.view">
|
||||
<record id="view_account_followup_print_all" model="ir.ui.view">
|
||||
<field name="name">account.followup.print.all.form</field>
|
||||
<field name="model">account.followup.print.all</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Send followups">
|
||||
<group col="4" colspan="6">
|
||||
<notebook>
|
||||
<page string="Partner Selection">
|
||||
<separator string="Select partners to remind" colspan="4"/>
|
||||
<field name="partner_ids" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Email Settings">
|
||||
<field name="email_conf" colspan="4"/>
|
||||
<field name="partner_lang" colspan="4"/>
|
||||
<field name="email_subject" colspan="4"/>
|
||||
<!--<separator string="Email body" colspan="4" attrs="{'readonly':[('partner_lang','=',True)]}"/>-->
|
||||
<separator string="Email body" colspan="4" />
|
||||
<field name="email_body" colspan="4" nolabel="1"/>
|
||||
<separator string="Legend" colspan="4"/>
|
||||
<label string="%%(partner_name)s: Partner name" colspan="2"/>
|
||||
<label string="%%(user_signature)s: User name" colspan="2"/>
|
||||
<label string="%%(followup_amount)s: Total Amount Due" colspan="2"/>
|
||||
<label string="%%(date)s: Current Date" colspan="2"/>
|
||||
<label string="%%(company_name)s: User's Company name" colspan="2"/>
|
||||
<label string="%%(company_currency)s: User's Company Currency" colspan="2"/>
|
||||
<label string="%%(heading)s: Move line header" colspan="2"/>
|
||||
<label string="%%(line)s: Ledger Posting lines" colspan="2"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="do_print" string="Print Follow Ups" colspan="1" type="object" icon="gtk-print"/>
|
||||
<button name="do_mail" string="Send Mails" colspan="1" type="object" icon="gtk-execute"/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Send followups">
|
||||
<group col="4" colspan="6">
|
||||
<notebook>
|
||||
<page string="Partner Selection">
|
||||
<separator string="Select partners to remind" colspan="4"/>
|
||||
<field name="partner_ids" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Email Settings">
|
||||
<field name="email_conf" colspan="4"/>
|
||||
<field name="partner_lang" colspan="4"/>
|
||||
<field name="email_subject" colspan="4"/>
|
||||
<!--<separator string="Email body" colspan="4" attrs="{'readonly':[('partner_lang','=',True)]}"/>-->
|
||||
<separator string="Email body" colspan="4" />
|
||||
<field name="email_body" colspan="4" nolabel="1"/>
|
||||
<separator string="Legend" colspan="4"/>
|
||||
<label string="%%(partner_name)s: Partner name" colspan="2"/>
|
||||
<label string="%%(user_signature)s: User name" colspan="2"/>
|
||||
<label string="%%(followup_amount)s: Total Amount Due" colspan="2"/>
|
||||
<label string="%%(date)s: Current Date" colspan="2"/>
|
||||
<label string="%%(company_name)s: User's Company name" colspan="2"/>
|
||||
<label string="%%(company_currency)s: User's Company Currency" colspan="2"/>
|
||||
<label string="%%(heading)s: Move line header" colspan="2"/>
|
||||
<label string="%%(line)s: Ledger Posting lines" colspan="2"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="do_print" string="Print Follow Ups" colspan="1" type="object" icon="gtk-print"/>
|
||||
<button name="do_mail" string="Send Mails" colspan="1" type="object" icon="gtk-execute"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_followup_print_all_msg" model="ir.ui.view">
|
||||
<record id="view_account_followup_print_all_msg" model="ir.ui.view">
|
||||
<field name="name">account.followup.print.all.msg.form</field>
|
||||
<field name="model">account.followup.print.all</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Summary">
|
||||
<group col="4" colspan="6">
|
||||
<field name="summary" height="300" width="800"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group>
|
||||
<button special="cancel" string="Ok" icon='gtk-cancel'/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Summary">
|
||||
<group col="4" colspan="6">
|
||||
<field name="summary" height="300" width="800"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group>
|
||||
<button special="cancel" string="Ok" icon='gtk-cancel'/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -128,5 +128,5 @@
|
|||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -14,7 +14,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-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_payment
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
import report
|
||||
import wizard
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
import report_bs
|
||||
import report_pl
|
|
@ -1,165 +0,0 @@
|
|||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
from report import report_sxw
|
||||
import xml.dom.minidom
|
||||
import os, time
|
||||
import osv
|
||||
import re
|
||||
import tools
|
||||
import pooler
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
class rml_parse(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(rml_parse, self).__init__(cr, uid, name, context=None)
|
||||
self.localcontext.update({
|
||||
'comma_me': self.comma_me,
|
||||
'format_date': self._get_and_change_date_format_for_swiss,
|
||||
'strip_name' : self._strip_name,
|
||||
'explode_name' : self._explode_name,
|
||||
})
|
||||
|
||||
def comma_me(self,amount):
|
||||
#print "#" + str(amount) + "#"
|
||||
if not amount:
|
||||
amount = 0.0
|
||||
if type(amount) is float :
|
||||
amount = str('%.2f'%amount)
|
||||
else :
|
||||
amount = str(amount)
|
||||
if (amount == '0'):
|
||||
return ' '
|
||||
orig = amount
|
||||
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
|
||||
if orig == new:
|
||||
return new
|
||||
else:
|
||||
return self.comma_me(new)
|
||||
|
||||
def _ellipsis(self, string, maxlen=100, ellipsis = '...'):
|
||||
ellipsis = ellipsis or ''
|
||||
try:
|
||||
return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen]
|
||||
except Exception, e:
|
||||
return False
|
||||
|
||||
def _strip_name(self, name, maxlen=50):
|
||||
return self._ellipsis(name, maxlen, '...')
|
||||
|
||||
def _get_and_change_date_format_for_swiss (self,date_to_format):
|
||||
date_formatted=''
|
||||
if date_to_format:
|
||||
date_formatted = strptime (date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
|
||||
return date_formatted
|
||||
|
||||
def _explode_name(self,chaine,length):
|
||||
# We will test if the size is less then account
|
||||
full_string = ''
|
||||
if (len(str(chaine)) <= length):
|
||||
return chaine
|
||||
#
|
||||
else:
|
||||
chaine = unicode(chaine,'utf8').encode('iso-8859-1')
|
||||
rup = 0
|
||||
for carac in chaine:
|
||||
rup = rup + 1
|
||||
if rup == length:
|
||||
full_string = full_string + '\n'
|
||||
full_string = full_string + carac
|
||||
rup = 0
|
||||
else:
|
||||
full_string = full_string + carac
|
||||
|
||||
return full_string
|
||||
|
||||
def makeAscii(self,str):
|
||||
try:
|
||||
Stringer = str.encode("utf-8")
|
||||
except UnicodeDecodeError:
|
||||
try:
|
||||
Stringer = str.encode("utf-16")
|
||||
except UnicodeDecodeError:
|
||||
print "UTF_16 Error"
|
||||
Stringer = str
|
||||
else:
|
||||
return Stringer
|
||||
else:
|
||||
return Stringer
|
||||
return Stringer
|
||||
|
||||
def explode_this(self,chaine,length):
|
||||
#chaine = self.repair_string(chaine)
|
||||
chaine = rstrip(chaine)
|
||||
ast = list(chaine)
|
||||
i = length
|
||||
while i <= len(ast):
|
||||
ast.insert(i,'\n')
|
||||
i = i + length
|
||||
chaine = str("".join(ast))
|
||||
return chaine
|
||||
|
||||
def repair_string(self,chaine):
|
||||
ast = list(chaine)
|
||||
UnicodeAst = []
|
||||
_previouslyfound = False
|
||||
i = 0
|
||||
#print str(ast)
|
||||
while i < len(ast):
|
||||
elem = ast[i]
|
||||
try:
|
||||
Stringer = elem.encode("utf-8")
|
||||
except UnicodeDecodeError:
|
||||
to_reencode = elem + ast[i+1]
|
||||
print str(to_reencode)
|
||||
Good_char = to_reencode.decode('utf-8')
|
||||
UnicodeAst.append(Good_char)
|
||||
i += i +2
|
||||
else:
|
||||
UnicodeAst.append(elem)
|
||||
i += i + 1
|
||||
return "".join(UnicodeAst)
|
||||
|
||||
def ReencodeAscii(self,str):
|
||||
print sys.stdin.encoding
|
||||
try:
|
||||
Stringer = str.decode("ascii")
|
||||
except UnicodeEncodeError:
|
||||
print "REENCODING ERROR"
|
||||
return str.encode("ascii")
|
||||
except UnicodeDecodeError:
|
||||
print "DECODING ERROR"
|
||||
return str.encode("ascii")
|
||||
else:
|
||||
print Stringer
|
||||
return Stringer
|
||||
|
||||
def _add_header(self, node, header=1):
|
||||
if header==2:
|
||||
rml_head = self.rml_header2
|
||||
else:
|
||||
rml_head = self.rml_header
|
||||
rml_head = rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
|
||||
return True
|
||||
|
||||
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_pl_report_view" model="ir.ui.view">
|
||||
<field name="name">Select period</field>
|
||||
<field name="model">account.pl.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select period">
|
||||
<group width="660" height="480">
|
||||
<field name="company_id"/>
|
||||
<field name="display_account" required = "True"/>
|
||||
<field name="fiscalyear"/>
|
||||
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
|
||||
<field name="display_type"/>
|
||||
<separator string="Filters" colspan="4"/>
|
||||
<field name="state" required="True"/>
|
||||
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
|
||||
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
|
||||
<separator string="Date Filter" colspan="4"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
|
||||
<separator string="Filter on Periods" colspan="4"/>
|
||||
<field name="periods" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_pl_report" model="ir.actions.act_window">
|
||||
<field name="name">Account Profit And Loss</field>
|
||||
<field name="res_model">account.pl.report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_pl_report_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="account_pl_report_account_view" model="ir.ui.view">
|
||||
<field name="name">Account Chart</field>
|
||||
<field name="model">account.pl.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Chart">
|
||||
<field name="Account_list"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_pl_balance_account_report" model="ir.actions.act_window">
|
||||
<field name="name">Select Account</field>
|
||||
<field name="res_model">account.pl.report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="account_pl_report_account_view"/>
|
||||
<field name="context">{'record_id':active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="final_accounting_reports"
|
||||
name="Accounting Reports"/>
|
||||
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
name="Profit And Loss"
|
||||
action="action_pl_balance_account_report"
|
||||
id="menu_account_pl_report"
|
||||
parent="final_accounting_reports"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -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: 2009-11-17 09:23+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2010-06-27 21:01+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\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:17+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-28 03:48+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_voucher
|
||||
|
@ -215,7 +215,7 @@ msgstr "Estado"
|
|||
#: selection:account.voucher.line,type:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Debit"
|
||||
msgstr "Débito"
|
||||
msgstr "Debe"
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,type:0
|
||||
|
|
|
@ -153,13 +153,15 @@ class account_analytic_account(osv.osv):
|
|||
def name_get(self, cr, uid, ids, context={}):
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.read(cr, uid, ids, ['name','parent_id'], context)
|
||||
res = []
|
||||
for record in reads:
|
||||
name = record['name']
|
||||
if record['parent_id']:
|
||||
name = record['parent_id'][1]+' / '+name
|
||||
res.append((record['id'], name))
|
||||
for account in self.browse(cr, uid, ids, context=context):
|
||||
data = []
|
||||
acc = account
|
||||
while acc:
|
||||
data.insert(0, acc.name)
|
||||
acc = acc.parent_id
|
||||
data = ' / '.join(data)
|
||||
res.append((account.id, data))
|
||||
return res
|
||||
|
||||
def _complete_name_calc(self, cr, uid, ids, prop, unknow_none, unknow_dict):
|
||||
|
@ -197,7 +199,7 @@ class account_analytic_account(osv.osv):
|
|||
'date': fields.date('Date End'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'company_currency_id': fields.function(_get_company_currency, method=True, type='many2one', relation='res.currency', string='Currency'),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,readonly=True,
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
|
||||
help='* When an account is created its in \'Draft\' state.\
|
||||
\n* If any associated partner is there, it can be in \'Open\' state.\
|
||||
\n* If any pending balance is there it can be in \'Pending\'. \
|
||||
|
@ -314,7 +316,7 @@ class account_analytic_line(osv.osv):
|
|||
|
||||
_columns = {
|
||||
'name' : fields.char('Description', size=256, required=True),
|
||||
'date' : fields.date('Date', required=True),
|
||||
'date' : fields.date('Date', required=True, select=1),
|
||||
'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price.'),
|
||||
'unit_amount' : fields.float('Quantity', help='Specifies the amount of quantity to count.'),
|
||||
'account_id' : fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True),
|
||||
|
|
|
@ -2,30 +2,30 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
#
|
||||
# Sequences for sale.order
|
||||
#
|
||||
#
|
||||
# Sequences for sale.order
|
||||
#
|
||||
|
||||
<record model="ir.sequence.type" id="seq_type_auction_deposit">
|
||||
<field name="name">Auction deposit</field>
|
||||
<field name="code">auction.deposit</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_sale_order">
|
||||
<field name="name">Auction deposit</field>
|
||||
<field name="code">auction.deposit</field>
|
||||
<field name="prefix">AD/</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_bid">
|
||||
<field name="name">Auction bid </field>
|
||||
<field name="code">auction.bid</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_auction_bid">
|
||||
<field name="name">Auction bid</field>
|
||||
<field name="code">auction.bid</field>
|
||||
<field name="prefix">bid/</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_auction_deposit">
|
||||
<field name="name">Auction deposit</field>
|
||||
<field name="code">auction.deposit</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_sale_order">
|
||||
<field name="name">Auction deposit</field>
|
||||
<field name="code">auction.deposit</field>
|
||||
<field name="prefix">AD/</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_bid">
|
||||
<field name="name">Auction bid </field>
|
||||
<field name="code">auction.bid</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_auction_bid">
|
||||
<field name="name">Auction bid</field>
|
||||
<field name="code">auction.bid</field>
|
||||
<field name="prefix">bid/</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record model="ir.ui.view_sc" id="sc_auction_dash">
|
||||
<field name="name">Auction dashboard</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="sequence">4</field>
|
||||
<field name="res_id" ref="menu_board_auction"/>
|
||||
</record>
|
||||
<!-- <record model="ir.ui.view_sc" id="sc_auction_dash">-->
|
||||
<!-- <field name="name">Auction dashboard</field>-->
|
||||
<!-- <field name="user_id" ref="base.user_root"/>-->
|
||||
<!-- <field name="resource">ir.ui.menu</field>-->
|
||||
<!-- <field name="sequence">4</field>-->
|
||||
<!-- <field name="res_id" ref="menu_board_auction"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -25,6 +25,7 @@ from tools.translate import _
|
|||
import ir
|
||||
import pooler
|
||||
import time
|
||||
import tools
|
||||
|
||||
class audittrail_rule(osv.osv):
|
||||
"""
|
||||
|
@ -33,25 +34,28 @@ class audittrail_rule(osv.osv):
|
|||
_name = 'audittrail.rule'
|
||||
_description = "Audittrail Rule"
|
||||
_columns = {
|
||||
"name": fields.char("Rule Name", size=32, required=True),
|
||||
"object_id": fields.many2one('ir.model', 'Object', required=True),
|
||||
"user_id": fields.many2many('res.users', 'audittail_rules_users',
|
||||
'user_id', 'rule_id', 'Users'),
|
||||
"log_read": fields.boolean("Log reads"),
|
||||
"log_write": fields.boolean("Log writes"),
|
||||
"log_unlink": fields.boolean("Log deletes"),
|
||||
"log_create": fields.boolean("Log creates"),
|
||||
"state": fields.selection((("draft", "Draft"),
|
||||
("subscribed", "Subscribed")),
|
||||
"State", required=True),
|
||||
"action_id": fields.many2one('ir.actions.act_window', "Action ID"),
|
||||
"name": fields.char("Rule Name", size=32, required=True),
|
||||
"object_id": fields.many2one('ir.model', 'Object', required=True),
|
||||
"user_id": fields.many2many('res.users', 'audittail_rules_users',
|
||||
'user_id', 'rule_id', 'Users', help="if User is not added then it will applicable for all users"),
|
||||
"log_read": fields.boolean("Log Reads"),
|
||||
"log_write": fields.boolean("Log Writes"),
|
||||
"log_unlink": fields.boolean("Log Deletes"),
|
||||
"log_create": fields.boolean("Log Creates"),
|
||||
"log_action": fields.boolean("Log Action"),
|
||||
"log_workflow": fields.boolean("Log Workflow"),
|
||||
"state": fields.selection((("draft", "Draft"),
|
||||
("subscribed", "Subscribed")),
|
||||
"State", required=True),
|
||||
"action_id": fields.many2one('ir.actions.act_window', "Action ID"),
|
||||
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
'log_create': lambda *a: 1,
|
||||
'log_unlink': lambda *a: 1,
|
||||
'log_write': lambda *a: 1,
|
||||
'state': lambda *a: 'draft',
|
||||
'log_create': lambda *a: 1,
|
||||
'log_unlink': lambda *a: 1,
|
||||
'log_write': lambda *a: 1,
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
|
@ -65,7 +69,7 @@ class audittrail_rule(osv.osv):
|
|||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Auddittrail Rule’s IDs.
|
||||
@return: True
|
||||
@return: True
|
||||
"""
|
||||
obj_action = self.pool.get('ir.actions.act_window')
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
|
@ -74,20 +78,20 @@ class audittrail_rule(osv.osv):
|
|||
obj = self.pool.get(thisrule.object_id.model)
|
||||
if not obj:
|
||||
raise osv.except_osv(
|
||||
_('WARNING: audittrail is not part of the pool'),
|
||||
_('WARNING: audittrail is not part of the pool'),
|
||||
_('Change audittrail depends -- Setting rule as DRAFT'))
|
||||
self.write(cr, uid, [thisrule.id], {"state": "draft"})
|
||||
val = {
|
||||
"name": 'View Log',
|
||||
"res_model": 'audittrail.log',
|
||||
"src_model": thisrule.object_id.model,
|
||||
"name": 'View Log',
|
||||
"res_model": 'audittrail.log',
|
||||
"src_model": thisrule.object_id.model,
|
||||
"domain": "[('object_id','=', " + str(thisrule.object_id.id) + "), ('res_id', '=', active_id)]"
|
||||
|
||||
}
|
||||
id = obj_action.create(cr, uid, val)
|
||||
self.write(cr, uid, [thisrule.id], {"state": "subscribed", "action_id": id})
|
||||
action_id = obj_action.create(cr, uid, val)
|
||||
self.write(cr, uid, [thisrule.id], {"state": "subscribed", "action_id": action_id})
|
||||
keyword = 'client_action_relate'
|
||||
value = 'ir.actions.act_window,' + str(id)
|
||||
value = 'ir.actions.act_window,' + str(action_id)
|
||||
res = obj_model.ir_set(cr, uid, 'action', keyword, 'View_log_' + thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
|
||||
#End Loop
|
||||
return True
|
||||
|
@ -98,7 +102,7 @@ class audittrail_rule(osv.osv):
|
|||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Auddittrail Rule’s IDs.
|
||||
@return: True
|
||||
@return: True
|
||||
"""
|
||||
obj_action = self.pool.get('ir.actions.act_window')
|
||||
val_obj = self.pool.get('ir.values')
|
||||
|
@ -127,17 +131,28 @@ class audittrail_log(osv.osv):
|
|||
_name = 'audittrail.log'
|
||||
_description = "Audittrail Log"
|
||||
|
||||
def _name_get_resname(self, cr, uid, ids, *args):
|
||||
data = {}
|
||||
for resname in self.browse(cr, uid, ids,[]):
|
||||
model_object = resname.object_id
|
||||
res_id = resname.res_id
|
||||
if model_object and res_id:
|
||||
model_pool = self.pool.get(model_object.model)
|
||||
res = model_pool.read(cr, uid, res_id, ['name'])
|
||||
data[resname.id] = res['name']
|
||||
else:
|
||||
data[resname.id] = False
|
||||
return data
|
||||
|
||||
_columns = {
|
||||
"name": fields.char("Name", size=32),
|
||||
"object_id": fields.many2one('ir.model', 'Object'),
|
||||
"user_id": fields.many2one('res.users', 'User'),
|
||||
"method": fields.selection((('read', 'Read'),
|
||||
('write', 'Write'),
|
||||
('unlink', 'Delete'),
|
||||
('create', 'Create')), "Method"),
|
||||
"timestamp": fields.datetime("Date"),
|
||||
"res_id": fields.integer('Resource Id'),
|
||||
"line_ids": fields.one2many('audittrail.log.line', 'log_id', 'Log lines'),
|
||||
"name": fields.char("Resource Name",size=64),
|
||||
# "name": fields.function(_name_get_resname, type='char', string='Resource Name', method=True),
|
||||
"object_id": fields.many2one('ir.model', 'Object'),
|
||||
"user_id": fields.many2one('res.users', 'User'),
|
||||
"method": fields.char("Method", size=64),
|
||||
"timestamp": fields.datetime("Date"),
|
||||
"res_id": fields.integer('Resource Id'),
|
||||
"line_ids": fields.one2many('audittrail.log.line', 'log_id', 'Log lines'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
@ -155,14 +170,14 @@ class audittrail_log_line(osv.osv):
|
|||
_name = 'audittrail.log.line'
|
||||
_description = "Log Line"
|
||||
_columns = {
|
||||
'field_id': fields.many2one('ir.model.fields', 'Fields', required=True),
|
||||
'log_id': fields.many2one('audittrail.log', 'Log'),
|
||||
'log': fields.integer("Log ID"),
|
||||
'old_value': fields.text("Old Value"),
|
||||
'new_value': fields.text("New Value"),
|
||||
'old_value_text': fields.text('Old value Text'),
|
||||
'new_value_text': fields.text('New value Text'),
|
||||
'field_description': fields.char('Field Description', size=64),
|
||||
'field_id': fields.many2one('ir.model.fields', 'Fields', required=True),
|
||||
'log_id': fields.many2one('audittrail.log', 'Log'),
|
||||
'log': fields.integer("Log ID"),
|
||||
'old_value': fields.text("Old Value"),
|
||||
'new_value': fields.text("New Value"),
|
||||
'old_value_text': fields.text('Old value Text'),
|
||||
'new_value_text': fields.text('New value Text'),
|
||||
'field_description': fields.char('Field Description', size=64),
|
||||
}
|
||||
|
||||
audittrail_log_line()
|
||||
|
@ -170,276 +185,366 @@ audittrail_log_line()
|
|||
|
||||
class audittrail_objects_proxy(osv_pool):
|
||||
""" Uses Object proxy for auditing changes on object of subscribed Rules"""
|
||||
|
||||
def get_value_text(self, cr, uid, field_name, values, object, context=None):
|
||||
|
||||
def get_value_text(self, cr, uid, field_name, values, model, context=None):
|
||||
"""
|
||||
Gets textual values for the fields
|
||||
e.g.: For field of type many2one it gives its name value instead of id
|
||||
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param field_name: List of fields for text values
|
||||
@param values: Values for field to be converted into textual values
|
||||
@return: values: List of textual values for given fields
|
||||
@param field_name: List of fields for text values
|
||||
@param values: Values for field to be converted into textual values
|
||||
@return: values: List of textual values for given fields
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
f_id = pool.get('ir.model.fields').search(cr, uid, [('name', '=', field_name), ('model_id', '=', object.id)])
|
||||
if f_id:
|
||||
field = pool.get('ir.model.fields').read(cr, uid, f_id)[0]
|
||||
model = field['relation']
|
||||
field_pool = pool.get('ir.model.fields')
|
||||
model_pool = pool.get('ir.model')
|
||||
obj_pool = pool.get(model.model)
|
||||
if obj_pool._inherits:
|
||||
inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])])
|
||||
field_ids = field_pool.search(cr, uid, [('name', '=', field_name), ('model_id', 'in', (model.id, inherits_ids[0]))])
|
||||
else:
|
||||
field_ids = field_pool.search(cr, uid, [('name', '=', field_name), ('model_id', '=', model.id)])
|
||||
field_id = field_ids and field_ids[0] or False
|
||||
assert field_id, _("'%s' field is not exits in '%s' model" %(field_name, model.model))
|
||||
|
||||
if field['ttype'] == 'many2one':
|
||||
if values:
|
||||
if type(values) == tuple:
|
||||
values = values[0]
|
||||
val = pool.get(model).read(cr, uid, [values], [pool.get(model)._rec_name])
|
||||
if val:
|
||||
return val[0][pool.get(model)._rec_name]
|
||||
elif field['ttype'] == 'many2many':
|
||||
value = []
|
||||
if values:
|
||||
for id in values:
|
||||
val = pool.get(model).read(cr, uid, [id], [pool.get(model)._rec_name])
|
||||
if val:
|
||||
value.append(val[0][pool.get(model)._rec_name])
|
||||
return value
|
||||
field = field_pool.read(cr, uid, field_id)
|
||||
relation_model = field['relation']
|
||||
relation_model_pool = relation_model and pool.get(relation_model) or False
|
||||
|
||||
elif field['ttype'] == 'one2many':
|
||||
if values:
|
||||
value = []
|
||||
for id in values:
|
||||
val = pool.get(model).read(cr, uid, [id], [pool.get(model)._rec_name])
|
||||
if field['ttype'] == 'many2one':
|
||||
res = False
|
||||
relation_id = False
|
||||
if values and type(values) == tuple:
|
||||
relation_id = values[0]
|
||||
if relation_id and relation_model_pool:
|
||||
relation_model_object = relation_model_pool.read(cr, uid, relation_id, [relation_model_pool._rec_name])
|
||||
res = relation_model_object[relation_model_pool._rec_name]
|
||||
return res
|
||||
|
||||
if val:
|
||||
value.append(val[0][pool.get(model)._rec_name])
|
||||
return value
|
||||
return values
|
||||
elif field['ttype'] in ('many2many','one2many'):
|
||||
res = []
|
||||
for relation_model_object in relation_model_pool.read(cr, uid, values, [relation_model_pool._rec_name]):
|
||||
res.append(relation_model_object[relation_model_pool._rec_name])
|
||||
return res
|
||||
|
||||
def create_log_line(self, cr, uid, id, object, lines=[]):
|
||||
return values
|
||||
|
||||
def create_log_line(self, cr, uid, log_id, model, lines=[]):
|
||||
"""
|
||||
Creates lines for changed fields with its old and new values
|
||||
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param object: Object who's values are being changed
|
||||
@param model: Object who's values are being changed
|
||||
@param lines: List of values for line is to be created
|
||||
"""
|
||||
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
obj = pool.get(object.model)
|
||||
obj_pool = pool.get(model.model)
|
||||
model_pool = pool.get('ir.model')
|
||||
field_pool = pool.get('ir.model.fields')
|
||||
log_line_pool = pool.get('audittrail.log.line')
|
||||
#start Loop
|
||||
for line in lines:
|
||||
if obj._inherits:
|
||||
inherits_ids = pool.get('ir.model').search(cr, uid, [('model', '=', obj._inherits.keys()[0])])
|
||||
f_id = pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (object.id, inherits_ids[0]))])
|
||||
if obj_pool._inherits:
|
||||
inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])])
|
||||
field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (model.id, inherits_ids[0]))])
|
||||
else:
|
||||
f_id = pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', '=', object.id)])
|
||||
if f_id:
|
||||
fields = pool.get('ir.model.fields').read(cr, uid, f_id)
|
||||
old_value = 'old_value' in line and line['old_value'] or ''
|
||||
new_value = 'new_value' in line and line['new_value'] or ''
|
||||
old_value_text = 'old_value_text' in line and line['old_value_text'] or ''
|
||||
new_value_text = 'new_value_text' in line and line['new_value_text'] or ''
|
||||
|
||||
if old_value_text == new_value_text:
|
||||
continue
|
||||
if fields[0]['ttype'] == 'many2one':
|
||||
if type(old_value) == tuple:
|
||||
old_value = old_value[0]
|
||||
if type(new_value) == tuple:
|
||||
new_value = new_value[0]
|
||||
vals = {
|
||||
"log_id": id,
|
||||
"field_id": f_id[0],
|
||||
"old_value": old_value,
|
||||
"new_value": new_value,
|
||||
"old_value_text": old_value_text,
|
||||
"new_value_text": new_value_text,
|
||||
"field_description": fields[0]['field_description']
|
||||
}
|
||||
line_id = pool.get('audittrail.log.line').create(cr, uid, vals)
|
||||
cr.commit()
|
||||
#End Loop
|
||||
field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', '=', model.id)])
|
||||
field_id = field_ids and field_ids[0] or False
|
||||
assert field_id, _("'%s' field is not exits in '%s' model" %(line['name'], model.model))
|
||||
|
||||
field = field_pool.read(cr, uid, field_id)
|
||||
old_value = 'old_value' in line and line['old_value'] or ''
|
||||
new_value = 'new_value' in line and line['new_value'] or ''
|
||||
old_value_text = 'old_value_text' in line and line['old_value_text'] or ''
|
||||
new_value_text = 'new_value_text' in line and line['new_value_text'] or ''
|
||||
|
||||
if old_value_text == new_value_text:
|
||||
continue
|
||||
if field['ttype'] == 'many2one':
|
||||
if type(old_value) == tuple:
|
||||
old_value = old_value[0]
|
||||
if type(new_value) == tuple:
|
||||
new_value = new_value[0]
|
||||
vals = {
|
||||
"log_id": log_id,
|
||||
"field_id": field_id,
|
||||
"old_value": old_value,
|
||||
"new_value": new_value,
|
||||
"old_value_text": old_value_text,
|
||||
"new_value_text": new_value_text,
|
||||
"field_description": field['field_description']
|
||||
}
|
||||
line_id = log_line_pool.create(cr, uid, vals)
|
||||
#End Loop
|
||||
return True
|
||||
|
||||
def log_fct(self, db, uid, object, method, fct_src, *args):
|
||||
|
||||
def log_fct(self, db, uid, model, method, fct_src, *args):
|
||||
"""
|
||||
Logging function: This function is performs logging oprations according to method
|
||||
@param db: the current database
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param object: Object who's values are being changed
|
||||
@param method: method to log: create, read, write, unlink
|
||||
@param method: method to log: create, read, write, unlink
|
||||
@param fct_src: execute method of Object proxy
|
||||
|
||||
@return: Returns result as per method of Object proxy
|
||||
|
||||
@return: Returns result as per method of Object proxy
|
||||
"""
|
||||
logged_uids = []
|
||||
res2 = args
|
||||
pool = pooler.get_pool(db)
|
||||
cr = pooler.get_db(db).cursor()
|
||||
obj_ids = pool.get('ir.model').search(cr, uid, [('model', '=', object)])
|
||||
model_object = pool.get('ir.model').browse(cr, uid, obj_ids)[0]
|
||||
resource_pool = pool.get(model)
|
||||
log_pool = pool.get('audittrail.log')
|
||||
model_pool = pool.get('ir.model')
|
||||
|
||||
model_ids = model_pool.search(cr, uid, [('model', '=', model)])
|
||||
model_id = model_ids and model_ids[0] or False
|
||||
assert model_id, _("'%s' Model is not exits..." %(model))
|
||||
model = model_pool.browse(cr, uid, model_id)
|
||||
|
||||
if method in ('create'):
|
||||
res_id = fct_src(db, uid, object, method, *args)
|
||||
res_id = fct_src(db, uid, model.model, method, *args)
|
||||
cr.commit()
|
||||
new_value = pool.get(model_object.model).read(cr, uid, [res_id], args[0].keys())[0]
|
||||
if 'id' in new_value:
|
||||
del new_value['id']
|
||||
if not logged_uids or uid in logged_uids:
|
||||
resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
|
||||
resource_name = resource_name and resource_name[0][1] or ''
|
||||
vals = {
|
||||
"method": method,
|
||||
"object_id": model_object.id,
|
||||
"user_id": uid, "res_id": res_id,
|
||||
"name": resource_name
|
||||
}
|
||||
id = pool.get('audittrail.log').create(cr, uid, vals)
|
||||
lines = []
|
||||
for field in new_value:
|
||||
if new_value[field]:
|
||||
line = {
|
||||
'name': field,
|
||||
'new_value': new_value[field],
|
||||
'new_value_text': self.get_value_text(cr, uid, field, new_value[field], model_object)
|
||||
}
|
||||
lines.append(line)
|
||||
self.create_log_line(cr, uid, id, model_object, lines)
|
||||
resource = resource_pool.read(cr, uid, res_id, args[0].keys())
|
||||
vals = {
|
||||
"method": method,
|
||||
"object_id": model.id,
|
||||
"user_id": uid,
|
||||
"res_id": resource['id'],
|
||||
}
|
||||
if 'id' in resource:
|
||||
del resource['id']
|
||||
log_id = log_pool.create(cr, uid, vals)
|
||||
lines = []
|
||||
for field in resource:
|
||||
line = {
|
||||
'name': field,
|
||||
'new_value': resource[field],
|
||||
'new_value_text': self.get_value_text(cr, uid, field, resource[field], model)
|
||||
}
|
||||
lines.append(line)
|
||||
self.create_log_line(cr, uid, log_id, model, lines)
|
||||
|
||||
cr.commit()
|
||||
cr.close()
|
||||
return res_id
|
||||
|
||||
if method in ('write'):
|
||||
res_ids = args[0]
|
||||
for res_id in res_ids:
|
||||
old_values = pool.get(model_object.model).read(cr, uid, res_id, args[1].keys())
|
||||
old_values_text = {}
|
||||
for field in args[1].keys():
|
||||
old_values_text[field] = self.get_value_text(cr, uid, field, old_values[field], model_object)
|
||||
res = fct_src(db, uid, object, method, *args)
|
||||
cr.commit()
|
||||
if res:
|
||||
new_values = pool.get(model_object.model).read(cr, uid, res_ids, args[1].keys())[0]
|
||||
if not logged_uids or uid in logged_uids:
|
||||
resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
|
||||
resource_name = resource_name and resource_name[0][1] or ''
|
||||
id = pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
|
||||
lines = []
|
||||
for field in args[1].keys():
|
||||
if args[1].keys():
|
||||
line = {
|
||||
'name': field,
|
||||
'new_value': field in new_values and new_values[field] or '',
|
||||
'old_value': field in old_values and old_values[field] or '',
|
||||
'new_value_text': self.get_value_text(cr, uid, field, new_values[field], model_object),
|
||||
'old_value_text': old_values_text[field]
|
||||
}
|
||||
lines.append(line)
|
||||
cr.commit()
|
||||
self.create_log_line(cr, uid, id, model_object, lines)
|
||||
cr.close()
|
||||
return res
|
||||
|
||||
if method in ('read'):
|
||||
elif method in ('read'):
|
||||
res_ids = args[0]
|
||||
old_values = {}
|
||||
res = fct_src(db, uid, object, method, *args)
|
||||
res = fct_src(db, uid, model.model, method, *args)
|
||||
if type(res) == list:
|
||||
|
||||
for v in res:
|
||||
old_values[v['id']] = v
|
||||
else:
|
||||
old_values[res['id']] = res
|
||||
for res_id in old_values:
|
||||
if not logged_uids or uid in logged_uids:
|
||||
resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
|
||||
resource_name = resource_name and resource_name[0][1] or ''
|
||||
id = pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
|
||||
lines = []
|
||||
for field in old_values[res_id]:
|
||||
if old_values[res_id][field]:
|
||||
line = {
|
||||
'name': field,
|
||||
'old_value': old_values[res_id][field],
|
||||
'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model_object)
|
||||
}
|
||||
lines.append(line)
|
||||
cr.commit()
|
||||
self.create_log_line(cr, uid, id, model_object, lines)
|
||||
vals = {
|
||||
"method": method,
|
||||
"object_id": model.id,
|
||||
"user_id": uid,
|
||||
"res_id": res_id,
|
||||
|
||||
}
|
||||
log_id = log_pool.create(cr, uid, vals)
|
||||
lines = []
|
||||
for field in old_values[res_id]:
|
||||
line = {
|
||||
'name': field,
|
||||
'old_value': old_values[res_id][field],
|
||||
'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model)
|
||||
}
|
||||
lines.append(line)
|
||||
|
||||
self.create_log_line(cr, uid, log_id, model, lines)
|
||||
|
||||
cr.close()
|
||||
return res
|
||||
|
||||
if method in ('unlink'):
|
||||
elif method in ('unlink'):
|
||||
res_ids = args[0]
|
||||
old_values = {}
|
||||
for res_id in res_ids:
|
||||
old_values[res_id] = pool.get(model_object.model).read(cr, uid, res_id, [])
|
||||
old_values[res_id] = resource_pool.read(cr, uid, res_id)
|
||||
|
||||
for res_id in res_ids:
|
||||
if not logged_uids or uid in logged_uids:
|
||||
resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
|
||||
resource_name = resource_name and resource_name[0][1] or ''
|
||||
id = pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
|
||||
lines = []
|
||||
for field in old_values[res_id]:
|
||||
if old_values[res_id][field]:
|
||||
line = {
|
||||
'name': field,
|
||||
'old_value': old_values[res_id][field],
|
||||
'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model_object)
|
||||
}
|
||||
lines.append(line)
|
||||
cr.commit()
|
||||
self.create_log_line(cr, uid, id, model_object, lines)
|
||||
res = fct_src(db, uid, object, method, *args)
|
||||
vals = {
|
||||
"method": method,
|
||||
"object_id": model.id,
|
||||
"user_id": uid,
|
||||
"res_id": res_id,
|
||||
|
||||
}
|
||||
log_id = log_pool.create(cr, uid, vals)
|
||||
lines = []
|
||||
for field in old_values[res_id]:
|
||||
if field in ('id'):
|
||||
continue
|
||||
line = {
|
||||
'name': field,
|
||||
'old_value': old_values[res_id][field],
|
||||
'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model)
|
||||
}
|
||||
lines.append(line)
|
||||
|
||||
self.create_log_line(cr, uid, log_id, model, lines)
|
||||
res = fct_src(db, uid, model.model, method, *args)
|
||||
cr.commit()
|
||||
cr.close()
|
||||
return res
|
||||
cr.close()
|
||||
else:
|
||||
res_ids = args[0]
|
||||
old_values = {}
|
||||
fields = []
|
||||
if len(args)>1 and type(args[1]) == dict:
|
||||
fields = args[1].keys()
|
||||
if type(res_ids) in (long, int):
|
||||
res_ids = [res_ids]
|
||||
if res_ids:
|
||||
for resource in resource_pool.read(cr, uid, res_ids):
|
||||
resource_id = resource['id']
|
||||
if 'id' in resource:
|
||||
del resource['id']
|
||||
old_values_text = {}
|
||||
old_value = {}
|
||||
for field in resource.keys():
|
||||
old_value[field] = resource[field]
|
||||
old_values_text[field] = self.get_value_text(cr, uid, field, resource[field], model)
|
||||
old_values[resource_id] = {'text':old_values_text, 'value': old_value}
|
||||
|
||||
def execute(self, db, uid, object, method, *args, **kw):
|
||||
res = fct_src(db, uid, model.model, method, *args)
|
||||
cr.commit()
|
||||
|
||||
if res_ids:
|
||||
for resource in resource_pool.read(cr, uid, res_ids):
|
||||
resource_id = resource['id']
|
||||
if 'id' in resource:
|
||||
del resource['id']
|
||||
vals = {
|
||||
"method": method,
|
||||
"object_id": model.id,
|
||||
"user_id": uid,
|
||||
"res_id": resource_id,
|
||||
}
|
||||
|
||||
|
||||
log_id = log_pool.create(cr, uid, vals)
|
||||
lines = []
|
||||
for field in resource.keys():
|
||||
line = {
|
||||
'name': field,
|
||||
'new_value': resource[field],
|
||||
'old_value': old_values[resource_id]['value'][field],
|
||||
'new_value_text': self.get_value_text(cr, uid, field, resource[field], model),
|
||||
'old_value_text': old_values[resource_id]['text'][field]
|
||||
}
|
||||
lines.append(line)
|
||||
|
||||
self.create_log_line(cr, uid, log_id, model, lines)
|
||||
cr.commit()
|
||||
cr.close()
|
||||
return res
|
||||
return True
|
||||
|
||||
|
||||
|
||||
def execute(self, db, uid, model, method, *args, **kw):
|
||||
"""
|
||||
Overrides Object Proxy execute method
|
||||
@param db: the current database
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param object: Object who's values are being changed
|
||||
@param method: method to log: create, read, write, unlink
|
||||
|
||||
@return: Returns result as per method of Object proxy
|
||||
@param method: get any method and create log
|
||||
|
||||
@return: Returns result as per method of Object proxy
|
||||
"""
|
||||
pool = pooler.get_pool(db)
|
||||
model_pool = pool.get('ir.model')
|
||||
rule_pool = pool.get('audittrail.rule')
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr.autocommit(True)
|
||||
logged_uids = []
|
||||
fct_src = super(audittrail_objects_proxy, self).execute
|
||||
|
||||
def my_fct(db, uid, object, method, *args):
|
||||
field = method
|
||||
def my_fct(db, uid, model, method, *args):
|
||||
rule = False
|
||||
obj_ids = pool.get('ir.model').search(cr, uid, [('model', '=', object)])
|
||||
for obj_name in pool.obj_list():
|
||||
if obj_name == 'audittrail.rule':
|
||||
model_ids = model_pool.search(cr, uid, [('model', '=', model)])
|
||||
model_id = model_ids and model_ids[0] or False
|
||||
|
||||
for model_name in pool.obj_list():
|
||||
if model_name == 'audittrail.rule':
|
||||
rule = True
|
||||
if not rule:
|
||||
return fct_src(db, uid, object, method, *args)
|
||||
if not obj_ids:
|
||||
return fct_src(db, uid, object, method, *args)
|
||||
rule_ids = pool.get('audittrail.rule').search(cr, uid, [('object_id', '=', obj_ids[0]), ('state', '=', 'subscribed')])
|
||||
if not rule_ids:
|
||||
return fct_src(db, uid, object, method, *args)
|
||||
return fct_src(db, uid, model, method, *args)
|
||||
if not model_id:
|
||||
return fct_src(db, uid, model, method, *args)
|
||||
|
||||
for thisrule in pool.get('audittrail.rule').browse(cr, uid, rule_ids):
|
||||
rule_ids = rule_pool.search(cr, uid, [('object_id', '=', model_id), ('state', '=', 'subscribed')])
|
||||
if not rule_ids:
|
||||
return fct_src(db, uid, model, method, *args)
|
||||
|
||||
for thisrule in rule_pool.browse(cr, uid, rule_ids):
|
||||
for user in thisrule.user_id:
|
||||
logged_uids.append(user.id)
|
||||
if not logged_uids or uid in logged_uids:
|
||||
if field in ('read', 'write', 'create', 'unlink'):
|
||||
if getattr(thisrule, 'log_' + field):
|
||||
return self.log_fct(db, uid, object, method, fct_src, *args)
|
||||
return fct_src(db, uid, object, method, *args)
|
||||
res = my_fct(db, uid, object, method, *args)
|
||||
if method in ('read', 'write', 'create', 'unlink'):
|
||||
if getattr(thisrule, 'log_' + method):
|
||||
return self.log_fct(db, uid, model, method, fct_src, *args)
|
||||
|
||||
elif method not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink', 'write', 'create'):
|
||||
if thisrule.log_action:
|
||||
return self.log_fct(db, uid, model, method, fct_src, *args)
|
||||
|
||||
return fct_src(db, uid, model, method, *args)
|
||||
res = my_fct(db, uid, model, method, *args)
|
||||
cr.close()
|
||||
return res
|
||||
|
||||
|
||||
def exec_workflow(self, db, uid, model, method, *args, **argv):
|
||||
pool = pooler.get_pool(db)
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr.autocommit(True)
|
||||
logged_uids = []
|
||||
fct_src = super(audittrail_objects_proxy, self).exec_workflow
|
||||
field = method
|
||||
rule = False
|
||||
model_pool = pool.get('ir.model')
|
||||
rule_pool = pool.get('audittrail.rule')
|
||||
model_ids = model_pool.search(cr, uid, [('model', '=', model)])
|
||||
for obj_name in pool.obj_list():
|
||||
if obj_name == 'audittrail.rule':
|
||||
rule = True
|
||||
if not rule:
|
||||
cr.close()
|
||||
return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv)
|
||||
if not model_ids:
|
||||
cr.close()
|
||||
return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv)
|
||||
|
||||
rule_ids = rule_pool.search(cr, uid, [('object_id', 'in', model_ids), ('state', '=', 'subscribed')])
|
||||
if not rule_ids:
|
||||
cr.close()
|
||||
return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv)
|
||||
|
||||
for thisrule in rule_pool.browse(cr, uid, rule_ids):
|
||||
for user in thisrule.user_id:
|
||||
logged_uids.append(user.id)
|
||||
if not logged_uids or uid in logged_uids:
|
||||
if thisrule.log_workflow:
|
||||
cr.close()
|
||||
return self.log_fct(db, uid, model, method, fct_src, *args)
|
||||
cr.close()
|
||||
return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv)
|
||||
|
||||
cr.close()
|
||||
return True
|
||||
|
||||
audittrail_objects_proxy()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -12,12 +12,15 @@
|
|||
<form string="AuditTrail Rule">
|
||||
<field name="name" select="1" required="1"/>
|
||||
<field name="object_id" select="1"/>
|
||||
<field name="log_read" />
|
||||
<field name="log_write" />
|
||||
<field name="log_unlink" />
|
||||
<field name="log_create" />
|
||||
<field name="action_id" colspan="4" readonly="1"/>
|
||||
<field name="user_id" select="1" colspan="4"/>
|
||||
<field name="log_read"/>
|
||||
<field name="log_write"/>
|
||||
<field name="log_unlink"/>
|
||||
<field name="log_create"/>
|
||||
<field name="log_action"/>
|
||||
<field name="log_workflow"/>
|
||||
<separator string="Users (if User is not added then it will applicable for all users)" colspan="4" />
|
||||
<field name="user_id" select="1" colspan="4" nolabel="1" />
|
||||
<field name="action_id" colspan="4" readonly="1" groups="base.group_extended"/>
|
||||
<field name="state" select="1" readonly="1" />
|
||||
<group colspan="2" col="2">
|
||||
<button string="Subscribe" name="subscribe"
|
||||
|
@ -42,6 +45,8 @@
|
|||
<field name="log_write" />
|
||||
<field name="log_unlink" />
|
||||
<field name="log_create" />
|
||||
<field name="log_action"/>
|
||||
<field name="log_workflow"/>
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -58,9 +63,10 @@
|
|||
<!--<field name="view_id" ref="view_audittrail_rule_form" />-->
|
||||
</record>
|
||||
|
||||
<menuitem name="Audittrails" id="menu_action_audittrail"
|
||||
<menuitem name="Audittrail" id="menu_action_audittrail"
|
||||
groups="base.group_extended"
|
||||
parent="base.menu_administration" />
|
||||
|
||||
<menuitem name="Rules" id="menu_action_audittrail_rule_tree"
|
||||
action="action_audittrail_rule_tree" parent="menu_action_audittrail" />
|
||||
|
||||
|
@ -83,13 +89,13 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="AuditTrail Logs">
|
||||
<field name="timestamp" select="1" required="1" readonly="1"/>
|
||||
<field name="object_id" select="1" readonly="1"/>
|
||||
<field name="method" select="1" readonly="1"/>
|
||||
<field name="user_id" select="1" readonly="1"/>
|
||||
<field name="res_id" readonly="1"/>
|
||||
<field name="method" select="1" readonly="1"/>
|
||||
<field name="name" readonly="1" select="1"/>
|
||||
<field name="res_id" readonly="1"/>
|
||||
<field name="object_id" select="1" readonly="1"/>
|
||||
<field name="line_ids" colspan="4" mode="tree,form"
|
||||
widget="one2many_list" readonly="1">
|
||||
widget="one2many_list" readonly="1" nolabel="1">
|
||||
<form string="Log Lines">
|
||||
<field name="field_id" colspan="4"
|
||||
readonly="1" />
|
||||
|
@ -151,11 +157,7 @@
|
|||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem name="Logs" id="menu_action_audittrail_log_tree"
|
||||
action="action_audittrail_log_tree" parent="menu_action_audittrail" />
|
||||
|
||||
<!-- <wizard string="View log" menu="False" model="audittrail.log" name="audittrail.view.log" id="wizard_audittrail_log"/>-->
|
||||
<menuitem name="View Logs" id="menu_action_log_tree2"
|
||||
action="action_audittrail_view_log" parent="menu_action_audittrail" />
|
||||
action="action_audittrail_log_tree" parent="menu_action_audittrail" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -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: 2010-06-24 02:58+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 21:17+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: Greek <el@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-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: audittrail
|
||||
|
@ -159,153 +159,157 @@ msgid ""
|
|||
" Subscribe Rules for read, write, create and delete on objects and check "
|
||||
"logs"
|
||||
msgstr ""
|
||||
"Επιστρέπει στον Διαχειριστή να ακολουθεί τα ίχνη κάθε λειτουργίας του χρήστη "
|
||||
"σε όλα τα αντικείμενα του συστήματος.\n"
|
||||
" Εισάγεται κανόνες για ανάγνωση, εγγραφή, δημιουργία και διαγραφή στα "
|
||||
"αντικείμενα και τα ημερολόγια ελέγχου."
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,timestamp:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
msgstr "Ημερομηνία"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,user_id:0
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
msgstr "Χρήστης"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.log:0
|
||||
msgid "Old Value Text : "
|
||||
msgstr ""
|
||||
msgstr "Παλιά τιμή κειμένου: "
|
||||
|
||||
#. module: audittrail
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
msgstr "Λανθασμένο XML για αρχιτεκτονική όψης!"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,name:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
msgstr "Όνομα"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,line_ids:0
|
||||
msgid "Log lines"
|
||||
msgstr ""
|
||||
msgstr "Γραμμές ημερολογίου"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree_sub
|
||||
msgid "Subscribed Rules"
|
||||
msgstr ""
|
||||
msgstr "Εγγεγραμμένοι Κανόνες"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,field_id:0
|
||||
msgid "Fields"
|
||||
msgstr ""
|
||||
msgstr "Πεδία"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.rule:0
|
||||
msgid "AuditTrail Rules"
|
||||
msgstr ""
|
||||
msgstr "Κανόνες διαδρομής ελέγχου"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_rule
|
||||
msgid "audittrail.rule"
|
||||
msgstr ""
|
||||
msgstr "ελεγκτική ιχνηλάτηση.κανόνες"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.rule:0
|
||||
msgid "UnSubscribe"
|
||||
msgstr ""
|
||||
msgstr "Διαγραφείτε"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,log_write:0
|
||||
msgid "Log writes"
|
||||
msgstr ""
|
||||
msgstr "Εγγραφές ημερολογίου"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_log
|
||||
msgid "audittrail.log"
|
||||
msgstr ""
|
||||
msgstr "ελεγκτική ιχνηλάτηση.ημερολόγιο"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,field_description:0
|
||||
msgid "Field Description"
|
||||
msgstr ""
|
||||
msgstr "Περιγραφή πεδίου"
|
||||
|
||||
#. module: audittrail
|
||||
#: selection:audittrail.log,method:0
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
msgstr "Διαγραφή"
|
||||
|
||||
#. module: audittrail
|
||||
#: wizard_button:audittrail.view.log,init,open:0
|
||||
msgid "Open Logs"
|
||||
msgstr ""
|
||||
msgstr "Άνοιγμα ημερολογίων"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,new_value_text:0
|
||||
msgid "New value Text"
|
||||
msgstr ""
|
||||
msgstr "Νέα τιμή κειμένου"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,name:0
|
||||
msgid "Rule Name"
|
||||
msgstr ""
|
||||
msgstr "Όνομα Κανόνα"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,log_read:0
|
||||
msgid "Log reads"
|
||||
msgstr ""
|
||||
msgstr "Αναγνώσεις ημερολογίων"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_log_tree
|
||||
msgid "Logs"
|
||||
msgstr ""
|
||||
msgstr "Αρχεία καταγραφής"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,new_value:0
|
||||
msgid "New Value"
|
||||
msgstr ""
|
||||
msgstr "Νέα τιμή"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.ui.menu,name:audittrail.menu_action_log_tree2
|
||||
msgid "View Logs"
|
||||
msgstr ""
|
||||
msgstr "Δείτε τα αρχεία καταγραφής"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,log_create:0
|
||||
msgid "Log creates"
|
||||
msgstr ""
|
||||
msgstr "Δημιουργία αρχείων καταγραφής"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.log:0
|
||||
msgid "AuditTrail Logs"
|
||||
msgstr ""
|
||||
msgstr "παρακολούθηση της πόρειας των αρχείων καταγραφής"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree
|
||||
msgid "Rules"
|
||||
msgstr ""
|
||||
msgstr "Κανόνες"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.log:0
|
||||
msgid "New Value : "
|
||||
msgstr ""
|
||||
msgstr "Νέα τιμή : "
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,user_id:0
|
||||
msgid "Users"
|
||||
msgstr ""
|
||||
msgstr "Χρήστες"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,old_value_text:0
|
||||
msgid "Old value Text"
|
||||
msgstr ""
|
||||
msgstr "Παλιά τιμή κειμένου"
|
||||
|
||||
#. module: audittrail
|
||||
#: wizard_button:audittrail.view.log,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Ακύρωση"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,log_unlink:0
|
||||
msgid "Log deletes"
|
||||
msgstr ""
|
||||
msgstr "Διαγραφή αρχείων καταγραφής"
|
||||
|
|
|
@ -7,14 +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: 2009-11-17 08:59+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"PO-Revision-Date: 2010-06-27 21:04+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\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:16+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-28 03:48+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: audittrail
|
||||
|
@ -83,7 +82,7 @@ msgstr "Ver registro"
|
|||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_log_line
|
||||
msgid "audittrail.log.line"
|
||||
msgstr "audittrail.registro.linea"
|
||||
msgstr "auditoria.registro.linea"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,method:0
|
||||
|
@ -212,7 +211,7 @@ msgstr "Reglas de auditoría"
|
|||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_rule
|
||||
msgid "audittrail.rule"
|
||||
msgstr "audittrail.regla"
|
||||
msgstr "auditoria.regla"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.rule:0
|
||||
|
@ -227,7 +226,7 @@ msgstr "Registrar escrituras"
|
|||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_log
|
||||
msgid "audittrail.log"
|
||||
msgstr "audittrail.registro"
|
||||
msgstr "auditoria.registro"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,field_description:0
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
'depends': ['base'],
|
||||
'init_xml': [],
|
||||
'init_xml': [
|
||||
'base_action_rule_data.xml'
|
||||
],
|
||||
'update_xml': [
|
||||
'base_action_rule_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
|
|
@ -19,14 +19,16 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import mx.DateTime
|
||||
import re
|
||||
|
||||
import tools
|
||||
from datetime import datetime
|
||||
from osv import fields, osv, orm
|
||||
from osv.orm import except_orm
|
||||
from osv.osv import osv_pool
|
||||
from tools.translate import _
|
||||
import mx.DateTime
|
||||
import pooler
|
||||
import re
|
||||
import time
|
||||
import tools
|
||||
|
||||
class base_action_rule(osv.osv):
|
||||
""" Base Action Rules """
|
||||
|
@ -93,23 +95,23 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
|
|||
'trg_state_to': fields.selection(_state_get, 'Button Pressed', size=16),
|
||||
|
||||
'act_method': fields.char('Call Object Method', size=64),
|
||||
'act_user_id': fields.many2one('res.users', 'Set responsible to'),
|
||||
'act_state': fields.selection(_state_get, 'Set state to', size=16),
|
||||
'act_email_cc': fields.char('Add watchers (Cc)', size=250, help="\
|
||||
'act_user_id': fields.many2one('res.users', 'Set Responsible to'),
|
||||
'act_state': fields.selection(_state_get, 'Set State to', size=16),
|
||||
'act_email_cc': fields.char('Add Watchers (Cc)', size=250, help="\
|
||||
These people will receive a copy of the future communication between partner \
|
||||
and users by email"),
|
||||
'act_remind_partner': fields.boolean('Remind Partner', help="Check \
|
||||
this if you want the rule to send a reminder by email to the partner."),
|
||||
'act_remind_user': fields.boolean('Remind responsible', help="Check \
|
||||
'act_remind_user': fields.boolean('Remind Responsible', help="Check \
|
||||
this if you want the rule to send a reminder by email to the user."),
|
||||
'act_reply_to': fields.char('Reply-To', size=64),
|
||||
'act_remind_attach': fields.boolean('Remind with attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
|
||||
'act_mail_to_user': fields.boolean('Mail to responsible', help="Check\
|
||||
'act_remind_attach': fields.boolean('Remind with Attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
|
||||
'act_mail_to_user': fields.boolean('Mail to Responsible', help="Check\
|
||||
this if you want the rule to send an email to the responsible person."),
|
||||
'act_mail_to_watchers': fields.boolean('Mail to watchers (CC)',
|
||||
'act_mail_to_watchers': fields.boolean('Mail to Watchers (CC)',
|
||||
help="Check this if you want \
|
||||
the rule to mark CC(mail to any other person defined in actions)."),
|
||||
'act_mail_to_email': fields.char('Mail to these emails', size=128, \
|
||||
'act_mail_to_email': fields.char('Mail to these Emails', size=128, \
|
||||
help="Email-id of the persons whom mail is to be sent"),
|
||||
'act_mail_body': fields.text('Mail body', help="Content of mail"),
|
||||
'regex_name': fields.char('Regular Expression on Model Name', size=128),
|
||||
|
@ -132,6 +134,71 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
|
||||
_order = 'sequence'
|
||||
|
||||
def pre_action(self, cr, uid, ids, model, context=None):
|
||||
# Searching for action rules
|
||||
cr.execute("SELECT model.model, rule.id FROM base_action_rule rule LEFT JOIN ir_model model on (model.id = rule.name)")
|
||||
res = cr.fetchall()
|
||||
# Check if any rule matching with current object
|
||||
for obj_name, rule_id in res:
|
||||
if not (model == obj_name):
|
||||
continue
|
||||
else:
|
||||
obj = self.pool.get(obj_name)
|
||||
self._action(cr, uid, [rule_id], obj.browse(cr, uid, ids, context=context))
|
||||
return True
|
||||
|
||||
def _create(self, old_create, model, context=None):
|
||||
if not context:
|
||||
context = {}
|
||||
def make_call_old(cr, uid, vals, context=context):
|
||||
new_id = old_create(cr, uid, vals, context=context)
|
||||
if not context.get('action'):
|
||||
self.pre_action(cr, uid, [new_id], model, context=context)
|
||||
return new_id
|
||||
return make_call_old
|
||||
|
||||
def _write(self, old_write, model, context=None):
|
||||
if not context:
|
||||
context = {}
|
||||
def make_call_old(cr, uid, ids, vals, context=context):
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
if not context.get('action'):
|
||||
self.pre_action(cr, uid, ids, model, context=context)
|
||||
return old_write(cr, uid, ids, vals, context=context)
|
||||
return make_call_old
|
||||
|
||||
def _register_hook(self, cr, uid, ids, context=None):
|
||||
if not context:
|
||||
context = {}
|
||||
model_pool = self.pool.get('ir.model')
|
||||
for action_rule in self.browse(cr, uid, ids, context=context):
|
||||
model = action_rule.name.model
|
||||
obj_pool = self.pool.get(model)
|
||||
obj_pool.__setattr__('create', self._create(obj_pool.create, model, context=context))
|
||||
obj_pool.__setattr__('write', self._write(obj_pool.write, model, context=context))
|
||||
return True
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
res_id = super(base_action_rule, self).create(cr, uid, vals, context)
|
||||
self._register_hook(cr, uid, [res_id], context=context)
|
||||
return res_id
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
res = super(base_action_rule, self).write(cr, uid, ids, vals, context)
|
||||
self._register_hook(cr, uid, ids, context=context)
|
||||
return res
|
||||
|
||||
def _check(self, cr, uid, automatic=False, use_new_cursor=False, \
|
||||
context=None):
|
||||
"""
|
||||
This Function is call by scheduler.
|
||||
"""
|
||||
rule_pool= self.pool.get('base.action.rule')
|
||||
rule_ids = rule_pool.search(cr, uid, [], context=context)
|
||||
return self._register_hook(cr, uid, rule_ids, context=context)
|
||||
|
||||
|
||||
def format_body(self, body):
|
||||
""" Foramat Action rule's body
|
||||
@param self: The object pointer """
|
||||
|
@ -166,7 +233,6 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
@param email: pass the emails
|
||||
@param emailfrom: Pass name the email From else False
|
||||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
body = self.format_mail(obj, body)
|
||||
if not emailfrom:
|
||||
if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.address_id and\
|
||||
|
@ -188,8 +254,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
ok = True
|
||||
ok = True
|
||||
if eval(action.domain):
|
||||
obj_ids = obj._table.search(cr, uid, eval(action.domain), context=context)
|
||||
if not obj.id in obj_ids:
|
||||
|
@ -210,7 +275,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
ok = ok and (not action.trg_state_from or action.trg_state_from==obj.state)
|
||||
if state_to:
|
||||
ok = ok and (not action.trg_state_to or action.trg_state_to==state_to)
|
||||
|
||||
elif action.trg_state_to:
|
||||
ok = False
|
||||
reg_name = action.regex_name
|
||||
result_name = True
|
||||
if reg_name:
|
||||
|
@ -235,6 +301,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
context.update({'active_id':obj.id, 'active_ids':[obj.id]})
|
||||
self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
|
||||
write = {}
|
||||
|
||||
if hasattr(obj, 'user_id') and action.act_user_id:
|
||||
obj.user_id = action.act_user_id
|
||||
write['user_id'] = action.act_user_id.id
|
||||
|
@ -279,12 +346,10 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
@param ids: List of Basic Action Rule’s IDs,
|
||||
@param objects: pass objects
|
||||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
context.update({'action': True})
|
||||
if not scrit:
|
||||
scrit = []
|
||||
cr.execute("select id from base_action_rule order by sequence")
|
||||
rule_ids = map(lambda x: x[0], cr.fetchall())
|
||||
for action in self.browse(cr, uid, rule_ids):
|
||||
for action in self.browse(cr, uid, ids):
|
||||
level = action.max_level
|
||||
if not level:
|
||||
break
|
||||
|
@ -333,6 +398,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
self.do_action(cr, uid, action, model_obj, obj, context)
|
||||
break
|
||||
level -= 1
|
||||
context.update({'action': False})
|
||||
return True
|
||||
|
||||
def _check_mail(self, cr, uid, ids, context=None):
|
||||
|
@ -359,4 +425,27 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
|
||||
base_action_rule()
|
||||
|
||||
|
||||
class ir_cron(osv.osv):
|
||||
_inherit = 'ir.cron'
|
||||
|
||||
def _poolJobs(self, db_name, check=False):
|
||||
try:
|
||||
db, pool = pooler.get_db_and_pool(db_name)
|
||||
except:
|
||||
return False
|
||||
cr = db.cursor()
|
||||
try:
|
||||
next = datetime.now().strftime('%Y-%m-%d %H:00:00')
|
||||
# Putting nextcall always less than current time in order to call it every time
|
||||
cr.execute('UPDATE ir_cron set nextcall = \'%s\' where numbercall<>0 and active and model=\'base.action.rule\' ' % (next))
|
||||
cr.commit()
|
||||
res = super(ir_cron, self)._poolJobs(db_name, check=check)
|
||||
finally:
|
||||
cr.commit()
|
||||
cr.close()
|
||||
|
||||
ir_cron()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="ir_cron_crm_action" model="ir.cron">
|
||||
<field name="name">Check Action Rules</field>
|
||||
<field name="interval_number">4</field>
|
||||
<field name="interval_type">hours</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field eval="False" name="doall"/>
|
||||
<field eval="'base.action.rule'" name="model"/>
|
||||
<field eval="'_check'" name="function"/>
|
||||
<field eval="'()'" name="args"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -18,7 +18,8 @@
|
|||
<field name="active"/>
|
||||
<field name="sequence"/>
|
||||
<field name="max_level" />
|
||||
<field name="domain" colspan="4"/>
|
||||
<field name="domain"/>
|
||||
<field name="filter_id"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Conditions">
|
||||
<group col="2" colspan="2" name="model">
|
||||
|
@ -54,7 +55,6 @@
|
|||
<field name="act_state"/>
|
||||
<separator colspan="4" string="Server Action to be Triggered"/>
|
||||
<field name="server_action_id"/>
|
||||
<field name="filter_id"/>
|
||||
</page>
|
||||
<page string="Email Actions">
|
||||
<!-- <group col="4" colspan="2">-->
|
||||
|
|
|
@ -377,6 +377,9 @@ property or property parameter."),
|
|||
_defaults = {
|
||||
'state': lambda *x: 'needs-action',
|
||||
}
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
raise osv.except_osv(_('Warning!'), _('Can not Duplicate'))
|
||||
|
||||
def get_ics_file(self, cr, uid, event_obj, context=None):
|
||||
"""
|
||||
|
@ -875,7 +878,7 @@ class calendar_event(osv.osv):
|
|||
value = {
|
||||
'duration': 24
|
||||
}
|
||||
return {'value': value}
|
||||
duration = 0.0
|
||||
|
||||
start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S")
|
||||
if end_date and not duration:
|
||||
|
@ -1005,17 +1008,17 @@ class calendar_event(osv.osv):
|
|||
_columns = {
|
||||
'id': fields.integer('ID'),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'name': fields.char('Description', size=64, required=False),
|
||||
'date': fields.datetime('Date'),
|
||||
'date_deadline': fields.datetime('Deadline'),
|
||||
'name': fields.char('Description', size=64, required=False, states={'done': [('readonly', True)]}),
|
||||
'date': fields.datetime('Date', states={'done': [('readonly', True)]}),
|
||||
'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}),
|
||||
'create_date': fields.datetime('Created', readonly=True),
|
||||
'duration': fields.float('Duration'),
|
||||
'description': fields.text('Your action'),
|
||||
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
|
||||
'description': fields.text('Description', states={'done': [('readonly', True)]}),
|
||||
'class': fields.selection([('public', 'Public'), ('private', 'Private'), \
|
||||
('confidential', 'Confidential')], 'Mark as'),
|
||||
'location': fields.char('Location', size=264, help="Location of Event"),
|
||||
('confidential', 'Confidential')], 'Mark as', states={'done': [('readonly', True)]}),
|
||||
'location': fields.char('Location', size=264, help="Location of Event", states={'done': [('readonly', True)]}),
|
||||
'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], \
|
||||
'Show as'),
|
||||
'Show as', states={'done': [('readonly', True)]}),
|
||||
'base_calendar_url': fields.char('Caldav URL', size=264),
|
||||
'exdate': fields.text('Exception Date/Times', help="This property \
|
||||
defines the list of date/time exceptions for arecurring calendar component."),
|
||||
|
@ -1029,14 +1032,14 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
|
|||
FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU'),
|
||||
'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
|
||||
('weekly', 'Weekly'), ('monthly', 'Monthly'), \
|
||||
('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency'),
|
||||
'alarm_id': fields.many2one('res.alarm', 'Alarm'),
|
||||
('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency', states={'done': [('readonly', True)]}),
|
||||
'alarm_id': fields.many2one('res.alarm', 'Alarm', states={'done': [('readonly', True)]}),
|
||||
'base_calendar_alarm_id': fields.many2one('calendar.alarm', 'Alarm'),
|
||||
'recurrent_uid': fields.integer('Recurrent ID'),
|
||||
'recurrent_id': fields.datetime('Recurrent ID date'),
|
||||
'vtimezone': fields.related('user_id', 'context_tz', type='char', size=24, \
|
||||
string='Timezone', store=True),
|
||||
'user_id': fields.many2one('res.users', 'Responsible'),
|
||||
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
|
||||
'freq': fields.selection([('None', 'No Repeat'), \
|
||||
('secondly', 'Secondly'), \
|
||||
('minutely', 'Minutely'), \
|
||||
|
@ -1068,7 +1071,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
|
|||
'end_date': fields.date('Repeat Until'),
|
||||
'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel', \
|
||||
'event_id', 'attendee_id', 'Attendees'),
|
||||
'allday': fields.boolean('All Day'),
|
||||
'allday': fields.boolean('All Day', states={'done': [('readonly', True)]}),
|
||||
'active': fields.boolean('Active', help="If the active field is set to \
|
||||
true, it will allow you to hide the event alarm information without removing it.")
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<filter string="Contact" icon="terp-gtk-jump-to-ltr" domain="[]"
|
||||
context="{'group_by':'partner_address_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':' state'}" />
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -138,7 +138,7 @@
|
|||
|
||||
<!-- Calenadar's menu -->
|
||||
<menuitem id="base.menu_calendar_configuration" name="Calendar"
|
||||
parent="base.menu_config_address_book" sequence="15" />
|
||||
parent="base.menu_base_config" sequence="15" />
|
||||
|
||||
<!-- Invitation menu -->
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_calendar_attendee","calendar.attendee","model_calendar_attendee",base.group_user,1,1,1,1
|
||||
"access_calendar_alarm","calendar.alarm","model_calendar_alarm",base.group_user,1,1,1,1
|
||||
"access_res_alarm","res.alarm","model_res_alarm",base.group_user,1,1,1,1
|
||||
"access_calendar_event_all","calendar.event","model_calendar_event",base.group_user,1,1,1,1
|
||||
"access_calendar_todo","calendar.todo","model_calendar_todo",base.group_user,1,1,1,1
|
||||
"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",base.group_user,1,1,1,1
|
||||
"access_calendar_event_edit_all","calendar_event_edit_all","model_calendar_event_edit_all",base.group_user,1,1,1,1
|
||||
"access_base_calendar_set_exrule","base.calendar.set.exrule","model_base_calendar_set_exrule",base.group_user,1,1,1,1
|
||||
"access_calendar_attendee","calendar.attendee","model_calendar_attendee","base.group_user",1,1,1,1
|
||||
"access_calendar_alarm","calendar.alarm","model_calendar_alarm","base.group_user",1,1,1,1
|
||||
"access_res_alarm","res.alarm","model_res_alarm","base.group_user",1,1,1,1
|
||||
"access_calendar_todo","calendar.todo","model_calendar_todo","base.group_user",1,1,1,1
|
||||
|
|
|
|
@ -65,7 +65,6 @@ send an Email to Invited Person')
|
|||
context = {}
|
||||
|
||||
model = False
|
||||
model_field = False
|
||||
context_id = context and context.get('active_id', False) or False
|
||||
if not context or not context.get('model'):
|
||||
return {}
|
||||
|
|
|
@ -104,11 +104,14 @@ class base_calendar_set_exrule(osv.osv_memory):
|
|||
weekstring = ''
|
||||
monthstring = ''
|
||||
yearstring = ''
|
||||
|
||||
ex_id = base_calendar.base_calendar_id2real_id(context['active_id'])
|
||||
model = context.get('model', False)
|
||||
model_obj = self.pool.get(model)
|
||||
for datas in self.read(cr, uid, ids, context=context):
|
||||
freq = datas.get('freq')
|
||||
if freq == 'None':
|
||||
return ''
|
||||
model_obj.write(cr, uid, ex_id,{'exrule': ''})
|
||||
return{}
|
||||
|
||||
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
|
||||
|
||||
|
@ -143,12 +146,8 @@ class base_calendar_set_exrule(osv.osv_memory):
|
|||
|
||||
exrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \
|
||||
+ enddate + monthstring + yearstring
|
||||
ex_id = base_calendar.base_calendar_id2real_id(context['active_id'])
|
||||
model = context.get('model', False)
|
||||
model_obj = self.pool.get(model)
|
||||
exrule_value = model_obj.write(cr, uid,ex_id,{
|
||||
'exrule': exrule_string,
|
||||
})
|
||||
|
||||
model_obj.write(cr, uid, ex_id,{'exrule': exrule_string})
|
||||
return {}
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -49,11 +49,13 @@
|
|||
attrs="{'required' : [('freq','=','yearly')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-ok" string="ok" name="compute_exrule_string" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
<group colspan="4" col="6">
|
||||
<separator string="" colspan="8"/>
|
||||
<label string="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-ok" string="_Ok" name="compute_exrule_string" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -20,5 +20,7 @@
|
|||
##############################################################################
|
||||
|
||||
import base_contact
|
||||
import base_contact_installer
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
'base_contact_view.xml',
|
||||
'base_contact_installer_view.xml',
|
||||
'process/base_contact_process.xml'
|
||||
],
|
||||
'demo_xml': ['base_contact_demo.xml'],
|
||||
|
|
|
@ -179,7 +179,7 @@
|
|||
<record id="res_partner_job_2" model="res.partner.job">
|
||||
<field name="address_id" ref="base.res_partner_address_3"/>
|
||||
<field name="function">CTO</field>
|
||||
<field eval=""""info@mediapole.net"""" name="email"/>
|
||||
<field eval=""""info@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_passot0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_3" model="res.partner.job">
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
# -*- coding: 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from lxml import etree
|
||||
from osv import fields, osv
|
||||
|
||||
class base_contact_installer(osv.osv_memory):
|
||||
_name = 'base.contact.installer'
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64),
|
||||
'migrate': fields.boolean('Migrate', help="If you select this, all addresses will be migrated."),
|
||||
}
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
This function is used to create contact and address from existing partner address
|
||||
"""
|
||||
cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact;
|
||||
DROP LANGUAGE IF EXISTS plpgsql CASCADE;
|
||||
CREATE LANGUAGE plpgsql ;
|
||||
CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$
|
||||
DECLARE
|
||||
new_name varchar;
|
||||
new_phonenum varchar;
|
||||
BEGIN
|
||||
IF(TG_OP='INSERT') THEN
|
||||
INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current');
|
||||
UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id;
|
||||
END IF;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$contactjob$ LANGUAGE plpgsql;
|
||||
CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""")
|
||||
cr.commit()
|
||||
|
||||
cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)")
|
||||
cr.commit()
|
||||
|
||||
cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact")
|
||||
cr.execute("DROP LANGUAGE IF EXISTS plpgsql CASCADE;")
|
||||
cr.execute("DROP FUNCTION IF EXISTS add_to_job()")
|
||||
cr.commit()
|
||||
|
||||
base_contact_installer()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,56 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<record id="view_base_contact_installer" model="ir.ui.view">
|
||||
<field name="name">base.contact.installer.view</field>
|
||||
<field name="model">base.contact.installer</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.res_config_installer"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Address's Migration to Contacts</attribute>
|
||||
</form>
|
||||
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Select the Option for Addresses Migration</attribute>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">You can migrate Partner's current addresses to the contact.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>13</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Migrate</attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<group colspan="2" col="2">
|
||||
<label string="Due to changes in Address and Partner's relation, some of the details from address are needed to migrated into contact information." colspan="4"/>
|
||||
<label string="Otherwise these details will not be visible from address/contact." colspan="4"/>
|
||||
<label string="Do you want to migrate your Address data in Contact Data?" colspan="4" />
|
||||
<field name="migrate" string="Yes/No" />
|
||||
</group>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_base_contact_installer" model="ir.actions.act_window">
|
||||
<field name="name">Address Migration</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">base.contact.installer</field>
|
||||
<field name="view_id" ref="view_base_contact_installer"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="base_contact_installer_todo" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_base_contact_installer"/>
|
||||
<field name="sequence">3</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -14,7 +14,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-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base_module_quality
|
||||
|
|
|
@ -15,7 +15,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-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base_module_quality
|
||||
|
|
|
@ -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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -48,7 +48,7 @@ PEP-8 Test , copyright of py files check, method can not call from loops
|
|||
list_files.append(os.path.join(i, j))
|
||||
py_list = []
|
||||
for file_py in list_files:
|
||||
if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__terp__.py'):
|
||||
if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__openerp__.py'):
|
||||
file_path = os.path.join(module_path, file_py)
|
||||
py_list.append(file_path)
|
||||
|
||||
|
|
|
@ -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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -50,7 +50,7 @@ class quality_test(base_module_quality.abstract_quality_check):
|
|||
flag = False
|
||||
self.result_details += '''<html><body><head>%s</head>'''%(self.get_style())
|
||||
for file_py in list_files:
|
||||
if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__terp__.py'):
|
||||
if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__openerp__.py'):
|
||||
if not flag:
|
||||
flag = True
|
||||
file_path = os.path.join(module_path, file_py)
|
||||
|
|
|
@ -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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -82,7 +82,7 @@ This test checks if the module satisfy tiny structure
|
|||
# module files calculation (module.py,module_view.xml,etc..)
|
||||
com_list = ['_unit_test.xml', '.py', '_view.xml', '_workflow.xml' , '_wizard.xml', '_report.xml', '_data.xml', '_demo.xml', '_security.xml', '_sequence.xml', '_graph.xml']
|
||||
com_list = map(lambda x: module_name + x, com_list)
|
||||
main_file = ['__init__.py', '__terp__.py']
|
||||
main_file = ['__init__.py', '__openerp__.py']
|
||||
com_list.extend(main_file)
|
||||
module_dict['module'] = filter(lambda x: len(x.split(".")) > 1, module_dict['module'])
|
||||
score = self.get_score(module_dict['module'], com_list)
|
||||
|
|
|
@ -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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -49,13 +49,13 @@ class quality_test(base_module_quality.abstract_quality_check):
|
|||
score = 1.0
|
||||
feel_good_factor = 0
|
||||
feel_bad_factor = 0
|
||||
if '__terp__.py' not in list_files:
|
||||
if '__openerp__.py' not in list_files:
|
||||
self.no_terp = True
|
||||
self.result += _("The module does not contain the __terp__.py file")
|
||||
self.result += _("The module does not contain the __openerp__.py file")
|
||||
return None
|
||||
result_dict = {}
|
||||
result_dict1 = {}
|
||||
terp_file = os.path.join(module_path,'__terp__.py')
|
||||
terp_file = os.path.join(module_path,'__openerp__.py')
|
||||
res = eval(tools.file_open(terp_file).read())
|
||||
terp_keys = ['category', 'name', 'description', 'author', 'website', 'update_xml', 'init_xml', 'depends', 'version', 'active', 'installable', 'demo_xml']
|
||||
for key in terp_keys:
|
||||
|
@ -117,7 +117,7 @@ class quality_test(base_module_quality.abstract_quality_check):
|
|||
|
||||
self.result_details += self.get_result_details(result_dict)
|
||||
self.result_details += self.get_result_details(result_dict1)
|
||||
return [_('__terp__.py file'), score]
|
||||
return [_('__openerp__.py file'), score]
|
||||
|
||||
def run_test(self, cr, uid, module_path):
|
||||
terp_score = self.run_test_terp(cr, uid, module_path)
|
||||
|
@ -125,7 +125,7 @@ class quality_test(base_module_quality.abstract_quality_check):
|
|||
if self.score*100 < self.min_score:
|
||||
self.message = 'Score is below than minimal score(%s%%)' % self.min_score
|
||||
if terp_score:
|
||||
self.result = self.get_result({'__terp__.py': terp_score})
|
||||
self.result = self.get_result({'__openerp__.py': terp_score})
|
||||
return None
|
||||
|
||||
def get_result(self, dict_terp):
|
||||
|
@ -144,4 +144,4 @@ class quality_test(base_module_quality.abstract_quality_check):
|
|||
return res
|
||||
return ""
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -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-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string"
|
||||
>Now that OpenERP is installed, We have selected applications commonly useful to users which you can install directly, as well as sets of applications for more specific types or groups of businesses (the vertical modules).
|
||||
|
||||
If you don't think you need any of these right now, you can easily install them later on.</attribute>
|
||||
>The most common applications have been pre selected. You can directly install them. You can either choose generic modules, or select modules for specific business sectors and industries. If you do not think you need any of these right now, you can easily install them later.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='string'></attribute>
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
<field name="company_id" invisible="1"/>
|
||||
<field name="name" required="True"/><field name="account_no"/>
|
||||
<field name="currency" widget="selection"/><field name="street"/>
|
||||
<field name="zip"/>
|
||||
<field name="street2"/>
|
||||
<field name="country_id"/>
|
||||
<field name="zip"/>
|
||||
<field name="state_id"/>
|
||||
<field name="city"/>
|
||||
<field name="email"/>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<attribute name="string">Contact Information</attribute>
|
||||
</form>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Information about you and the company you are related too. The Basic information related to the company has already been collected and some more information required by you to fill.</attribute>
|
||||
<attribute name="string">To receive more information, please fill in the form about you and your company. Documentation and/or information will be sent to you as soon as possible.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="title"]' position='attributes'>
|
||||
<attribute name='string'>Would you like more information or documentation ?</attribute>
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_association
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:15+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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-24 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_association
|
||||
#: model:ir.ui.menu,name:board_association.menu_board_associations_manager
|
||||
msgid "Associations"
|
||||
msgstr "Συνεταιρισμοί"
|
||||
|
||||
#. module: board_association
|
||||
#: model:ir.module.module,shortdesc:board_association.module_meta_information
|
||||
msgid "Dashboard for Associations"
|
||||
msgstr "Πίνακας για Συνεταιρισμούς"
|
||||
|
||||
#. module: board_association
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_association.open_board_associations_manager
|
||||
msgid "Association Dashboard"
|
||||
msgstr "Πίνακας Συνεταιρισμών"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "My tasks"
|
||||
msgstr "Οι αναθέσεις μου"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "New members"
|
||||
msgstr "Νέα μέλη"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "Unpaid Invoices"
|
||||
msgstr "Απλήρωτα Τιμολόγια"
|
||||
|
||||
#. module: board_association
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "Next Events"
|
||||
msgstr "Επόμενα Συμβάντα"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "Registrations by Events"
|
||||
msgstr "Καταχωρήσεις ανά Συμβάν"
|
|
@ -1,125 +0,0 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_auction
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:15+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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-24 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_auction
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Invalid XML for View Architecture!"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Objects by day"
|
||||
msgstr "Αντικείμενα ανά Ημέρα"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Objects statistics"
|
||||
msgstr "Στατιστικά Αντικειμένων"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.ui.menu,name:board_auction.menu_board_auction_manager
|
||||
msgid "Auction Manager"
|
||||
msgstr "Υπεύθυνος Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Summary pointing by user"
|
||||
msgstr "Περίληψη χτυπημάτων ανά χρήστη"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.ui.menu,name:board_auction.menu_board_auction
|
||||
msgid "Auction Member"
|
||||
msgstr "Μέλος Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My Latest Deposits"
|
||||
msgstr "Οι Τελευταίες Καταθέσεις μου"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.actions.act_window,name:board_auction.open_board_auction
|
||||
msgid "Auction member board"
|
||||
msgstr "Πίνακας μέλους δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Auction manager "
|
||||
msgstr "Υπεύθυνος Δημοπρασίας "
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.module.module,shortdesc:board_auction.module_meta_information
|
||||
msgid "Board for Auction"
|
||||
msgstr "Πίνακας Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Estimations/Adjudication"
|
||||
msgstr "Εκτιμήσεις/Κατακυρώσεις"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Total Adjudications"
|
||||
msgstr "Σύνολο Κατακυρώσεων"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Latest objects"
|
||||
msgstr "Τελευταία αντικείμενα"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Latest deposits"
|
||||
msgstr "Τελευταίες καταθέσεις"
|
||||
|
||||
#. module: board_auction
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Menu"
|
||||
msgstr "Μενού"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My objects By Day"
|
||||
msgstr "Τα Ανικείμενά μου ανά Ημέρα"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My board"
|
||||
msgstr "Ο Πίνακάς μου"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.actions.act_window,name:board_auction.open_board_auction_manager
|
||||
msgid "Auction manager board"
|
||||
msgstr "Πίνακας Υπεύθυνου Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Min/Adj/Max"
|
||||
msgstr "Ελαχ./Επικ./Μέγ."
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My Latest Objects"
|
||||
msgstr "Τα Τελευταία μου Αντικείμενα"
|
|
@ -1,122 +0,0 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_crm_configuration
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:16+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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-24 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.module.module,shortdesc:board_crm_configuration.module_meta_information
|
||||
msgid "Dashboard for CRM Configuration"
|
||||
msgstr "Πίνακας Ρυθμίσεων CRM"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.ui.menu,name:board_crm_configuration.menu_board_statistics_dash
|
||||
msgid "Statistics Dashboard"
|
||||
msgstr "Πίνακας Στατιστικών Μεγεθών"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_oppor_categ
|
||||
msgid "Opportunities By Categories"
|
||||
msgstr "Ευκαιρίες ανά Κατηγορίες"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_my_cases
|
||||
msgid "My Cases"
|
||||
msgstr "Τα Θέματά μου"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.open_board_crm
|
||||
msgid "CRM Dashboard"
|
||||
msgstr "Πίνακας Αναφορών CRM"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.ui.menu,name:board_crm_configuration.menu_board_crm
|
||||
msgid "Connecting Dashboard"
|
||||
msgstr "Σύνδεση Πινάκων Αναφορών"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_leads_month_user
|
||||
msgid "Leads Of The Month By User"
|
||||
msgstr "Σύνδεσμοι Μηνός ανά Χρήστη"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: view:report.crm.case.section.stage:0
|
||||
msgid "Leads By Stage"
|
||||
msgstr "Σύνδεσμοι ανά Στάδιο"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Meetings"
|
||||
msgstr "Οι Συσκέψεις μου"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.ui.menu,name:board_crm_configuration.menu_board_crm_config
|
||||
msgid "CRM Configuration"
|
||||
msgstr "Ρυθμίσεις CRM"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_jobs_categ
|
||||
msgid "Jobs Requests Of The Month by Applied Job"
|
||||
msgstr "Αιτήσεις Εργασίας του Μήνα ανά Θέση Αίτησης"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Sales Pipeline"
|
||||
msgstr "Το Κανάλι Πωλήσεών μου"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:report.crm.case.user:0
|
||||
msgid "Cases by User and Section"
|
||||
msgstr "Θέματα ανά Χρήστη και Τμήμα"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Leads By Stage"
|
||||
msgstr "Οι Σύνδεσμοί μου ανά Στάδιο"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:report.crm.case.categ:0
|
||||
msgid "Cases by Sections and Categories"
|
||||
msgstr "Θέματα ανά Τμήμα και Κατηγορίες"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.open_board_statistical_dash
|
||||
msgid "CRM - Statistics Dashboard"
|
||||
msgstr "CRM - Πίνακας Στατιστικών Μεγεθών"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Leads"
|
||||
msgstr "Οι Σύνδεσμοί μου"
|
|
@ -1,92 +0,0 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_document
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:21+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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-24 03:47+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_document
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "New Files"
|
||||
msgstr "Νέα Αρχεία"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.actions.act_window,name:board_document.open_board_document_manager
|
||||
#: model:ir.ui.menu,name:board_document.menu_board_document_manager
|
||||
msgid "Document Dashboard"
|
||||
msgstr "Πίνακας Εγγραφών"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Wall of Shame"
|
||||
msgstr "Τείχος της Ντροπής"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "File Size by Month"
|
||||
msgstr "Μέγεθος Αρχείων ανά Μήνα"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Month"
|
||||
msgstr "Αρχεία ανά Μήνα"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.actions.act_window,name:board_document.open_board_document_manager1
|
||||
#: model:ir.ui.menu,name:board_document.menu_board_document_manager1
|
||||
msgid "Statistics by User"
|
||||
msgstr "Στατιστικά ανά Χρήστη"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Resource Type"
|
||||
msgstr "Αρχεία ανά Τύπο Προέλευσης"
|
||||
|
||||
#. module: board_document
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.module.module,shortdesc:board_document.module_meta_information
|
||||
msgid "Dashboard for Document Management"
|
||||
msgstr "Πίνακας Διαχείρισης Εγγραφών"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Partner"
|
||||
msgstr "Αρχεία ανά Συνεργάτη"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.ui.menu,name:board_document.menu_board_document
|
||||
msgid "Document"
|
||||
msgstr "Έγγραφο"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Users"
|
||||
msgstr "Αρχεία ανά Χρήστη"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Document board"
|
||||
msgstr "Πίνακας εγγράφου"
|
|
@ -1,142 +0,0 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_project
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:22+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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-24 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My project's planning"
|
||||
msgstr "Σχεδιασμός Έργων μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:hr_timesheet_sheet.sheet:0
|
||||
#: model:ir.actions.act_window,name:board_project.act_hr_timesheet_sheet
|
||||
msgid "Timesheets"
|
||||
msgstr "Φύλλα Χρόνου Εργασίας"
|
||||
|
||||
#. module: board_project
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.act_my_project
|
||||
msgid "My projects"
|
||||
msgstr "Τα Έργα μου"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.action_view_task_tree_deadline
|
||||
msgid "My Task's Deadlines"
|
||||
msgstr "Προθεσμίες Αναθέσεών μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:project.task:0
|
||||
msgid "My Tasks"
|
||||
msgstr "Οι Αναθέσεις μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.action_view_board_note_tree
|
||||
msgid "Public Notes"
|
||||
msgstr "Κοινοποιημένες Σημειώσεις"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.open_board_project
|
||||
#: model:ir.ui.menu,name:board_project.menu_board_project
|
||||
msgid "Project Dashboard"
|
||||
msgstr "Πίνακας Έργων"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.module.module,shortdesc:board_project.module_meta_information
|
||||
msgid "Board for project users"
|
||||
msgstr "Πίνακας Χρηστών Έργου"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.action_project_pipeline_user
|
||||
msgid "Pipeline of tasks"
|
||||
msgstr "Κανάλι Αναθέσεων"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Planning"
|
||||
msgstr "Ο Σχεδιασμός μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.act_my_account
|
||||
msgid "My accounts to invoice"
|
||||
msgstr "Οι λογαριασμοί μου προς τιμολόγηση"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.open_board_project_manager
|
||||
#: model:ir.ui.menu,name:board_project.menu_board_project_manager
|
||||
msgid "Project Manager Dashboard"
|
||||
msgstr "Πίνακας Αναφορών Διευθυντή Έργου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Deadlines"
|
||||
msgstr "Οι Προθεσμίες μου"
|
||||
|
||||
#. module: board_project
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "User's timesheets"
|
||||
msgstr "Φύλλα χρόνου χρηστών"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.ui.menu,name:board_project.next_id_86
|
||||
msgid "Project"
|
||||
msgstr "Έργο"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "Project manager board"
|
||||
msgstr "Πίνακας διευθυντή έργου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.action_view_task_tree
|
||||
msgid "My Open Tasks"
|
||||
msgstr "Οι Ανοικτές Αναθέσεις μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Board"
|
||||
msgstr "Ο Πίνακάς μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My tasks board"
|
||||
msgstr "Ο πίνακας αναθέσεών μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My user's pipeline"
|
||||
msgstr "Το κανάλι μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Timesheet"
|
||||
msgstr "Το Φύλλο Χρόνου μου"
|
|
@ -32,16 +32,6 @@ class calendar_event_export(osv.osv_memory):
|
|||
"""
|
||||
Export Calendar Event.
|
||||
"""
|
||||
def process_export_ics(self, cr, uid, ids, context):
|
||||
"""
|
||||
Get Default value for file_path field.
|
||||
"""
|
||||
model = context.get('model', 'basic.calendar')
|
||||
model_obj = self.pool.get(model)
|
||||
|
||||
calendar = model_obj.export_cal(cr, uid, context['active_ids'], context)
|
||||
self.write(cr, uid, ids, {'file_path': base64.encodestring(calendar)})
|
||||
return False
|
||||
|
||||
def default_get(self, cr, uid, fields, context):
|
||||
"""
|
||||
|
@ -54,6 +44,9 @@ class calendar_event_export(osv.osv_memory):
|
|||
name = 'OpenERP %s.ics' % (model_obj._description)
|
||||
if 'name' in fields:
|
||||
res.update({'name': name})
|
||||
if 'file_path' in fields:
|
||||
calendar = model_obj.export_cal(cr, uid, context['active_ids'], context)
|
||||
res.update({'file_path': base64.encodestring(calendar)})
|
||||
return res
|
||||
|
||||
_name = "calendar.event.export"
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<button name="process_export_ics" icon="gtk-execute" string="Genetate ics" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<label string=""/>
|
||||
<button icon="gtk-close" special="cancel" string="_Close"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
##############################################################################
|
||||
|
||||
import crm
|
||||
import crm_mailgate
|
||||
import crm_action_rule
|
||||
import crm_segmentation
|
||||
import crm_meeting
|
||||
|
|
|
@ -69,8 +69,10 @@ Create dashboard for CRM that includes:
|
|||
'crm_opportunity_data.xml',
|
||||
'crm_phonecall_data.xml',
|
||||
],
|
||||
|
||||
'update_xml': [
|
||||
'security/crm_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
'wizard/crm_lead_to_partner_view.xml',
|
||||
'wizard/crm_lead_to_opportunity_view.xml',
|
||||
|
||||
|
@ -98,9 +100,6 @@ Create dashboard for CRM that includes:
|
|||
'crm_opportunity_view.xml',
|
||||
'crm_opportunity_menu.xml',
|
||||
|
||||
'security/crm_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
'report/crm_lead_report_view.xml',
|
||||
'report/crm_phonecall_report_view.xml',
|
||||
|
||||
|
|
|
@ -19,15 +19,16 @@
|
|||
<field name="res_model">crm.lead</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_oppor"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_meetings">
|
||||
<field name="res_model">crm.meeting</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','cancel'),('date','ilike',time.strftime("%Y-%m"))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_leads_stage">
|
||||
|
@ -53,34 +54,28 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Connecting Dashboard">
|
||||
<hpaned>
|
||||
|
||||
<child1>
|
||||
|
||||
<action
|
||||
string="My Opportunities"
|
||||
name="%(act_my_leads)d"
|
||||
colspan="4"
|
||||
height="150"
|
||||
width="510"/>
|
||||
|
||||
<action
|
||||
string="My Meetings"
|
||||
name="%(act_my_meetings)d"
|
||||
height="150"
|
||||
colspan="4"/>
|
||||
|
||||
</child1>
|
||||
|
||||
<child2>
|
||||
<action
|
||||
string="My Leads By Stage"
|
||||
string="Revenues by stage"
|
||||
name="%(act_my_leads_stage)d"
|
||||
colspan="4"/>
|
||||
|
||||
<action
|
||||
string="My Sales Pipeline"
|
||||
name="%(act_sales_pipeline)d"
|
||||
colspan="4"/>
|
||||
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
|
@ -105,7 +100,5 @@
|
|||
action="open_board_crm"
|
||||
sequence="1"
|
||||
id="menu_board_crm" icon="terp-graph"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -118,15 +118,18 @@ class crm_case(object):
|
|||
@param context: A standard dictionary for contextual values"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
s = self.get_stage_dict(cr, uid, ids, context=context)
|
||||
section = self._name
|
||||
stage = False
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if section in s:
|
||||
st = case.stage_id.id or False
|
||||
if st in s[section]:
|
||||
self.write(cr, uid, [case.id], {'stage_id': s[section][st]})
|
||||
return True
|
||||
data = {'stage_id': s[section][st]}
|
||||
stage = s[section][st]
|
||||
self.write(cr, uid, [case.id], data)
|
||||
return stage
|
||||
|
||||
def get_stage_dict(self, cr, uid, ids, context=None):
|
||||
"""This function gives dictionary for stage according to stage levels
|
||||
|
@ -162,12 +165,18 @@ class crm_case(object):
|
|||
|
||||
s = self.get_stage_dict(cr, uid, ids, context=context)
|
||||
section = self._name
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if section in s:
|
||||
st = case.stage_id.id or False
|
||||
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
|
||||
if st in s[section]:
|
||||
self.write(cr, uid, [case.id], {'stage_id': s[section][st]})
|
||||
data = {'stage_id': s[section][st]}
|
||||
if s[section][st]:
|
||||
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
self.write(cr, uid, [case.id], data)
|
||||
return True
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part, email=False):
|
||||
|
@ -181,7 +190,8 @@ class crm_case(object):
|
|||
"""
|
||||
if not part:
|
||||
return {'value': {'partner_address_id': False,
|
||||
'email_from': False,
|
||||
'email_from': False,
|
||||
'phone': False
|
||||
}}
|
||||
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
|
||||
data = {'partner_address_id': addr['contact']}
|
||||
|
@ -200,7 +210,7 @@ class crm_case(object):
|
|||
if not add:
|
||||
return {'value': {'email_from': False}}
|
||||
address = self.pool.get('res.partner.address').browse(cr, uid, add)
|
||||
return {'value': {'email_from': address.email}}
|
||||
return {'value': {'email_from': address.email, 'phone': address.phone}}
|
||||
|
||||
def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context={}):
|
||||
mailgate_pool = self.pool.get('mailgate.thread')
|
||||
|
@ -541,7 +551,7 @@ class crm_case_resource_type(osv.osv):
|
|||
_rec_name = "name"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Case Resource Type', size=64, required=True, translate=True),
|
||||
'name': fields.char('Resource Type', size=64, required=True, translate=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
'object_id': fields.many2one('ir.model', 'Object Name'),
|
||||
}
|
||||
|
|
|
@ -69,12 +69,10 @@ this if you want the rule to send an email to the partner."),
|
|||
return tools.email_send(emailfrom, emails, name, body, reply_to=reply_to, openobject_id=str(obj.id))
|
||||
|
||||
def do_check(self, cr, uid, action, obj, context={}):
|
||||
|
||||
""" @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 context: A standard dictionary for contextual values"""
|
||||
|
||||
ok = super(base_action_rule, self).do_check(cr, uid, action, obj, context=context)
|
||||
|
||||
if hasattr(obj, 'section_id'):
|
||||
|
@ -89,7 +87,6 @@ this if you want the rule to send an email to the partner."),
|
|||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
res = super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context)
|
||||
write = {}
|
||||
|
||||
|
@ -125,7 +122,7 @@ this if you want the rule to send an email to the partner."),
|
|||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
res = super(base_action_rule, self).state_get(cr, uid, context=context)
|
||||
return res + [('escalate', 'Escalate')] + crm.AVAILABLE_STATES
|
||||
return res + crm.AVAILABLE_STATES
|
||||
|
||||
def priority_get(self, cr, uid, context={}):
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue