[MERGE]:Merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons1

bzr revid: sbh@tinyerp.com-20100524044458-s6fxz4onkv01zd8c
bzr revid: sbh@tinyerp.com-20100524052759-mk8mpnm1v2gfcslq
This commit is contained in:
sbh (Open ERP)
2010-05-24 10:57:59 +05:30
357 changed files with 13320 additions and 3898 deletions
+3
View File
@@ -107,8 +107,11 @@ module named account_voucherss
'company_view.xml',
'account_installer.xml',
'report/account_invoice_report_view.xml',
'report/account_entries_report_view.xml',
'report/account_report_view.xml',
'report/account_analytic_report_view.xml',
'report/account_account_report_view.xml',
'report/account_analytic_entries_report_view.xml'
],
'demo_xml': [
#'demo/price_accuracy00.yml',
+81 -13
View File
@@ -231,9 +231,9 @@ class account_account(osv.osv):
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
wheres = [""]
if query:
if query.strip():
wheres.append(query.strip())
if aml_query:
if aml_query.strip():
wheres.append(aml_query.strip())
query = " AND ".join(wheres)
@@ -251,6 +251,7 @@ class account_account(osv.osv):
# consolidate accounts with direct children
ids2.reverse()
brs = list(self.browse(cr, uid, ids2, context=context))
sums = {}
while brs:
@@ -270,8 +271,9 @@ class account_account(osv.osv):
if current.child_id:
sums[current.id][fn] += sum(sums[child.id][fn] for child in current.child_id)
res = {}
null_result = dict((fn, 0.0) for fn in field_names)
for id in ids:
res[id] = sums[id]
res[id] = sums.get(id, null_result)
return res
def _get_company_currency(self, cr, uid, ids, field_name, arg, context={}):
@@ -313,7 +315,7 @@ class account_account(osv.osv):
'user_type': fields.many2one('account.account.type', 'Account Type', required=True,
help="These types are defined according to your country. The type contains more information "\
"about the account and its specificities."),
'parent_id': fields.many2one('account.account', 'Parent', ondelete='cascade'),
'parent_id': fields.many2one('account.account', 'Parent', ondelete='cascade', domain=[('type','=','view')]),
'child_parent_ids': fields.one2many('account.account','parent_id','Children'),
'child_consol_ids': fields.many2many('account.account', 'account_account_consol_rel', 'child_id', 'parent_id', 'Consolidated Children'),
'child_id': fields.function(_get_child_ids, method=True, type='many2many', relation="account.account", string="Child Accounts"),
@@ -450,18 +452,42 @@ class account_account(osv.osv):
def _check_moves(self, cr, uid, ids, method, context):
line_obj = self.pool.get('account.move.line')
account_ids = self.search(cr, uid, [('id', 'child_of', ids)])
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
if method == 'write':
raise osv.except_osv(_('Error !'), _('You cannot deactivate an account that contains account moves.'))
elif method == 'unlink':
raise osv.except_osv(_('Error !'), _('You cannot remove an account which has account entries!. '))
#Checking whether the account is set as a property to any Partner or not
value = 'account.account,' + str(ids[0])
partner_prop_acc = self.pool.get('ir.property').search(cr, uid, [('value_reference','=',value)], context=context)
if partner_prop_acc:
raise osv.except_osv(_('Warning !'), _('You cannot remove/deactivate an account which is set as a property to any Partner.'))
return True
def _check_allow_type_change(self, cr, uid, ids, new_type, context):
group1 = ['payable', 'receivable', 'other']
group2 = ['consolidation','view']
line_obj = self.pool.get('account.move.line')
for account in self.browse(cr, uid, ids, context=context):
old_type = account.type
account_ids = self.search(cr, uid, [('id', 'child_of', [account.id])])
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
#Check for 'Closed' type
if old_type == 'closed' and new_type !='closed':
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type which contains account entries!"))
#Check for change From group1 to group2 and vice versa
if (old_type in group1 and new_type in group2) or (old_type in group2 and new_type in group1):
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from '%s' to '%s' type as it contains account entries!") % (old_type,new_type,))
return True
def write(self, cr, uid, ids, vals, context=None):
if not context:
if context is None:
context = {}
if 'active' in vals and not vals['active']:
self._check_moves(cr, uid, ids, "write", context)
if 'type' in vals.keys():
self._check_allow_type_change(cr, uid, ids, vals['type'], context=context)
return super(account_account, self).write(cr, uid, ids, vals, context=context)
def unlink(self, cr, uid, ids, context={}):
@@ -557,15 +583,16 @@ class account_journal(osv.osv):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if not context:
context={}
args = []
if context is None:
context = {}
ids = []
if name:
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit, context=context)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
return self.name_get(cr, user, ids, context=context)
account_journal()
class account_fiscalyear(osv.osv):
@@ -631,6 +658,19 @@ class account_fiscalyear(osv.osv):
else:
return False
return ids[0]
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
if args is None:
args = []
if context is None:
context = {}
ids = []
if name:
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
return self.name_get(cr, user, ids, context=context)
account_fiscalyear()
class account_period(osv.osv):
@@ -706,12 +746,24 @@ class account_period(osv.osv):
cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
cr.execute('update account_period set state=%s where id=%s', (mode, id))
return True
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
if args is None:
args = []
if context is None:
context = {}
ids = []
if name:
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
return self.name_get(cr, user, ids, context=context)
account_period()
class account_journal_period(osv.osv):
_name = "account.journal.period"
_description = "Journal - Period"
_description = "Journal Period"
def _icon_get(self, cr, uid, ids, field_name, arg=None, context={}):
result = {}.fromkeys(ids, 'STOCK_NEW')
@@ -950,7 +1002,6 @@ class account_move(osv.osv):
l[2]['period_id'] = default_period
context['period_id'] = default_period
accnt_journal = self.pool.get('account.journal').browse(cr, uid, vals['journal_id'])
if 'line_id' in vals:
c = context.copy()
c['novalidate'] = True
@@ -1248,7 +1299,7 @@ class account_tax_code(osv.osv):
_description = 'Tax Code'
_rec_name = 'code'
_columns = {
'name': fields.char('Tax Case Name', size=64, required=True),
'name': fields.char('Tax Case Name', size=64, required=True, translate=True),
'code': fields.char('Case Code', size=64),
'info': fields.text('Description'),
'sum': fields.function(_sum_year, method=True, string="Year Sum"),
@@ -1262,6 +1313,15 @@ class account_tax_code(osv.osv):
}
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
if not args:
args = []
if context is None:
context = {}
ids = self.search(cr, user, ['|',('name',operator,name),('code',operator,name)] + args, limit=limit, context=context)
return self.name_get(cr, user, ids, context)
def name_get(self, cr, uid, ids, context=None):
if not len(ids):
return []
@@ -1290,7 +1350,15 @@ class account_tax_code(osv.osv):
return False
level -= 1
return True
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default = default.copy()
default.update({'line_ids': []})
return super(account_tax_code, self).copy(cr, uid, id, default, context)
_constraints = [
(_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id'])
]
+3 -3
View File
@@ -30,7 +30,7 @@ from tools import config
class account_analytic_line(osv.osv):
_inherit = 'account.analytic.line'
_description = 'Analytic lines'
_description = 'Analytic Line'
_columns = {
'product_uom_id' : fields.many2one('product.uom', 'UoM'),
'product_id' : fields.many2one('product.product', 'Product'),
@@ -42,7 +42,7 @@ class account_analytic_line(osv.osv):
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', c),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
}
_order = 'date'
@@ -118,7 +118,7 @@ account_analytic_line()
class timesheet_invoice(osv.osv):
_name = "report.hr.timesheet.invoice.journal"
_description = "Analytic account costs and revenues"
_description = "Analytic Account Costs and Revenues"
_auto = False
_columns = {
'name': fields.char('Year',size=64,required=False, readonly=True),
+28 -23
View File
@@ -387,7 +387,7 @@ account_bank_statement()
class account_bank_statement_reconcile(osv.osv):
_name = "account.bank.statement.reconcile"
_description = "Statement reconcile"
_description = "Statement Reconcile"
def _total_entry(self, cursor, user, ids, name, attr, context=None):
result = {}
@@ -558,35 +558,40 @@ class account_bank_statement_line(osv.osv):
def onchange_partner_id(self, cursor, user, line_id, partner_id, type, currency_id,
context={}):
res = {'value': {}}
if not partner_id:
return {}
res_currency_obj = self.pool.get('res.currency')
res_users_obj = self.pool.get('res.users')
company_currency_id = res_users_obj.browse(cursor, user, user,
context=context).company_id.currency_id.id
if not currency_id:
currency_id = company_currency_id
part = self.pool.get('res.partner').browse(cursor, user, partner_id,
return res
line = self.browse(cursor, user, line_id)
if not line or (line and not line[0].account_id):
part = self.pool.get('res.partner').browse(cursor, user, partner_id,
context=context)
if type == 'supplier':
account_id = part.property_account_payable.id
else:
account_id = part.property_account_receivable.id
if type == 'supplier':
account_id = part.property_account_payable.id
else:
account_id = part.property_account_receivable.id
res['value']['account_id'] = account_id
cursor.execute('SELECT sum(debit-credit) \
if not line or (line and not line[0].amount):
res_users_obj = self.pool.get('res.users')
res_currency_obj = self.pool.get('res.currency')
company_currency_id = res_users_obj.browse(cursor, user, user,
context=context).company_id.currency_id.id
if not currency_id:
currency_id = company_currency_id
cursor.execute('SELECT sum(debit-credit) \
FROM account_move_line \
WHERE (reconcile_id is null) \
AND partner_id = %s \
AND account_id=%s', (partner_id, account_id))
res = cursor.fetchone()
balance = res and res[0] or 0.0
pgres = cursor.fetchone()
balance = pgres and pgres[0] or 0.0
balance = res_currency_obj.compute(cursor, user, company_currency_id,
balance = res_currency_obj.compute(cursor, user, company_currency_id,
currency_id, balance, context=context)
return {'value': {'amount': balance, 'account_id': account_id}}
res['value']['amount'] = balance
return res
def _reconcile_amount(self, cursor, user, ids, name, args, context=None):
if not ids:
@@ -625,7 +630,7 @@ class account_bank_statement_line(osv.osv):
'statement_id': fields.many2one('account.bank.statement', 'Statement',
select=True, required=True, ondelete='cascade'),
'reconcile_id': fields.many2one('account.bank.statement.reconcile',
'Reconcile', states={'confirm':[('readonly',True)]}),
'Reconcile'),
'move_ids': fields.many2many('account.move',
'account_bank_statement_line_move_rel', 'move_id','statement_id',
'Moves'),
@@ -633,7 +638,7 @@ class account_bank_statement_line(osv.osv):
'note': fields.text('Notes'),
'reconcile_amount': fields.function(_reconcile_amount,
string='Amount reconciled', method=True, type='float'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bank statement line."),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bank statement lines."),
}
_defaults = {
'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
+4 -2
View File
@@ -478,9 +478,11 @@
<act_window domain="[('journal_id','=',active_id),('state','!=','draft'),('reconciled','=',False)]" id="act_account_journal_2_account_invoice_opened" name="Unpaid invoices" res_model="account.invoice" src_model="account.journal"/>
<act_window domain="[('account_analytic_id', '=', active_id)]" id="act_account_analytic_account_2_account_invoice_line" name="Invoice lines" res_model="account.invoice.line" src_model="account.analytic.account"/>
<!-- Partners inherited form -->
<act_window domain="[('partner_id', '=', partner_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_invoice_account_move_unreconciled" name="Unreconciled Receivables &amp; Payables" res_model="account.move.line" src_model="account.invoice"/>
<!-- Partners inherited form -->
<record id="view_invoice_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.invoice.info.inherit</field>
<field name="model">res.partner</field>
+1 -1
View File
@@ -50,7 +50,7 @@ write({'state':'open'})</field>
<field name="wkf_id" ref="wkf"/>
<field name="name">paid</field>
<!--<field name="flow_stop">True</field>-->
<field name="action">write({'state':'paid'})</field>
<field name="action">confirm_paid()</field>
<field name="kind">function</field>
<field name="signal_send">subflow.paid</field>
</record>
+1
View File
@@ -22,6 +22,7 @@
groups="group_account_user"/>
<menuitem id="menu_account_end_year_treatments" name="End of Year Treatments" parent="account.menu_finance_periodical_processing" sequence="20"/>
<menuitem id="menu_finance_statastic_report_statement" name="Satistic Reports" parent="account.menu_finance_reporting" sequence="3"/>
</data>
</openerp>
+42 -17
View File
@@ -30,7 +30,7 @@ import tools
class account_move_line(osv.osv):
_name = "account.move.line"
_description = "Entry lines"
_description = "Entry Lines"
def _query_get(self, cr, uid, obj='l', context={}):
fiscalyear_obj = self.pool.get('account.fiscalyear')
@@ -577,11 +577,12 @@ class account_move_line(osv.osv):
merges_rec = []
for line in self.browse(cr, uid, ids, context):
if line.reconcile_id:
raise osv.except_osv(_('Already Reconciled'), _('Already Reconciled'))
raise osv.except_osv(_('Warning'), _('Already Reconciled!'))
if line.reconcile_partial_id:
for line2 in line.reconcile_partial_id.line_partial_ids:
if not line2.reconcile_id:
merges.append(line2.id)
if line2.id not in merges:
merges.append(line2.id)
total += (line2.debit or 0.0) - (line2.credit or 0.0)
merges_rec.append(line.reconcile_partial_id.id)
else:
@@ -774,6 +775,17 @@ class account_move_line(osv.osv):
result['fields'] = self.fields_get(cr, uid, fields, context)
return result
def _check_moves(self, cr, uid, context):
# use the first move ever created for this journal and period
cr.execute('select id, state, name from account_move where journal_id=%s and period_id=%s order by id limit 1', (context['journal_id'],context['period_id']))
res = cr.fetchone()
if res:
if res[1] != 'draft':
raise osv.except_osv(_('UserError'),
_('The account move (%s) for centralisation ' \
'has been confirmed!') % res[2])
return res
def unlink(self, cr, uid, ids, context={}, check=True):
self._update_check(cr, uid, ids, context)
result = False
@@ -809,7 +821,7 @@ class account_move_line(osv.osv):
return True
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
if not context:
if context is None:
context={}
if vals.get('account_tax_id', False):
raise osv.except_osv(_('Unable to change tax !'), _('You can not change the tax, you should remove and recreate lines !'))
@@ -825,6 +837,24 @@ class account_move_line(osv.osv):
if vals.get('date', False):
todo_date = vals['date']
del vals['date']
for line in self.browse(cr, uid, ids,context=context):
ctx = context.copy()
if ('journal_id' not in ctx):
if line.move_id:
ctx['journal_id'] = line.move_id.journal_id.id
else:
ctx['journal_id'] = line.journal_id.id
if ('period_id' not in ctx):
if line.move_id:
ctx['period_id'] = line.move_id.period_id.id
else:
ctx['period_id'] = line.period_id.id
#Check for centralisation
journal = self.pool.get('account.journal').browse(cr, uid, ctx['journal_id'], context=ctx)
if journal.centralisation:
self._check_moves(cr, uid, context=ctx)
result = super(account_move_line, self).write(cr, uid, ids, vals, context)
if check:
@@ -891,14 +921,9 @@ class account_move_line(osv.osv):
is_new_move = False
if not move_id:
if journal.centralisation:
# use the first move ever created for this journal and period
cr.execute('select id, state, name from account_move where journal_id=%s and period_id=%s order by id limit 1', (context['journal_id'],context['period_id']))
res = cr.fetchone()
#Check for centralisation
res = self._check_moves(cr, uid, context)
if res:
if res[1] != 'draft':
raise osv.except_osv(_('UserError'),
_('The Ledger Posting (%s) for centralisation ' \
'has been confirmed!') % res[2])
vals['move_id'] = res[0]
if not vals.get('move_id', False):
@@ -926,7 +951,7 @@ class account_move_line(osv.osv):
break
if journal.account_control_ids and not ok:
for a in journal.account_control_ids:
if a.id==vals['account_id']:
if a.id == vals['account_id']:
ok = True
break
if (account.currency_id) and 'amount_currency' not in vals and account.currency_id.id <> company_currency:
@@ -941,7 +966,7 @@ class account_move_line(osv.osv):
if not ok:
raise osv.except_osv(_('Bad account !'), _('You can not use this general account in this journal !'))
if 'analytic_account_id' in vals and vals['analytic_account_id']:
if vals.get('analytic_account_id',False):
if journal.analytic_journal_id:
vals['analytic_lines'] = [(0,0, {
'name': vals['name'],
@@ -961,8 +986,8 @@ class account_move_line(osv.osv):
result = super(osv.osv, self).create(cr, uid, vals, context)
# CREATE Taxes
if 'account_tax_id' in vals and vals['account_tax_id']:
tax_id=tax_obj.browse(cr,uid,vals['account_tax_id'])
if vals.get('account_tax_id',False):
tax_id = tax_obj.browse(cr, uid, vals['account_tax_id'])
total = vals['debit'] - vals['credit']
if journal.refund_journal:
base_code = 'ref_base_code_id'
@@ -978,7 +1003,7 @@ class account_move_line(osv.osv):
tax_sign = 'tax_sign'
tmp_cnt = 0
for tax in tax_obj.compute(cr,uid,[tax_id],total,1.00):
for tax in tax_obj.compute(cr, uid, [tax_id], total, 1.00):
#create the base movement
if tmp_cnt == 0:
if tax[base_code]:
@@ -1031,7 +1056,7 @@ class account_move_line(osv.osv):
# if context and ('__last_update' in context):
# del context['__last_update']
# self.pool.get('account.move').write(cr, uid, [move_id], {'date':vals['date']}, context=context)
if check and not context.get('no_store_function'):
if check and ((not context.get('no_store_function')) or journal.entry_posted):
tmp = self.pool.get('account.move').validate(cr, uid, [vals['move_id']], context)
if journal.entry_posted and tmp:
self.pool.get('account.move').button_validate(cr,uid, [vals['move_id']],context)
+12 -6
View File
@@ -351,7 +351,7 @@
<page string="Entry encoding">
<field colspan="4" name="line_ids" nolabel="1">
<tree editable="bottom" string="Statement lines">
<field name="sequence"/>
<field name="sequence" invisible="1"/>
<field name="date"/>
<field name="ref"/>
<field name="name"/>
@@ -531,7 +531,10 @@
<field name="create_date" select="1"/>
<field name="type" select="1"/>
</group>
<separator colspan="4" string="Reconcile Entries"/>
<field colspan="4" name="line_id" nolabel="1"/>
<separator colspan="4" string="Partial Reconcile Entries"/>
<field colspan="4" name="line_partial_ids" nolabel="1"/>
</form>
</field>
</record>
@@ -551,6 +554,7 @@
<field name="code"/>
<field name="sum"/>
<field name="sum_period"/>
<field name="company_id"/>
</tree>
</field>
</record>
@@ -562,7 +566,7 @@
<form string="Account Tax Code">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="company_id" select="1"/>
<field name="notprintable"/>
<field name="parent_id" select="1"/>
<field name="sign"/>
@@ -648,9 +652,9 @@
</page>
<page groups="base.group_extended" string="Special Computation">
<separator colspan="4" string="Compute Code (if type=code)"/>
<field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')]}"/>
<field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
<separator colspan="4" string="Applicable Code (if type=code)"/>
<field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')]}"/>
<field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/>
</page>
</notebook>
</form>
@@ -1453,9 +1457,11 @@
<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="Receivables &amp; Payables" res_model="account.move.line" src_model="res.partner"/>
<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 &amp; 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"/>
<act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable'])]" id="act_account_partner_account_move_all" name="Receivables &amp; 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"/>
<record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
<field name="name">Account Add wizard</field>
+6 -6
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-17 13:10+0000\n"
"Last-Translator: Jon A. Ortuondo (Euskotec) <Unknown>\n"
"PO-Revision-Date: 2010-05-23 09:59+0000\n"
"Last-Translator: ninaiz <inigo.rekalde@gmail.com>\n"
"Language-Team: Basque <eu@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-05-18 05:15+0000\n"
"X-Launchpad-Export-Date: 2010-05-24 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -236,7 +236,7 @@ msgstr ""
#: field:account.tax.template,amount:0
#: xsl:account.transfer:0
msgid "Amount"
msgstr ""
msgstr "Kopurua"
#. module: account
#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger
@@ -338,7 +338,7 @@ msgstr ""
#: field:account.invoice,amount_tax:0
#: field:account.move.line,account_tax_id:0
msgid "Tax"
msgstr ""
msgstr "Zerga"
#. module: account
#: rml:account.general.journal:0
@@ -465,7 +465,7 @@ msgstr ""
#. module: account
#: rml:account.invoice:0
msgid "Disc.(%)"
msgstr ""
msgstr "Desk. (%)"
#. module: account
#: rml:account.general.ledger:0
+10 -6
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.1\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-02-18 09:24+0000\n"
"Last-Translator: Olivier Dony (OpenERP) <Unknown>\n"
"PO-Revision-Date: 2010-05-21 17:48+0000\n"
"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:06+0000\n"
"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -2495,7 +2495,8 @@ msgid "Analytic Entry"
msgstr "Ecriture analytique"
#. module: account
#: view:res.company:0 field:res.company,overdue_msg:0
#: view:res.company:0
#: field:res.company,overdue_msg:0
msgid "Overdue Payments Message"
msgstr "Message pour les paiements en retard"
@@ -2784,7 +2785,7 @@ msgstr "Ouvrir journal"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "KI"
msgstr ""
msgstr "KI"
#. module: account
#: model:ir.actions.wizard,name:account.action_account_analytic_line
@@ -3034,7 +3035,7 @@ msgstr "-"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "asgfas"
msgstr ""
msgstr "asgfas"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_account_tree2
@@ -6082,3 +6083,6 @@ msgid ""
msgstr ""
"Cochez cette case si l'utilisateur peut réconcilier les entrées dans ce "
"compte."
#~ msgid "account.config.wizard"
#~ msgstr "account.config.wizard"
+7 -7
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-13 10:33+0000\n"
"Last-Translator: Cédric VALMARY (Per Tot en òc) <cvalmary@yahoo.fr>\n"
"PO-Revision-Date: 2010-05-18 08:45+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-04-17 04:07+0000\n"
"X-Launchpad-Export-Date: 2010-05-19 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -175,7 +175,7 @@ msgstr ""
#. module: account
#: view:account.move:0
msgid "Total Credit"
msgstr "Total crrdit"
msgstr "Credit Total"
#. module: account
#: field:account.config.wizard,charts:0
@@ -255,7 +255,7 @@ msgstr "Taxas provesidors"
#. module: account
#: view:account.move:0
msgid "Total Debit"
msgstr "Total debit"
msgstr "Debit Total"
#. module: account
#: rml:account.tax.code.entries:0
@@ -808,7 +808,6 @@ msgstr ""
msgid "Move Lines"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.report_account_analytic_journal_tree
#: model:ir.ui.menu,name:account.report_account_analytic_journal_print
@@ -2136,7 +2135,8 @@ msgid "Analytic Entry"
msgstr ""
#. module: account
#: view:res.company:0 field:res.company,overdue_msg:0
#: view:res.company:0
#: field:res.company,overdue_msg:0
msgid "Overdue Payments Message"
msgstr ""
+6 -5
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-15 03:12+0000\n"
"PO-Revision-Date: 2010-05-20 07:09+0000\n"
"Last-Translator: Songpon Phusing <p.songpon@gmail.com>\n"
"Language-Team: Thai <th@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-04-17 04:08+0000\n"
"X-Launchpad-Export-Date: 2010-05-21 03:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -51,7 +51,7 @@ msgstr ""
#. module: account
#: model:account.account.type,name:account.account_type_asset
msgid "Asset"
msgstr ""
msgstr "สินทรัพย์"
#. module: account
#: constraint:ir.actions.act_window:0
@@ -106,7 +106,7 @@ msgstr ""
#: model:ir.actions.wizard,name:account.wizard_vat_declaration
#: model:ir.ui.menu,name:account.menu_wizard_vat_declaration
msgid "Print Taxes Report"
msgstr ""
msgstr "พิมพ์รายงานภาษี"
#. module: account
#: field:account.account,parent_id:0
@@ -2133,7 +2133,8 @@ msgid "Analytic Entry"
msgstr ""
#. module: account
#: view:res.company:0 field:res.company,overdue_msg:0
#: view:res.company:0
#: field:res.company,overdue_msg:0
msgid "Overdue Payments Message"
msgstr ""
+33 -10
View File
@@ -23,8 +23,8 @@ import time
import decimal_precision as dp
import netsvc
from osv import fields, osv, orm
import ir
import pooler
from tools import config
from tools.translate import _
@@ -217,6 +217,7 @@ class account_invoice(osv.osv):
_name = "account.invoice"
_description = 'Invoice'
_order = "number"
_log_create = True
_columns = {
'name': fields.char('Description', size=64, select=True,readonly=True, states={'draft':[('readonly',False)]}),
'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice."),
@@ -333,7 +334,14 @@ class account_invoice(osv.osv):
raise orm.except_orm(_('Configuration Error!'),
_('There is no Accounting Journal of type Sale/Purchase defined!'))
else:
raise
raise orm.except_orm(_('UnknownError'), str(e))
def confirm_paid(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'paid'}, context=context)
for (id,name) in self.name_get(cr, uid, ids):
message = _('Document ') + " '" + name + "' "+ _("has been paid.")
self.log(cr, uid, id, message)
return True
def unlink(self, cr, uid, ids, context=None):
invoices = self.read(cr, uid, ids, ['state'])
@@ -350,7 +358,7 @@ class account_invoice(osv.osv):
# res = self.pool.get('res.partner').address_get(cr, uid, [part], ['invoice'])
# return [{}]
def onchange_partner_id(self, cr, uid, ids, type, partner_id,
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
date_invoice=False, payment_term=False, partner_bank=False, company_id=False):
invoice_addr_id = False
contact_addr_id = False
partner_payment_term = False
@@ -415,7 +423,7 @@ class account_invoice(osv.osv):
else:
result['value']['date_due'] = False
if partner_bank_id != bank_id:
if partner_bank != bank_id:
to_update = self.onchange_partner_bank(cr, uid, ids, bank_id)
result['value'].update(to_update['value'])
return result
@@ -450,7 +458,7 @@ class account_invoice(osv.osv):
def onchange_invoice_line(self, cr, uid, ids, lines):
return {}
def onchange_partner_bank(self, cursor, user, ids, partner_bank_id):
def onchange_partner_bank(self, cursor, user, ids, partner_bank):
return {'value': {}}
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id):
@@ -650,6 +658,16 @@ class account_invoice(osv.osv):
self.write(cr, uid, [inv.id], res['value'])
return True
def finalize_invoice_move_lines(self, cr, uid, invoice_browse, move_lines):
"""finalize_invoice_move_lines(cr, uid, invoice, move_lines) -> move_lines
Hook method to be overridden in additional modules to verify and possibly alter the
move lines to be created by an invoice, for special cases.
:param invoice_browse: browsable record of the invoice that is generating the move lines
:param move_lines: list of dictionaries with the account.move.lines (as for create())
:return: the (possibly updated) final move_lines to create for this invoice
"""
return move_lines
def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj):
if not inv.tax_line:
for tax in compute_taxes.values():
@@ -912,7 +930,12 @@ class account_invoice(osv.osv):
# will be automatically deleted too
account_move_obj.unlink(cr, uid, [i['move_id'][0]])
if i['payment_ids']:
self.pool.get('account.move.line').write(cr, uid, i['payment_ids'], {'reconcile_partial_id': False})
account_move_line_obj = self.pool.get('account.move.line')
pay_ids = account_move_line_obj.browse(cr, uid , i['payment_ids'])
for move_line in pay_ids:
if move_line.reconcile_partial_id and move_line.reconcile_partial_id.line_partial_ids:
raise osv.except_osv(_('Error !'), _('You cannot cancel the Invoice which is Partially Paid! You need to unreconcile concerned payment entries!'))
self.write(cr, uid, ids, {'state':'cancel', 'move_id':False})
self._log_event(cr, uid, ids,-1.0, 'Cancel Invoice')
return True
@@ -1147,14 +1170,14 @@ class account_invoice_line(osv.osv):
t = t - (p * l[2].get('quantity'))
taxes = l[2].get('invoice_line_tax_id')
if len(taxes[0]) >= 3 and taxes[0][2]:
taxes=tax_obj.browse(cr, uid, taxes[0][2])
taxes = tax_obj.browse(cr, uid, taxes[0][2])
for tax in tax_obj.compute(cr, uid, taxes, p,l[2].get('quantity'), context.get('address_invoice_id', False), l[2].get('product_id', False), context.get('partner_id', False)):
t = t - tax['amount']
return t
return 0
_name = "account.invoice.line"
_description = "Invoice line"
_description = "Invoice Line"
_columns = {
'name': fields.char('Description', size=256, required=True),
'origin': fields.char('Origin', size=256, help="Reference of the document that produced this invoice."),
@@ -1200,8 +1223,8 @@ class account_invoice_line(osv.osv):
part = self.pool.get('res.partner').browse(cr, uid, partner_id)
fpos = fposition_id and self.pool.get('account.fiscal.position').browse(cr, uid, fposition_id) or False
lang=part.lang
context.update({'lang': lang})
if part.lang:
context.update({'lang': part.lang})
result = {}
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
+1
View File
@@ -113,6 +113,7 @@
</form>
<tree string="Bank Details">
<field name="state"/>
<field name="bank"/>
<field name="owner_name"/>
<field name="acc_number"/>
</tree>
+4 -2
View File
@@ -25,13 +25,13 @@
<field name="arch" type="xml">
<search string="Analytic Account">
<group col="8" colspan="4">
<filter icon="gtk-execute" string="My Accounts" domain="[('user_id','=',uid)]" help="My Analytic Accounts"/>
<filter icon="gtk-execute" string="Current" domain="[('state','=','open')]" help="Current Accounts"/>
<filter icon="gtk-execute" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="partner_id" select="1"/>
<field name="user_id" widget="selection"/>
</group>
</search>
</field>
@@ -97,6 +97,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph,form</field>
<field name="view_id" ref="view_account_analytic_account_tree"/>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
</record>
<!--<menuitem id="menu_analytic_account" name="Analytic Accounts" parent="account.menu_analytic_accounting"/>-->
@@ -188,11 +189,11 @@
<field name="arch" type="xml">
<search string="Search Analytic Lines">
<group col='6' colspan='4'>
<filter icon="gtk-execute" string="My" domain="[('user_id','=',uid)]" help="My Analytic Entries"/>
<field name="name" select="1"/>
<field name="journal_id" select="1"/>
<field name="account_id" select="1"/>
<field name="date" select="1"/>
<field name="user_id" widget="selection"/>
</group>
</search>
</field>
@@ -202,6 +203,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="view_id" ref="view_account_analytic_line_tree"/>
</record>
<wizard id="action_account_analytic_line" menu="False" model="account.analytic.line" name="account.analytic.line" string="Entries by Line"/>
@@ -54,12 +54,12 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
self.cr.execute("SELECT abs(sum(amount)) AS balance \
FROM account_analytic_line \
WHERE date>=%s AND date<=%s AND amount>0 AND general_account_id = %s", (date1, date2, a['id']))
WHERE date>=%s AND date<=%s AND amount<0 AND general_account_id = %s", (date1, date2, a['id']))
(ad,) = self.cr.fetchone()
ad = ad or 0.0
self.cr.execute("SELECT abs(sum(amount)) AS balance \
FROM account_analytic_line \
WHERE date>=%s AND date<=%s AND amount<0 AND general_account_id = %s", (date1, date2, a['id']))
WHERE date>=%s AND date<=%s AND amount>0 AND general_account_id = %s", (date1, date2, a['id']))
(ac,) = self.cr.fetchone()
ac = ac or 0.0
+3 -1
View File
@@ -37,6 +37,8 @@ import compare_account_balance
import account_invoice_report
import account_report
import account_analytic_report
import account_account_report
import account_entries_report
import account_analytic_entries_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,86 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class account_account_report(osv.osv):
_name = "account.account.report"
_description = "Account Report"
_auto = False
_columns = {
'name': fields.char('Name', size=128, readonly=True),
'code': fields.char('Code', size=64, readonly=True),
'type': fields.selection([
('receivable', 'Receivable'),
('payable', 'Payable'),
('view', 'View'),
('consolidation', 'Consolidation'),
('other', 'Others'),
('closed', 'Closed'),
], 'Internal Type', readonly=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'currency_mode': fields.selection([('current', 'At Date'), ('average', 'Average Rate')], 'Outgoing Currencies Rate',readonly=True),
'user_type': fields.many2one('account.account.type', 'Account Type',readonly=True),
'quantity': fields.float('Quantity', readonly=True),
'amount_total': fields.float('Total Amount', readonly=True),
'credit': fields.float('Credit', readonly=True),
'debit': fields.float('Debit', readonly=True),
'balance': fields.float('Balance', readonly=True),
'nbr': fields.integer('#Accounts', readonly=True),
'parent_account_id': fields.many2one('account.account', 'Parent Account', required=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_account_report')
cr.execute("""
create or replace view account_account_report as (
select
min(a.id) as id,
count(distinct a.id) as nbr,
a.name,
a.code,
a.type as type,
a.company_id as company_id,
a.currency_mode as currency_mode,
a.user_type as user_type,
a.parent_id as parent_account_id,
sum(ail.quantity) as quantity,
sum(ail.price_subtotal) as amount_total,
sum(m.credit) as credit,
sum(m.debit) as debit,
(sum(m.credit)-sum(m.debit)) as balance
from
account_account as a
left join account_move_line as m on m.account_id=a.id
left join account_invoice_line as ail on ail.account_id=a.id
left join account_invoice as ai on ai.account_id=a.id
group by
a.name,
a.code,
a.type,
a.company_id,
a.currency_mode,
a.user_type,
m.account_id,
a.parent_id
)
""")
account_account_report()
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_account_account_report_tree" model="ir.ui.view">
<field name="name">account.account.report.tree</field>
<field name="model">account.account.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Report">
<field name="name" invisible="1" string="Account"/>
<field name="code" invisible="1"/>
<field name="type" invisible="1"/>
<field name="company_id" invisible="1" group="base.multi_company"/>
<field name="currency_mode" invisible="1"/>
<field name="nbr" sum="#Accounts"/>
<field name="user_type" invisible="1"/>
<field name="parent_account_id" invisible="1"/>
<field name="quantity" sum="Quantity"/>
<field name="amount_total" sum="Total Amount"/>
<field name="credit" sum="Credit"/>
<field name="debit" sum="Debit"/>
<field name="balance" sum="Balance"/>
</tree>
</field>
</record>
<record id="view_account_account_report_graph" model="ir.ui.view">
<field name="name">account.account.report.graph</field>
<field name="model">account.account.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Accounts" type="bar">
<field name="name"/>
<field name="credit" operator="+"/>
<field name="debit" operator="+"/>
<field name="balance" operator="+"/>
</graph>
</field>
</record>
<record id="view_account_account_report_search" model="ir.ui.view">
<field name="name">account.account.report.search</field>
<field name="model">account.account.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Accounts">
<group>
<filter icon="terp-account"
string="At Date"
domain="[('currency_mode','=', 'current')]"/>
<filter icon="terp-account"
string="Average Rate"
domain="[('currency_mode','=','average')]"/>
<separator orientation="vertical"/>
<field name="name" string="Account"/>
<field name="code"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<field name="type" />
<field name="user_type" widget="selection"/>
<field name="parent_account_id" />
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Account" name="Account" icon="terp-account" context="{'group_by':'name'}"/>
<filter string="Code" icon="terp-account" context="{'group_by':'code'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Currencies Rate" icon="terp-account" context="{'group_by':'currency_mode'}"/>
<filter string="Internal Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="Account Type" icon="terp-account" context="{'group_by':'user_type'}"/>
<filter string="Parent Account" icon="terp-account" context="{'group_by':'parent_account_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_account_account_report" model="ir.actions.act_window">
<field name="name">Accounts</field>
<field name="res_model">account.account.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{"search_default_Account":1,"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_account_account_report_search"/>
</record>
<menuitem action="action_account_account_report" id="menu_action_account_account_report" parent="account.menu_finance_statastic_report_statement" sequence="6"/>
</data>
</openerp>
@@ -0,0 +1,83 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class analytic_entries_report(osv.osv):
_name = "analytic.entries.report"
_description = "Analytic Entries Statistics"
_auto = False
_columns = {
'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'user_id' : fields.many2one('res.users', 'User',readonly=True),
'name': fields.char('Description', size=64, readonly=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
'account_id': fields.many2one('account.analytic.account', 'Account', required=True),
'general_account_id': fields.many2one('account.account', 'General Account', required=True),
'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),
'move_id': fields.many2one('account.move.line', 'Move', required=True),
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_uom_id': fields.many2one('product.uom', 'Product UOM', required=True),
'amount': fields.float('Amount', readonly=True),
'unit_amount': fields.float('Unit Amount', readonly=True),
'amount_currency': fields.float('Amount Currency', readonly=True),
'nbr': fields.integer('#Entries', readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'analytic_entries_report')
cr.execute("""
create or replace view analytic_entries_report as (
select
min(a.id) as id,
count(distinct a.id) as nbr,
a.create_date as date,
to_char(a.create_date, 'YYYY') as year,
to_char(a.create_date, 'MM') as month,
to_char(a.create_date, 'YYYY-MM-DD') as day,
a.user_id as user_id,
a.name as name,
a.company_id as company_id,
a.currency_id as currency_id,
a.account_id as account_id,
a.general_account_id as general_account_id,
a.journal_id as journal_id,
a.move_id as move_id,
a.product_id as product_id,
a.product_uom_id as product_uom_id,
sum(a.amount) as amount,
sum(a.unit_amount) as unit_amount,
sum(a.amount_currency) as amount_currency
from
account_analytic_line a
group by
a.create_date, a.user_id,a.name,company_id,a.currency_id,
a.account_id,a.general_account_id,a.journal_id,
a.move_id,a.product_id,a.product_uom_id
)
""")
analytic_entries_report()
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_analytic_entries_report_tree" model="ir.ui.view">
<field name="name">analytic.entries.report.tree</field>
<field name="model">analytic.entries.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Analytic Entries Statistics">
<field name="date" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="name" invisible="1"/>
<field name="company_id" invisible="1" groups="base.multi_company"/>
<field name="currency_id" invisible="1"/>
<field name="account_id" invisible="1"/>
<field name="general_account_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="product_uom_id" invisible="1"/>
<field name="nbr" sum="Entries"/>
<field name="amount" sum="Amount"/>
<field name="unit_amount" sum="Unit Amount"/>
<field name="amount_currency" sum="Amount Currency"/>
</tree>
</field>
</record>
<record id="view_analytic_entries_report_search" model="ir.ui.view">
<field name="name">analytic.entries.report.search</field>
<field name="model">analytic.entries.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Entries">
<group col="10" colspan="12">
<filter icon="terp-account" string="Last 365 DAys"
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')),('day','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Analytic Entries of the year"/>
<filter icon="terp-account" string="Last 30 Days"
name="month"
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')), ('day','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Analytic Entries of this month"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')), ('day','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Analytic Entries during last 7 days"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id" widget="selection">
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Case"/>
</field>
<field name="currency_id"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<field name="account_id" />
<field name="general_account_id" widget="selection"/>
<field name="journal_id" widget="selection"/>
<separator orientation="vertical"/>
<field name="product_id" />
<field name="product_uom_id" widget="selection"/>
<field name="company_id" widget="selection" groups="base.multi_company"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="User" name="User" icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Currency" icon="terp-account" context="{'group_by':'currency_id'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.multi_company"/>
<separator orientation="vertical"/>
<filter string="Account" icon="terp-account" context="{'group_by':'account_id'}"/>
<filter string="General Account" icon="terp-account" context="{'group_by':'general_account_id'}"/>
<filter string="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<filter string="Product UOM" icon="terp-account" context="{'group_by':'product_uom_id'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="view_account_analytic_entries_search" model="ir.ui.view">
<field name="name">account.analytic.entries.graph</field>
<field name="model">analytic.entries.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Analytic Entries" type="bar">
<field name="user_id"/>
<field name="amount" operator="+"/>
<field name="unit_amount" operator="+"/>
<field name="amount_currency" operator="+"/>
</graph>
</field>
</record>
<record id="action_analytic_entries_report" model="ir.actions.act_window">
<field name="name">Analytic Entries</field>
<field name="res_model">analytic.entries.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="search_view_id" ref="view_analytic_entries_report_search"/>
</record>
<menuitem action="action_analytic_entries_report" id="menu_action_analytic_entries_report" parent="account.menu_finance_statastic_report_statement" sequence="4"/>
</data>
</openerp>
@@ -35,7 +35,7 @@ class analytic_report(osv.osv):
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', readonly=True),
'user_id' : fields.many2one('res.users', 'Account Manager',readonly=True),
'product_id' : fields.many2one('product.product', 'Product',readonly=True),
'quantity': fields.float('Quantity',readonly=True),
'total_quantity': fields.float('# Total Quantity',readonly=True),
'debit' : fields.float('Debit',readonly=True),
'credit' : fields.float('Credit',readonly=True),
'balance' : fields.float('Balance',readonly=True),
@@ -43,6 +43,11 @@ class analytic_report(osv.osv):
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Account Type'),
'state': fields.selection([('draft','Draft'),
('open','Open'),
('pending','Pending'),
@@ -50,6 +55,7 @@ class analytic_report(osv.osv):
('close','Close'),
('template', 'Template')],
'State', readonly=True),
}
_order = 'date_start desc'
def init(self, cr):
@@ -60,15 +66,18 @@ class analytic_report(osv.osv):
min(s.id) as id,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
to_char(s.create_date, 'YYYY-MM-DD') as day,
l.journal_id,
l.product_id,
s.parent_id,
s.date_start,
s.date as date_end,
s.user_id,
s.company_id,
s.type,
s.name,
s.partner_id,
s.quantity,
sum(s.quantity) as total_quantity,
s.debit,
s.credit,
s.balance,
@@ -77,7 +86,8 @@ class analytic_report(osv.osv):
from account_analytic_account s
left join account_analytic_line l on (s.id=l.account_id)
GROUP BY s.create_date,s.state,l.journal_id,s.name,
s.partner_id,s.date_start,s.date,s.user_id,s.quantity,
s.partner_id,s.date_start,s.date,s.user_id,
s.company_id,s.type,
s.debit,s.credit,s.balance,s.parent_id,l.product_id
)
""")
@@ -9,23 +9,26 @@
<tree string="Analytic Accounts Statistics">
<field name="parent_id" invisible="1" string="Analytic Account"/>
<field name="product_id" invisible="1"/>
<field name="name"/>
<field name="partner_id"/>
<field name="journal_id" string="Analytic Journal"/>
<field name="user_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="quantity"/>
<field name="name" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="journal_id" string="Analytic Journal" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="date_start" invisible="1"/>
<field name="date_end" invisible="1"/>
<field name="total_quantity" sum=" # Total Quantity"/>
<field name="nbr" sum ="# of Lines"/>
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
<field name="type" invisible="1"/>
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
<field name="state"/>
<field name="state" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="year" invisible="1"/>
</tree>
</field>
</record>
<record id="view_analytic_report_search" model="ir.ui.view">
<field name="name">analytic.report.search</field>
<field name="model">analytic.report</field>
@@ -38,23 +41,15 @@
domain="[('year','=',time.strftime('%%Y'))]"/>
<filter icon="terp-account"
string="This Month"
name="This Month"
domain="[('month','=',time.strftime('%%m'))]"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')), ('day','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Entries during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Start" icon="terp-account" domain="[('date_start','=',time.strftime('%%Y/%%m/%%d'))]"/>
<filter string="End" icon="terp-account" domain="[('date_end','=',time.strftime('%%Y/%%m/%%d'))]"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Accounts"
name="User"
domain="[('user_id','=',uid)]"/>
</field>
<field name="partner_id"/>
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12">
<filter icon="terp-account"
<filter icon="terp-account"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-account"
@@ -63,6 +58,18 @@
<filter icon="terp-account"
string="Pending"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Accounts"
help="My Account"
domain="[('user_id','=',uid)]"/>
</field>
<field name="partner_id"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter icon="terp-account"
string="Close"
domain="[('state','=','close')]"/>
@@ -70,40 +77,59 @@
string="Template"
domain="[('state','=','template')]"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="parent_id"/>
<field name="journal_id"/>
<field name="product_id"/>
<field name="journal_id" widget="selection"/>
<newline/>
<field name="product_id" />
<field name="type"/>
<separator orientation="vertical"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="User" name='User' icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="User" name="User" icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Associated Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Analytic Account" icon="terp-account" context="{'group_by':'parent_id'}"/>
<filter string="Analytic Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<filter string="Analytic Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Analytic Account" icon="terp-account" context="{'group_by':'parent_id'}"/>
<filter string="Account Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="view_account_analytic_report_search" model="ir.ui.view">
<field name="name">account.analytic.report.graph</field>
<field name="model">analytic.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Analytic Accounts" type="bar">
<field name="user_id"/>
<field name="credit" operator="+"/>
<field name="debit" operator="+"/>
<field name="balance" operator="+"/>
<field name="nbr" operator="+"/>
</graph>
</field>
</record>
<record id="action_analytic_report_all" model="ir.actions.act_window">
<field name="name">Analytic Accounts</field>
<field name="res_model">analytic.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="context">{'search_default_User':1,'search_default_user_id':uid}</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_This Month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_analytic_report_search"/>
</record>
<menuitem action="action_analytic_report_all" id="menu_action_analytic_report_all" parent="account.menu_finance_reporting" sequence="0"/>
<menuitem action="action_analytic_report_all" id="menu_action_analytic_report_all" parent="account.menu_finance_statastic_report_statement" sequence="8"/>
</data>
</openerp>
@@ -0,0 +1,123 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class account_entries_report(osv.osv):
_name = "account.entries.report"
_description = "Entries"
_auto = False
_rec_name = 'date'
_columns = {
'date': fields.date('Effective Date', readonly=True),
'date_created': fields.date('Date Created', readonly=True),
'date_maturity': fields.date('Date Maturity', readonly=True),
'nbr':fields.integer('# of Entries', readonly=True),
'nbl':fields.integer('# of Lines', readonly=True),
'amount': fields.float('Amount',readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'ref': fields.char('Reference', size=64,readonly=True),
'period_id': fields.many2one('account.period', 'Period', readonly=True),
'account_id': fields.many2one('account.account', 'Account', readonly=True),
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State',readonly=True,
help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Posted\' state.'),
'state_2': fields.selection([('draft','Draft'), ('valid','Valid')], 'State of Move Line', readonly=True,
help='When new move line is created the state will be \'Draft\'.\n* When all the payments are done it will be in \'Valid\' state.'),
'partner_id': fields.many2one('res.partner','Partner', readonly=True),
'period_id2': fields.many2one('account.period', 'Move Line Period', readonly=True),
'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'journal_id2': fields.many2one('account.journal', 'Move Line Journal', readonly=True),
'type': fields.selection([
('pay_voucher','Cash Payment'),
('bank_pay_voucher','Bank Payment'),
('rec_voucher','Cash Receipt'),
('bank_rec_voucher','Bank Receipt'),
('cont_voucher','Contra'),
('journal_sale_vou','Journal Sale'),
('journal_pur_voucher','Journal Purchase'),
('journal_voucher','Journal Voucher'),
],'Type',readonly=True),
'quantity': fields.float('Products Quantity', digits=(16,2), readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
}
_order = 'date desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_entries_report')
cr.execute("""
create or replace view account_entries_report as (
select
min(l.id) as id,
am.ref as ref,
sum(l.quantity) as quantity,
am.state as state,
l.state as state_2,
am.date as date,
count(l.id) as nbr,
count(distinct am.id) as nbl,
l.debit as amount,
to_char(am.date, 'YYYY') as year,
to_char(am.date, 'MM') as month,
to_char(am.date, 'YYYY-MM-DD') as day,
am.company_id as company_id,
l.account_id as account_id,
l.analytic_account_id as analytic_account_id,
l.date_created as date_created,
l.date_maturity as date_maturity,
am.journal_id as journal_id,
l.journal_id as journal_id2,
l.period_id as period_id2,
am.period_id as period_id,
l.partner_id as partner_id,
l.product_id as product_id,
am.type as type
from
account_move_line l
left join
account_move am on (am.id=l.move_id)
group by am.ref,
am.state,
am.date,
am.company_id,
am.journal_id,
l.journal_id,
am.period_id,
l.period_id,
am.type,
l.partner_id,
l.analytic_account_id,
l.product_id,
l.date_created,
l.date_maturity,
l.account_id,
l.state,
l.debit
)
""")
account_entries_report()
@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_account_entries_report_tree" model="ir.ui.view">
<field name="name">account.entries.report.tree</field>
<field name="model">account.entries.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Invoices Statistics">
<field name="date" invisible="1"/>
<field name="date_created" invisible="1"/>
<field name="date_maturity" invisible="1"/>
<field name="ref" invisible="1"/>
<field name="state" invisible="1"/>
<field name="state_2" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
<field name="journal_id" invisible="1"/>
<field name="account_id" invisible="1"/>
<field name="analytic_account_id" invisible="1"/>
<field name="period_id" invisible="1"/>
<field name="period_id2" invisible="1"/>
<field name="type" invisible="1"/>
<field name="nbr" sum="# of Entries "/>
<field name="nbl" sum="# of Lines "/>
<field name="amount" sum="# of Amount "/>
<field name="quantity" sum="# of Products Qty "/>
</tree>
</field>
</record>
<record id="view_account_entries_report_graph" model="ir.ui.view">
<field name="name">account.entries.report.graph</field>
<field name="model">account.entries.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Entries" type="bar">
<field name="partner_id"/>
<field name="amount"/>
</graph>
</field>
</record>
<record id="view_account_entries_report_search" model="ir.ui.view">
<field name="name">account.entries.report.search</field>
<field name="model">account.entries.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Entries">
<group colspan="10" col="12">
<filter icon="terp-account" string="This Year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Entries of the year"/>
<filter icon="terp-account" string="This Month"
name="This Month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Entries of this month"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Entries during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Draft"
icon="terp-account"
domain="[('state','=','draft')]"
help = "Draft tasks"/>
<separator orientation="vertical"/>
<field name="journal_id" widget="selection"/>
<field name="account_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="partner_id" />
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter string="Posted"
icon="terp-account"
domain="[('state','=','posted')]"
help = "Posted tasks"/>
<field name="state_2"/>
<separator orientation="vertical"/>
<field name="period_id" widget="selection"/>
<field name="period_id2" widget="selection"/>
<field name="type"/>
<field name="product_id" />
<field name="analytic_account_id"/>
<newline/>
<separator orientation="vertical"/>
<field name="date_created"/>
<field name="date"/>
<field name="date_maturity"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Journal" name="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Account" name="Account" icon="terp-account" context="{'group_by':'account_id'}"/>
<filter string="Analytic Account" name="Analytic Account" icon="terp-account" context="{'group_by':'analytic_account_id'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<filter string="State of Move Line" icon="terp-account" context="{'group_by':'state_2'}"/>
<filter string="Period" icon="terp-account" context="{'group_by':'period_id'}"/>
<filter string="Period of Move Line" icon="terp-account" context="{'group_by':'period_id2'}"/>
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="action_account_entries_report_all" model="ir.actions.act_window">
<field name="name">Entries</field>
<field name="res_model">account.entries.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_This Month':1,'search_default_Journal':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_account_entries_report_search"/>
</record>
<menuitem action="action_account_entries_report_all" id="menu_action_account_entries_report_all" parent="account.menu_finance_statastic_report_statement" sequence="2"/>
</data>
</openerp>
@@ -61,6 +61,13 @@ class account_invoice_report(osv.osv):
('paid','Done'),
('cancel','Cancelled')
], 'Order State', readonly=True),
'date_due': fields.date('Due Date', readonly=True),
'address_contact_id': fields.many2one('res.partner.address', 'Contact Address Name', readonly=True),
'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address Name', readonly=True),
'account_id': fields.many2one('account.account', 'Account',readonly=True),
'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
'residual':fields.float('Total Residual', readonly=True),
'delay_to_pay':fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
}
_order = 'date desc'
def init(self, cr):
@@ -87,12 +94,24 @@ class account_invoice_report(osv.osv):
(sum(l.quantity*l.price_unit)/sum(l.quantity * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
s.type as type,
s.state
from
s.state,
s.date_due as date_due,
s.address_contact_id as address_contact_id,
s.address_invoice_id as address_invoice_id,
s.account_id as account_id,
s.partner_bank as partner_bank,
s.residual as residual,
case when s.state != 'paid' then null else
extract(epoch from avg(am.date_created-l.create_date))/(24*60*60)::decimal(16,2)
end as delay_to_pay
from
account_invoice_line l
left join
account_invoice s on (s.id=l.invoice_id)
left join product_uom u on (u.id=l.uos_id)
left join product_uom u on (u.id=l.uos_id),
account_move_line am left join account_invoice i on (i.move_id=am.move_id)
where
am.account_id=i.account_id
group by
s.type,
s.date_invoice,
@@ -101,12 +120,18 @@ class account_invoice_report(osv.osv):
l.uos_id,
s.user_id,
s.state,
s.residual,
s.company_id,
s.payment_term,
s.period_id,
s.fiscal_position,
s.currency_id,
s.journal_id
s.journal_id,
s.date_due,
s.address_contact_id,
s.address_invoice_id,
s.account_id,
s.partner_bank
)
""")
account_invoice_report()
@@ -17,7 +17,6 @@
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="product_qty" invisible="1"/>
<!--field name="delay" avg="Days to Close"/-->
<field name="nbr" sum="# of Lines"/>
<field name="price_average" avg="Average Price"/>
<field name="price_total" sum="Total Price"/>
@@ -27,6 +26,13 @@
<field name="fiscal_position" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="date_due" invisible="1"/>
<field name="address_contact_id" invisible="1"/>
<field name="address_invoice_id" invisible="1"/>
<field name="account_id" invisible="1"/>
<field name="partner_bank" invisible="1"/>
<field name="residual" sum="Total Residual"/>
<field name="delay_to_pay" avg="Avg. Delay To Pay"/>
</tree>
</field>
</record>
@@ -49,14 +55,14 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Invoices">
<group>
<filter icon="terp-account" string="This Year"
<group col="10" colspan="12">
<filter icon="terp-account" string="Last 365 Days"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of the year"/>
<filter icon="terp-account" string="This Month"
help="Invoices of last 365 days"/>
<filter icon="terp-account" string="Last 30 Days"
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of this month"/>
help="Invoices of last 30 days"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
@@ -75,61 +81,61 @@
icon="terp-account"
domain="[('state', '=' ,'open')]"
help = "In progress tasks"/>
<filter string="Done"
icon="terp-account"
domain="[('state','=','paid')]"
help = "Done tasks"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Invoices"
help = "My Invoices"
domain="[('user_id','=',uid)]" />
<field name="partner_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="Invoices Non Users"
help="Invoices Non Users"
domain="[('user_id','=',False)]"/>
</field>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</field>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter string="Done"
icon="terp-account"
domain="[('state','=','paid')]"
help = "Done tasks"/>
<filter string="Cancelled"
icon="terp-account"
domain="[('state', '=' ,'cancel')]"
help = "Cancelled tasks"/>
<separator orientation="vertical"/>
<field name="payment_term" widget="selection"/>
<field name="currency_id" widget="selection"/>
<field name="journal_id" widget="selection"/>
<field name="type"/>
<field name="currency_id" widget="selection"/>
<field name="partner_bank" widget="selection"/>
<field name="fiscal_position" widget="selection"/>
<separator orientation="vertical"/>
<field name="address_contact_id"/>
<field name="account_id"/>
<newline/>
<field name="payment_term" widget="selection"/>
<field name="journal_id" widget="selection"/>
<field name="period_id" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<separator orientation="vertical"/>
<field name="address_invoice_id"/>
<field name="product_id"/>
<newline/>
<field name="type"/>
<field name="period_id" widget="selection"/>
<field name="fiscal_position" widget="selection"/>
<field name="date"/>
<field name="date" string="Date Invoiced"/>
<field name="date_due"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Salesman" name='User' icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Payment Term" icon="terp-account" context="{'group_by':'payment_term'}"/>
<separator orientation="vertical"/>
<filter string="Currency" icon="terp-account" context="{'group_by':'currency_id'}"/>
<filter string="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Account" icon="terp-account" context="{'group_by':'account_id'}"/>
<filter string="Bank Account" icon="terp-account" context="{'group_by':'partner_bank'}"/>
<separator orientation="vertical"/>
<filter string="Currency" icon="terp-account" context="{'group_by':'currency_id'}"/>
<filter string="Payment Term" icon="terp-account" context="{'group_by':'payment_term'}"/>
<filter string="Force Period" icon="terp-account" context="{'group_by':'period_id'}"/>
<filter string="Fiscal Position" icon="terp-account" context="{'group_by':'fiscal_position'}"/>
<separator orientation="vertical"/>
<newline/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'date'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
</search>
@@ -141,11 +147,11 @@
<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_User':1,'group_by_no_leaf':1,'group_by':[],'search_default_user_id':uid}</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_reporting" sequence="0"/>
<menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_statastic_report_statement" sequence="0"/>
</data>
</openerp>
@@ -47,7 +47,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
</record>
<menuitem action="action_account_receivable_graph" id="menu_account_receivable_graph" parent="account.menu_finance_reporting"/>
<!-- <menuitem action="action_account_receivable_graph" id="menu_account_receivable_graph" parent="account.menu_finance_reporting"/> -->
<!-- Report for Aged Receivable -->
@@ -116,7 +116,7 @@
</record>
<!-- <menuitem id="menu_report_this_month" name="This Month" parent="account.menu_finance_reporting"/>-->
<menuitem id="menu_report_all_months" name="Sales by Account" parent="account.menu_finance_reporting"/>
<!-- <menuitem id="menu_report_all_months" name="Sales by Account" parent="account.menu_finance_reporting"/> -->
<!-- Report of the sales by product and account -->
<record id="view_report_account_sales_tree" model="ir.ui.view">
<field name="name">report.account.sales.tree</field>
@@ -169,7 +169,7 @@
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_report_account_sales_search"/>
</record>
<menuitem action="action_report_account_sales_tree_all" id="menu_report_account_sales_all" parent="menu_report_all_months"/>
<!-- <menuitem action="action_report_account_sales_tree_all" id="menu_report_account_sales_all" parent="menu_report_all_months"/> -->
<!-- Report of the sales by product and account type -->
<record id="view_report_account_type_sales_tree" model="ir.ui.view">
@@ -237,7 +237,7 @@
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_report_account_type_sales_search"/>
</record>
<menuitem action="action_report_account_type_sales_tree_all" id="menu_report_account_type_sales_all" parent="menu_report_all_months"/>
<!-- <menuitem action="action_report_account_type_sales_tree_all" id="menu_report_account_type_sales_all" parent="menu_report_all_months"/> -->
</data>
</openerp>
+11 -11
View File
@@ -84,8 +84,8 @@
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<images/>
<story>
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
<para style="terp_default_8">[[ setLang(o.lang) ]]</para>
@@ -177,16 +177,16 @@
<para style="terp_default_Centre_9">[[ line['ref'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['date_maturity'] ]]</para>
<para style="terp_default_Centre_9">[[ line['date_maturity'] and formatLang(line['date_maturity'],date=True) or '' ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['debit']) and formatLang(line['debit'] * (line['account_id']['type'] == 'payable' and -1 or 1)) ]]</para>
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['credit']) and formatLang(line['credit'] * (line['account_id']['type'] == 'payable' and -1 or 1)) ]]</para>
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] &lt; time.strftime('%Y-%m-%d')) and ((line['debit'] - line['credit']) * (line['account_id']['type'] == 'payable' and -1 or 1))) ]]</para>
<para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] &lt; time.strftime('%Y-%m-%d'))) and (line['debit'] - line['credit']) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para>
@@ -205,13 +205,13 @@
<para style="terp_default_Bold_9">Sub-Total : </para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] * (y['account_id']['type'] == 'payable' and -1 or 1)), getLines(o), 0))) ]]</para>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x ,y: x + (y['credit'] * (y['account_id']['type'] == 'payable' and -1 or 1)), getLines(o), 0))) ]] </para>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] </para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['debit'] - y['credit']) * (y['account_id']['type'] == 'payable' and -1 or 1)), filter(lambda x: x['date_maturity'] &lt; time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]]</para>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] &lt; time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]]</para>
</td>
<td>
<para style="terp_default_9">
@@ -229,7 +229,7 @@
<para style="terp_default_Bold_9">Balance : </para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x +((y['debit'] - y['credit']) * (y['account_id']['type'] == 'payable' and -1 or 1)), getLines(o), 0))) ]]</para>
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]]</para>
</td>
<td>
<para style="terp_default_9">
@@ -248,9 +248,9 @@
</td>
</tr>
</blockTable>
<para style="terp_default_9">Total amount due: [[ formatLang((reduce(lambda x, y: x + ((y['debit'] - y['credit']) * (y['account_id']['type'] == 'payable' and -1 or 1)), getLines(o), 0))) ]] [[ company.currency_id.name ]].</para>
<para style="terp_default_9">Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.name ]].</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</story>
</document>
</document>
+12 -2
View File
@@ -15,8 +15,8 @@
"access_account_move","account.move","model_account_move","account.group_account_user",1,1,1,1
"access_account_move_line","account.move.line","model_account_move_line","account.group_account_user",1,1,1,1
"access_account_move_reconcile","account.move.reconcile","model_account_move_reconcile","account.group_account_user",1,1,1,1
"access_account_tax_code","account.tax.code","model_account_tax_code",,1,0,0,0
"access_account_tax","account.tax","model_account_tax",,1,0,0,0
"access_account_tax_code","account.tax.code","model_account_tax_code","account.group_account_invoice",1,0,0,0
"access_account_tax","account.tax","model_account_tax","account.group_account_invoice",1,0,0,0
"access_account_model","account.model","model_account_model","account.group_account_user",1,1,1,1
"access_account_model_line","account.model.line","model_account_model_line","account.group_account_user",1,1,1,1
"access_account_subscription","account.subscription","model_account_subscription","account.group_account_user",1,1,1,1
@@ -93,3 +93,13 @@
"access_report_account_type_sales","report.account_type.sales","model_report_account_type_sales","account.group_account_manager",1,0,0,0
"access_report_account_sales","report.account.sales","model_report_account_sales","account.group_account_manager",1,0,0,0
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_manager",1,0,0,0
"access_project_account_analytic_line","project.account.analytic.line","model_project_account_analytic_line","account.group_account_manager",1,1,1,1
"access_account_move_line_reconcile_select","account.move.line.reconcile.select","model_account_move_line_reconcile_select","account.group_account_manager",1,1,1,1
"access_account_move_line_unreconcile_select","account.move.line.unreconcile.select","model_account_move_line_unreconcile_select","account.group_account_manager",1,1,1,1
"access_account_invoice_refund","account.invoice.refund","model_account_invoice_refund","account.group_account_manager",1,1,1,1
"access_account_move_journal","account.move.journal","model_account_move_journal","account.group_account_manager",1,1,1,1
"access_account_move_bank_reconcile","account.move.bank.reconcile","model_account_move_bank_reconcile","account.group_account_manager",1,1,1,1
"access_account_subscription_generate","account.subscription.generate","model_account_subscription_generate","account.group_account_manager",1,1,1,1
"access_account_period_close","account.period.close","model_account_period_close","account.group_account_manager",1,1,1,1
"access_account_fiscalyear_close_state","account.fiscalyear.close.state","model_account_fiscalyear_close_state","account.group_account_manager",1,1,1,1
"access_account_chart","account.chart","model_account_chart","account.group_account_manager",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
15 access_account_move account.move model_account_move account.group_account_user 1 1 1 1
16 access_account_move_line account.move.line model_account_move_line account.group_account_user 1 1 1 1
17 access_account_move_reconcile account.move.reconcile model_account_move_reconcile account.group_account_user 1 1 1 1
18 access_account_tax_code account.tax.code model_account_tax_code account.group_account_invoice 1 0 0 0
19 access_account_tax account.tax model_account_tax account.group_account_invoice 1 0 0 0
20 access_account_model account.model model_account_model account.group_account_user 1 1 1 1
21 access_account_model_line account.model.line model_account_model_line account.group_account_user 1 1 1 1
22 access_account_subscription account.subscription model_account_subscription account.group_account_user 1 1 1 1
93 access_report_account_type_sales report.account_type.sales model_report_account_type_sales account.group_account_manager 1 0 0 0
94 access_report_account_sales report.account.sales model_report_account_sales account.group_account_manager 1 0 0 0
95 access_account_invoice_report account.invoice.report model_account_invoice_report account.group_account_manager 1 0 0 0
96 access_project_account_analytic_line project.account.analytic.line model_project_account_analytic_line account.group_account_manager 1 1 1 1
97 access_account_move_line_reconcile_select account.move.line.reconcile.select model_account_move_line_reconcile_select account.group_account_manager 1 1 1 1
98 access_account_move_line_unreconcile_select account.move.line.unreconcile.select model_account_move_line_unreconcile_select account.group_account_manager 1 1 1 1
99 access_account_invoice_refund account.invoice.refund model_account_invoice_refund account.group_account_manager 1 1 1 1
100 access_account_move_journal account.move.journal model_account_move_journal account.group_account_manager 1 1 1 1
101 access_account_move_bank_reconcile account.move.bank.reconcile model_account_move_bank_reconcile account.group_account_manager 1 1 1 1
102 access_account_subscription_generate account.subscription.generate model_account_subscription_generate account.group_account_manager 1 1 1 1
103 access_account_period_close account.period.close model_account_period_close account.group_account_manager 1 1 1 1
104 access_account_fiscalyear_close_state account.fiscalyear.close.state model_account_fiscalyear_close_state account.group_account_manager 1 1 1 1
105 access_account_chart account.chart model_account_chart account.group_account_manager 1 1 1 1
+1 -1
View File
@@ -42,7 +42,7 @@ class ir_sequence(osv.osv):
_columns = {
'fiscal_ids' : fields.one2many('account.sequence.fiscalyear', 'sequence_main_id', 'Sequences')
}
def get_id(self, cr, uid, sequence_id, test='id', context={}):
def get_id(self, cr, uid, sequence_id, test='id', context={}):
cr.execute('select id from ir_sequence where '+test+'=%s and active=%s', (sequence_id, True,))
res = cr.dictfetchone()
if res:
@@ -21,6 +21,7 @@
from osv import fields, osv
from tools.translate import _
import netsvc
import time
class account_invoice_refund(osv.osv_memory):
@@ -29,10 +30,14 @@ class account_invoice_refund(osv.osv_memory):
_name = "account.invoice.refund"
_description = "Invoice Refund"
_columns = {
'date': fields.date('Operation date', required=False),
'date': fields.date('Operation date', required=False, help='This date will be used as the invoice date for Refund Invoice and Period will be chosen accordingly!'),
'period': fields.many2one('account.period', 'Force period', required=False),
'description': fields.char('Description', size=150, required=True),
}
}
_defaults = {
'date': time.strftime('%Y-%m-%d'),
}
def compute_refund(self, cr, uid, ids, mode, context=None):
"""
@@ -167,7 +172,7 @@ class account_invoice_refund(osv.osv_memory):
xml_id = 'action_invoice_tree1'
elif inv.type == 'in_invoice':
xml_id = 'action_invoice_tree2'
elif type == 'out_refund':
elif inv.type == 'out_refund':
xml_id = 'action_invoice_tree3'
else:
xml_id = 'action_invoice_tree4'
@@ -19,7 +19,6 @@
#
##############################################################################
import time
import datetime
from osv import fields, osv
from tools.translate import _
+13 -6
View File
@@ -29,11 +29,17 @@ class account_unreconcile(osv.osv_memory):
obj_move_reconcile = self.pool.get('account.move.reconcile')
if context is None:
context = {}
recs = obj_move_line.read(cr, uid, context['active_ids'], ['reconcile_id',])
recs = filter(lambda x: x['reconcile_id'], recs)
rec_ids = [rec['reconcile_id'][0] for rec in recs]
if len(rec_ids):
obj_move_reconcile.unlink(cr, uid, rec_ids)
recs = pool.get('account.move.line').read(cr, uid, data['ids'], ['reconcile_id','reconcile_partial_id'])
unlink_ids = []
full_recs = filter(lambda x: x['reconcile_id'], recs)
rec_ids = [rec['reconcile_id'][0] for rec in full_recs]
part_recs = filter(lambda x: x['reconcile_partial_id'], recs)
part_rec_ids = [rec['reconcile_partial_id'][0] for rec in part_recs]
unlink_ids += rec_ids
unlink_ids += part_rec_ids
if len(unlink_ids):
pooler.get_pool(cr.dbname).get('account.move.reconcile').unlink(cr, uid, unlink_ids)
return {}
account_unreconcile()
@@ -44,10 +50,11 @@ class account_unreconcile_reconcile(osv.osv_memory):
def trans_unrec_reconcile(self, cr, uid, ids, context=None):
obj_move_reconcile = self.pool.get('account.move.reconcile')
rec_ids = context['active_ids']
if context is None:
context = {}
if len(rec_ids):
obj_move_reconcile.unlink(cr, uid, context['active_ids'])
obj_move_reconcile.unlink(cr, uid, rec_ids)
return {}
account_unreconcile_reconcile()
@@ -393,7 +393,7 @@ account_analytic_account()
class account_analytic_account_summary_user(osv.osv):
_name = "account_analytic_analysis.summary.user"
_description = "Hours summary by user"
_description = "Hours Summary by User"
_order='user'
_auto = False
_rec_name = 'user'
@@ -25,7 +25,7 @@ import time
class account_analytic_default(osv.osv):
_name = 'account.analytic.default'
_description = 'Analytic Distributions'
_description = 'Analytic Distribution'
_rec_name = 'analytic_id'
_order = 'sequence'
_columns = {
@@ -69,7 +69,7 @@ account_analytic_default()
class account_invoice_line(osv.osv):
_inherit = 'account.invoice.line'
_description = 'account invoice line'
_description = 'Invoice Line'
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, currency_id=False, context={}):
res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition, price_unit, address_invoice_id, currency_id=currency_id, context=context)
@@ -103,6 +103,8 @@ class sale_order_line(osv.osv):
# Method overridden to set the analytic account by default on criterion match
def invoice_line_create(self, cr, uid, ids, context={}):
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context)
if not ids:
return create_ids
sale_line_obj = self.browse(cr, uid, ids[0], context)
pool_inv_line = self.pool.get('account.invoice.line')
@@ -54,7 +54,7 @@ class one2many_mod2(fields.one2many):
class account_analytic_plan(osv.osv):
_name = "account.analytic.plan"
_description = "Analytic Plans"
_description = "Analytic Plan"
_columns = {
'name': fields.char('Analytic Plan', size=64, required=True, select=True,),
'plan_ids': fields.one2many('account.analytic.plan.line','plan_id','Analytic Plans'),
@@ -63,7 +63,7 @@ account_analytic_plan()
class account_analytic_plan_line(osv.osv):
_name = "account.analytic.plan.line"
_description = "Analytic Plan Lines"
_description = "Analytic Plan Line"
_columns = {
'plan_id':fields.many2one('account.analytic.plan','Analytic Plan'),
'name': fields.char('Plan Name', size=64, required=True, select=True),
@@ -297,14 +297,15 @@ class account_move_line(osv.osv):
def create_analytic_lines(self, cr, uid, ids, context={}):
super(account_move_line, self).create_analytic_lines(cr, uid, ids, context)
analytic_line_obj = self.pool.get('account.analytic.line')
for line in self.browse(cr, uid, ids, context):
if line.analytics_id:
if not line.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (line.journal_id.name,))
toremove = self.pool.get('account.analytic.line').search(cr, uid, [('move_id','=',line.id)], context=context)
toremove = analytic_line_obj.search(cr, uid, [('move_id','=',line.id)], context=context)
if toremove:
line.unlink(cr, uid, toremove, context=context)
analytic_line_obj.unlink(cr, uid, toremove, context=context)
for line2 in line.analytics_id.account_ids:
val = (line.credit or 0.0) - (line.debit or 0.0)
amt=val * (line2.rate/100)
@@ -321,7 +322,7 @@ class account_move_line(osv.osv):
'journal_id': line.journal_id.analytic_journal_id.id,
'ref': line.ref,
}
ali_id=self.pool.get('account.analytic.line').create(cr,uid,al_vals)
ali_id=analytic_line_obj.create(cr, uid, al_vals, context=context)
return True
account_move_line()
+2 -3
View File
@@ -24,7 +24,7 @@ from osv import fields, osv
class purchase_order(osv.osv):
_name = "purchase.order"
_inherit = "purchase.order"
_description = "Purchase order"
_description = "Purchase Order"
def inv_line_create(self, cr, uid, a, ol):
line = super(purchase_order, self).inv_line_create(cr, uid, a, ol)
@@ -37,5 +37,4 @@ class purchase_order(osv.osv):
a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, oa)
line[2].update({'account_id': a})
return line
purchase_order()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
purchase_order()
+1 -1
View File
@@ -239,7 +239,7 @@ class crossovered_budget_lines(osv.osv):
res[line.id]=0.00
return res
_name="crossovered.budget.lines"
_description = "Budget Lines"
_description = "Budget Line"
_columns = {
'crossovered_budget_id': fields.many2one('crossovered.budget', 'Budget', ondelete='cascade', select=True, required=True),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account',required=True),
+486
View File
@@ -0,0 +1,486 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:42+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_budget
#: field:crossovered.budget,creating_user_id:0
msgid "Responsible User"
msgstr ""
#. module: account_budget
#: rml:account.budget:0
msgid "% performance"
msgstr ""
#. module: account_budget
#: model:ir.actions.act_window,name:account_budget.open_budget_post_form
#: model:ir.ui.menu,name:account_budget.menu_budget_post_form
msgid "Budgetary Positions"
msgstr ""
#. module: account_budget
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: rml:crossovered.budget.report:0
msgid "Printed at:"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
msgid "Confirm"
msgstr "Confirmar"
#. module: account_budget
#: field:crossovered.budget,validating_user_id:0
msgid "Validate User"
msgstr ""
#. module: account_budget
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Lo nom de l'objècte deu començar amb x_ e conténer pas de caractèrs "
"especials !"
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Confirmed"
msgstr ""
#. module: account_budget
#: field:account.budget.post.dotation,period_id:0
msgid "Period"
msgstr "Periòde"
#. module: account_budget
#: wizard_field:account.budget.report,init,date2:0
#: wizard_field:wizard.analytic.account.budget.report,init,date_to:0
#: wizard_field:wizard.crossovered.budget,init,date_to:0
#: wizard_field:wizard.crossovered.budget.summary,init,date_to:0
msgid "End of period"
msgstr ""
#. module: account_budget
#: rml:account.budget:0
msgid "Printing date:"
msgstr ""
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Draft"
msgstr "Borrolhon"
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: rml:account.budget:0
#: rml:crossovered.budget.report:0
msgid "at"
msgstr "a"
#. module: account_budget
#: view:account.budget.post:0
msgid "Dotations"
msgstr ""
#. module: account_budget
#: rml:account.budget:0
msgid "Performance"
msgstr "Performància"
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: rml:account.budget:0
#: rml:crossovered.budget.report:0
msgid "Currency:"
msgstr "Devisa :"
#. module: account_budget
#: rml:account.budget:0
msgid "From"
msgstr "De"
#. module: account_budget
#: field:crossovered.budget.lines,percentage:0
msgid "Percentage"
msgstr "Percentatge"
#. module: account_budget
#: rml:account.budget:0
msgid "Results"
msgstr "Resultats"
#. module: account_budget
#: field:crossovered.budget,state:0
msgid "Status"
msgstr "Estat"
#. module: account_budget
#: model:ir.module.module,description:account_budget.module_meta_information
msgid ""
"This module allows accountants to manage analytic and crossovered budgets.\n"
"\n"
"Once the Master Budgets and the Budgets defined (in Financial\n"
"Management/Budgets/), the Project Managers can set the planned amount on "
"each\n"
"Analytic Account.\n"
"\n"
"The accountant has the possibility to see the total of amount planned for "
"each\n"
"Budget and Master Budget in order to ensure the total planned is not\n"
"greater/lower than what he planned for this Budget/Master Budget. Each list "
"of\n"
"record can also be switched to a graphical view of it.\n"
"\n"
"Three reports are available:\n"
" 1. The first is available from a list of Budgets. It gives the "
"spreading, for these Budgets, of the Analytic Accounts per Master Budgets.\n"
"\n"
" 2. The second is a summary of the previous one, it only gives the "
"spreading, for the selected Budgets, of the Analytic Accounts.\n"
"\n"
" 3. The last one is available from the Analytic Chart of Accounts. It "
"gives the spreading, for the selected Analytic Accounts, of the Master "
"Budgets per Budgets.\n"
"\n"
msgstr ""
#. module: account_budget
#: rml:account.budget:0
#: rml:crossovered.budget.report:0
msgid "%"
msgstr "%"
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: rml:crossovered.budget.report:0
msgid "Description"
msgstr "Descripcion"
#. module: account_budget
#: rml:account.analytic.account.budget:0
msgid "Analytic Account :"
msgstr "Compte Analitic :"
#. module: account_budget
#: wizard_button:account.budget.report,init,report:0
#: wizard_button:wizard.analytic.account.budget.report,init,report:0
#: wizard_button:wizard.crossovered.budget,init,report:0
#: wizard_button:wizard.crossovered.budget.summary,init,report:0
msgid "Print"
msgstr "Estampar"
#. module: account_budget
#: rml:account.budget:0
msgid "A/c No."
msgstr ""
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: rml:account.budget:0
#: rml:crossovered.budget.report:0
msgid "to"
msgstr "a"
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: rml:account.budget:0
#: rml:crossovered.budget.report:0
msgid "Total :"
msgstr "Total :"
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: field:crossovered.budget.lines,planned_amount:0
#: rml:crossovered.budget.report:0
msgid "Planned Amount"
msgstr ""
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: rml:crossovered.budget.report:0
msgid "Perc(%)"
msgstr ""
#. module: account_budget
#: rml:account.budget:0
msgid "Period Budget"
msgstr ""
#. module: account_budget
#: rml:account.budget:0
msgid "Budget Analysis"
msgstr ""
#. module: account_budget
#: view:crossovered.budget:0
#: selection:crossovered.budget,state:0
msgid "Done"
msgstr "Acabat"
#. module: account_budget
#: view:crossovered.budget:0
msgid "Validate"
msgstr "Validar"
#. module: account_budget
#: wizard_view:wizard.crossovered.budget,init:0
#: wizard_view:wizard.crossovered.budget.summary,init:0
msgid "Select Options"
msgstr ""
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: field:crossovered.budget.lines,practical_amount:0
#: rml:crossovered.budget.report:0
msgid "Practical Amount"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,date_to:0
#: field:crossovered.budget.lines,date_to:0
msgid "End Date"
msgstr "Data de fin"
#. module: account_budget
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: account_budget
#: field:crossovered.budget.lines,theoritical_amount:0
msgid "Theoritical Amount"
msgstr ""
#. module: account_budget
#: field:account.budget.post,name:0
#: field:account.budget.post.dotation,name:0
#: field:crossovered.budget,name:0
msgid "Name"
msgstr "Nom"
#. module: account_budget
#: model:ir.actions.wizard,name:account_budget.wizard_crossovered_budget_menu_1
msgid "Print Summary of Budgets"
msgstr ""
#. module: account_budget
#: model:ir.actions.wizard,name:account_budget.wizard_budget_spread
msgid "Spread amount"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
#: view:account.budget.post:0
msgid "Lines"
msgstr "Linhas"
#. module: account_budget
#: rml:account.budget:0
#: view:crossovered.budget:0
#: field:crossovered.budget.lines,crossovered_budget_id:0
#: model:ir.actions.act_window,name:account_budget.act_crossovered_budget_view
#: model:ir.actions.wizard,name:account_budget.wizard_budget_report
#: model:ir.model,name:account_budget.model_crossovered_budget
#: model:ir.ui.menu,name:account_budget.menu_act_crossovered_budget_view
msgid "Budget"
msgstr "Budgèt"
#. module: account_budget
#: field:account.budget.post.dotation,post_id:0
msgid "Item"
msgstr "Element"
#. module: account_budget
#: field:account.budget.post.dotation,amount:0
#: wizard_field:account.budget.spread,init,amount:0
msgid "Amount"
msgstr "Soma"
#. module: account_budget
#: field:crossovered.budget.lines,paid_date:0
msgid "Paid Date"
msgstr ""
#. module: account_budget
#: model:ir.actions.act_window,name:account_budget.action_account_budget_post_tree
#: model:ir.ui.menu,name:account_budget.menu_action_account_budget_post_tree
#: model:ir.ui.menu,name:account_budget.next_id_31
msgid "Budgets"
msgstr ""
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Cancelled"
msgstr "Anullat"
#. module: account_budget
#: view:account.budget.post.dotation:0
#: model:ir.model,name:account_budget.model_account_budget_post_dotation
msgid "Budget Dotation"
msgstr ""
#. module: account_budget
#: view:account.budget.post.dotation:0
msgid "Budget Dotations"
msgstr ""
#. module: account_budget
#: rml:account.budget:0
msgid "Budget Item Detail"
msgstr ""
#. module: account_budget
#: view:account.budget.post:0
#: field:crossovered.budget.lines,general_budget_id:0
#: model:ir.model,name:account_budget.model_account_budget_post
msgid "Budgetary Position"
msgstr ""
#. module: account_budget
#: wizard_field:account.budget.report,init,date1:0
#: wizard_field:wizard.analytic.account.budget.report,init,date_from:0
#: wizard_field:wizard.crossovered.budget,init,date_from:0
#: wizard_field:wizard.crossovered.budget.summary,init,date_from:0
msgid "Start of period"
msgstr ""
#. module: account_budget
#: model:ir.actions.report.xml,name:account_budget.account_analytic_account_budget
#: model:ir.actions.report.xml,name:account_budget.report_crossovered_budget
#: model:ir.actions.wizard,name:account_budget.account_analytic_account_budget_report
#: model:ir.actions.wizard,name:account_budget.wizard_crossovered_budget_menu
msgid "Print Budgets"
msgstr ""
#. module: account_budget
#: field:account.budget.post,code:0
#: field:crossovered.budget,code:0
msgid "Code"
msgstr "Còde"
#. module: account_budget
#: field:account.budget.post.dotation,tot_planned:0
msgid "Total Planned Amount"
msgstr ""
#. module: account_budget
#: wizard_view:wizard.analytic.account.budget.report,init:0
msgid "Select Dates Period"
msgstr ""
#. module: account_budget
#: field:account.budget.post,dotation_ids:0
msgid "Spreading"
msgstr ""
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: rml:crossovered.budget.report:0
msgid "Theoretical Amount"
msgstr ""
#. module: account_budget
#: wizard_field:account.budget.spread,init,fiscalyear:0
msgid "Fiscal Year"
msgstr ""
#. module: account_budget
#: field:crossovered.budget.lines,analytic_account_id:0
msgid "Analytic Account"
msgstr "Compte Analitic"
#. module: account_budget
#: rml:crossovered.budget.report:0
msgid "Budget :"
msgstr "Budgèt :"
#. module: account_budget
#: rml:account.budget:0
#: view:account.budget.post:0
#: wizard_view:account.budget.spread,init:0
#: wizard_button:account.budget.spread,init,spread:0
msgid "Spread"
msgstr "Difusir"
#. module: account_budget
#: view:account.budget.post:0
#: field:account.budget.post,account_ids:0
msgid "Accounts"
msgstr "Comptes"
#. module: account_budget
#: model:ir.actions.report.xml,name:account_budget.account_budget
msgid "Print Budget"
msgstr ""
#. module: account_budget
#: view:account.analytic.account:0
#: field:account.analytic.account,crossovered_budget_line:0
#: view:account.budget.post:0
#: field:account.budget.post,crossovered_budget_line:0
#: view:crossovered.budget:0
#: field:crossovered.budget,crossovered_budget_line:0
#: view:crossovered.budget.lines:0
#: model:ir.actions.act_window,name:account_budget.act_account_analytic_account_cb_lines
#: model:ir.actions.act_window,name:account_budget.act_crossovered_budget_lines_view
#: model:ir.model,name:account_budget.model_crossovered_budget_lines
#: model:ir.ui.menu,name:account_budget.menu_act_crossovered_budget_lines_view
msgid "Budget Lines"
msgstr ""
#. module: account_budget
#: wizard_button:account.budget.report,init,end:0
#: wizard_button:account.budget.spread,init,end:0
#: view:crossovered.budget:0
#: wizard_button:wizard.analytic.account.budget.report,init,end:0
#: wizard_button:wizard.crossovered.budget,init,end:0
#: wizard_button:wizard.crossovered.budget.summary,init,end:0
msgid "Cancel"
msgstr "Anullar"
#. module: account_budget
#: model:ir.module.module,shortdesc:account_budget.module_meta_information
msgid "Budget Management"
msgstr ""
#. module: account_budget
#: field:crossovered.budget,date_from:0
#: field:crossovered.budget.lines,date_from:0
msgid "Start Date"
msgstr "Data de començament"
#. module: account_budget
#: rml:account.analytic.account.budget:0
#: rml:crossovered.budget.report:0
msgid "Analysis from"
msgstr ""
#. module: account_budget
#: selection:crossovered.budget,state:0
msgid "Validated"
msgstr ""
#. module: account_budget
#: wizard_view:account.budget.report,init:0
msgid "Select period"
msgstr "Seleccionatz un periòde"
+23
View File
@@ -0,0 +1,23 @@
# Thai 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-20 04:33+0000\n"
"Last-Translator: Songpon Phusing <p.songpon@gmail.com>\n"
"Language-Team: Thai <th@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-05-21 03:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_chart
#: model:ir.module.module,description:account_chart.module_meta_information
msgid "Remove minimal account chart"
msgstr "ทำการลบตัวอย่างผังบัญชีแบบง่าย"
+25
View File
@@ -0,0 +1,25 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import coda
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+39
View File
@@ -0,0 +1,39 @@
# -*- 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/>.
#
##############################################################################
{
"name":"Account CODA - import bank statements from coda file",
"version":"1.0",
"author":"Tiny",
"category":"Account CODA",
"description":"""Module provides functionality to import
bank statements from coda files.
""",
"depends":["base", "account"],
"demo_xml":["coda_demo.xml"],
"init_xml":[],
"update_xml" : ["security/ir.model.access.csv","coda_wizard.xml","coda_view.xml"],
"active":False,
"installable":True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+50
View File
@@ -0,0 +1,50 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import osv,fields
class account_coda(osv.osv):
_name = "account.coda"
_description = "coda for an Account"
_columns = {
'name': fields.binary('Coda file', readonly=True),
'statement_ids': fields.one2many('account.bank.statement','coda_id','Generated Bank Statement', readonly=True),
'note': fields.text('Import log', readonly=True),
'journal_id': fields.many2one('account.journal','Bank Journal', readonly=True,select=True),
'date': fields.date('Import Date', readonly=True,select=True),
'user_id': fields.many2one('res.users','User', readonly=True, select=True),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'user_id': lambda self,cr,uid,context: uid,
}
account_coda()
class account_bank_statement(osv.osv):
_inherit = "account.bank.statement"
_columns = {
'coda_id':fields.many2one('account.coda','Coda'),
}
account_bank_statement()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
</data>
</openerp>
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record model="ir.ui.view" id="view_account_coda_form">
<field name="name">account.coda.form</field>
<field name="model">account.coda</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Coda import">
<field name="name" />
<field name="journal_id" />
<field name="date" />
<field name="user_id" />
<notebook colspan="4">
<page string="Log">
<field name="note" colspan="4"/>
</page>
<page string="Statements">
<field name="statement_ids" colspan="4"/>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_account_coda_tree">
<field name="name">account.coda.tree</field>
<field name="model">account.coda</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Coda import">
<field name="journal_id" />
<field name="date" />
<field name="user_id" />
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_account_coda">
<field name="name">Coda import</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Coda Statements" parent="account.menu_finance_reporting" id="menu_account_coda" action="action_account_coda" sequence="12"/>
<menuitem name="Import Coda Statements" action="wizard_account_coda_import" parent="account.menu_finance_periodical_processing"
type="wizard" id="menu_account_coda_wizard" sequence="15"/>
<act_window name="Coda File"
domain="[('statement_ids', 'in', [active_id])]"
res_model="account.coda"
src_model="account.bank.statement"
view_type="form"
view_mode="tree,form"
id="act_account_payment_account_bank_statement"/>
</data>
</openerp>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<openerp>
<data>
<wizard
string="Import Coda File"
model="account.bank.statement"
name="account.coda_import"
id="wizard_account_coda_import"
menu="False"
/>
</data>
</openerp>
+163
View File
@@ -0,0 +1,163 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_coda
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-24 13:11:29+0000\n"
"PO-Revision-Date: 2009-11-24 13:11:29+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_coda
#: field:account.coda,journal_id:0
#: wizard_field:account.coda_import,init,journal_id:0
msgid "Bank Journal"
msgstr ""
#. module: account_coda
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,extraction,note:0
msgid "Log"
msgstr ""
#. 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 ""
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,def_receivable:0
msgid "Default receivable Account"
msgstr ""
#. 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 ""
#. module: account_coda
#: field:account.coda,statement_id:0
msgid "Generated Bank Statement"
msgstr ""
#. 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 ""
#. module: account_coda
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Select your bank journal :"
msgstr ""
+163
View File
@@ -0,0 +1,163 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_coda
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-24 13:11:29+0000\n"
"PO-Revision-Date: 2009-11-24 13:11:29+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_coda
#: field:account.coda,journal_id:0
#: wizard_field:account.coda_import,init,journal_id:0
msgid "Bank Journal"
msgstr ""
#. module: account_coda
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,extraction,note:0
msgid "Log"
msgstr ""
#. 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 ""
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,def_receivable:0
msgid "Default receivable Account"
msgstr ""
#. 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 ""
#. module: account_coda
#: field:account.coda,statement_id:0
msgid "Generated Bank Statement"
msgstr ""
#. 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 ""
#. module: account_coda
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Select your bank journal :"
msgstr ""
@@ -0,0 +1,3 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_account_coda","account.coda","model_account_coda","account.group_account_user",1,0,0,0
"access_account_coda_manager","account.coda","model_account_coda","account.group_account_manager",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_coda account.coda model_account_coda account.group_account_user 1 0 0 0
3 access_account_coda_manager account.coda model_account_coda account.group_account_manager 1 1 1 1
+10
View File
@@ -0,0 +1,10 @@
0000006060712505 00000CPH CODA TINY 0047747270100477472701 00000 1
1 049126201326907 EUR0BE 0000000015632900050607TINY COMPTE COURANT ORDINAIRE 049
2100010000 0000000001150000060607001500000INVOICE OF 2006-12-19 0606070020100
2200010000 EUR000000001150000 100
2300010000301915554082 PROLIBRE SARL CAROUGE GE 000
2100020000 0000000000500000060607001500000CONTRACT PARTNER ERREUR ECART YEA 0606070030100
2200020000RTY CONTRACT PARTNER EUR000000000500000 100
2300020000050000000017 SEDNACOM 43 ALLEE DES FOUGERES 9522 0 HERBLAY 000
8049126201326907 0000000017282900060607
9 000008000000000000000000000001650000 2
+25
View File
@@ -0,0 +1,25 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import coda_import
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+339
View File
@@ -0,0 +1,339 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import pooler
import time
import datetime
import wizard
import netsvc
import base64
from osv import osv
from tools.translate import _
codawiz_form = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Select your bank journal :" />
<field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
<newline />
<field name="def_payable" /> <field name="def_receivable" />
<newline />
<field name="awaiting_account" />
<separator string="Clic on 'New' to select your file :" colspan="4"/>
<field name="coda"/>
</form>
"""
codawiz_fields = {
'journal_id' : {
'string':'Bank Journal',
'type':'many2one',
'relation':'account.journal',
'required':True,
},
'coda' : {
'string':'Coda File',
'type':'binary',
'required':True,
},
'def_payable' : {
'string' : 'Default Payable Account',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'domain':[('type','=','payable')],
'help': 'Set here the payable account that will be used, by default, if the partner is not found',
},
'def_receivable' : {
'string' : 'Default receivable Account',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'domain':[('type','=','receivable')],
'help': 'Set here the receivable account that will be used, by default, if the partner is not found',
},
'awaiting_account' : {
'string' : 'Default Account for Unrecognized Movement',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'help': 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',
}
}
result_form = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="500"/>
</form>
"""
result_fields = {
'note' : {'string':'Log','type':'text'}
}
def _coda_parsing(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
codafile = data['form']['coda']
journal_code = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context).code
def_pay_acc = data['form']['def_payable']
def_rec_acc = data['form']['def_receivable']
str_log = ""
err_log = "Errors:\n------\n"
nb_err=0
std_log=''
str_log1 = "Coda File is Imported : "
str_not=''
str_not1=''
bank_statements=[]
recordlist = base64.decodestring(codafile).split('\n')
recordlist.pop()
for line in recordlist:
if line[0] == '0':
# header data
bank_statement = {}
bank_statement["bank_statement_line"]={}
bank_statement_lines = {}
bank_statement['date'] = str2date(line[5:11])
bank_statement['journal_id']=data['form']['journal_id']
period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))])
bank_statement['period_id'] = period_id[0]
bank_statement['state']='draft'
elif line[0] == '1':
# old balance data
bal_start = list2float(line[43:58])
if line[42] == '1':
bal_start = - bal_start
bank_statement["balance_start"]= bal_start
bank_statement["acc_number"]=line[5:17]
bank_statement["acc_holder"]=line[64:90]
bank_statement['name'] = journal_code + ' ' + str(line[2:5])
elif line[0]=='2':
# movement data record 2
if line[1]=='1':
# movement data record 2.1
if bank_statement_lines.has_key(line[2:6]):
continue
st_line = {}
st_line['extra_note'] = ''
st_line['statement_id']=0
st_line['ref'] = line[2:10]
st_line['date'] = time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
st_line_amt = list2float(line[32:47])
if line[61]=='1':
st_line['toreconcile'] = True
st_line['name']=line[65:77]
else:
st_line['toreconcile'] = False
st_line['name']=line[62:115]
st_line['free_comm'] = st_line['name']
st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[47:53]),"%y/%m/%d")),
st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
st_line['partner_id']=0
if line[31] == '1':
st_line_amt = - st_line_amt
st_line['account_id'] = def_pay_acc
else:
st_line['account_id'] = def_rec_acc
st_line['amount'] = st_line_amt
bank_statement_lines[line[2:6]]=st_line
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
elif line[1] == '3':
# movement data record 3.1
st_line_name = line[2:6]
st_line_partner_acc = str(line[10:47]).strip()
cntry_number=line[10:47].strip()
contry_name=line[47:125].strip()
bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line_partner_acc)])
bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
if bank_ids:
bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context)
if line and bank.partner_id:
bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
if bank_statement_lines[st_line_name]['amount'] < 0 :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
else :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
else:
nb_err += 1
err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number,contry_name)
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[0]=='3':
if line[1] == '1':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113]
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115]
elif line[1] == '3':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100]
elif line[0]=='8':
# new balance record
bal_end = list2float(line[42:57])
if line[41] == '1':
bal_end = - bal_end
bank_statement["balance_end_real"]= bal_end
elif line[0]=='9':
# footer record
bank_statements.append(bank_statement)
#end for
bkst_list=[]
for statement in bank_statements:
try:
bk_st_id = pool.get('account.bank.statement').create(cr,uid,{
'journal_id': statement['journal_id'],
'date':time.strftime('%Y-%m-%d',time.strptime(statement['date'],"%y/%m/%d")),
'period_id':statement['period_id'],
'balance_start': statement["balance_start"],
'balance_end_real': statement["balance_end_real"],
'state': 'draft',
'name': statement['name'],
})
lines=statement["bank_statement_line"]
for value in lines:
line=lines[value]
reconcile_id = False
if line['toreconcile']:
rec_id = pool.get('account.move.line').search(cr, uid, [('name','=',line['name']),('reconcile_id','=',False),('account_id.reconcile','=',True)])
if rec_id:
reconcile_id = pool.get('account.bank.statement.reconcile').create(cr, uid, {
'line_ids': [(6, 0, rec_id)]
}, context=context)
str_not1 = ''
if line.has_key('contry_name') and line.has_key('cntry_number'):
str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"],line["cntry_number"],line["free_comm"]+line['extra_note'],line["val_date"][0],line["entry_date"][0])
id=pool.get('account.bank.statement.line').create(cr,uid,{
'name':line['name'],
'date': line['date'],
'amount': line['amount'],
'partner_id':line['partner_id'] or 0,
'account_id':line['account_id'],
'statement_id': bk_st_id,
'reconcile_id': reconcile_id,
'note':str_not1,
'ref':line['ref'],
})
str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"],statement["acc_holder"])
std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
%(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
bkst_list.append(bk_st_id)
except osv.except_osv, e:
cr.rollback()
nb_err+=1
err_log += '\n Application Error : ' + str(e)
raise # REMOVEME
except Exception, e:
cr.rollback()
nb_err+=1
err_log += '\n System Error : '+str(e)
raise # REMOVEME
except :
cr.rollback()
nb_err+=1
err_log += '\n Unknown Error'
raise
err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
err_log += '\nNumber of error :'+ str(nb_err) +'\n'
pool.get('account.coda').create(cr, uid,{
'name':codafile,
'statement_ids': [(6, 0, bkst_list,)],
'note':str_log1+str_not+std_log+err_log,
'journal_id':data['form']['journal_id'],
'date':time.strftime("%Y-%m-%d"),
'user_id':uid,
})
return {'note':str_log1 + std_log + err_log ,'journal_id': data['form']['journal_id'], 'coda': data['form']['coda'],'statment_ids':bkst_list}
def str2date(date_str):
return time.strftime("%y/%m/%d",time.strptime(date_str,"%d%m%y"))
def str2float(str):
try:
return float(str)
except:
return 0.0
def list2float(lst):
try:
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
except:
return 0.0
class coda_import(wizard.interface):
def _action_open_window(self, cr, uid, data, context):
form=data['form']
return {
'domain':"[('id','in',%s)]"%(form['statment_ids']),
'name': 'Statement',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.bank.statement',
'view_id': False,
'type': 'ir.actions.act_window',
}
states = {
'init' : {
'actions' : [],
'result' : {'type' : 'form',
'arch' : codawiz_form,
'fields' : codawiz_fields,
'state' : [('end', '_Close'),('extraction', '_Ok') ]}
},
'extraction' : {
'actions' : [_coda_parsing],
'result' : {'type' : 'form',
'arch' : result_form,
'fields' : result_fields,
'state' : [('end', '_Close'),('open', '_Open Statement')]}
},
'open': {
'actions': [],
'result': {'type': 'action', 'action': _action_open_window, 'state': 'end'}
},
}
coda_import("account.coda_import")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -2
View File
@@ -23,7 +23,7 @@ from osv import fields, osv
class followup(osv.osv):
_name = 'account_followup.followup'
_description = 'Follow-Ups'
_description = 'Follow-Up'
_columns = {
'name': fields.char('Name', size=64, required=True),
'description': fields.text('Description'),
@@ -34,7 +34,7 @@ followup()
class followup_line(osv.osv):
_name = 'account_followup.followup.line'
_description = 'Follow-Ups Criteria'
_description = 'Follow-Up Criteria'
_columns = {
'name': fields.char('Name', size=64, required=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of follow-up lines."),
+1 -1
View File
@@ -30,7 +30,7 @@ def _code_get(self, cr, uid, context={}):
class account_followup_stat(osv.osv):
_name = "account_followup.stat"
_description = "Followup statistics"
_description = "Followup Statistics"
_auto = False
_columns = {
'name': fields.many2one('res.partner', 'Partner', readonly=True),
+1 -1
View File
@@ -124,7 +124,7 @@
</field>
</record>
<act_window domain="[('partner_id', '=', active_id),('reconcile_id','=',False),('account_id.reconcile', '=', True)]" id="account.act_account_partner_account_move_unreconciled" name="Receivables &amp; Payables" res_model="account.move.line" view="account_move_line_partner_tree"/>
<act_window domain="[('partner_id', '=', active_id),('reconcile_id','=',False),('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]" id="account.act_account_partner_account_move_unreconciled" name="Receivables &amp; Payables" res_model="account.move.line" view="account_move_line_partner_tree"/>
<act_window domain="[('reconcile_id', '=', False),('account_id.type','=','receivable')]" id="act_account_partner_account_move_all" name="All receivable entries" res_model="account.move.line" src_model="" view="account_move_line_partner_tree"/>
+12 -12
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-01-07 13:19+0000\n"
"Last-Translator: opix <inur.opix@gmail.com>\n"
"PO-Revision-Date: 2010-05-18 11:05+0000\n"
"Last-Translator: Pandu Pradana <p4ndupr4d4n4@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-04-17 04:12+0000\n"
"X-Launchpad-Export-Date: 2010-05-19 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_invoice_layout
@@ -35,7 +35,7 @@ msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Cancelled Invoice"
msgstr ""
msgstr "Pembatalan Tagihan"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
@@ -56,7 +56,7 @@ msgstr "Potongan (%)"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "(Incl. taxes):"
msgstr ""
msgstr "(Termasuk pajak):"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
@@ -132,7 +132,7 @@ msgstr "Harga"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "/ ("
msgstr ""
msgstr "/ ("
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@@ -147,7 +147,7 @@ msgstr "Rekening Asal"
#. module: account_invoice_layout
#: model:ir.actions.act_window,name:account_invoice_layout.notify_mesage_tree_form
msgid "Write Messages"
msgstr ""
msgstr "Tulis Pesan"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@@ -212,7 +212,7 @@ msgstr "Invoice dengan Layout"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Description / Taxes"
msgstr ""
msgstr "Penjelasan / Pajak"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@@ -222,7 +222,7 @@ msgstr "Jumlah"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Description/Taxes"
msgstr ""
msgstr "Penjelasan/Pajak"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@@ -262,7 +262,7 @@ msgstr "Faktur Pembelian"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Note :"
msgstr ""
msgstr "Catatan :"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@@ -272,12 +272,12 @@ msgstr "Pajak"
#. module: account_invoice_layout
#: model:ir.module.module,shortdesc:account_invoice_layout.module_meta_information
msgid "account_invoice_layout"
msgstr ""
msgstr "Tatanan_tagihan_akun"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Total (Excl. taxes):"
msgstr ""
msgstr "Jumlah (Tidak termasuk pajak):"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
+2 -2
View File
@@ -28,7 +28,7 @@ import pooler
class payment_type(osv.osv):
_name= 'payment.type'
_description= 'Payment type'
_description= 'Payment Type'
_columns= {
'name': fields.char('Name', size=64, required=True,help='Payment Type'),
'code': fields.char('Code', size=64, required=True,help='Specifies the Code for Payment Type'),
@@ -43,7 +43,7 @@ payment_type()
class payment_mode(osv.osv):
_name= 'payment.mode'
_description= 'Payment mode'
_description= 'Payment Mode'
_columns= {
'name': fields.char('Name', size=64, required=True,help='Mode of Payment'),
'bank_id': fields.many2one('res.partner.bank', "Bank account",
+2 -1
View File
@@ -25,6 +25,8 @@
<field name="partner_id"/>
<field name="ref"/>
<field name="name"/>
<field name="journal_id"/>
<field name="account_id"/>
<field name="date_maturity"/>
<field name="date"/>
<field name="debit" sum="Total debit"/>
@@ -279,7 +281,6 @@
<field name="currency"/>
<field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
<field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode)"/>
<field domain="[('partner_id', '=', partner_id)]" name="bank_id"/>
<field name="create_date"/>
<field name="name"/>
</tree>
@@ -104,7 +104,7 @@ class payment_order_create(osv.osv_memory):
# Search for move line to pay:
domain = [('reconcile_id', '=', False),('account_id.type', '=', 'payable'),('amount_to_pay', '>', 0)]
domain = domain + ['|',('date_maturity','<',search_due_date),('date_maturity','=',False)]
domain = domain + ['|',('date_maturity','<=',search_due_date),('date_maturity','=',False)]
line_ids = line_obj.search(cr, uid, domain, context=context)
context.update({'line_ids': line_ids})
model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_create_payment_order_lines')], context=context)
@@ -106,5 +106,3 @@ class account_payment_populate_statement(osv.osv_memory):
return {'type' : 'ir.actions.act_window_close'}
account_payment_populate_statement()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -32,7 +32,7 @@ from mx.DateTime import RelativeDateTime, now, DateTime, localtime
class account_report(osv.osv):
_name = "account.report.report"
_description = "Account reporting"
_description = "Account Reporting"
# _color = [
# ('', ''),
# ('green','Green'),
+532
View File
@@ -0,0 +1,532 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:43+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:11+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_report
#: field:account.report.history,name:0
#: selection:account.report.report,type:0
#: model:ir.model,name:account_report.model_account_report_history
msgid "Indicator"
msgstr ""
#. module: account_report
#: wizard_field:print.indicators.pdf,init,file:0
msgid "Select a PDF File"
msgstr ""
#. module: account_report
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. module: account_report
#: view:account.report.report:0
msgid "Operators:"
msgstr ""
#. module: account_report
#: field:account.report.report,parent_id:0
msgid "Parent"
msgstr "Parent"
#. module: account_report
#: field:account.report.report,disp_graph:0
msgid "Display As Graph"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "Account Debit:"
msgstr ""
#. module: account_report
#: selection:account.report.report,type:0
msgid "Others"
msgstr "Autres"
#. module: account_report
#: view:account.report.report:0
msgid "balance(['ACCOUNT_CODE',],fiscalyear)"
msgstr ""
#. module: account_report
#: rml:print.indicators:0
msgid "Tabular Summary"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "Notes"
msgstr "Nòtas"
#. module: account_report
#: view:account.report.report:0
msgid "= Goodness Indicator Limit:"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "Very bad"
msgstr ""
#. module: account_report
#: field:account.report.history,val:0
#: field:account.report.report,amount:0
msgid "Value"
msgstr "Valor"
#. module: account_report
#: view:account.report.report:0
msgid "= Badness Indicator Limit:"
msgstr ""
#. module: account_report
#: view:account.report.report:0
#: selection:account.report.report,status:0
msgid "Bad"
msgstr ""
#. module: account_report
#: wizard_view:print.indicators.pdf,init:0
msgid "Select the PDF file on which Indicators will be printed."
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "> Goodness Indicator Limit:"
msgstr ""
#. module: account_report
#: field:account.report.report,badness_limit:0
msgid "Badness Indicator Limit"
msgstr ""
#. module: account_report
#: selection:account.report.report,status:0
msgid "Very Bad"
msgstr ""
#. module: account_report
#: model:ir.actions.act_window,name:account_report.account_report_history_record_structure
msgid "Indicator history"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "credit(['ACCOUNT_CODE',],fiscalyear)"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "Report Amount:"
msgstr ""
#. module: account_report
#: model:ir.actions.report.xml,name:account_report.fiscal_statements
msgid "Fiscal Statements"
msgstr ""
#. module: account_report
#: wizard_button:print.indicators,init,next:0
msgid "Next"
msgstr "Seguent"
#. module: account_report
#: model:ir.module.module,shortdesc:account_report.module_meta_information
msgid "Reporting for accounting"
msgstr ""
#. module: account_report
#: wizard_button:print.indicators,next,print:0
#: wizard_button:print.indicators.pdf,init,print:0
msgid "Print"
msgstr "Estampar"
#. module: account_report
#: field:account.report.report,type:0
msgid "Type"
msgstr "Tipe"
#. module: account_report
#: model:ir.actions.report.xml,name:account_report.report_indicator_pdf
msgid "Print Indicators in PDF"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "Account Tax Code:"
msgstr ""
#. module: account_report
#: view:account.report.report:0
#: selection:account.report.report,status:0
msgid "Good"
msgstr "Bon"
#. module: account_report
#: view:account.report.history:0
msgid "Account Report History"
msgstr ""
#. module: account_report
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: account_report
#: help:account.report.report,badness_limit:0
msgid "This Value sets the limit of badness."
msgstr ""
#. module: account_report
#: wizard_field:print.indicators,init,select_base:0
msgid "Choose Criteria"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "debit(['ACCOUNT_CODE',],fiscalyear)"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "Account Credit:"
msgstr ""
#. module: account_report
#: wizard_view:print.indicators,init:0
msgid "Select the criteria based on which Indicators will be printed."
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "< Badness Indicator Limit:"
msgstr ""
#. module: account_report
#: view:account.report.report:0
#: selection:account.report.report,status:0
msgid "Very Good"
msgstr ""
#. module: account_report
#: field:account.report.report,note:0
msgid "Note"
msgstr "Nòta"
#. module: account_report
#: rml:accounting.report:0
#: rml:print.indicators:0
msgid "Currency:"
msgstr "Devisa :"
#. module: account_report
#: field:account.report.report,status:0
msgid "Status"
msgstr "Estat"
#. module: account_report
#: help:account.report.report,disp_tree:0
msgid ""
"When the indicators are printed, if one indicator is set with this field to "
"True, then it will display one more graphs with all its children in tree"
msgstr ""
#. module: account_report
#: selection:account.report.report,status:0
msgid "Normal"
msgstr "Normala"
#. module: account_report
#: view:account.report.report:0
msgid "Example: (balance(['6','45'],-1) - credit(['7'])) / report('RPT1')"
msgstr ""
#. module: account_report
#: field:account.report.report,active:0
msgid "Active"
msgstr "Actiu"
#. module: account_report
#: field:account.report.report,disp_tree:0
msgid "Display Tree"
msgstr ""
#. module: account_report
#: selection:print.indicators,init,select_base:0
msgid "Based On Fiscal Years"
msgstr ""
#. module: account_report
#: model:ir.model,name:account_report.model_account_report_report
msgid "Account reporting"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "Account Balance:"
msgstr ""
#. module: account_report
#: rml:print.indicators:0
msgid "Expression :"
msgstr "Expression :"
#. module: account_report
#: view:account.report.report:0
msgid "report('REPORT_CODE')"
msgstr ""
#. module: account_report
#: field:account.report.report,expression:0
msgid "Expression"
msgstr "Expression"
#. module: account_report
#: view:account.report.report:0
msgid "Accounting reporting"
msgstr ""
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_form
#: model:ir.ui.menu,name:account_report.menu_action_account_report_form
msgid "New Reporting Item Formula"
msgstr ""
#. module: account_report
#: field:account.report.report,code:0
#: rml:accounting.report:0
msgid "Code"
msgstr "Còde"
#. module: account_report
#: field:account.report.history,tmp:0
msgid "temp"
msgstr ""
#. module: account_report
#: field:account.report.history,period_id:0
msgid "Period"
msgstr "Periòde"
#. module: account_report
#: view:account.report.report:0
msgid "General"
msgstr "General"
#. module: account_report
#: view:account.report.report:0
msgid "Legend of operators"
msgstr ""
#. module: account_report
#: wizard_button:print.indicators,init,end:0
#: wizard_button:print.indicators,next,end:0
#: wizard_button:print.indicators.pdf,init,end:0
msgid "Cancel"
msgstr "Anullar"
#. module: account_report
#: field:account.report.report,child_ids:0
msgid "Children"
msgstr "Enfants"
#. module: account_report
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Lo nom de l'objècte deu començar amb x_ e conténer pas de caractèrs "
"especials !"
#. module: account_report
#: help:account.report.report,goodness_limit:0
msgid "This Value sets the limit of goodness."
msgstr ""
#. module: account_report
#: model:ir.actions.wizard,name:account_report.wizard_print_indicators
#: model:ir.ui.menu,name:account_report.menu_wizard_print_indicators
#: wizard_view:print.indicators,init:0
#: wizard_view:print.indicators,next:0
msgid "Print Indicators"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "+ - * / ( )"
msgstr "+ - * / ( )"
#. module: account_report
#: rml:accounting.report:0
#: rml:print.indicators:0
msgid "Printing date:"
msgstr ""
#. module: account_report
#: model:ir.actions.wizard,name:account_report.wizard_indicators_with_pdf
msgid "Indicators in PDF"
msgstr ""
#. module: account_report
#: rml:accounting.report:0
#: rml:print.indicators:0
msgid "at"
msgstr "a"
#. module: account_report
#: rml:accounting.report:0
msgid "Accounting Report"
msgstr ""
#. module: account_report
#: field:account.report.report,goodness_limit:0
msgid "Goodness Indicator Limit"
msgstr ""
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view_other
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_view_other
msgid "Other reports"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid ""
"Note: The second arguement 'fiscalyear' and 'period' are optional "
"arguements.If the value is -1,previous fiscalyear or period is considered."
msgstr ""
#. module: account_report
#: rml:print.indicators:0
msgid ")"
msgstr ")"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view_fiscal
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_view_fiscal
msgid "Fiscal Statements reporting"
msgstr ""
#. module: account_report
#: selection:print.indicators,init,select_base:0
msgid "Based on Fiscal Periods"
msgstr ""
#. module: account_report
#: model:ir.actions.report.xml,name:account_report.report_print_indicators
#: rml:print.indicators:0
msgid "Indicators"
msgstr "Indicadors"
#. module: account_report
#: wizard_view:print.indicators.pdf,init:0
msgid "Print Indicators with PDF"
msgstr ""
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view_indicator
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_view_indicator
msgid "Indicators reporting"
msgstr ""
#. module: account_report
#: field:account.report.report,name:0
#: rml:accounting.report:0
#: rml:print.indicators:0
msgid "Name"
msgstr "Nom"
#. module: account_report
#: wizard_field:print.indicators,next,base_selection:0
msgid "Select Criteria"
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "tax_code(['ACCOUNT_TAX_CODE',],period)"
msgstr ""
#. module: account_report
#: field:account.report.history,fiscalyear_id:0
msgid "Fiscal Year"
msgstr ""
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_define
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_view
msgid "Custom reporting"
msgstr ""
#. module: account_report
#: rml:print.indicators:0
msgid "Page"
msgstr "Pagina"
#. module: account_report
#: selection:account.report.report,type:0
msgid "View"
msgstr "Afichatge"
#. module: account_report
#: rml:print.indicators:0
msgid "Indicators -"
msgstr ""
#. module: account_report
#: help:account.report.report,disp_graph:0
msgid ""
"If the field is set to True, information will be printed as a Graph, "
"otherwise as an array."
msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "Return value for status"
msgstr ""
#. module: account_report
#: field:account.report.report,sequence:0
msgid "Sequence"
msgstr "Sequéncia"
#. module: account_report
#: rml:accounting.report:0
msgid "Amount"
msgstr "Soma"
#. module: account_report
#: rml:print.indicators:0
msgid "1cm 27.7cm 20cm 27.7cm"
msgstr "1cm 27.7cm 20cm 27.7cm"
#. module: account_report
#: model:ir.module.module,description:account_report.module_meta_information
msgid ""
"Financial and accounting reporting\n"
" Fiscal statements\n"
" Indicators\n"
" "
msgstr ""
#. module: account_report
#: selection:account.report.report,type:0
msgid "Fiscal Statement"
msgstr ""
+1 -1
View File
@@ -30,7 +30,7 @@ from mx.DateTime import RelativeDateTime, now, DateTime, localtime
class color_rml(osv.osv):
_name = "color.rml"
_description = "Rml Colors"
_description = "Rml Color"
_columns = {
'name': fields.char('Name', size=64, required=True),
'code': fields.char('code',size=64,required=True),
+246
View File
@@ -0,0 +1,246 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:40+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_reporting
#: field:color.rml,code:0
msgid "code"
msgstr "còde"
#. module: account_reporting
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Lo nom de l'objècte deu començar amb x_ e conténer pas de caractèrs "
"especials !"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica-Bold"
msgstr "Helvetica-Gras"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica"
msgstr "Helvetica"
#. module: account_reporting
#: field:account.report.bs,note:0
msgid "Note"
msgstr "Nòta"
#. module: account_reporting
#: field:account.report.bs,report_type:0
msgid "Report Type"
msgstr ""
#. module: account_reporting
#: model:ir.ui.menu,name:account_reporting.action_account_report_bs_form
#: model:ir.ui.menu,name:account_reporting.menu_finan_config_BSheet
msgid "Balance Sheet Report"
msgstr ""
#. module: account_reporting
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier"
msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-BoldOblique"
msgstr ""
#. module: account_reporting
#: wizard_button:account.account.balancesheet.report,init,report:0
msgid "Print BalanceSheet"
msgstr ""
#. module: account_reporting
#: help:account.account.balancesheet.report,init,periods:0
msgid "All periods if empty"
msgstr ""
#. module: account_reporting
#: field:account.report.bs,color_font:0
msgid "Font Color"
msgstr "Color de la poliça"
#. module: account_reporting
#: selection:account.report.bs,report_type:0
msgid "Report Objects With Accounts and child of Accounts"
msgstr ""
#. module: account_reporting
#: model:ir.module.module,description:account_reporting.module_meta_information
msgid ""
"Financial and accounting reporting\n"
" Balance Sheet Report"
msgstr ""
#. module: account_reporting
#: selection:account.report.bs,report_type:0
msgid "Report Objects With Accounts"
msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-Oblique"
msgstr ""
#. module: account_reporting
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: account_reporting
#: field:account.report.bs,name:0
#: field:color.rml,name:0
msgid "Name"
msgstr "Nom"
#. module: account_reporting
#: view:account.report.bs:0
msgid "Account reporting"
msgstr ""
#. module: account_reporting
#: model:ir.ui.menu,name:account_reporting.bs_report_action_form
msgid "Balance Sheet Report Form"
msgstr ""
#. module: account_reporting
#: view:account.report.bs:0
msgid "Notes"
msgstr "Nòtas"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-BoldItalic"
msgstr ""
#. module: account_reporting
#: model:ir.model,name:account_reporting.model_account_report_bs
msgid "Account reporting for Balance Sheet"
msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-Bold"
msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Italic"
msgstr ""
#. module: account_reporting
#: selection:account.report.bs,report_type:0
msgid "Report Objects Only"
msgstr ""
#. module: account_reporting
#: model:ir.model,name:account_reporting.model_color_rml
msgid "Rml Colors"
msgstr ""
#. module: account_reporting
#: model:ir.module.module,shortdesc:account_reporting.module_meta_information
msgid "Reporting of Balancesheet for accounting"
msgstr ""
#. module: account_reporting
#: field:account.report.bs,code:0
msgid "Code"
msgstr "Còde"
#. module: account_reporting
#: field:account.report.bs,parent_id:0
msgid "Parent"
msgstr "Parent"
#. module: account_reporting
#: field:account.report.bs,sequence:0
msgid "Sequence"
msgstr "Sequéncia"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Bold"
msgstr ""
#. module: account_reporting
#: view:account.report.bs:0
msgid "General"
msgstr "General"
#. module: account_reporting
#: wizard_field:account.account.balancesheet.report,init,fiscalyear:0
msgid "Fiscal year"
msgstr "Exercici fiscal"
#. module: account_reporting
#: view:account.report.bs:0
#: field:account.report.bs,account_id:0
msgid "Accounts"
msgstr "Comptes"
#. module: account_reporting
#: wizard_field:account.account.balancesheet.report,init,periods:0
msgid "Periods"
msgstr "Periòdes"
#. module: account_reporting
#: field:account.report.bs,color_back:0
msgid "Back Color"
msgstr ""
#. module: account_reporting
#: field:account.report.bs,child_id:0
msgid "Children"
msgstr "Enfants"
#. module: account_reporting
#: wizard_button:account.account.balancesheet.report,init,end:0
msgid "Cancel"
msgstr "Anullar"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Roman"
msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica-Oblique"
msgstr ""
#. module: account_reporting
#: field:account.report.bs,font_style:0
msgid "Font"
msgstr "Poliça de caractèr"
#. module: account_reporting
#: wizard_view:account.account.balancesheet.report,init:0
msgid "Customize Report"
msgstr ""
+601
View File
@@ -0,0 +1,601 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:57+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.act_account_acount_move_line_open1
msgid "Opening Balance Entry"
msgstr ""
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_receipt_bakreceipt_voucher_list
msgid "Bank Receipts"
msgstr "Recebuts bancaris"
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Particulars"
msgstr ""
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "State :"
msgstr "Estat :"
#. module: account_voucher
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Ref. :"
msgstr "Ref. :"
#. module: account_voucher
#: selection:account.move,voucher_type:0
#: selection:account.voucher,type:0
#: selection:account.voucher.open,init,type:0
#: model:ir.actions.act_window,name:account_voucher.action_view_cont_voucher_form
#: model:ir.ui.menu,name:account_voucher.menu_action_view_cont_voucher_form
msgid "Contra Voucher"
msgstr ""
#. module: account_voucher
#: field:account.voucher,company_id:0
msgid "Company"
msgstr "Entrepresa"
#. module: account_voucher
#: selection:account.move,voucher_type:0
#: selection:account.voucher,type:0
#: model:ir.actions.act_window,name:account_voucher.action_view_jour_voucher_form
#: model:ir.ui.menu,name:account_voucher.menu_action_view_jour_voucher_form
msgid "Journal Voucher"
msgstr "Jornal dels chèques"
#. module: account_voucher
#: rml:voucher.cash_receipt.drcr:0
msgid ","
msgstr ","
#. module: account_voucher
#: view:account.voucher:0
msgid "Set to Draft"
msgstr "Metre en Borrolhon"
#. module: account_voucher
#: wizard_button:account.voucher.open,init,open:0
msgid "Open Voucher Entries"
msgstr ""
#. module: account_voucher
#: model:ir.model,name:account_voucher.model_account_voucher_line
msgid "Voucher Line"
msgstr ""
#. module: account_voucher
#: view:account.move:0
msgid "Total Credit"
msgstr "Credit Total"
#. module: account_voucher
#: field:account.voucher,account_id:0
#: field:account.voucher.line,account_id:0
msgid "Account"
msgstr "Compte"
#. module: account_voucher
#: rml:voucher.cash_amount:0
msgid "D"
msgstr "D"
#. module: account_voucher
#: field:account.account,level:0
msgid "Level"
msgstr "Nivèl"
#. module: account_voucher
#: view:account.move:0
msgid "Account Entry Line"
msgstr "Linha d'escritura comptabla"
#. module: account_voucher
#: view:account.move:0
msgid "Total Debit"
msgstr "Debit Total"
#. module: account_voucher
#: field:account.voucher,amount:0
#: field:account.voucher.line,amount:0
#: rml:voucher.cash_amount:0
msgid "Amount"
msgstr "Soma"
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Receiver's Signature"
msgstr ""
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "No."
msgstr "N°"
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Amount (in words) :"
msgstr ""
#. module: account_voucher
#: field:account.voucher.line,account_analytic_id:0
msgid "Analytic Account"
msgstr "Compte Analitic"
#. module: account_voucher
#: selection:account.move,voucher_type:0
#: selection:account.voucher,type:0
#: selection:account.voucher.open,init,type:0
#: model:ir.actions.act_window,name:account_voucher.action_view_jour_sale_voucher_form
#: model:ir.ui.menu,name:account_voucher.menu_action_view_jour_sale_voucher_form
msgid "Journal Sale Voucher"
msgstr ""
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_receipt_vou_voucher_list
#: model:ir.ui.menu,name:account_voucher.menu_action_receipt_vou_voucher_list
msgid "Receipt Vouchers"
msgstr ""
#. module: account_voucher
#: rml:voucher.cash_amount:0
msgid "Account :"
msgstr ""
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "On Account of :"
msgstr ""
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_payments_bankpay_voucher_list
#: model:ir.actions.act_window,name:account_voucher.action_payments_cashpay_voucher_list
#: model:ir.actions.act_window,name:account_voucher.action_payments_voucher_list
#: model:ir.ui.menu,name:account_voucher.menu_action_payments_voucher_list
msgid "Payment Vouchers"
msgstr ""
#. module: account_voucher
#: view:account.voucher:0
msgid "Create"
msgstr "Crear"
#. module: account_voucher
#: selection:account.account,type1:0
#: selection:account.account.template,type1:0
msgid "None"
msgstr "Pas cap"
#. module: account_voucher
#: field:account.voucher,number:0
msgid "Number"
msgstr "Numèro"
#. module: account_voucher
#: view:account.move:0
#: field:account.voucher,state:0
#: wizard_field:account.voucher.open,init,state:0
msgid "State"
msgstr "Estat"
#. module: account_voucher
#: selection:account.account,type1:0
#: selection:account.account.template,type1:0
#: selection:account.voucher.line,type:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Debit"
msgstr "Debit"
#. module: account_voucher
#: field:account.voucher,type:0
#: field:account.voucher.line,type:0
msgid "Type"
msgstr "Tipe"
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_voucher_list
msgid "Voucher Entries"
msgstr ""
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Authorised Signatory"
msgstr ""
#. module: account_voucher
#: view:account.voucher:0
#: model:ir.actions.act_window,name:account_voucher.action_voucher_list
msgid "Vouchers"
msgstr ""
#. module: account_voucher
#: view:account.voucher:0
#: field:account.voucher.line,voucher_id:0
#: model:res.request.link,name:account_voucher.req_link_voucher
msgid "Voucher"
msgstr ""
#. module: account_voucher
#: wizard_view:account.voucher.open,init:0
#: model:ir.ui.menu,name:account_voucher.menu_wizard_account_voucher_open
msgid "Open Vouchers"
msgstr ""
#. module: account_voucher
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Dated :"
msgstr ""
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_receipt_cashreceipt_voucher_list
msgid "Cash Receipts"
msgstr ""
#. module: account_voucher
#: field:account.voucher,partner_id:0
#: field:account.voucher.line,partner_id:0
msgid "Partner"
msgstr "Partenari"
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_view_bank_pay_voucher_form
msgid "New Bank Payment"
msgstr ""
#. module: account_voucher
#: view:account.voucher:0
#: field:account.voucher,payment_ids:0
msgid "Voucher Lines"
msgstr ""
#. module: account_voucher
#: field:account.voucher,currency_id:0
msgid "Currency"
msgstr "Devisa"
#. module: account_voucher
#: view:account.move:0
#: field:account.move,narration:0
#: view:account.voucher:0
#: field:account.voucher,narration:0
msgid "Narration"
msgstr ""
#. module: account_voucher
#: field:account.voucher,reference:0
msgid "Voucher Reference"
msgstr ""
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_view_cash_rec_voucher_form
msgid "New Cash Receipt"
msgstr ""
#. module: account_voucher
#: model:ir.actions.report.xml,name:account_voucher.report_account_voucher_amt
msgid "Voucher Report"
msgstr ""
#. module: account_voucher
#: field:account.account,open_bal:0
msgid "Opening Balance"
msgstr ""
#. module: account_voucher
#: selection:account.voucher,state:0
#: selection:account.voucher.open,init,state:0
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Draft"
msgstr "Borrolhon"
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "PRO-FORMA"
msgstr "PRO-FORMA"
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_receipt_cashreceipt_voucher_list
msgid "Cash Receipt"
msgstr ""
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_view_cash_pay_voucher_form
msgid "New Cash Payment"
msgstr ""
#. module: account_voucher
#: view:account.move:0
msgid "Optional Information"
msgstr "Entresenhas opcionalas"
#. module: account_voucher
#: view:account.voucher:0
msgid "General Entries"
msgstr ""
#. module: account_voucher
#: field:account.voucher,date:0
msgid "Date"
msgstr "Data"
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid ":"
msgstr ":"
#. module: account_voucher
#: field:account.account,type1:0
#: field:account.account.template,type1:0
msgid "Dr/Cr"
msgstr ""
#. module: account_voucher
#: model:ir.actions.report.xml,name:account_voucher.report_account_voucher
msgid "Voucher Report (Cr/Dr)"
msgstr ""
#. module: account_voucher
#: field:account.move,voucher_type:0
#: wizard_field:account.voucher.open,init,type:0
msgid "Voucher Type"
msgstr ""
#. module: account_voucher
#: selection:account.account,type1:0
#: selection:account.account.template,type1:0
#: selection:account.voucher.line,type:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Credit"
msgstr "Credit"
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Through :"
msgstr ""
#. module: account_voucher
#: field:account.voucher,reference_type:0
msgid "Reference Type"
msgstr ""
#. module: account_voucher
#: model:ir.model,name:account_voucher.model_account_voucher
msgid "Accounting Voucher"
msgstr ""
#. module: account_voucher
#: field:account.voucher,period_id:0
msgid "Period"
msgstr "Periòde"
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_payments_bankpay_voucher_list
msgid "Bank Payments"
msgstr ""
#. module: account_voucher
#: view:account.move:0
msgid "General Information"
msgstr "Informacions generalas"
#. module: account_voucher
#: wizard_field:account.voucher.open,init,period_ids:0
msgid "Periods"
msgstr "Periòdes"
#. module: account_voucher
#: view:account.voucher:0
#: selection:account.voucher,state:0
#: wizard_button:account.voucher.open,init,end:0
#: selection:account.voucher.open,init,state:0
msgid "Cancel"
msgstr "Anullar"
#. module: account_voucher
#: view:account.voucher:0
#: selection:account.voucher,state:0
#: selection:account.voucher.open,init,state:0
msgid "Pro-forma"
msgstr "Pro-forma"
#. module: account_voucher
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Lo nom de l'objècte deu començar amb x_ e conténer pas de caractèrs "
"especials !"
#. module: account_voucher
#: view:account.voucher:0
msgid "Other Info"
msgstr ""
#. module: account_voucher
#: model:ir.module.module,shortdesc:account_voucher.module_meta_information
msgid "Accounting Voucher Entries"
msgstr ""
#. module: account_voucher
#: field:res.currency,sub_name:0
msgid "Sub Currency"
msgstr ""
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_other_voucher_list
#: model:ir.ui.menu,name:account_voucher.menu_action_other_voucher_list
msgid "Other Vouchers"
msgstr ""
#. module: account_voucher
#: field:account.voucher.line,name:0
msgid "Description"
msgstr "Descripcion"
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Canceled"
msgstr "Anullat"
#. module: account_voucher
#: selection:account.move,voucher_type:0
#: selection:account.voucher,type:0
#: selection:account.voucher.open,init,type:0
#: model:ir.actions.act_window,name:account_voucher.action_view_cash_pay_voucher_form
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Cash Payment Voucher"
msgstr ""
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_receipt_bakreceipt_voucher_list
msgid "Bank Receipt"
msgstr ""
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "-"
msgstr "-"
#. module: account_voucher
#: selection:account.move,voucher_type:0
#: selection:account.voucher,type:0
#: selection:account.voucher.open,init,type:0
#: model:ir.actions.act_window,name:account_voucher.action_view_jour_pur_voucher_form
#: model:ir.ui.menu,name:account_voucher.menu_action_view_jour_pur_voucher_form
msgid "Journal Purchase Voucher"
msgstr ""
#. module: account_voucher
#: view:account.account:0
msgid "Closing Balance"
msgstr ""
#. module: account_voucher
#: field:account.voucher.line,ref:0
msgid "Ref."
msgstr "Ref."
#. module: account_voucher
#: selection:account.voucher,state:0
#: selection:account.voucher.open,init,state:0
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Posted"
msgstr ""
#. module: account_voucher
#: field:account.voucher,name:0
msgid "Name"
msgstr "Nom"
#. module: account_voucher
#: field:account.voucher,move_ids:0
msgid "Real Entry"
msgstr ""
#. module: account_voucher
#: model:ir.actions.wizard,name:account_voucher.wizard_account_voucher_open
msgid "Open a Voucher Entry"
msgstr ""
#. module: account_voucher
#: field:account.voucher,move_id:0
msgid "Account Entry"
msgstr ""
#. module: account_voucher
#: view:account.voucher:0
msgid "Entry Lines"
msgstr ""
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_view_bank_rec_voucher_form
msgid "New Bank Receipt"
msgstr ""
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_payments_cashpay_voucher_list
msgid "Cash Payments"
msgstr ""
#. module: account_voucher
#: selection:account.move,voucher_type:0
#: selection:account.voucher,type:0
#: selection:account.voucher.open,init,type:0
#: model:ir.actions.act_window,name:account_voucher.action_view_cash_rec_voucher_form
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Cash Receipt Voucher"
msgstr ""
#. module: account_voucher
#: selection:account.move,voucher_type:0
#: selection:account.voucher,type:0
#: selection:account.voucher.open,init,type:0
#: model:ir.actions.act_window,name:account_voucher.action_view_bank_pay_voucher_form
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Bank Payment Voucher"
msgstr ""
#. module: account_voucher
#: selection:account.move,voucher_type:0
#: selection:account.voucher,type:0
#: selection:account.voucher.open,init,type:0
#: model:ir.actions.act_window,name:account_voucher.action_view_bank_rec_voucher_form
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Bank Receipt Voucher"
msgstr ""
#. module: account_voucher
#: field:account.account,journal_id:0
#: field:account.voucher,journal_id:0
msgid "Journal"
msgstr "Jornal"
+10 -11
View File
@@ -103,7 +103,7 @@ class account_voucher(osv.osv):
],'Type', readonly=True, select=True , size=128),
'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}),
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}, domain=[('type','<>','view')]),
'payment_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'proforma':[('readonly',True)]}),
'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}),
'narration':fields.text('Narration', readonly=True, states={'draft':[('readonly',False)]}, required=True),
@@ -167,15 +167,14 @@ class account_voucher(osv.osv):
return {'value':{'account_id':account_id.id}}
def open_voucher(self, cr, uid, ids, context={}):
obj=self.pool.get('account.voucher').browse(cr,uid,ids)
total=0
obj = self.pool.get('account.voucher').browse(cr,uid,ids)
total = 0
for i in obj[0].payment_ids:
total+=i.amount
if total!=0:
self.write(cr,uid,ids,{'amount':total})
self.write(cr, uid, ids, {'state':'proforma'})
total += i.amount
if total != 0:
self.write(cr, uid, ids, {'amount':total, 'state':'proforma'})
else:
raise osv.except_osv('Invalid action !', 'You can not post to Pro-Forma a voucher with Total amount = 0')
raise osv.except_osv('Invalid action !', 'You cannot post to Pro-Forma a voucher with Total amount = 0 !')
return True
def proforma_voucher(self, cr, uid, ids, context={}):
@@ -302,9 +301,9 @@ class account_voucher(osv.osv):
name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id)
move = {
'name': name,
'name' : name,
'journal_id': journal_id,
'voucher_type':inv.type,
'type' : inv.type,
'narration' : inv.narration
}
if inv.period_id:
@@ -487,7 +486,7 @@ class account_voucher_line(osv.osv):
_columns = {
'voucher_id':fields.many2one('account.voucher', 'Voucher'),
'name':fields.char('Description', size=256, required=True),
'account_id':fields.many2one('account.account','Account', required=True),
'account_id':fields.many2one('account.account','Account', required=True, domain=[('type','<>','view')]),
'partner_id': fields.many2one('res.partner', 'Partner', change_default=True),
'amount':fields.float('Amount'),
'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Type'),
+3 -3
View File
@@ -31,7 +31,7 @@ import decimal_precision as dp
class account_analytic_account(osv.osv):
_name = 'account.analytic.account'
_description = 'Analytic Accounts'
_description = 'Analytic Account'
def _compute_currency_for_level_tree(self, cr, uid, ids, ids2, res, acc_set, context={}):
# Handle multi-currency on each level of analytic account
@@ -285,7 +285,7 @@ account_analytic_account()
class account_analytic_line(osv.osv):
_name = 'account.analytic.line'
_description = 'Analytic lines'
_description = 'Analytic Line'
def _amount_currency(self, cr, uid, ids, field_name, arg, context={}):
result = {}
for rec in self.browse(cr, uid, ids, context):
@@ -343,7 +343,7 @@ class account_analytic_line(osv.osv):
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', c),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
}
_order = 'date'
account_analytic_line()
@@ -0,0 +1,66 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:44+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic_journal_billing_rate
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: analytic_journal_billing_rate
#: field:analytic_journal_rate_grid,journal_id:0
msgid "Analytic Journal"
msgstr "Jornal analitic"
#. module: analytic_journal_billing_rate
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Lo nom de l'objècte deu començar amb x_ e conténer pas de caractèrs "
"especials !"
#. module: analytic_journal_billing_rate
#: view:analytic_journal_rate_grid:0
msgid "Billing Rate per Journal for this Analytic Account"
msgstr ""
#. module: analytic_journal_billing_rate
#: field:analytic_journal_rate_grid,account_id:0
msgid "Analytic Account"
msgstr "Compte Analitic"
#. module: analytic_journal_billing_rate
#: model:ir.model,name:analytic_journal_billing_rate.model_analytic_journal_rate_grid
msgid "Relation table between journals and billing rates"
msgstr ""
#. module: analytic_journal_billing_rate
#: field:account.analytic.account,journal_rate_ids:0
msgid "Invoicing Rate per Journal"
msgstr ""
#. module: analytic_journal_billing_rate
#: model:ir.module.module,shortdesc:analytic_journal_billing_rate.module_meta_information
msgid "Analytic Journal Billing Rate"
msgstr ""
#. module: analytic_journal_billing_rate
#: field:analytic_journal_rate_grid,rate_id:0
msgid "Invoicing Rate"
msgstr ""
@@ -100,7 +100,7 @@ class hr_analytic_timesheet(osv.osv):
'for this product: "%s" (id:%d)') % \
(r.product_id.name, r.product_id.id,))
# Compute based on pricetype
amount_unit=self.on_change_unit_amount(cr, uid, ids,
amount_unit = self.on_change_unit_amount(cr, uid, ids,
r.product_id.id, unit_amount, r.product_id.uom_id.id)['value']['amount']
amount = unit_amount * amount_unit
@@ -136,7 +136,7 @@ class hr_analytic_timesheet(osv.osv):
'for this product: "%s" (id:%d)') % \
(r.product_id.name, r.product_id.id,))
# Compute based on pricetype
amount_unit=self.on_change_unit_amount(cr, uid, ids,
amount_unit = self.on_change_unit_amount(cr, uid, ids,
r.product_id.id, unit_amount, r.product_id.uom_id.id)['value']['amount']
amount = unit_amount * amount_unit
@@ -32,3 +32,5 @@
"acess_auction_payer","auction.payer","model_auction_payer","base.group_user",1,0,0,0
"access_auction_pay_sel","auction.pay.sel","model_auction_payer_sel","base.group_user",1,0,0,0
"acess_auction_taken","auction.taken","model_auction_taken","base.group_user",1,0,0,0
"access_auction_catalog_flagey","auction.catalog.flagey","model_auction_catalog_flagey","base.group_user",1,0,0,0
"access_auction_lots_buyer_map_user","auction_lots_buyer_map_user","model_auction_lots_buyer_map","base.group_user",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
32 acess_auction_payer auction.payer model_auction_payer base.group_user 1 0 0 0
33 access_auction_pay_sel auction.pay.sel model_auction_payer_sel base.group_user 1 0 0 0
34 acess_auction_taken auction.taken model_auction_taken base.group_user 1 0 0 0
35 access_auction_catalog_flagey auction.catalog.flagey model_auction_catalog_flagey base.group_user 1 0 0 0
36 access_auction_lots_buyer_map_user auction_lots_buyer_map_user model_auction_lots_buyer_map base.group_user 1 0 0 0
+10 -6
View File
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 14:56+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-21 17:51+0000\n"
"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:17+0000\n"
"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: audittrail
#: model:ir.module.module,shortdesc:audittrail.module_meta_information
msgid "Audit Trail"
msgstr ""
msgstr "Rapport de l' audit"
#. module: audittrail
#: constraint:ir.model:0
@@ -72,7 +72,7 @@ msgstr "Ancienne valeur"
#. module: audittrail
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nom de modèle invalide pour la définition de l'action"
#. module: audittrail
#: model:ir.actions.wizard,name:audittrail.wizard_audittrail_log
@@ -143,7 +143,7 @@ msgstr "Règle AuditTrail"
#. module: audittrail
#: wizard_field:audittrail.view.log,init,to:0
msgid "Log To"
msgstr ""
msgstr "Connecter à"
#. module: audittrail
#: view:audittrail.log:0
@@ -158,6 +158,10 @@ msgid ""
" Subscribe Rules for read, write, create and delete on objects and check "
"logs"
msgstr ""
"Autorise un administrateur à tracer toutes les manipulations des "
"utilisateurs sur tous les objets du système.\n"
" Règles d'abonnement pour la lecture, l'écriture, la création, la "
"suppression des objets et la consultation des journaux"
#. module: audittrail
#: field:audittrail.log,timestamp:0
+311
View File
@@ -0,0 +1,311 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:49+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: audittrail
#: model:ir.module.module,shortdesc:audittrail.module_meta_information
msgid "Audit Trail"
msgstr ""
#. module: audittrail
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Lo nom de l'objècte deu començar amb x_ e conténer pas de caractèrs "
"especials !"
#. module: audittrail
#: field:audittrail.log.line,log_id:0
msgid "Log"
msgstr "Jornal"
#. module: audittrail
#: selection:audittrail.rule,state:0
msgid "Subscribed"
msgstr "Abonat"
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value : "
msgstr ""
#. module: audittrail
#: selection:audittrail.log,method:0
msgid "Create"
msgstr "Crear"
#. module: audittrail
#: wizard_view:audittrail.view.log,init:0
msgid "Audit Logs"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,state:0
msgid "State"
msgstr "Estat"
#. module: audittrail
#: selection:audittrail.rule,state:0
msgid "Draft"
msgstr "Borrolhon"
#. module: audittrail
#: field:audittrail.log.line,old_value:0
msgid "Old Value"
msgstr ""
#. module: audittrail
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. module: audittrail
#: model:ir.actions.wizard,name:audittrail.wizard_audittrail_log
msgid "View log"
msgstr ""
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_log_line
msgid "audittrail.log.line"
msgstr ""
#. module: audittrail
#: field:audittrail.log,method:0
msgid "Method"
msgstr "Metòde"
#. module: audittrail
#: wizard_field:audittrail.view.log,init,from:0
msgid "Log From"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,log:0
msgid "Log ID"
msgstr ""
#. module: audittrail
#: field:audittrail.log,res_id:0
msgid "Resource Id"
msgstr ""
#. module: audittrail
#: selection:audittrail.log,method:0
msgid "Write"
msgstr "Escriure"
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail
msgid "Audittrails"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "Log Lines"
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
msgid "Subscribe"
msgstr "S'abonar"
#. module: audittrail
#: selection:audittrail.log,method:0
msgid "Read"
msgstr "Legir"
#. module: audittrail
#: field:audittrail.log,object_id:0
#: field:audittrail.rule,object_id:0
msgid "Object"
msgstr "Objècte"
#. module: audittrail
#: view:audittrail.rule:0
msgid "AuditTrail Rule"
msgstr ""
#. module: audittrail
#: wizard_field:audittrail.view.log,init,to:0
msgid "Log To"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "New Value Text: "
msgstr ""
#. module: audittrail
#: model:ir.module.module,description:audittrail.module_meta_information
msgid ""
"Allows the administrator to track every user operations on all objects of "
"the system.\n"
" Subscribe Rules for read, write, create and delete on objects and check "
"logs"
msgstr ""
#. module: audittrail
#: field:audittrail.log,timestamp:0
msgid "Date"
msgstr "Data"
#. module: audittrail
#: field:audittrail.log,user_id:0
msgid "User"
msgstr "Utilizaire"
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value Text : "
msgstr ""
#. module: audittrail
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: audittrail
#: field:audittrail.log,name:0
msgid "Name"
msgstr "Nom"
#. module: audittrail
#: field:audittrail.log,line_ids:0
msgid "Log lines"
msgstr ""
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree_sub
msgid "Subscribed Rules"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,field_id:0
msgid "Fields"
msgstr "Camps"
#. module: audittrail
#: view:audittrail.rule:0
msgid "AuditTrail Rules"
msgstr ""
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_rule
msgid "audittrail.rule"
msgstr ""
#. module: audittrail
#: view:audittrail.rule:0
msgid "UnSubscribe"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,log_write:0
msgid "Log writes"
msgstr ""
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_log
msgid "audittrail.log"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,field_description:0
msgid "Field Description"
msgstr ""
#. module: audittrail
#: selection:audittrail.log,method:0
msgid "Delete"
msgstr "Suprimir"
#. module: audittrail
#: wizard_button:audittrail.view.log,init,open:0
msgid "Open Logs"
msgstr ""
#. module: audittrail
#: field:audittrail.log.line,new_value_text:0
msgid "New value Text"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,name:0
msgid "Rule Name"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,log_read:0
msgid "Log reads"
msgstr ""
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_log_tree
msgid "Logs"
msgstr "Jornals"
#. module: audittrail
#: field:audittrail.log.line,new_value:0
msgid "New Value"
msgstr ""
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_log_tree2
msgid "View Logs"
msgstr ""
#. module: audittrail
#: field:audittrail.rule,log_create:0
msgid "Log creates"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "AuditTrail Logs"
msgstr ""
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree
msgid "Rules"
msgstr "Règlas"
#. module: audittrail
#: view:audittrail.log:0
msgid "New Value : "
msgstr ""
#. module: audittrail
#: field:audittrail.rule,user_id:0
msgid "Users"
msgstr "Utilizaires"
#. module: audittrail
#: field:audittrail.log.line,old_value_text:0
msgid "Old value Text"
msgstr ""
#. module: audittrail
#: wizard_button:audittrail.view.log,init,end:0
msgid "Cancel"
msgstr "Anullar"
#. module: audittrail
#: field:audittrail.rule,log_unlink:0
msgid "Log deletes"
msgstr ""
+18 -17
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,34 +15,35 @@
# 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/>.
#
##############################################################################
{
"name" : "Basic Calendar Functionality",
"version" : "1.0",
"depends" : ["base"],
"name" : "Basic Calendar Functionality",
"version" : "1.0",
"depends" : ["base"],
'description': """Full featured calendar system that support:
- Alerts (create requests)
- Recurring events (*)
- Invitations to others people""",
"author" : "Tiny",
'category': 'Generic Modules/Others',
'website': 'http://www.openerp.com',
- Invitations to others people""",
"author" : "Tiny",
'category': 'Generic Modules/Others',
'website': 'http://www.openerp.com',
"init_xml" : [
'base_calendar_data.xml'
],
"demo_xml" : [],
],
"demo_xml" : [],
"update_xml" : [
'security/ir.model.access.csv',
'wizard/calendar_event_edit_all_view.xml',
'wizard/base_calendar_invite_attendee_view.xml',
'wizard/calendar_event_edit_all_view.xml',
'wizard/base_calendar_invite_attendee_view.xml',
'wizard/base_calendar_set_exrule_view.xml',
'base_calendar_view.xml'
],
"test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
],
# "test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
File diff suppressed because it is too large Load Diff
+32 -6
View File
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Attendee form view-->
<record id="base_calendar_attendee_form_view" model="ir.ui.view">
<field name="name">calendar.attendee.form</field>
@@ -65,6 +67,8 @@
</form>
</field>
</record>
<!-- Attendee tree view-->
<record id="base_calendar_attendee_tree_view" model="ir.ui.view">
<field name="name">calendar.attendee.tree</field>
@@ -77,10 +81,14 @@
<field name="partner_address_id" string="Contact" />
<field name="role" />
<field name="state" />
<field name="cutype" invisible="1"/>
<field name="rsvp" invisible="1"/>
</tree>
</field>
</record>
<!-- Attendee search view-->
<record id="base_calendar_attendee_search_view" model="ir.ui.view">
<field name="name">calendar.attendee.search</field>
<field name="model">calendar.attendee</field>
@@ -99,11 +107,26 @@
<separator orientation="vertical"/>
<field name="cutype" string="Invitation type" select="1"/>
<field name="event_date" select="1"/>
<newline/>
<group expand="0" string="Group By..." colspan="16">
<filter string="Type" icon="terp-project" help="Invitation Type"
domain="[]" context="{'group_by':'cutype'}" />
<filter string="Role" icon="terp-project"
domain="[]" context="{'group_by':'role'}" />
<filter string="Required Reply" icon="terp-crm"
domain="[]" context="{'group_by':'rsvp'}" />
<separator orientation="vertical" />
<filter string="User" icon="terp-partner" domain="[]"
context="{'group_by':'user_id'}" />
<filter string="Contact" icon="terp-partner" domain="[]"
context="{'group_by':'partner_address_id'}" />
</group>
</search>
</field>
</record>
<!-- Action for attendee view-->
<record id="action_view_attendee_form" model="ir.actions.act_window">
<field name="name">Event Invitations</field>
<field name="type">ir.actions.act_window</field>
@@ -115,10 +138,12 @@
</record>
<!-- Calenadar's menu -->
<menuitem id="base.menu_calendar_configuration" name="Calendar"
parent="base.menu_base_config" sequence="10" />
<!-- Invitation menu -->
<menuitem id="menu_attendee_invitations"
name="Event Invitations" parent="base.menu_calendar_configuration"
sequence="10" action="action_view_attendee_form" />
@@ -138,9 +163,6 @@
<field name="trigger_interval" select="1" />
<field name="trigger_occurs" select="1" />
<field name="trigger_related" select="1" />
<separator string="" colspan="4" />
<field name="duration" />
<field name="repeat" />
</form>
</field>
</record>
@@ -162,7 +184,8 @@
</field>
</record>
<!-- Action for alarms view-->
<record id="action_res_alarm_view" model="ir.actions.act_window">
<field name="name">Available Alarms</field>
<field name="type">ir.actions.act_window</field>
@@ -170,6 +193,8 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu for Alarms-->
<menuitem id="menu_crm_meeting_avail_alarm"
groups="base.group_extended"
@@ -405,6 +430,7 @@
</record>
<!-- Event menu -->
<menuitem id="menu_events"
name="Events" parent="base.menu_calendar_configuration"
sequence="5" action="action_view_event" />
+3 -2
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@@ -15,12 +15,13 @@
# 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/>.
#
##############################################################################
import calendar_event_edit_all
import base_calendar_invite_attendee
import base_calendar_set_exrule
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -13,37 +13,38 @@
<field name="type" />
<field name="send_mail" />
<newline />
<group col="1" colspan="4"
<group col="2" colspan="6"
attrs="{'invisible': [('type', '!=', 'external')]}">
<field name="email" colspan="4"
attrs="{'required': [('type', '=', 'external')]}" />
</group>
<group col="1" colspan="4"
<group col="2" colspan="6"
attrs="{'invisible': [('type', '!=', 'internal')]}">
<separator string="Users" colspan="4" />
<field name="user_ids" select="1" colspan="4"
nolabel="1" />
<newline />
</group>
<group col="2" colspan="4"
<group col="2" colspan="6"
attrs="{'invisible': [('type', '!=', 'partner')]}">
<field name="partner_id" colspan="2"
on_change="onchange_partner_id(partner_id)"
attrs="{'required': [('type', '=', 'partner')]}" />
<newline />
<separator string="Partner Contacts"
colspan="4" />
colspan="6" />
<field name="contact_ids" select="1" colspan="4"
nolabel="1" domain="[('partner_id', '=', partner_id)]"
attrs="{'readonly': [('type', '!=', 'partner')]}" />
</group>
<newline />
<separator string="" colspan="6" />
<label string="" colspan="2" />
<group col="4" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="do_invite" string="Invite"
type="object" icon="gtk-ok" />
</group>
</form>
</field>
</record>
@@ -0,0 +1,162 @@
# -*- 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 base_calendar import base_calendar
from osv import fields, osv
from tools.translate import _
import tools
import mx.DateTime
import re
months = {
1: "January", 2: "February", 3: "March", 4: "April", \
5: "May", 6: "June", 7: "July", 8: "August", 9: "September", \
10: "October", 11: "November", 12: "December"
}
class base_calendar_set_exrule(osv.osv_memory):
"""
Set Exrule.
"""
_name = "base.calendar.set.exrule"
_description = "Set Exrule"
_columns = {
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
('hourly', 'Hourly'), \
('daily', 'Daily'), \
('weekly', 'Weekly'), \
('monthly', 'Monthly'), \
('yearly', 'Yearly')], 'Frequency',required=True),
'interval': fields.integer('Interval'),
'count': fields.integer('Count'),
'mo': fields.boolean('Mon'),
'tu': fields.boolean('Tue'),
'we': fields.boolean('Wed'),
'th': fields.boolean('Thu'),
'fr': fields.boolean('Fri'),
'sa': fields.boolean('Sat'),
'su': fields.boolean('Sun'),
'select1': fields.selection([('date', 'Date of month'), \
('day', 'Day of month')], 'Option'),
'day': fields.integer('Date of month'),
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
('WE', 'Wednesday'), ('TH', 'Thursday'), \
('FR', 'Friday'), ('SA', 'Saturday'), \
('SU', 'Sunday')], 'Weekday'),
'byday': fields.selection([('1', 'First'), ('2', 'Second'), \
('3', 'Third'), ('4', 'Fourth'), \
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
'month_list': fields.selection(months.items(),'Month'),
'end_date': fields.date('Repeat Until'),
}
def view_init(self, cr, uid, fields, context=None):
"""
This function checks for precondition before wizard executes
@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 fields: List of fields for default value
@param context: A standard dictionary for contextual values
"""
crm_obj = self.pool.get('crm.meeting')
for meeting in crm_obj.browse(cr, uid, context.get('active_ids', [])):
if not meeting.rrule:
raise osv.except_osv(_("Warning !"), _("Please Apply Recurrency after Apply Exception Rule"))
return False
def compute_exrule_string(self, cr, uid, ids, context=None):
"""
Compute rule string.
@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 datas: dictionary of freq and interval value.
@return: string value which compute FREQILY;INTERVAL
"""
weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
weekstring = ''
monthstring = ''
yearstring = ''
for datas in self.read(cr, uid, ids, context=context):
freq = datas.get('freq')
if freq == 'None':
return ''
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
if freq == 'weekly':
byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
if byday:
weekstring = ';BYDAY=' + ','.join(byday)
elif freq == 'monthly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
if datas.get('select1')=='day':
monthstring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
monthstring = ';BYMONTHDAY=' + str(datas.get('day'))
elif freq == 'yearly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
bymonth = ';BYMONTH=' + str(datas.get('month_list'))
if datas.get('select1')=='day':
bystring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
bystring = ';BYMONTHDAY=' + str(datas.get('day'))
yearstring = bymonth + bystring
if datas.get('end_date'):
datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + '235959Z'
enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\
((datas.get('end_date') and (';UNTIL=' + datas.get('end_date'))) or '')
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,
})
return {}
_defaults = {
'freq': lambda *x: 'None',
'select1': lambda *x: 'date',
'interval': lambda *x: 1,
}
base_calendar_set_exrule()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_base_calendar_set_exrule" model="ir.ui.view">
<field name="name">base.calendar.set.exrule.form</field>
<field name="model">base.calendar.set.exrule</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Set Exrule">
<separator string="Select data for ExRule" colspan="8"/>
<group col="8" colspan="6">
<field name="freq" />
<field name="interval" />
<field name="count" />
<field name="end_date" />
</group>
<group col="8" colspan="8" name="Select weekdays"
attrs="{'invisible' : [('freq','!=','weekly')]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="8" colspan="6"
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date')]}"/>
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day')]}"/>
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day')]}"/>
</group>
<group col="1" colspan="1"
attrs="{'invisible' : [('freq','!=','yearly')]}">
<field name="month_list" string="of"
colspan="1"
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>
</field>
</record>
<record id="action_base_calendar_set_exrule" model="ir.actions.act_window">
<field name="name">Set Exrule</field>
<field name="res_model">base.calendar.set.exrule</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="target">new</field>
</record>
</data>
</openerp>
+33 -21
View File
@@ -19,14 +19,13 @@
#
##############################################################################
import netsvc
from osv import fields, osv
class res_partner_contact(osv.osv):
""" Partner Contact """
_name = "res.partner.contact"
_description = "res.partner.contact"
_description = "Contact"
def _title_get(self,cr, user, context={}):
"""
@@ -116,22 +115,6 @@ res_partner_contact()
class res_partner_address(osv.osv):
def search(self, cr, user, args, offset=0, limit=None, order=None,
context=None, count=False):
""" search parnter address
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param user: the current user
@param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...].
@param offset: The Number of Results to Pass
@param limit: The Number of Results to Return
@param context: A standard dictionary for contextual values
"""
if context and context.has_key('address_partner_id' ) and context['address_partner_id']:
args.append(('partner_id', '=', context['address_partner_id']))
return super(res_partner_address, self).search(cr, user, args, offset, limit, order, context, count)
#overriding of the name_get defined in base in order to remove the old contact name
def name_get(self, cr, user, ids, context={}):
"""
@@ -208,6 +191,8 @@ class res_partner_job(osv.osv):
if arg[2] and not count:
search_arg = ['|', ('first_name', 'ilike', arg[2]), ('name', 'ilike', arg[2])]
contact_ids = contact_obj.search(cr, user, search_arg, offset=offset, limit=limit, order=order, context=context, count=count)
if not contact_ids:
continue
contacts = contact_obj.browse(cr, user, contact_ids, context=context)
for contact in contacts:
job_ids.extend([item.id for item in contact.job_ids])
@@ -224,11 +209,11 @@ class res_partner_job(osv.osv):
_order = 'sequence_contact'
_columns = {
'name': fields.related('address_id','partner_id', type='many2one',\
'name': fields.related('address_id', 'partner_id', type='many2one',\
relation='res.partner', string='Partner', help="You may\
enter Address first,Partner will be linked automatically if any."),
'address_id': fields.many2one('res.partner.address','Address', \
help='Address which is linked to the Partner'),
'address_id': fields.many2one('res.partner.address', 'Address', \
help='Address which is linked to the Partner'), # TO Correct: domain=[('partner_id', '=', name)]
'contact_id': fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'),
'function_id': fields.many2one('res.partner.function','Partner Function', \
help="Function of this contact with this partner"),
@@ -251,7 +236,34 @@ class res_partner_job(osv.osv):
'sequence_contact' : lambda *a: 0,
'state': lambda *a: 'current',
}
def onchange_partner(self, cr, uid, _, partner_id, context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user,
@param _: List of IDs,
@partner_id : ID of the Partner selected,
@param context: A standard dictionary for contextual values
"""
return {'value': {'address_id': False}}
def onchange_address(self, cr, uid, _, address_id, context=None):
"""
@@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user,
@param _: List of IDs,
@address_id : ID of the Address selected,
@param context: A standard dictionary for contextual values
"""
partner_id = False
if address_id:
address = self.pool.get('res.partner.address')\
.browse(cr, uid, address_id, context)
partner_id = address.partner_id.id
return {'value': {'name': partner_id}}
res_partner_job()
+14 -18
View File
@@ -52,7 +52,7 @@
<form string="Functions and Addresses">
<group string="Partner" colspan="2" col="4">
<field name="function_id"/>
<field name="address_id" context="{'address_partner_id': name}"/>
<field name="address_id"/>
<field name="name"/>
<field name="date_start" />
<field name="date_stop" />
@@ -357,23 +357,19 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Contact Functions">
<notebook>
<page string="General">
<field name="name" select="1"/>
<field name="address_id" select="1" context="{'address_partner_id': name}"/>
<field name="contact_id" select="1"/>
<field name="function_id" select="1"/>
<field name="email" widget="email"/>
<field name="phone"/>
<field name="fax"/>
<field name="extension"/>
<field name="sequence_contact" groups="base.group_user"/>
<field name="sequence_partner" groups="base.group_user"/>
<field name="date_start" groups="base.group_user"/>
<field name="date_stop" groups="base.group_user"/>
<field name="state" />
</page>
</notebook>
<field name="name" select="1" on_change="onchange_partner(name)"/>
<field name="address_id" select="1" attrs="{'required': [('name', '!=', False)]}" on_change="onchange_address(address_id)"/>
<field name="contact_id" select="1"/>
<field name="function_id" select="1"/>
<field name="email" widget="email"/>
<field name="phone"/>
<field name="fax"/>
<field name="extension"/>
<field name="sequence_contact" groups="base.group_user"/>
<field name="sequence_partner" groups="base.group_user"/>
<field name="date_start" groups="base.group_user"/>
<field name="date_stop" groups="base.group_user"/>
<field name="state" />
</form>
</field>
</record>
+357
View File
@@ -0,0 +1,357 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:57+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:11+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_contact
#: field:res.partner.job,sequence_contact:0
msgid "Contact Seq."
msgstr "Seq. del contacte"
#. module: base_contact
#: model:ir.model,name:base_contact.model_res_partner_contact
msgid "res.partner.contact"
msgstr ""
#. module: base_contact
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Lo nom de l'objècte deu començar amb x_ e conténer pas de caractèrs "
"especials !"
#. module: base_contact
#: field:res.partner.job,function_id:0
msgid "Partner Function"
msgstr "Foncion del partenari"
#. module: base_contact
#: model:ir.actions.act_window,name:base_contact.action_partner_contact_form
#: model:ir.ui.menu,name:base_contact.menu_partner_contact_form
#: model:process.node,name:base_contact.process_node_contacts0
#: view:res.partner:0
#: view:res.partner.address:0
#: field:res.partner.address,job_ids:0
msgid "Contacts"
msgstr "Contactes"
#. module: base_contact
#: field:res.partner.job,sequence_partner:0
msgid "Partner Seq."
msgstr "Seq. del partenari"
#. module: base_contact
#: selection:res.partner.job,state:0
msgid "Current"
msgstr "Actual"
#. module: base_contact
#: field:res.partner.contact,first_name:0
msgid "First Name"
msgstr "Pichon nom"
#. module: base_contact
#: model:ir.model,name:base_contact.model_res_partner_job
msgid "Contact Partner Function"
msgstr "Foncion del contacte del partenari"
#. module: base_contact
#: field:res.partner.job,other:0
msgid "Other"
msgstr "Autre"
#. module: base_contact
#: model:process.transition,name:base_contact.process_transition_contacttofunction0
msgid "Contact to function"
msgstr "Contacte cap a foncion"
#. module: base_contact
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. module: base_contact
#: model:process.transition,name:base_contact.process_transition_partnertoaddress0
msgid "Partner to address"
msgstr "Partenari cap a adreça"
#. module: base_contact
#: view:res.partner.address:0
msgid "# of Contacts"
msgstr "# de contactes"
#. module: base_contact
#: help:res.partner.job,other:0
msgid "Additional phone field"
msgstr ""
#. module: base_contact
#: model:process.node,name:base_contact.process_node_function0
msgid "Function"
msgstr "Foncion"
#. module: base_contact
#: field:res.partner.job,fax:0
msgid "Fax"
msgstr "Fax"
#. module: base_contact
#: field:res.partner.contact,lang_id:0
msgid "Language"
msgstr "Lenga"
#. module: base_contact
#: field:res.partner.job,phone:0
msgid "Phone"
msgstr "Telefòn"
#. module: base_contact
#: model:process.transition,note:base_contact.process_transition_contacttofunction0
msgid "Defines contacts and functions."
msgstr "Definir los contactes e lors foncions"
#. module: base_contact
#: field:res.partner.contact,title:0
msgid "Title"
msgstr "Títol"
#. module: base_contact
#: view:res.partner.job:0
msgid "Contact Functions"
msgstr "Foncions del contacte"
#. module: base_contact
#: model:ir.module.module,shortdesc:base_contact.module_meta_information
msgid "Base Contact"
msgstr "Basa Contacte"
#. module: base_contact
#: help:res.partner.job,sequence_partner:0
msgid ""
"Order of importance of this job title in the list of job title of the linked "
"partner"
msgstr ""
#. module: base_contact
#: field:res.partner.contact,email:0
#: field:res.partner.job,email:0
msgid "E-Mail"
msgstr "Corrièr electronic"
#. module: base_contact
#: field:res.partner.job,date_stop:0
msgid "Date Stop"
msgstr "Data de fin d'emplec"
#. module: base_contact
#: view:res.partner:0
#: field:res.partner.job,address_id:0
msgid "Address"
msgstr "Adreça"
#. module: base_contact
#: model:ir.actions.act_window,name:base_contact.action_res_partner_job
#: model:ir.ui.menu,name:base_contact.menu_action_res_partner_job
msgid "Contact's Jobs"
msgstr "Foncions dels contactes"
#. module: base_contact
#: field:res.partner.contact,country_id:0
msgid "Nationality"
msgstr "Nacionalitat"
#. module: base_contact
#: help:res.partner.job,sequence_contact:0
msgid ""
"Order of importance of this address in the list of addresses of the linked "
"contact"
msgstr ""
#. module: base_contact
#: field:res.partner.address,job_id:0
#: field:res.partner.contact,job_id:0
msgid "Main Job"
msgstr "Emplec principal"
#. module: base_contact
#: view:res.partner:0
msgid "Categories"
msgstr "Categorias"
#. module: base_contact
#: field:res.partner.contact,function_id:0
msgid "Main Function"
msgstr "Foncion principala"
#. module: base_contact
#: model:process.transition,note:base_contact.process_transition_partnertoaddress0
msgid "Define partners and their addresses."
msgstr ""
#. module: base_contact
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: base_contact
#: model:process.process,name:base_contact.process_process_basecontactprocess0
msgid "Base Contact Process"
msgstr "Tractar los contactes de basa"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Seq."
msgstr "Seq."
#. module: base_contact
#: field:res.partner.job,extension:0
msgid "Extension"
msgstr "Extension"
#. module: base_contact
#: field:res.partner.contact,mobile:0
msgid "Mobile"
msgstr "Telefonet"
#. module: base_contact
#: help:res.partner.job,extension:0
msgid "Internal/External extension phone number"
msgstr ""
#. module: base_contact
#: model:process.node,note:base_contact.process_node_contacts0
msgid "People you work with."
msgstr ""
#. module: base_contact
#: view:res.partner.contact:0
msgid "Extra Information"
msgstr "Informacion suplementària"
#. module: base_contact
#: view:res.partner.contact:0
#: field:res.partner.contact,job_ids:0
msgid "Functions and Addresses"
msgstr "Foncions e adreças"
#. module: base_contact
#: field:res.partner.contact,active:0
msgid "Active"
msgstr "Actiu"
#. module: base_contact
#: field:res.partner.job,contact_id:0
msgid "Contact"
msgstr "Contacte"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_partners0
msgid "Companies you work with."
msgstr ""
#. module: base_contact
#: field:res.partner.contact,partner_id:0
msgid "Main Employer"
msgstr "Emplegaire principal"
#. module: base_contact
#: model:process.transition,name:base_contact.process_transition_functiontoaddress0
msgid "Function to address"
msgstr "Foncion cap a adreça"
#. module: base_contact
#: model:ir.actions.act_window,name:base_contact.act_res_partner_jobs
msgid "Partner Contacts"
msgstr "Contactes del partenari"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Partner Contact"
msgstr "Contacte del partenari"
#. module: base_contact
#: model:process.node,name:base_contact.process_node_partners0
msgid "Partners"
msgstr "Partenaris"
#. module: base_contact
#: model:process.node,name:base_contact.process_node_addresses0
#: view:res.partner:0
msgid "Addresses"
msgstr "Adreças"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_addresses0
msgid "Working and private addresses."
msgstr ""
#. module: base_contact
#: field:res.partner.contact,name:0
msgid "Last Name"
msgstr "Nom d'ostal"
#. module: base_contact
#: field:res.partner.job,state:0
msgid "State"
msgstr "Estat"
#. module: base_contact
#: view:res.partner.contact:0
#: view:res.partner.job:0
msgid "General"
msgstr "General"
#. module: base_contact
#: selection:res.partner.job,state:0
msgid "Past"
msgstr ""
#. module: base_contact
#: view:res.partner.contact:0
msgid "General Information"
msgstr "Informacions generalas"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_function0
msgid "Jobs at a same partner address."
msgstr ""
#. module: base_contact
#: field:res.partner.job,name:0
msgid "Partner"
msgstr "Partenari"
#. module: base_contact
#: field:res.partner.job,date_start:0
msgid "Date Start"
msgstr "Data de començament"
#. module: base_contact
#: model:process.transition,note:base_contact.process_transition_functiontoaddress0
msgid "Define functions and address."
msgstr ""
#. module: base_contact
#: field:res.partner.contact,website:0
msgid "Website"
msgstr "Site web"
#. module: base_contact
#: field:res.partner.contact,birthdate:0
msgid "Birth Date"
msgstr "Data de naissença"
+11
View File
@@ -42,6 +42,17 @@
</field>
</field>
</record>
<record id="view_partner_iban_list" model="ir.ui.view">
<field name="name">res.partner.form.iban.inherit.list</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='bank_ids']/tree/field[@name='acc_number']" position="after">
<field name="iban"/>
</xpath>
</field>
</record>
</data>
</openerp>
+64
View File
@@ -0,0 +1,64 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:28+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:11+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_iban
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_zip_field
msgid "zip"
msgstr "zip"
#. module: base_iban
#: help:res.partner.bank,iban:0
msgid "International Bank Account Number"
msgstr "Numèro Internacional de Compte Bancari"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_country_field
msgid "country_id"
msgstr "country_id"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_swift_field
msgid "bic"
msgstr "bic"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_iban_field
msgid "iban"
msgstr "iban"
#. module: base_iban
#: model:ir.module.module,shortdesc:base_iban.module_meta_information
#: field:res.partner.bank,iban:0
msgid "IBAN"
msgstr "IBAN"
#. module: base_iban
#: model:res.partner.bank.type,name:base_iban.bank_iban
msgid "IBAN Account"
msgstr "N° IBAN del compte"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_acc_number_field
msgid "acc_number"
msgstr "acc_number"
+155
View File
@@ -0,0 +1,155 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:33+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,info,category:0
msgid "Category"
msgstr "Categoria"
#. module: base_module_merge
#: wizard_view:base_module_merge.module_merge,save:0
msgid "Information"
msgstr "Informacion"
#. module: base_module_merge
#: wizard_view:base_module_merge.module_merge,init:0
msgid "Module Merging"
msgstr ""
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,info,author:0
msgid "Author"
msgstr "Autor"
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,info,directory_name:0
msgid "Directory Name"
msgstr "Nom del dorsièr"
#. module: base_module_merge
#: selection:base_module_merge.module_merge,info,data_kind:0
msgid "Demo Data"
msgstr "Donadas de demo"
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,save,module_filename:0
msgid "Filename"
msgstr "Nom del fichièr"
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,info,version:0
msgid "Version"
msgstr "Version"
#. module: base_module_merge
#: wizard_view:base_module_merge.module_merge,info:0
#: wizard_view:base_module_merge.module_merge,save:0
msgid "Module Recording"
msgstr "Modul d'Enregistrament"
#. module: base_module_merge
#: wizard_view:base_module_merge.module_merge,save:0
msgid "Thanks in advance for your contribution."
msgstr ""
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,info,description:0
msgid "Full Description"
msgstr "Descripcion completa"
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,info,name:0
msgid "Module Name"
msgstr "Nom de modul"
#. module: base_module_merge
#: model:ir.actions.wizard,name:base_module_merge.wizard_base_module_merger
#: model:ir.ui.menu,name:base_module_merge.menu_wizard_base_module_merger
msgid "Merge module"
msgstr ""
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,save,module_file:0
msgid "Module .zip File"
msgstr "Fichièr zip del Modul"
#. module: base_module_merge
#: model:ir.module.module,shortdesc:base_module_merge.module_meta_information
msgid "Module Merger"
msgstr ""
#. module: base_module_merge
#: wizard_view:base_module_merge.module_merge,save:0
msgid "Module successfully created !"
msgstr "Modul creat amb succès !"
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,info,website:0
msgid "Documentation URL"
msgstr ""
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,init,modules_list:0
msgid "Modules"
msgstr "Moduls"
#. module: base_module_merge
#: wizard_button:base_module_merge.module_merge,info,save:0
#: wizard_button:base_module_merge.module_merge,init,info:0
msgid "Continue"
msgstr "Contunhar"
#. module: base_module_merge
#: selection:base_module_merge.module_merge,info,data_kind:0
msgid "Normal Data"
msgstr ""
#. module: base_module_merge
#: wizard_view:base_module_merge.module_merge,save:0
msgid ""
"If you think your module could interrest others people, we'd like you to "
"publish it on OpenERP.com, in the 'Modules' section. You can do it through "
"the website or using features of the 'base_module_publish' module."
msgstr ""
#. module: base_module_merge
#: help:base_module_merge.module_merge,init,modules_list:0
msgid "Select Modules which you want to merge in single module"
msgstr ""
#. module: base_module_merge
#: wizard_field:base_module_merge.module_merge,info,data_kind:0
msgid "Type of Data"
msgstr "Tipe de Donada"
#. module: base_module_merge
#: wizard_view:base_module_merge.module_merge,info:0
msgid "Module Information"
msgstr "Informacion sul Modul"
#. module: base_module_merge
#: wizard_button:base_module_merge.module_merge,info,end:0
#: wizard_button:base_module_merge.module_merge,init,end:0
msgid "Cancel"
msgstr "Anullar"
#. module: base_module_merge
#: wizard_button:base_module_merge.module_merge,save,end:0
msgid "Close"
msgstr "Tampar"
@@ -19,12 +19,28 @@
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import pooler
from base_module_quality import base_module_quality
class CounterCursor(object):
def __init__(self, real_cursor):
self.cr = real_cursor
self.count = 0
def reset(self):
self.count = 0
def execute(self, query, params=None):
if query.lower().startswith('select '):
self.count += 1
return self.cr.execute(query, params)
def __getattr__(self, attr):
return getattr(self.cr, attr)
class quality_test(base_module_quality.abstract_quality_check):
def __init__(self):
@@ -63,6 +79,7 @@ This test checks the speed of the module. Note that at least 5 demo data is need
result_dict = {}
result_dict2 = {}
self.result_details += _("<html>O(1) means that the number of SQL requests to read the object does not depand on the number of objects we are reading. This feature is hardly wished.\n</html>")
ccr = CounterCursor(cr)
for obj, ids in obj_ids.items():
code_base_complexity = 0
code_half_complexity = 0
@@ -73,22 +90,22 @@ This test checks the speed of the module. Note that at least 5 demo data is need
list2 = []
if size:
speed_list = []
#we perform the operation twice, and count the number of queries in the second run. This allows to avoid the cache effect. (like translated terms that asks for more queries)
try:
pool.get(obj).read(cr, uid, [ids[0]])
cnt = cr.count
pool.get(obj).read(cr, uid, [ids[0]])
code_base_complexity = cr.count - cnt
pool.get(obj).read(cr, uid, ids[:size/2])
cnt = cr.count
pool.get(obj).read(cr, uid, ids[:size/2])
code_half_complexity = cr.count - cnt
# perform the operation once to put data in cache
pool.get(obj).read(cr, uid, ids)
cnt = cr.count
pool.get(obj).read(cr, uid, ids)
code_size_complexity = cr.count - cnt
ccr.reset()
pool.get(obj).read(ccr, uid, [ids[0]])
code_base_complexity = ccr.count
ccr.reset()
pool.get(obj).read(ccr, uid, ids[:size/2])
code_half_complexity = ccr.count
ccr.reset()
pool.get(obj).read(ccr, uid, ids)
code_size_complexity = ccr.count
except Exception, e:
list2 = [obj, _("Error in Read method")]
speed_list = [obj, size, code_base_complexity, code_half_complexity, code_size_complexity, _("Error in Read method:" + str(e))]
@@ -35,7 +35,7 @@ class report_creator(osv.osv):
#
def export_data(self, cr, uid, ids, fields_to_export, context=None):
if not context:
if context is None:
context = {}
data_l = self.read(cr, uid, ids, ['sql_query'], context)
final_datas = []
@@ -61,7 +61,7 @@ class report_creator(osv.osv):
@param Fields: List of field of customer reports form.
@return: Dictionary of Fields
"""
if not context:
if context is None:
context = {}
data = context and context.get('report_id', False) or False
@@ -95,7 +95,7 @@ class report_creator(osv.osv):
@param user: the current user’s ID for security checks,
@return: Dictionary of Fields, arch and toolbar.
"""
if not context:
if context is None:
context = {}
data = context and context.get('report_id', False) or False
@@ -116,9 +116,11 @@ class report_creator(osv.osv):
arch = '<?xml version="1.0" encoding="utf-8"?>\n'
if view_type == 'graph':
arch += '<graph string="%s" type="%s" orientation="%s">' % (report.name, report.view_graph_type, report.view_graph_orientation)
orientation_eval = {'horz':'horizontal','vert' :'vertical'}
orientation = eval(report.view_graph_orientation,orientation_eval)
arch +='<graph string="%s" type="%s" orientation="%s">' % (report.name, report.view_graph_type, orientation)
i = 0
for val in ('x','y'):
i = 0
for f in report.field_ids:
if f.graph_mode == val:
if f.field_id.model:
@@ -191,7 +193,9 @@ class report_creator(osv.osv):
@param fields: List of fields.
@return: List of Dictionary of form [{‘name_of_the_field’: value, ...}, ...]
"""
data = context and context.get('report_id', False) or False
if context is None:
context = {}
data = context.get('report_id', False)
if (not context) or 'report_id' not in context:
return super(report_creator, self).read(cr, user, ids, fields, context, load)
ctx = context or {}
@@ -225,8 +229,9 @@ class report_creator(osv.osv):
@param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...].
@return: List of id
"""
context_id = context and context.get('report_id', False) or False
if context is None:
context = {}
context_id = context.get('report_id', False)
if (not context) or 'report_id' not in context:
return super(report_creator, self).search(cr, user, args, offset, limit, order, context, count)
@@ -372,9 +377,10 @@ class report_creator(osv.osv):
t = self.pool.get(f.field_id.model_id.model)._table
if f.group_method == 'group':
fields.append('\t'+t+'.'+f.field_id.name+' as field'+str(i))
groupby.append(t+'.'+f.field_id.name)
else:
fields.append('\t'+f.group_method+'('+t+'.'+f.field_id.name+')'+' as field'+str(i))
groupby.append(t+'.'+f.field_id.name)
i += 1
models = self._path_get(cr, uid, obj.model_ids, obj.filter_ids)
check = self._id_get(cr, uid, ids[0], context)
@@ -309,27 +309,32 @@ class PyOpenOffice(object):
return new_c
def sxw2rml(sxw_file, xsl, output='.', save_pict=False):
import libxslt
import libxml2
from lxml import etree
from StringIO import StringIO
tool = PyOpenOffice(output, save_pict = save_pict)
res = tool.unpackNormalize(sxw_file)
styledoc = libxml2.parseDoc(xsl)
style = libxslt.parseStylesheetDoc(styledoc)
doc = libxml2.parseMemory(res,len(res))
result = style.applyStylesheet(doc, None)
root = result.xpathEval("/document/stylesheet")
f = StringIO(xsl)
styledoc = etree.parse(f)
style = etree.XSLT(styledoc)
f = StringIO(res)
doc = etree.parse(f)
result = style(doc)
root = etree.XPathEvaluator(result)("/document/stylesheet")
if root:
root=root[0]
images = libxml2.newNode("images")
images = etree.Element("images")
for img in tool.images:
node = libxml2.newNode('image')
node.setProp('name', img)
node.setContent( base64.encodestring(tool.images[img]))
images.addChild(node)
root.addNextSibling(images)
node = etree.Element('image', name=img)
node.text = base64.encodestring(tool.images[img])
images.append(node)
root.append(images)
try:
xml = style.saveResultToString(result)
xml = str(result)
return xml
except:
return result
@@ -349,7 +354,7 @@ if __name__ == "__main__":
import StringIO
fname = sys.argv[1]
f = StringIO.StringIO(file(fname).read())
f = fname
xsl_file = 'normalized_oo2rml.xsl'
z = zipfile.ZipFile(fname,"r")
mimetype = z.read('mimetype')
+16 -11
View File
@@ -74,21 +74,26 @@ class base_gtkcontactform(osv.osv_memory):
'contact_me':fields.boolean('Contact Me'),
}
def execute(self, cr, uid, ids, context=None):
company_id = self.pool.get('base.setup.company').search(cr, uid, [])
company_data = self.pool.get('base.setup.company').read(cr, uid, company_id)
company_data = company_data and company_data[0] or False
if context is None:
context = {}
company_id = self.pool.get('base.setup.company').search(cr, uid, [], context=context)
company_data = self.pool.get('base.setup.company').read(cr, uid, company_id, context=context)
company_data = company_data and company_data[0] or {}
country = ''
if company_data and company_data.get('country_id', False):
country = self.pool.get('res.country').read(cr, uid, company_data['country_id'],['name'])['name']
for res in self.read(cr, uid, ids):
if company_data.get('country_id', False):
country = self.pool.get('res.country').read(cr, uid, company_data['country_id'],['name'], context=context)['name']
for res in self.read(cr, uid, ids, context=context):
email = res.get('email','')
result = "\ncompany: "+ str(company_data.get('name',''))
result += "\nname: " + str(res.get('name',''))
result += "\njob: " + str(res.get('job',''))
result = "\ncompany: "+ tools.ustr(company_data.get('name',''))
result += "\nname: " + tools.ustr(res.get('name',''))
result += "\njob: " + tools.ustr(res.get('job',''))
result += "\nphone: " + str(res.get('phone',''))
result += "\ncity: " + str(company_data.get('city',''))
result += "\ncity: " + tools.ustr(company_data.get('city',''))
result += "\ncountry: " + str(country)
result += "\nindustry: " + str(res.get('industry', ''))
result += "\nindustry: " + tools.ustr(res.get('industry', ''))
result += "\ntotal_employees: " + str(res.get('total_employees', ''))
result += "\nplan_use: " + str(res.get('use_openerp', False))
result += "\nalready_using_openerp: " + str(res.get('already_using_openerp', False))
+277
View File
@@ -0,0 +1,277 @@
# Thai 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-20 04:32+0000\n"
"Last-Translator: Songpon Phusing <p.songpon@gmail.com>\n"
"Language-Team: Thai <th@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-05-21 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,city:0
#: wizard_field:base_setup.base_setup,init,city:0
#: wizard_field:base_setup.base_setup,update,city:0
msgid "City"
msgstr "อำเภอ"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid ""
"You can start configuring the system or connect directly to the database "
"using the default setup."
msgstr "คุณอาจจะเริ่มตั้งค่าหรือใช้ค่าพื้นฐานเบื้องต้น"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,zip:0
#: wizard_field:base_setup.base_setup,init,zip:0
#: wizard_field:base_setup.base_setup,update,zip:0
msgid "Zip code"
msgstr "รหัสไปรษณีย์"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid "Select a Profile"
msgstr "เลือกแบบ"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Report header"
msgstr "หัวรายงาน"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,config:0
msgid "Start Configuration"
msgstr "เริ่มการตั้งค่า"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid ""
"You'll be able to install more modules later through the Administration menu."
msgstr "คุณสามารถลงโมดูลใหม่ๆได้ในเมนูการบริหารระบบ"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid ""
"A profile sets a pre-selection of modules for specific needs. These profiles "
"have been setup to help you discover the different aspects of OpenERP. This "
"is just an overview, we have 300+ available modules."
msgstr ""
"รูปแบบโมดูลเป็นเพียงการตั้งค่าแนะนำในการใช้งานเพื่อตั้งค่าได้ง่ายขึ้น "
"แต่เรามีโมดูลที่สามารถหาติดตั้งได้มากกว่า 500 โมดูล"
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,update:0
#: wizard_button:base_setup.base_setup,init,company:0
msgid "Next"
msgstr "ถัดไป"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,email:0
#: wizard_field:base_setup.base_setup,init,email:0
#: wizard_field:base_setup.base_setup,update,email:0
msgid "E-mail"
msgstr "อีเมล์"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,state_id:0
#: wizard_field:base_setup.base_setup,init,state_id:0
#: wizard_field:base_setup.base_setup,update,state_id:0
msgid "State"
msgstr "จังหวัด"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "Your new database is now fully installed."
msgstr "ฐานข้อมูลใหม่ตั้งตั้งเสร็จสิ้น"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,profile:0
#: wizard_field:base_setup.base_setup,init,profile:0
#: wizard_field:base_setup.base_setup,update,profile:0
msgid "Profile"
msgstr "รูปแบบ"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_footer1:0
#: wizard_field:base_setup.base_setup,init,rml_footer1:0
#: wizard_field:base_setup.base_setup,update,rml_footer1:0
msgid "Report Footer 1"
msgstr "หัวรายงาน 1"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_footer2:0
#: wizard_field:base_setup.base_setup,init,rml_footer2:0
#: wizard_field:base_setup.base_setup,update,rml_footer2:0
msgid "Report Footer 2"
msgstr "ท้ายรายงาน 2"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "General Information"
msgstr "ข้อมูลทั่วไป"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,street2:0
#: wizard_field:base_setup.base_setup,init,street2:0
#: wizard_field:base_setup.base_setup,update,street2:0
msgid "Street2"
msgstr "ตำบล"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Report Information"
msgstr "ข้อมูลรายงาน"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,phone:0
#: wizard_field:base_setup.base_setup,init,phone:0
#: wizard_field:base_setup.base_setup,update,phone:0
msgid "Phone"
msgstr "โทรศัพท์"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Define Main Company"
msgstr "ตั้งบริษัทหลัก"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,name:0
#: wizard_field:base_setup.base_setup,init,name:0
#: wizard_field:base_setup.base_setup,update,name:0
msgid "Company Name"
msgstr "ชื่อบริษัท"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_footer2:0
#: help:base_setup.base_setup,init,rml_footer2:0
#: help:base_setup.base_setup,update,rml_footer2:0
msgid ""
"This sentence will appear at the bottom of your reports.\n"
"We suggest you to put bank information here:\n"
"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
msgstr ""
"ข้อมูลนี่จะอยู่ในท้ายกระดาษของรายงาน\n"
"เราแนะนำให้เปลี่ยนโดยใส่ข้อมูลของธนาคาร\n"
"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,country_id:0
#: wizard_field:base_setup.base_setup,init,country_id:0
#: wizard_field:base_setup.base_setup,update,country_id:0
msgid "Country"
msgstr "ประเทศ"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
#: wizard_view:base_setup.base_setup,finish:0
#: wizard_view:base_setup.base_setup,init:0
#: wizard_view:base_setup.base_setup,update:0
#: model:ir.actions.wizard,name:base_setup.action_wizard_setup
#: model:ir.actions.wizard,name:base_setup.wizard_base_setup
msgid "Setup"
msgstr "ตั้งค่า"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_footer1:0
#: help:base_setup.base_setup,init,rml_footer1:0
#: help:base_setup.base_setup,update,rml_footer1:0
msgid ""
"This sentence will appear at the bottom of your reports.\n"
"We suggest you to write legal sentences here:\n"
"Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07"
msgstr ""
"ข้อมูลนี่จะอยู่ในท้ายกระดาษของรายงาน\n"
"เราแนะนำให้ท่านนำข้อมูลเกี่ยวกับทางกฏหมาย\n"
"Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07"
#. module: base_setup
#: wizard_view:base_setup.base_setup,update:0
msgid "Summary"
msgstr "สรุป"
#. module: base_setup
#: wizard_button:base_setup.base_setup,update,finish:0
msgid "Install"
msgstr "ติดตั้ง"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "Installation Done"
msgstr "ติดตั้งเสร็จสิ้น"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_header1:0
#: help:base_setup.base_setup,init,rml_header1:0
#: help:base_setup.base_setup,update,rml_header1:0
msgid ""
"This sentence will appear at the top right corner of your reports.\n"
"We suggest you to put a slogan here:\n"
"\"Open Source Business Solutions\"."
msgstr ""
"ข้อมูลนี่จะอยู่ในด้านบนขวาของรายงานท่าน\n"
"กรุณาใส่ สโลแกน\n"
"\"Open Source Business Solutions\"."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_header1:0
#: wizard_field:base_setup.base_setup,init,rml_header1:0
#: wizard_field:base_setup.base_setup,update,rml_header1:0
msgid "Report Header"
msgstr "หัวรายงาน"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Your Logo - Use a size of about 450x150 pixels."
msgstr "กรุณาใช้โลโก้ขนาด 450X150 px"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,currency:0
#: wizard_field:base_setup.base_setup,init,currency:0
#: wizard_field:base_setup.base_setup,update,currency:0
msgid "Currency"
msgstr "อัตราแลกเปลี่ยน"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,street:0
#: wizard_field:base_setup.base_setup,init,street:0
#: wizard_field:base_setup.base_setup,update,street:0
msgid "Street"
msgstr "ที่อยู่"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,menu:0
msgid "Use Directly"
msgstr "ใช้ทันที"
#. module: base_setup
#: wizard_button:base_setup.base_setup,init,menu:0
msgid "Cancel"
msgstr "ยกเลิก"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,logo:0
#: wizard_field:base_setup.base_setup,init,logo:0
#: wizard_field:base_setup.base_setup,update,logo:0
msgid "Logo"
msgstr "โลโก้"
#. module: base_setup
#: model:ir.module.module,shortdesc:base_setup.module_meta_information
msgid "Base Setup"
msgstr "โครงสร้าง ตั้งค่า"
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,init:0
#: wizard_button:base_setup.base_setup,update,company:0
msgid "Previous"
msgstr "ก่อนหน้า"
+18
View File
@@ -152,5 +152,23 @@ IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701'''),
context=context)
base_setup_company()
class res_currency(osv.osv):
_inherit = 'res.currency'
def name_get(self, cr, uid, ids, context=None):
if context is None:
context = {}
# We can use the following line,if we want to restrict this name_get for company setup only
# But, its better to show currencies as name(Code).
# if not (context.get('active_model','') == 'ir.actions.todo'):
# return super(res_currency,self).name_get(cr, uid, ids, context=context)
if not len(ids):
return []
if isinstance(ids, (int, long)):
ids = [ids]
reads = self.read(cr, uid, ids, ['name','code'], context, load='_classic_write')
return [(x['id'], tools.ustr(x['name']) + ' (' + tools.ustr(x['code']) + ')') for x in reads]
res_currency()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+4 -4
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 15:20+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-19 09:15+0000\n"
"Last-Translator: Rytis Ūsalis <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 03:57+0000\n"
"X-Launchpad-Export-Date: 2010-05-20 05:23+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_association
@@ -40,7 +40,7 @@ msgstr ""
#. module: board_association
#: view:board.board:0
msgid "My tasks"
msgstr ""
msgstr "Mano užduotys"
#. module: board_association
#: view:board.board:0
+90
View File
@@ -0,0 +1,90 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 09:06+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_document
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: board_document
#: view:board.board:0
msgid "New Files"
msgstr "Fichièrs novèls"
#. 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 "Paret de la Vergonha"
#. module: board_document
#: view:board.board:0
msgid "File Size by Month"
msgstr "Talha dels Fichièrs per Mes"
#. module: board_document
#: view:board.board:0
msgid "Files by Month"
msgstr "Fichièrs per Mes"
#. 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 "Fichièrs per Tipe de Ressorsa"
#. module: board_document
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. 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 "Fichièrs per Partenari"
#. module: board_document
#: model:ir.ui.menu,name:board_document.menu_board_document
msgid "Document"
msgstr "Document"
#. module: board_document
#: view:board.board:0
msgid "Files by Users"
msgstr "Fichièrs per Utilizaire"
#. module: board_document
#: view:board.board:0
msgid "Document board"
msgstr "Tablèu dels Documents"
+1 -1
View File
@@ -11,7 +11,7 @@
<field name="name">My Expenses</field>
<field name="res_model">hr.expense.expense</field>
<field name="view_type">form</field>
<field name="domain">[('state','=','draft'),('user_id','=',uid)]</field>
<field name="domain">[('state','in',('draft', 'confirm')),('user_id','=',uid)]</field>
<field name="view_id" ref="hr_expense.view_editable_expenses_tree"/>
</record>
+74
View File
@@ -0,0 +1,74 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 09:03+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:11+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_manufacturing
#: view:board.board:0
msgid "Procurement in Exception"
msgstr "Aprovisionament en excepcion"
#. module: board_manufacturing
#: view:board.board:0
msgid "Next production orders"
msgstr "Òrdre de fabricacion seguent"
#. module: board_manufacturing
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: board_manufacturing
#: view:board.board:0
msgid "Deliveries (Out packing)"
msgstr "Liurasons"
#. module: board_manufacturing
#: view:board.board:0
msgid "Manufacturing board"
msgstr "Tablèu de bòrd de produccion"
#. module: board_manufacturing
#: model:ir.ui.menu,name:board_manufacturing.next_id_87
msgid "Production"
msgstr "Produccion"
#. module: board_manufacturing
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. module: board_manufacturing
#: model:ir.actions.act_window,name:board_manufacturing.open_board_manufacturing
#: model:ir.ui.menu,name:board_manufacturing.menu_board_manufacturing
msgid "Production Dashboard"
msgstr "Tablèu de bòrd de produccion"
#. module: board_manufacturing
#: model:ir.module.module,shortdesc:board_manufacturing.module_meta_information
msgid "Board for manufacturing"
msgstr "Tablèu per la produccion"
#. module: board_manufacturing
#: view:board.board:0
msgid "Stock value variation"
msgstr "Variacion de la valor de l'emmagazinatge"
#. module: board_manufacturing
#: view:board.board:0
msgid "Workcenter futur load"
msgstr ""
+8 -8
View File
@@ -7,19 +7,19 @@ 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-21 15:58+0000\n"
"Last-Translator: Andrzej MoST (Marcin Ostajewski) <Unknown>\n"
"PO-Revision-Date: 2010-05-23 20:02+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:00+0000\n"
"X-Launchpad-Export-Date: 2010-05-24 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_manufacturing
#: view:board.board:0
msgid "Procurement in Exception"
msgstr ""
msgstr "Niepoprawne nabycia"
#. module: board_manufacturing
#: view:board.board:0
@@ -34,7 +34,7 @@ msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
#. module: board_manufacturing
#: view:board.board:0
msgid "Deliveries (Out packing)"
msgstr ""
msgstr "Dostawy do klientów"
#. module: board_manufacturing
#: view:board.board:0
@@ -49,7 +49,7 @@ msgstr "Produkcja"
#. module: board_manufacturing
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: board_manufacturing
#: model:ir.actions.act_window,name:board_manufacturing.open_board_manufacturing
@@ -65,9 +65,9 @@ msgstr "Konsola dla produkcji"
#. module: board_manufacturing
#: view:board.board:0
msgid "Stock value variation"
msgstr ""
msgstr "Zmiany wartości zapasów"
#. module: board_manufacturing
#: view:board.board:0
msgid "Workcenter futur load"
msgstr "Przyszłe obiciążenie centrum roboczego"
msgstr "Obciążenie centrów roboczych"
@@ -7,24 +7,72 @@
<field name="res_model">project.issue</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('create_date', '&gt;=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '&lt;=', time.strftime('%Y-%m-%d 23:59:59'))]</field>
<field name="domain">[('user_id','=',uid),('state','in',['draft','open'])]</field>
<field name="view_id" ref="project_issue.project_issue_tree_view"/>
</record>
<record id="action_view_pending_project_issue_tree" model="ir.actions.act_window">
<field name="name">Project issues</field>
<field name="res_model">project.issue</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('user_id','=',uid),('state','=','pending')]</field>
<field name="view_id" ref="project_issue.project_issue_tree_view"/>
</record>
<record id="action_project_issue_graph_state" model="ir.actions.act_window">
<field name="name">Project Issue</field>
<field name="res_model">project.issue.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="view_id" ref="project_issue.view_project_issue_report_graph"/>
</record>
<record id="view_project_issue_graph_stage" model="ir.ui.view">
<field name="name">project.issue.report.graph</field>
<field name="model">project.issue.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph orientation="vertical" string="Project Issue" type="bar">
<field name="stage_id"/>
<field name="nbr" operator="+"/>
<field group="True" name="user_id"/>
</graph>
</field>
</record>
<record id="action_project_issue_graph_stage" model="ir.actions.act_window">
<field name="name">Project Issue</field>
<field name="res_model">project.issue.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="view_id" ref="view_project_issue_graph_stage"/>
</record>
<record id="board_project_issue_form" model="ir.ui.view">
<field name="name">board.project.issue.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project Issue Board">
<vpaned>
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(action_view_current_project_issue_tree)d" string="Current Project Issues" width="510"/>
<action colspan="4" name="%(action_view_current_project_issue_tree)d" string="Current Issues" width="510"/>
<action colspan="4" name="%(action_view_pending_project_issue_tree)d" string="Pending Issues" width="510"/>
</child1>
<child2>
<action colspan="4" height="220" name="%(project.action_task_by_days_graph)d" string="Project Tasks By Days" width="510"/>
<vpaned>
<child1>
<action colspan="4" name="%(action_project_issue_graph_state)d" string="Issues By State" />
</child1>
<child2>
<action colspan="4" name="%(action_project_issue_graph_stage)d" string="Issues By Stage" />
</child2>
</vpaned>
</child2>
</vpaned>
</hpaned>
</form>
</field>
</record>
+140
View File
@@ -0,0 +1,140 @@
# Occitan (post 1500) 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 09:08+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-05-19 05:11+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_project
#: view:board.board:0
msgid "My project's planning"
msgstr "Mon planning de projèctes"
#. module: board_project
#: view:hr_timesheet_sheet.sheet:0
#: model:ir.actions.act_window,name:board_project.act_hr_timesheet_sheet
msgid "Timesheets"
msgstr "Fuèlh de preséncia"
#. module: board_project
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. module: board_project
#: view:board.board:0
#: model:ir.actions.act_window,name:board_project.act_my_project
msgid "My projects"
msgstr "Mos projèctes"
#. module: board_project
#: model:ir.actions.act_window,name:board_project.action_view_task_tree_deadline
msgid "My Task's Deadlines"
msgstr "Las Datas Limitas de mos Prètzfaches"
#. module: board_project
#: view:project.task:0
msgid "My Tasks"
msgstr "Mos prètzfaches"
#. module: board_project
#: view:board.board:0
#: model:ir.actions.act_window,name:board_project.action_view_board_note_tree
msgid "Public Notes"
msgstr "Nòtas publicas"
#. 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 "Tablèu de bòrd de projècte"
#. 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 "Mos comptes de facturar"
#. 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 "Tablèu de bòrd de gestion de projècte"
#. module: board_project
#: view:board.board:0
msgid "My Deadlines"
msgstr "Mas datas limitas"
#. module: board_project
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: board_project
#: view:board.board:0
msgid "User's timesheets"
msgstr "Fuèlh de preséncia de l'utilizaire"
#. module: board_project
#: model:ir.ui.menu,name:board_project.next_id_86
msgid "Project"
msgstr "Projècte"
#. module: board_project
#: view:board.board:0
msgid "Project manager board"
msgstr "Tablèu del responsable del projècte"
#. module: board_project
#: view:board.board:0
#: model:ir.actions.act_window,name:board_project.action_view_task_tree
msgid "My Open Tasks"
msgstr "Mos prètzfaches dobèrts"
#. module: board_project
#: view:board.board:0
msgid "My Board"
msgstr "Mon Tablèu"
#. module: board_project
#: view:board.board:0
msgid "My tasks board"
msgstr "Mon tablèu de prètzfaches"
#. module: board_project
#: view:board.board:0
msgid "My user's pipeline"
msgstr ""
#. module: board_project
#: view:board.board:0
msgid "My Timesheet"
msgstr "Mon Fuèlh de preséncia"

Some files were not shown because too many files have changed in this diff Show More