bzr revid: uco@tinyerp.com-20100726045014-visykrnftlghnjmb
This commit is contained in:
uco (Open ERP)
2010-07-26 10:20:14 +05:30
267 changed files with 17171 additions and 8453 deletions
+92 -75
View File
@@ -248,59 +248,59 @@ class account_account(osv.osv):
def __compute(self, cr, uid, ids, field_names, arg=None, context=None,
query='', query_params=()):
""" compute the balance, debit and/or credit for the provided
account ids
Arguments:
`ids`: account ids
`field_names`: the fields to compute (a list of any of
'balance', 'debit' and 'credit')
`arg`: unused fields.function stuff
`query`: additional query filter (as a string)
`query_params`: parameters for the provided query string
(__compute will handle their escaping) as a
tuple
"""
mapping = {
'balance': "COALESCE(SUM(l.debit),0) " \
"- COALESCE(SUM(l.credit), 0) as balance",
'debit': "COALESCE(SUM(l.debit), 0) as debit",
'credit': "COALESCE(SUM(l.credit), 0) as credit"
}
#get all the necessary accounts
children_and_consolidated = self._get_children_and_consol(cr, uid, ids, context=context)
#compute for each account the balance/debit/credit from the move lines
accounts = {}
if children_and_consolidated:
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
""" compute the balance, debit and/or credit for the provided
account ids
Arguments:
`ids`: account ids
`field_names`: the fields to compute (a list of any of
'balance', 'debit' and 'credit')
`arg`: unused fields.function stuff
`query`: additional query filter (as a string)
`query_params`: parameters for the provided query string
(__compute will handle their escaping) as a
tuple
"""
mapping = {
'balance': "COALESCE(SUM(l.debit),0) " \
"- COALESCE(SUM(l.credit), 0) as balance",
'debit': "COALESCE(SUM(l.debit), 0) as debit",
'credit': "COALESCE(SUM(l.credit), 0) as credit"
}
#get all the necessary accounts
children_and_consolidated = self._get_children_and_consol(cr, uid, ids, context=context)
#compute for each account the balance/debit/credit from the move lines
accounts = {}
if children_and_consolidated:
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
wheres = [""]
if query.strip():
wheres.append(query.strip())
if aml_query.strip():
wheres.append(aml_query.strip())
filters = " AND ".join(wheres)
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
'Filters: %s'%filters)
# IN might not work ideally in case there are too many
# children_and_consolidated, in that case join on a
# values() e.g.:
# SELECT l.account_id as id FROM account_move_line l
# INNER JOIN (VALUES (id1), (id2), (id3), ...) AS tmp (id)
# ON l.account_id = tmp.id
# or make _get_children_and_consol return a query and join on that
request = ("SELECT l.account_id as id, " +\
' , '.join(map(mapping.__getitem__, field_names)) +
" FROM account_move_line l" \
" WHERE l.account_id IN %s " \
+ filters +
" GROUP BY l.account_id")
params = (tuple(children_and_consolidated),) + query_params
cr.execute(request, params)
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
'Status: %s'%cr.statusmessage)
wheres = [""]
if query.strip():
wheres.append(query.strip())
if aml_query.strip():
wheres.append(aml_query.strip())
filters = " AND ".join(wheres)
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
'Filters: %s'%filters)
# IN might not work ideally in case there are too many
# children_and_consolidated, in that case join on a
# values() e.g.:
# SELECT l.account_id as id FROM account_move_line l
# INNER JOIN (VALUES (id1), (id2), (id3), ...) AS tmp (id)
# ON l.account_id = tmp.id
# or make _get_children_and_consol return a query and join on that
request = ("SELECT l.account_id as id, " +\
' , '.join(map(mapping.__getitem__, field_names)) +
" FROM account_move_line l" \
" WHERE l.account_id IN %s " \
+ filters +
" GROUP BY l.account_id")
params = (tuple(children_and_consolidated),) + query_params
cr.execute(request, params)
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
'Status: %s'%cr.statusmessage)
for res in cr.dictfetchall():
accounts[res['id']] = res
for res in cr.dictfetchall():
accounts[res['id']] = res
# consolidate accounts with direct children
children_and_consolidated.reverse()
@@ -656,9 +656,18 @@ class account_journal(osv.osv):
@param context: context arguments, like lang, time zone
@return: return a result
"""
journal_type = ('sale', 'sale_refund', 'purchase', 'purchase_refund')
journal_seq = {
'sale':'seq_out_invoice',
'purchase':'seq_in_invoice',
'purchase_refund':'seq_out_refund',
'sale_refund':'seq_in_refund'
}
seq_pool = self.pool.get('ir.sequence')
seq_typ_pool = self.pool.get('ir.sequence.type')
date_pool = self.pool.get('ir.model.data')
result = True
@@ -685,10 +694,13 @@ class account_journal(osv.osv):
res.update({
'sequence_id':seq_id
})
if not journal.invoice_sequence_id:
if journal.type in journal_type and not journal.invoice_sequence_id:
res_ids = date_pool.search(cr, uid, [('model','=','ir.sequence'), ('name','=',journal_seq.get(journal.type, 'sale'))])
inv_seq_id = date_pool.browse(cr, uid, res_ids[0]).res_id
inv_seq_id
res.update({
'invoice_sequence_id':seq_id
'invoice_sequence_id':inv_seq_id
})
result = self.write(cr, uid, [journal.id], res)
@@ -1066,24 +1078,13 @@ class account_move(osv.osv):
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner"),
'amount': fields.function(_amount_compute, method=True, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),
'date': fields.date('Date', required=True, states={'posted':[('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'),
],'Entry Type', select=True , size=128, readonly=True, states={'draft':[('readonly',False)]}),
'narration':fields.text('Narration', readonly=True, select=True, states={'draft':[('readonly',False)]}),
'narration':fields.text('Narration', select=True),
'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
}
_defaults = {
'name': lambda *a: '/',
'state': lambda *a: 'draft',
'period_id': _get_period,
'type' : lambda *a : 'journal_voucher',
'date': lambda *a:time.strftime('%Y-%m-%d'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
}
@@ -1162,8 +1163,20 @@ class account_move(osv.osv):
# TODO: Check if period is closed !
#
def create(self, cr, uid, vals, context={}):
if 'line_id' in vals:
if 'journal_id' in vals:
if 'line_id' in vals and context.get('copy'):
for l in vals['line_id']:
if not l[0]:
l[2].update({
'reconcile_id':False,
'reconcil_partial_id':False,
'analytic_lines':False,
'invoice':False,
'ref':False,
'balance':False,
'account_tax_id':False,
})
if 'journal_id' in vals and vals.get('journal_id', False):
for l in vals['line_id']:
if not l[0]:
l[2]['journal_id'] = vals['journal_id']
@@ -1189,11 +1202,14 @@ class account_move(osv.osv):
result = super(account_move, self).create(cr, uid, vals, context)
return result
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default = default.copy()
default.update({'state':'draft', 'name':'/',})
def copy(self, cr, uid, id, default={}, context={}):
default.update({
'state':'draft',
'name':'/',
})
context.update({
'copy':True
})
return super(account_move, self).copy(cr, uid, id, default, context)
def unlink(self, cr, uid, ids, context={}, check=True):
@@ -2527,9 +2543,9 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'account_paid_id': acc_template_ref[value['account_paid_id']],
})
# Creating Journals
# Creating Journals Sales and Purchase
vals_journal={}
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_view')])
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_journal_view')])
data = data_pool.browse(cr, uid, data_id[0])
view_id = data.res_id
@@ -2561,6 +2577,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
vals_journal['type'] = 'purchase'
vals_journal['code'] = _('EXJ')
vals_journal['sequence_id'] = seq_id_purchase
vals_journal['view_id'] = view_id
if obj_multi.chart_template_id.property_account_payable:
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_expense_categ.id]
+1
View File
@@ -335,6 +335,7 @@ class account_bank_statement(osv.osv):
if st.journal_id.entry_posted:
account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
self.log(cr, uid, st.id, 'Statement %s is confirmed and entries are created.' % st.name)
done.append(st.id)
self.write(cr, uid, done, {'state':'confirm'}, context=context)
return True
+1
View File
@@ -8,6 +8,7 @@
<field name="view_type">form</field>
<field name="domain">[('state','=','draft')]</field>
<field name="view_id" ref="view_account_period_tree"/>
<field name="help"> After closing a period, you will no longer be able to post entries to the period once it has been closed.</field>
</record>
<menuitem
action="action_account_period_tree"
+2
View File
@@ -60,6 +60,8 @@
<field name="account_payment"/>
<field name="account_followup"/>
<field name="account_asset"/>
<field name="account_voucher"/>
<field name="account_voucher_payment"/>
</group>
</group>
</group>
+17 -2
View File
@@ -135,6 +135,12 @@
<field name="amount_untaxed" sum="Untaxed Amount"/>
<field name="amount_total" sum="Total Amount"/>
<field name="state"/>
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="terp-gtk-stop"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='open,paid' icon="gtk-execute"/>
</tree>
</field>
</record>
@@ -151,7 +157,7 @@
<field name="number" readonly="1"/>
<field name="type" invisible="1"/>
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}"/>
<newline/>
<field name="partner_id" domain="[('supplier','=', 1)]" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'default_customer': 0}"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
@@ -260,7 +266,7 @@
<field name="number"/>
<field name="type" invisible="1"/>
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}"/>
<newline/>
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" groups="base.group_user"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
@@ -365,6 +371,11 @@
<field name="amount_total"/>
</group>
<newline/>
<group col="10" colspan="4">
<field name="journal_id" widget="selection" select='1'/>
<field name="period_id" select='1'/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
@@ -424,6 +435,7 @@
<field name="domain">[('type','=','out_invoice')]</field>
<field name="context">{'type':'out_invoice'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">Most of customer invoices are automatically generated in draft mode by OpenERP flows, following a purchase order for instance. Review, confirm or cancel, pay or refund your customers' invoices here. A manual invoice can be created here.</field>
</record>
<record id="action_invoice_tree1_view1" model="ir.actions.act_window.view">
@@ -449,6 +461,7 @@
<field name="domain">[('type','=','in_invoice')]</field>
<field name="context">{'type':'in_invoice'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">Proposal for vendor invoices are usually automatically generate by OpenERP, following a procurement order or a production order for instance. To consult and to check for, or to manually create a customer invoice, use this menu. You can review, confirm or cancel, pay or refund an invoice from the view from of the invoices.</field>
</record>
<menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="menu_finance_payables"/>
@@ -461,6 +474,7 @@
<field name="domain">[('type','=','out_refund')]</field>
<field name="context">{'type':'out_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">A customer refund is a credit note to your customer that cancel invoice or a part of it.</field>
</record>
<record id="action_invoice_tree3_view1" model="ir.actions.act_window.view">
@@ -486,6 +500,7 @@
<field name="domain">[('type','=','in_refund')]</field>
<field name="context">{'type':'in_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">A vendor refund is a credit note from your supplier indicating that he refunds part or totality of the invoice sent to you.</field>
</record>
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>
+25 -16
View File
@@ -8,24 +8,23 @@
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user"/>
<menuitem id="periodical_processing_journal_entries_validation" name="Entries to Review" parent="menu_finance_periodical_processing"/>
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
<menuitem id="periodical_processing_journal_entries_validation" name="Entries to Review" parent="menu_finance_periodical_processing"/>
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5"/>
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
<menuitem id="menu_generic_report" name="Management Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13"/>
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
<!-- <menuitem id="menu_finance_configuration1" name="Configuration" parent="menu_finance" sequence="80"/>-->
<!-- <menuitem id="base.menu_action_currency_form" parent="menu_finance_configuration" sequence="20"/>-->
<!-- <menuitem id="menu_finance_accounting1" name="Financial Accounting" parent="menu_finance_configuration" sequence="80"/>-->
@@ -34,10 +33,9 @@
<!-- <menuitem id="menu_finance_reporting11" name="Reporting" parent="account.menu_finance" sequence="80"/>-->
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/>
<!-- <menuitem id="menu_finance_legal_statement1" name="Legal Statements" parent="account.menu_finance_reporting" sequence="200"/>-->
<!-- <menuitem id="menu_generic_report" name="Generic Reports" parent="account.menu_finance_legal_statement" sequence="8"/>-->
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
groups="group_account_user"/>
groups="group_account_user"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15"/>
<!-- <menuitem id="menu_finance_periodical_processing11" name="Periodical Processing" parent="account.menu_finance"-->
@@ -45,7 +43,18 @@
<!-- groups="group_account_user"/>-->
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing"/>
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300"/>
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300"/>
<menuitem
parent="account.menu_finance_legal_statement"
id="final_accounting_reports"
name="Accounting Reports"/>
<menuitem
parent="account.menu_finance_legal_statement"
id="menu_journals_report"
name="Journals"/>
</data>
</openerp>
+36 -7
View File
@@ -20,7 +20,6 @@
##############################################################################
import time
from datetime import datetime
import netsvc
from osv import fields, osv
from tools.translate import _
@@ -183,7 +182,7 @@ class account_move_line(osv.osv):
# Compute the current move
move_id = False
partner_id = False
if context.get('journal_id',False) and context.get('period_id',False):
if context.get('journal_id', False) and context.get('period_id', False):
if 'move_id' in fields:
cr.execute('select move_id \
from \
@@ -199,6 +198,7 @@ class account_move_line(osv.osv):
return data
else:
data['move_id'] = move_id
if 'date' in fields:
cr.execute('select date \
from \
@@ -214,7 +214,6 @@ class account_move_line(osv.osv):
period = period_obj.browse(cr, uid, context['period_id'],
context=context)
data['date'] = period.date_start
if not move_id:
return data
@@ -454,6 +453,7 @@ class account_move_line(osv.osv):
context=context)
dt = period.date_start
return dt
def _get_currency(self, cr, uid, context={}):
if not context.get('journal_id', False):
return False
@@ -786,6 +786,31 @@ class account_move_line(osv.osv):
return j+(p and (':'+p) or '')
return False
# def onchange_date(self, cr, user, ids, date, context={}):
# """
# Returns a dict that contains new values and context
# @param cr: A database cursor
# @param user: ID of the user currently logged in
# @param date: latest value from user input for field date
# @param args: other arguments
# @param context: context arguments, like lang, time zone
# @return: Returns a dict which contains new values, and context
# """
# res = {}
# period_pool = self.pool.get('account.period')
# pids = period_pool.search(cr, user, [('date_start','<=',date), ('date_stop','>=',date)])
# if pids:
# res.update({
# 'period_id':pids[0]
# })
# context.update({
# 'period_id':pids[0]
# })
# return {
# 'value':res,
# 'context':context,
# }
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar, submenu=submenu)
if view_type != 'tree':
@@ -848,11 +873,14 @@ class account_move_line(osv.osv):
elif field == 'credit':
attrs.append('sum="Total credit"')
elif field == 'account_tax_id':
attrs.append('domain="[(\'parent_id\',\'=\',False)]"')
attrs.append('domain="[(\'parent_id\',\'=\',False), (\'type_tax_use\',\'=\',context.get(journal_id.type, \'sale\'))]"')
elif field == 'account_id' and journal.id:
attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'&lt;&gt;\',\'view\'), (\'type\',\'&lt;&gt;\',\'closed\')]" on_change="onchange_account_id(account_id, partner_id)"')
elif field == 'partner_id':
attrs.append('on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"')
# elif field == 'date':
# attrs.append('on_change="onchange_date(date)"')
# if field.readonly:
# attrs.append('readonly="1"')
# if field.required:
@@ -898,6 +926,7 @@ class account_move_line(osv.osv):
def _check_date(self, cr, uid, vals, context=None, check=True):
if context is None:
context = {}
journal_id = False
if 'date' in vals.keys():
if 'journal_id' in vals and 'journal_id' not in context:
journal_id = vals['journal_id']
@@ -1082,10 +1111,10 @@ class account_move_line(osv.osv):
#if not 'currency_id' in vals:
# vals['currency_id'] = account.company_id.currency_id.id
result = super(osv.osv, self).create(cr, uid, vals, context)
# CREATE Taxes
if vals.get('account_tax_id',False):
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:
@@ -1158,7 +1187,7 @@ class account_move_line(osv.osv):
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)
rs = self.pool.get('account.move').button_validate(cr,uid, [vals['move_id']],context)
return result
account_move_line()
+204 -119
View File
@@ -44,7 +44,7 @@
<field name="model">account.fiscalyear</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Fiscalyear">
<tree colors="blue:state in ('draft');gray:state in ('done') " string="Fiscalyear">
<field name="code"/>
<field name="name"/>
<field name="state"/>
@@ -113,7 +113,7 @@
<field name="model">account.period</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Period">
<tree colors="blue:state in ('draft');gray:state in ('done') " string="Period">
<field name="code"/>
<field name="name"/>
<field name="date_start"/>
@@ -203,10 +203,9 @@
<field name="type">tree</field>
<field name="field_parent">child_id</field>
<field name="arch" type="xml">
<tree string="Chart of accounts" toolbar="1" colors="blue:type in ('view');black:type not in ('view')">
<tree colors="blue:type in ('view');black:type in ('other','receivable','payable','consolidation');gray:type in ('closed')" string="Chart of accounts" toolbar="1" >
<field name="code"/>
<field name="name"/>
<field name="parent_id" invisible="1"/>
<field name="user_type" invisible="1"/>
<field name="debit"/>
<field name="credit"/>
@@ -234,7 +233,7 @@
<field name="type">tree</field>
<field name="field_parent">child_id</field>
<field name="arch" type="xml">
<tree string="Chart of accounts" toolbar="1" colors="blue:type in ('view');black:type not in ('view')">
<tree colors="blue:type in ('view');black:type in ('other','receivable','payable','consolidation');gray:type in ('closed')" string="Chart of accounts" toolbar="1" >
<field name="code"/>
<field name="name"/>
<field name="debit"/>
@@ -267,12 +266,19 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Journal Column">
<field colspan="4" name="name" select="1"/>
<field colspan="4" name="name" select="1"/><field name="name"/>
<field name="date"/>
<field name="period_id"/>
<field name="journal_id"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="balance_end"/>
<field name="state"/>
<field name="field" select="1"/>
<field name="sequence"/>
<newline/>
<field name="readonly"/>
<field name="required"/>
<!-- <newline/>-->
<!-- <field name="readonly"/>-->
<!-- <field name="required"/>-->
</form>
</field>
</record>
@@ -284,8 +290,8 @@
<tree string="Journal Column">
<field name="sequence"/>
<field name="name"/>
<field name="required"/>
<field name="readonly"/>
<!-- <field name="required"/>-->
<!-- <field name="readonly"/>-->
</tree>
</field>
</record>
@@ -296,11 +302,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Journal View">
<field colspan="4" name="name" select="1"/>
<field name="name" select="1"/>
<field colspan="4" name="columns_id" nolabel="1" widget="one2many_list"/>
</form>
</field>
</record>
<record id="action_account_journal_view" model="ir.actions.act_window">
<field name="name">Journal Views</field>
<field name="res_model">account.journal.view</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_account_journal_view" id="menu_action_account_journal_view" parent="account.menu_low_level"/>
<!--
# Account Journal
@@ -415,18 +428,20 @@
<field name="model">account.bank.statement</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Statement">
<group col="10" colspan="4">
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Statement"/>
<filter icon="terp-check" string="Posted" domain="[('state','=','confirm')]" help="Confirm confirm"/>
<search string="Search Bank Statements">
<group col="8" colspan="4">
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<filter string="Confirm" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>
</group>
<group expand="0" string="Group By..." colspan="12" col="10">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
</group>
</search>
</field>
@@ -438,10 +453,10 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:balance_end_real!=balance_end and state=='draft';blue:state=='draft' and (balance_end_real==balance_end);black:state=='confirm'" string="Statement">
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>
<field name="date"/>
<field name="period_id"/>
<field name="journal_id"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="balance_end"/>
@@ -458,7 +473,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Bank Statements">
<group>
<group col="8" colspan="4">
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<filter string="Confirm" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<separator orientation="vertical"/>
@@ -484,7 +499,7 @@
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="date" select="1"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1"/>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" select="1"/>
<field name="period_id"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
@@ -537,7 +552,7 @@
<field name="name">Bank Statements</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,graph</field>
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
</record>
<record model="ir.actions.act_window.view" id="action_bank_statement_tree_bank">
@@ -657,14 +672,14 @@
<field name="model">account.move</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Accounting Entries">
<tree colors="blue:state in ('draft');black:state in ('posted')" string="Accounting Entries">
<field name="name"/>
<field name="date"/>
<field name="ref"/>
<field name="period_id"/>
<field name="journal_id"/>
<field name="partner_id"/>
<field name="amount"/>
<field name="amount" sum="Total Amount"/>
<field name="state"/>
</tree>
</field>
@@ -851,6 +866,7 @@
<field name="domain">[('parent_id','=',False)]</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_tax_code_tree"/>
<field name="help">Chart of Taxes is a tree view reflecting the structure of the Tax Cases (or tax codes) and shows the current tax situation. The tax chart represents the amount of each area of the tax declaration for your country. It’s presented in a hierarchical structure, which can be modified to fit your needs.</field>
</record>
<menuitem
action="action_tax_code_tree"
@@ -869,7 +885,7 @@
<field name="type">tree</field>
<field eval="4" name="priority"/>
<field name="arch" type="xml">
<tree string="Account Entry Line" editable="top" on_write="on_create_write">
<tree colors="blue:state in ('draft');black:state in ('valid')" string="Account Entry Line" editable="top" on_write="on_create_write">
<field name="date"/>
<field name="period_id"/>
<field name="move_id"/>
@@ -899,43 +915,69 @@
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<form string="Account Entry Line">
<notebook>
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="ref"/>
<field name="partner_id" select="1" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
</group>
<notebook colspan="4">
<page string="Information">
<separator colspan="4" string="General Information"/>
<field name="name" select="1"/>
<field name="date" select="1"/>
<field name="ref"/>
<field name="invoice"/>
<field name="account_id" select="1" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="partner_id" select="1" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
<group col="2" colspan="2">
<separator colspan="2" string="Amount"/>
<field name="account_id" select="1" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="debit"/>
<field name="credit"/>
<field name="quantity"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Accounting Documents"/>
<field name="invoice"/>
<field name="move_id" required="False"/>
<field name="statement_id"/>
</group>
<field name="debit"/>
<field name="credit"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
<group col="2" colspan="2">
<separator colspan="2" string="Dates"/>
<field name="date" select="1"/>
<field name="date_maturity"/>
<field name="date_created"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Taxes"/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Currency"/>
<field name="currency_id"/>
<field name="amount_currency"/>
</group>
<separator colspan="4" string="Optional Information"/>
<field name="currency_id"/>
<field name="amount_currency"/>
<field name="quantity"/>
<field name="move_id" required="False"/>
<newline/>
<field name="statement_id"/>
<field name="blocked"/>
<field name="date_maturity"/>
<field name="date_created"/>
<newline/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<newline/>
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
<field name="analytic_account_id"/>
<group col="2" colspan="2">
<separator colspan="2" string="Reconciliation"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="States"/>
<field name="state"/>
<field name="blocked"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Analytic"/>
<field name="analytic_account_id"/>
</group>
<separator colspan="4" string="State"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
<field name="state"/>
</page>
<page string="Analytic Lines">
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
@@ -945,7 +987,6 @@
</field>
</record>
<record id="view_move_line_form2" model="ir.ui.view">
<field name="name">account.move.line.form2</field>
<field name="model">account.move.line</field>
@@ -953,7 +994,7 @@
<field eval="9" name="priority"/>
<field name="arch" type="xml">
<form string="Account Entry Line">
<notebook>
<notebook colspan="4">
<page string="Information">
<separator colspan="4" string="General Information"/>
<field name="name" select="1"/>
@@ -993,6 +1034,19 @@
</field>
</record>
<record id="account_move_line_graph" model="ir.ui.view">
<field name="name">account.move.line.graph</field>
<field name="model">account.move.line</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar">
<field name="account_id"/>
<field name="debit" operator="+"/>
<field name="credit" operator="+"/>
</graph>
</field>
</record>
<record id="view_account_move_line_filter" model="ir.ui.view">
<field name="name">Entry Lines</field>
<field name="model">account.move.line</field>
@@ -1001,8 +1055,11 @@
<search string="Search Entry Lines">
<group col='10' colspan='4'>
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Entry Lines"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>
<separator orientation="vertical"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>
<filter icon="terp-stock_symbol-selection" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Entry Lines"/>
<separator orientation="vertical"/>
<filter icon="terp-stock_symbol-selection" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.type','in',['receivable', 'payable'])]" help="Unreconciled Entry Lines"/>
<field name="date" select='1'/>
<field name="account_id" select='1'/>
<field name="partner_id" select='1'>
@@ -1012,8 +1069,8 @@
</group>
<newline/>
<group col="10" colspan="4">
<field name="journal_id" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
<field name="period_id" widget="selection" context="{'period_id':self}"/>
<field name="journal_id" required="1" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
<field name="period_id" required="1" widget="selection" context="{'period_id':self}"/>
</group>
</search>
</field>
@@ -1043,22 +1100,32 @@
Account.Entry Edition
-->
<record id="account_move_graph" model="ir.ui.view">
<field name="name">account.move.graph</field>
<field name="model">account.move</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar">
<field name="period_id"/>
<field name="amount" operator="+"/>
</graph>
</field>
</record>
<record id="view_move_tree" model="ir.ui.view">
<field name="name">account.move.tree</field>
<field name="model">account.move</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Entry">
<tree colors="blue:state in ('draft');black:state in ('posted')" string="Account Entry">
<field name="name"/>
<field name="date"/>
<field name="ref"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="type" invisible=" not context.get('set_visible',True)"/>
<field name="partner_id"/>
<field name="line_id"/>
<field name="to_check" groups="base.group_extended"/>
<field name="amount"/>
<field name="amount" sum="Total Amount"/>
<field name="state"/>
<button name="button_validate" states="draft" string="Approve" type="object" icon="terp-camera_test"/>
</tree>
@@ -1072,15 +1139,18 @@
<form string="Journal Entries">
<group colspan="4" col="6">
<field name="name" select="1" readonly="True"/>
<field name="ref" select="1"/>
<field name="to_check" groups="base.group_extended"/>
<field name="journal_id" select="1"/>
<field name="period_id"/>
<field name="type"/>
<field name="ref" select="1"/>
<field name="date" select="1"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="partner_id" invisible="1" select="1"/>
<field name="amount" invisible="1" select="1"/>
</group>
<notebook colspan="4">
<page string="Journal Entries Lines">
<field colspan="4" height="200" name="line_id" nolabel="1" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
<field colspan="4" name="line_id" nolabel="1" height="250" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
<form string="Account Entry Line">
<separator colspan="4" string="General Information"/>
<field name="name" select="1"/>
@@ -1105,7 +1175,7 @@
<field name="statement_id"/>
<field name="state"/>
</form>
<tree editable="top" string="Account Entry Line">
<tree colors="blue:state in ('draft');black:state in ('posted')" editable="top" string="Account Entry Line">
<field name="ref"/>
<field name="invoice"/>
<field name="name"/>
@@ -1125,20 +1195,13 @@
</tree>
</field>
<separator colspan="4" string="Narration"/>
<field name="narration" colspan="4" nolabel="1"/>
<field name="state" select="1"/>
<group col="2" colspan="2">
<field name="narration" colspan="4" nolabel="1" height="50"/>
<group col="4" colspan="4">
<field name="state" select="1"/>
<button name="button_validate" states="draft" string="Approve" type="object" icon="terp-camera_test"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="terp-gtk-stop"/>
</group>
</page>
<page string="Other Information">
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="date" select="1" groups="base.group_extended"/>
<field name="to_check" groups="base.group_extended"/>
<field name="partner_id" invisible="1" select="1"/>
<field name="amount" invisible="1" select="1"/>
</page>
</notebook>
</form>
</field>
@@ -1155,28 +1218,34 @@
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Entries"/>
<separator orientation="vertical"/>
<filter icon="terp-camera_test" string="To Review" domain="[('to_check','=',True)]" groups="base.group_extended" help="To Review"/>
<separator orientation="vertical"/>
<field name="date" select='1'/>
<field name="name" select='1'/>
<field name="journal_id" select='1'/>
<field name="partner_id" select='1'/>
</group>
<newline/>
<group col='8' colspan='4'>
<field name="journal_id" widget="selection" select='1'/>
<field name="period_id" select='1'/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="12" col="10">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type', 'set_visible':True}"/>
<filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
</field>
</record>
<record id="action_move_journal_line" model="ir.actions.act_window">
<record id="action_move_journal_line" model="ir.actions.act_window">
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
@@ -1205,21 +1274,20 @@
res_model="account.move.line"
src_model="account.move"/>
<record id="action_move_to_review" model="ir.actions.act_window">
<field name="name">Journal Entries</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
<field name="domain">[('to_check','=',True), ('state','=','draft')]</field>
</record>
<menuitem
action="action_move_to_review"
id="menu_action_move_to_review"
parent="periodical_processing_journal_entries_validation"
/>
<!-- <record id="action_move_to_review" model="ir.actions.act_window">-->
<!-- <field name="name">Journal Entries</field>-->
<!-- <field name="type">ir.actions.act_window</field>-->
<!-- <field name="res_model">account.move</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_id" ref="view_move_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_filter"/>-->
<!-- <field name="domain">[('to_check','=',True), ('state','=','draft')]</field>-->
<!-- </record>-->
<!-- <menuitem-->
<!-- action="action_move_to_review"-->
<!-- id="menu_action_move_to_review"-->
<!-- parent="periodical_processing_journal_entries_validation"-->
<!-- />-->
<!-- <menuitem id="next_id_29" name="Search Entries" parent="account.menu_finance_entries" sequence="40"/>-->
<!-- <menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>-->
@@ -1239,7 +1307,7 @@
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('journal_id.type', 'in', ['sale', 'purchase_refund'])]</field>
@@ -1251,11 +1319,10 @@
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('journal_id.type', 'in', ['purchase', 'sale_refund'])]</field>
<field name="context">{'journal_id':1}</field>
</record>
<menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>
@@ -1420,7 +1487,7 @@
<field name="model">account.journal.period</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Journals">
<tree colors="blue:state in ('draft');gray:state in ('done');black:state in ('printed')" string="Journals">
<field icon="icon" name="fiscalyear_id"/>
<field name="period_id"/>
<field name="journal_id"/>
@@ -1433,6 +1500,7 @@
<field name="name">Journals</field>
<field name="res_model">account.journal.period</field>
<field name="view_type">tree</field>
<field name="help">You can look up individual account entries by searching for useful information. To search for account entries, open a journal, then select a record line.</field>
</record>
<menuitem action="action_account_journal_period_tree" id="menu_action_account_journal_period_tree" parent="account.menu_finance_generic_reporting" sequence="2"/>
@@ -1634,7 +1702,7 @@
<field name="model">account.subscription</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Entry Subscription">
<tree colors="blue:state in ('draft');gray:state in ('done');black:state in ('running')" string="Entry Subscription">
<field name="ref"/>
<field name="name"/>
<field name="date_start"/>
@@ -1736,7 +1804,7 @@
<field name="type">tree</field>
<field eval="4" name="priority"/>
<field name="arch" type="xml">
<tree string="Account Entry Line">
<tree colors="blue:state in ('draft');black:state in ('valid')" string="Account Entry Line">
<field name="date"/>
<field name="move_id"/>
<field name="statement_id" string="St."/>
@@ -2271,7 +2339,7 @@
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
</record>
@@ -2285,23 +2353,22 @@
/>
<!-- Cash Statement -->
<record id="view_bank_statement_tree" model="ir.ui.view">
<record id="view_cash_statement_tree" model="ir.ui.view">
<field name="name">account.bank.statement.tree</field>
<field name="model">account.bank.statement</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state in ('open');blue:state in ('draft')" string="Statement">
<field name="date"/>
<tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state in ('open')" string="Statement">
<field name="name"/>
<field name="journal_id"/>
<field name="date"/>
<field name="period_id"/>
<field name="journal_id"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="balance_end"/>
<field name="user_id" select="1"/>
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
<button type="object" string="Confirm" name="button_confirm_cash" states="open" icon="terp-gtk-go-back-rtl"/>
<button type="object" string="Confirm" name="button_confirm_bank" states="open" icon="terp-gtk-go-back-rtl"/>
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
</tree>
</field>
@@ -2411,20 +2478,32 @@
</form>
</field>
</record>
<record id="account_cash_statement_graph" model="ir.ui.view">
<field name="name">account.bank.statement.graph</field>
<field name="model">account.bank.statement</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar">
<field name="date"/>
<field name="balance_start" operator="+"/>
<field name="balance_end" operator="+"/>
</graph>
</field>
</record>
<record id="action_view_bank_statement_tree" model="ir.actions.act_window">
<field name="name">Cash Register</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_bank_statement_tree"/>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_cash_statement_tree"/>
<field name="search_view_id" ref="view_account_bank_statement_filter"/>
<field name="domain">[('journal_id.type', '=', 'cash')]</field>
</record>
<record model="ir.actions.act_window.view" id="act_cash_statement1_all">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_bank_statement_tree"/>
<field name="view_id" ref="view_cash_statement_tree"/>
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
</record>
<record model="ir.actions.act_window.view" id="act_cash_statement2_all">
@@ -2433,6 +2512,12 @@
<field name="view_id" ref="view_bank_statement_form2"/>
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
</record>
<record model="ir.actions.act_window.view" id="act_cash_statement3_all">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="account_cash_statement_graph"/>
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
</record>
<menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash"/>
</data>
+12 -12
View File
@@ -385,18 +385,18 @@
Product income and expense accounts, default parameters
-->
<record id="property_account_expense_prd" model="ir.property">
<field name="name">property_account_expense</field>
<field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_expense')]"/>
<field eval="'account.account,'+str(ref('account.a_expense'))" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
<record id="property_account_income_prd" model="ir.property">
<field name="name">property_account_income</field>
<field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_income')]"/>
<field eval="'account.account,'+str(ref('account.a_sale'))" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
<!-- <record id="property_account_expense_prd" model="ir.property">-->
<!-- <field name="name">property_account_expense</field>-->
<!-- <field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_expense')]"/>-->
<!-- <field eval="'account.account,'+str(ref('account.a_expense'))" name="value"/>-->
<!-- <field name="company_id" ref="base.main_company"/>-->
<!-- </record>-->
<!-- <record id="property_account_income_prd" model="ir.property">-->
<!-- <field name="name">property_account_income</field>-->
<!-- <field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_income')]"/>-->
<!-- <field eval="'account.account,'+str(ref('account.a_sale'))" name="value"/>-->
<!-- <field name="company_id" ref="base.main_company"/>-->
<!-- </record>-->
<record id="property_account_expense_categ" model="ir.property">
<field name="name">property_account_expense_categ</field>
<field name="fields_id" search="[('model','=','product.category'),('name','=','property_account_expense_categ')]"/>
+556 -261
View File
File diff suppressed because it is too large Load Diff
+762 -261
View File
File diff suppressed because it is too large Load Diff
+803 -244
View File
File diff suppressed because it is too large Load Diff
+1110 -644
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-07-18 14:54+0000\n"
"PO-Revision-Date: 2010-07-21 07:21+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-19 03:41+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -3719,7 +3719,7 @@ msgstr "Wprowadzanie zapisów"
#: wizard_view:account.invoice.refund,init:0
#: model:ir.actions.wizard,name:account.wizard_invoice_refund
msgid "Credit Note"
msgstr "Nota kredytowa"
msgstr "Korekta"
#. module: account
#: model:ir.actions.todo,note:account.config_fiscalyear
@@ -4426,7 +4426,7 @@ msgstr "Zaksięgowano"
#: view:account.tax:0
#: view:account.tax.template:0
msgid "Credit Notes"
msgstr "Nota kredytowa"
msgstr "Korekty"
#. module: account
#: field:account.config.wizard,date2:0
+365 -27
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-01-11 07:51+0000\n"
"Last-Translator: Nguyễn Thịnh <thinhnverp@gmail.com>\n"
"PO-Revision-Date: 2010-07-20 03:39+0000\n"
"Last-Translator: Business Link Development Technologies <Unknown>\n"
"Language-Team: Vietnamese <vi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:06+0000\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -25,28 +25,28 @@ msgstr "Tên nội bộ"
#. module: account
#: view:account.tax.code:0
msgid "Account Tax Code"
msgstr ""
msgstr "Mã số thuế"
#. module: account
#: model:ir.actions.act_window,name:account.action_invoice_tree9
#: model:ir.ui.menu,name:account.menu_action_invoice_tree9
msgid "Unpaid Supplier Invoices"
msgstr ""
msgstr "Hoá đơn từ nhà cung cấp chưa thanh toán"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_entries
msgid "Entries Encoding"
msgstr "mục endoding"
msgstr "Mã hoá mục"
#. module: account
#: model:ir.actions.todo,note:account.config_wizard_account_base_setup_form
msgid "Specify The Message for the Overdue Payment Report."
msgstr ""
msgstr "Chỉ định Thông báo cho Báo cáo thanh toán quá hạn"
#. module: account
#: model:process.transition,name:account.process_transition_confirmstatementfromdraft0
msgid "Confirm statement from draft"
msgstr ""
msgstr "Xác nhận kê khai tạm"
#. module: account
#: model:account.account.type,name:account.account_type_asset
@@ -61,19 +61,21 @@ msgstr ""
#. module: account
#: help:account.journal,currency:0
msgid "The currency used to enter statement"
msgstr ""
msgstr "Đơn vị tiền được sử dụng để nhập bảng kê khai"
#. module: account
#: wizard_view:account_use_models,init_form:0
msgid "Select Message"
msgstr ""
msgstr "Lựa chọn thông báo"
#. module: account
#: help:product.category,property_account_income_categ:0
msgid ""
"This account will be used to value incoming stock for the current product "
"category"
msgstr "tài khoản này sẽ được dùng cho giá của sản phẩm đưa vào danh mục"
msgstr ""
"Tài khoản này sẽ được sử dụng để định giá tồn kho sắp đến đối với loại sản "
"phẩm này."
#. module: account
#: help:account.invoice,period_id:0
@@ -89,7 +91,7 @@ msgstr "kết quả hòa giả"
#. module: account
#: model:ir.actions.act_window,name:account.act_account_acount_move_line_open_unreconciled
msgid "Unreconciled entries"
msgstr "không thể hòa giải"
msgstr "Mục chưa được tổng hợp"
#. module: account
#: field:account.invoice.tax,base_code_id:0
@@ -107,7 +109,7 @@ msgstr "thống kê tài chính"
#: 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 "in báo cáo thuế"
#. module: account
#: field:account.account,parent_id:0
@@ -189,8 +191,6 @@ msgstr "di chuyển dòng lựa chọn"
#. module: account
#: rml:account.journal.period.print:0
#: rml:account.tax.code.entries:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
msgid "Entry label"
msgstr "thử nhãn hàng"
@@ -235,7 +235,6 @@ msgstr ""
#: field:account.move,amount:0
#: field:account.tax,amount:0
#: field:account.tax.template,amount:0
#: xsl:account.transfer:0
msgid "Amount"
msgstr "Số tiền"
@@ -299,7 +298,6 @@ msgstr ""
#. module: account
#: wizard_view:account.account.balance.report,checktype:0
#: wizard_view:account.analytic.account.analytic.check.report,init:0
#: wizard_view:account.analytic.account.balance.report,init:0
#: wizard_view:account.analytic.account.cost_ledger.report,init:0
#: wizard_view:account.analytic.account.inverted.balance.report,init:0
#: wizard_view:account.analytic.account.quantity_cost_ledger.report,init:0
@@ -339,6 +337,7 @@ msgid "Delta Debit"
msgstr ""
#. module: account
#: model:account.account.type,name:account.account_type_tax
#: rml:account.invoice:0
#: field:account.invoice,amount_tax:0
#: field:account.move.line,account_tax_id:0
@@ -353,7 +352,9 @@ msgstr "thay đổi báo có."
#. module: account
#: field:account.analytic.line,account_id:0
#: field:account.invoice.line,account_analytic_id:0
#: wizard_field:account.invoice.pay,addendum,analytic_id:0
#: field:account.move.line,analytic_account_id:0
#: wizard_field:account.move.line.reconcile,addendum,analytic_id:0
#: field:report.hr.timesheet.invoice.journal,account_id:0
msgid "Analytic Account"
msgstr "truy vấn tài khoản"
@@ -675,8 +676,11 @@ msgstr ""
#. module: account
#: field:account.analytic.account,line_ids:0
#: view:account.analytic.line:0
#: code:addons/account/project/wizard/wizard_account_analytic_line.py:0
#: model:ir.actions.act_window,name:account.action_account_analytic_line_form
#: model:ir.actions.act_window,name:account.action_account_tree1
#: model:ir.ui.menu,name:account.next_id_41
#, python-format
msgid "Analytic Entries"
msgstr ""
@@ -691,6 +695,7 @@ msgid "Associated Partner"
msgstr "liên kết khách hàng"
#. module: account
#: view:account.invoice:0
#: field:account.invoice,comment:0
msgid "Additional Information"
msgstr "Thông tin bổ sung"
@@ -1460,6 +1465,9 @@ msgstr ""
#: field:account.bank.statement.reconcile,line_new_ids:0
#: wizard_view:account.move.line.reconcile,init_full:0
#: wizard_view:account.move.line.reconcile,init_partial:0
#: code:addons/account/wizard/wizard_pay_invoice.py:0
#: code:addons/account/wizard/wizard_reconcile.py:0
#, python-format
msgid "Write-Off"
msgstr ""
@@ -1865,7 +1873,6 @@ msgstr ""
#: field:account.journal,type:0
#: field:account.move,type:0
#: field:account.move.reconcile,type:0
#: xsl:account.transfer:0
msgid "Type"
msgstr ""
@@ -2299,13 +2306,13 @@ msgstr ""
#: selection:account.general.ledger.report,checktype,sortbydate:0
#: rml:account.journal.period.print:0
#: field:account.move,date:0
#: wizard_field:account.move.line.reconcile,addendum,date_p:0
#: rml:account.overdue:0
#: wizard_field:account.subscription.generate,init,date:0
#: field:account.subscription.line,date:0
#: rml:account.tax.code.entries:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
#: xsl:account.transfer:0
msgid "Date"
msgstr ""
@@ -2422,6 +2429,7 @@ msgstr ""
#: view:account.bank.statement:0
#: field:account.move.reconcile,line_id:0
#: model:ir.actions.act_window,name:account.action_move_line_search
#: model:ir.actions.act_window,name:account.action_move_line_select
#: model:ir.actions.act_window,name:account.action_move_line_tree1
#: model:ir.ui.menu,name:account.menu_action_move_line_search
msgid "Entry Lines"
@@ -2613,6 +2621,8 @@ msgstr ""
#. module: account
#: rml:account.analytic.account.journal:0
#: wizard_view:account.invoice.pay,addendum:0
#: wizard_view:account.move.line.reconcile,addendum:0
#: model:ir.ui.menu,name:account.next_id_40
#: model:process.node,name:account.process_node_analytic0
#: model:process.node,name:account.process_node_analyticcost0
@@ -2716,6 +2726,7 @@ msgid "Invoice Number"
msgstr ""
#. module: account
#: wizard_field:account.analytic.account.balance.report,init,date2:0
#: field:account.period,date_stop:0
msgid "End of Period"
msgstr ""
@@ -2899,8 +2910,6 @@ msgstr ""
#: rml:account.journal.period.print:0
#: rml:account.partner.balance:0
#: rml:account.tax.code.entries:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
#: rml:account.vat.declaration:0
msgid "1cm 27.7cm 20cm 27.7cm"
msgstr ""
@@ -2957,9 +2966,11 @@ msgstr ""
#: wizard_view:account.move.line.reconcile,init_full:0
#: wizard_view:account.move.line.reconcile,init_partial:0
#: wizard_view:account.move.line.reconcile.select,init:0
#: code:addons/account/wizard/wizard_reconcile_select.py:0
#: model:ir.ui.menu,name:account.next_id_20
#: model:process.node,name:account.process_node_reconciliation0
#: model:process.node,name:account.process_node_supplierreconciliation0
#, python-format
msgid "Reconciliation"
msgstr ""
@@ -3019,7 +3030,6 @@ msgstr ""
#. module: account
#: rml:account.invoice:0
#: xsl:account.transfer:0
msgid "Document"
msgstr ""
@@ -3067,6 +3077,8 @@ msgstr ""
#. module: account
#: rml:account.general.ledger:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
msgid "Entry Label"
msgstr ""
@@ -3258,6 +3270,7 @@ msgid "Generate Fiscal Year Opening Entries"
msgstr ""
#. module: account
#: view:account.move.reconcile:0
#: model:ir.actions.wizard,name:account.wizard_reconcile
msgid "Reconcile Entries"
msgstr ""
@@ -3605,7 +3618,6 @@ msgid ""
msgstr ""
#. module: account
#: wizard_field:account.invoice.pay,addendum,comment:0
#: wizard_field:account.invoice.pay,init,name:0
msgid "Entry Name"
msgstr ""
@@ -4912,6 +4924,7 @@ msgid "Invoice Lines"
msgstr ""
#. module: account
#: wizard_field:account.analytic.account.balance.report,init,date1:0
#: field:account.period,date_start:0
msgid "Start of Period"
msgstr ""
@@ -5304,8 +5317,6 @@ msgstr ""
#: rml:account.journal.period.print:0
#: rml:account.partner.balance:0
#: rml:account.tax.code.entries:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
#: rml:account.vat.declaration:0
msgid "Page"
msgstr ""
@@ -5387,7 +5398,6 @@ msgstr ""
#. module: account
#: wizard_field:account.analytic.account.analytic.check.report,init,date2:0
#: wizard_field:account.analytic.account.balance.report,init,date2:0
#: wizard_field:account.analytic.account.cost_ledger.report,init,date2:0
#: wizard_field:account.analytic.account.inverted.balance.report,init,date2:0
#: wizard_field:account.analytic.account.journal.report,init,date2:0
@@ -5576,7 +5586,6 @@ msgstr ""
#. module: account
#: wizard_field:account.aged.trial.balance,init,date1:0
#: wizard_field:account.analytic.account.analytic.check.report,init,date1:0
#: wizard_field:account.analytic.account.balance.report,init,date1:0
#: wizard_field:account.analytic.account.cost_ledger.report,init,date1:0
#: wizard_field:account.analytic.account.inverted.balance.report,init,date1:0
#: wizard_field:account.analytic.account.journal.report,init,date1:0
@@ -5934,6 +5943,335 @@ msgstr ""
msgid "Compute Entry Dates"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Analytic accounts to close"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Draft invoices"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.open_board_account
#: model:ir.ui.menu,name:account.menu_board_account
msgid "Accounting Dashboard"
msgstr ""
#. module: account
#: view:board.board:0
#: model:ir.actions.act_window,name:account.act_my_account
msgid "Accounts to invoice"
msgstr ""
#. module: account
#: view:board.board:0
#: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice
msgid "Costs to invoice"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Aged receivables"
msgstr ""
#. module: account
#: model:ir.module.module,shortdesc:account.module_meta_information
msgid "Board for accountant"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_aged_income
msgid "Income Accounts"
msgstr ""
#. module: account
#: view:board.board:0
msgid "My indicators"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Account Board"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Aged income"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
msgid "Show Debit/Credit Information"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,account_choice:0
msgid "All accounts"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
msgid "Entries Selection Based on"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "Notification"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,period_manner:0
msgid "Financial Period"
msgstr ""
#. module: account
#: model:ir.actions.report.xml,name:account.account_account_balance
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
msgid "Account balance"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period(s)"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Percentage"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
msgid "Compare Selected Years In Terms Of"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Fiscal Year(s)(Maximum Three Years)"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,select_account:0
msgid "Select Reference Account(for % comparision)"
msgstr ""
#. module: account
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
msgid "Account balance-Compare Years"
msgstr ""
#. module: account
#: model:ir.module.module,description:account.module_meta_information
msgid ""
"Account Balance Module is an added functionality to the Financial Management "
"module.\n"
"\n"
" This module gives you the various options for printing balance sheet.\n"
"\n"
" 1. You can compare the balance sheet for different years.\n"
"\n"
" 2. You can set the cash or percentage comparison between two years.\n"
"\n"
" 3. You can set the referential account for the percentage comparison for "
"particular years.\n"
"\n"
" 4. You can select periods as an actual date or periods as creation "
"date.\n"
"\n"
" 5. You have an option to print the desired report in Landscape format.\n"
" "
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You have to select 'Landscape' option. Please Check it."
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,landscape:0
msgid "Show Report in Landscape Form"
msgstr ""
#. module: account
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Total :"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
msgid "Show Comparision in %"
msgstr ""
#. module: account
#: wizard_view:account.analytic.account.balance.report,init:0
msgid "Select Period"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Report Options"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Don't Compare"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
msgid "Show Accounts"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "1. You have selected more than 3 years in any case."
msgstr ""
#. module: account
#: model:ir.module.module,shortdesc:account.module_meta_information
msgid "Accounting and financial management-Compare Accounts"
msgstr ""
#. module: account
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Year :"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You can select maximum 3 years. Please check again."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"3. You have selected 'Percentage' option with more than 2 years, but you "
"have not selected landscape format."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"You might have done following mistakes. Please correct them and try again."
msgstr ""
#. module: account
#: help:account.balance.account.balance.report,init,select_account:0
msgid "Keep empty for comparision to its parent"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,period_manner:0
msgid "Creation Date"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"2. You have not selected 'Percentage' option, but you have selected more "
"than 2 years."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid ""
"You may have selected the compare options with more than 1 year with "
"credit/debit columns and % option.This can lead contents to be printed out "
"of the paper.Please try again."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "You have to select at least 1 Fiscal Year. Try again."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Customize Report"
msgstr ""
#. module: account
#: field:report.aged.receivable,name:0
msgid "Month Range"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
msgid "Invoices Created Within Past 15 Days"
msgstr ""
#. module: account
#: model:ir.model,name:report_account.model_report_invoice_created
msgid "Report of Invoices Created within Last 15 days"
msgstr ""
#. module: account
#: view:report.invoice.created:0
msgid "Total Amount"
msgstr ""
#. module: account
#: view:report.account.receivable:0
msgid "Accounts by type"
msgstr ""
#. module: account
#: model:ir.model,name:report_account.model_report_aged_receivable
msgid "Aged Receivable Till Today"
msgstr ""
#. module: account
#: model:ir.model,name:report_account.model_report_account_receivable
msgid "Receivable accounts"
msgstr ""
#. module: account
#: field:temp.range,name:0
msgid "Range"
msgstr ""
#. module: account
#: model:ir.module.module,description:report_account.module_meta_information
msgid "A module that adds new reports based on the account module."
msgstr ""
#. module: account
#: model:ir.module.module,shortdesc:report_account.module_meta_information
msgid "Account Reporting - Reporting"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:report_account.action_account_receivable_graph
#: model:ir.ui.menu,name:report_account.menu_account_receivable_graph
msgid "Balance by Type of Account"
msgstr ""
#. module: account
#: field:report.account.receivable,name:0
msgid "Week of Year"
msgstr ""
#. module: account
#: field:report.invoice.created,create_date:0
msgid "Create Date"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
#: view:report.aged.receivable:0
msgid "Aged Receivable"
msgstr ""
#. module: account
#: view:report.invoice.created:0
msgid "Untaxed Amount"
msgstr ""
#, python-format
#~ msgid "Warning !"
#~ msgstr "Cảnh báo"
+18 -18
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-07-16 01:13+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
"PO-Revision-Date: 2010-07-22 01:32+0000\n"
"Last-Translator: digitalsatori <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-07-23 04:08+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -35,7 +35,7 @@ msgstr "未支付的采购发票"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_entries
msgid "Entries Encoding"
msgstr "录入的记录"
msgstr "分录录入"
#. module: account
#: model:ir.actions.todo,note:account.config_wizard_account_base_setup_form
@@ -55,7 +55,7 @@ msgstr "资产"
#. module: account
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "在动作定义使用了无效的模块名。"
msgstr "在动作定义使用了无效的模式名称。"
#. module: account
#: help:account.journal,currency:0
@@ -87,14 +87,14 @@ msgstr "对账结果"
#. module: account
#: model:ir.actions.act_window,name:account.act_account_acount_move_line_open_unreconciled
msgid "Unreconciled entries"
msgstr "取消核销"
msgstr "未对账分录"
#. module: account
#: field:account.invoice.tax,base_code_id:0
#: field:account.tax,base_code_id:0
#: field:account.tax.template,base_code_id:0
msgid "Base Code"
msgstr "基于的税务"
msgstr ""
#. module: account
#: view:account.account:0
@@ -115,7 +115,7 @@ msgstr "上级科目"
#. module: account
#: selection:account.move,type:0
msgid "Journal Voucher"
msgstr "原始凭证集合"
msgstr ""
#. module: account
#: field:account.invoice,residual:0
@@ -215,7 +215,7 @@ msgstr "明细"
#. module: account
#: wizard_view:account.aged.trial.balance,init:0
msgid "Aged Trial Balance"
msgstr "账龄试算平衡表"
msgstr "旧的试算表"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_recurrent_entries
@@ -239,7 +239,7 @@ msgstr "金额"
#: model:ir.actions.wizard,name:account.wizard_third_party_ledger
#: model:ir.ui.menu,name:account.menu_third_party_ledger
msgid "Partner Ledger"
msgstr "业务伙伴总帐"
msgstr "业务伙伴分类账"
#. module: account
#: field:product.template,supplier_taxes_id:0
@@ -460,7 +460,7 @@ msgstr "从草稿确认, 与对/ 不对账"
#: model:ir.actions.wizard,name:account.action_account_bank_reconcile_tree
#: model:ir.ui.menu,name:account.menu_action_account_bank_reconcile_check_tree
msgid "Bank reconciliation"
msgstr "银行对账"
msgstr "银行对帐单"
#. module: account
#: rml:account.invoice:0
@@ -680,7 +680,7 @@ msgstr "月"
#. module: account
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
msgstr "相关业务伙伴"
msgstr "相关的业务伙伴"
#. module: account
#: view:account.invoice:0
@@ -795,7 +795,7 @@ msgstr "之前生成的记录:"
#: model:ir.actions.report.xml,name:account.account_analytic_account_cost_ledger
#: model:ir.actions.wizard,name:account.account_analytic_account_cost_ledger_report
msgid "Cost Ledger"
msgstr "成本分类帐"
msgstr "成本分类账"
#. module: account
#: wizard_view:account.account.balance.report,checktype:0
@@ -888,7 +888,7 @@ msgstr "补差额集合"
#: field:account.model.line,amount_currency:0
#: field:account.move.line,amount_currency:0
msgid "Amount Currency"
msgstr "货币金额"
msgstr "另一货币金额"
#. module: account
#: field:account.chart.template,property_account_expense_categ:0
@@ -1897,7 +1897,7 @@ msgstr "支付发票"
#. module: account
#: constraint:account.invoice:0
msgid "Error: Invalid Bvr Number (wrong checksum)."
msgstr "错误:无效的Bvr号(错误的检验和)"
msgstr "错误:无效的Bvr号(校验错误)"
#. module: account
#: model:ir.actions.act_window,name:account.action_invoice_tree5
@@ -4212,7 +4212,7 @@ msgstr "这序列提供记录集合列表的显示顺序"
#. module: account
#: field:account.journal,type_control_ids:0
msgid "Type Controls"
msgstr "类型控制"
msgstr "控制类型"
#. module: account
#: field:account.analytic.account,name:0
@@ -5182,7 +5182,7 @@ msgstr "从手动转为草稿"
#. module: account
#: model:ir.ui.menu,name:account.next_id_43
msgid "This Month"
msgstr "本月"
msgstr "这月"
#. module: account
#: field:account.account.type,sign:0
@@ -5209,7 +5209,7 @@ msgstr "在确认对帐单产生的会计分录"
#. module: account
#: wizard_view:account_use_models,create:0
msgid "Use Model"
msgstr "使用模型"
msgstr "使用模式"
#. module: account
#: wizard_button:account.wizard_paid_open,init,end:0
+14 -4
View File
@@ -33,8 +33,9 @@ class account_installer(osv.osv_memory):
_inherit = 'res.config.installer'
def _get_default_accounts(self, cr, uid, context=None):
accounts = [{'acc_name':'Current','account_type':'cash'},
{'acc_name':'Deposit','account_type':'cash'}]
accounts = [{'acc_name':'Current','account_type':'bank'},
{'acc_name':'Deposit','account_type':'bank'},
{'acc_name':'Cash','account_type':'cash'}]
return accounts
def _get_charts(self, cr, uid, context=None):
@@ -67,6 +68,12 @@ class account_installer(osv.osv_memory):
'account_asset':fields.boolean('Assets Management',
help="Enables asset management in the accounting application, "
"including asset categories and usage periods."),
'account_voucher':fields.boolean('Voucher Management',
help="Account Voucher module includes all the basic requirements of "
"Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... "),
'account_voucher_payment':fields.boolean('Voucher and Reconcile Management',
help="Extension Account Voucher module includes allows to link payment / receipt "
"entries with voucher, also automatically reconcile during the payment and receipt entries."),
'date_start': fields.date('Start Date', required=True),
'date_stop': fields.date('End Date', required=True),
'period':fields.selection([('month','Monthly'), ('3months','3 Monthly')],
@@ -289,9 +296,12 @@ class account_installer(osv.osv_memory):
'account_paid_id': acc_template_ref[value['account_paid_id']],
})
# Creating Journals
# Creating Journals Sales and Purchase
vals_journal={}
view_id = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Journal View')])[0]
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_journal_view')])
data = data_pool.browse(cr, uid, data_id[0])
view_id = data.res_id
seq_id = obj_sequence.search(cr,uid,[('name','=','Account Journal')])[0]
if seq_journal:
+20 -11
View File
@@ -220,7 +220,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.", readonly=True, states={'draft':[('readonly',False)]}),
@@ -235,20 +235,20 @@ class account_invoice(osv.osv):
'reference': fields.char('Invoice Reference', size=64, help="The partner reference of this invoice."),
'reference_type': fields.selection(_get_reference_type, 'Reference Type',
required=True, readonly=True, states={'draft':[('readonly',False)]}),
'comment': fields.text('Additional Information', translate=True),
'comment': fields.text('Additional Information'),
'state': fields.selection([
('draft','Draft'),
('proforma','Pro-forma'),
('proforma2','Pro-forma'),
('open','Open'),
('paid','Done'),
('paid','Paid'),
('cancel','Cancelled')
],'State', select=True, readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Invoice. \
\n* The \'Pro-forma\' when invoice is in Pro-forma state,invoice does not have an invoice number. \
\n* The \'Open\' state is used when user create invoice,a invoice number is generated.Its in open state till user does not pay invoice. \
\n* The \'Done\' state is set automatically when invoice is paid.\
\n* The \'Paid\' state is set automatically when invoice is paid.\
\n* The \'Cancelled\' state is used when user cancel invoice.'),
'date_invoice': fields.date('Date Invoiced', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]}, help="Keep empty to use the current date"),
'date_due': fields.date('Due Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]},
@@ -344,6 +344,9 @@ class account_invoice(osv.osv):
def create(self, cr, uid, vals, context=None):
try:
res = super(account_invoice, self).create(cr, uid, vals, context)
for inv_id, name in self.name_get(cr, uid, [res], context=context):
message = _('Invoice ') + " '" + name + "' "+ _("is waiting for validation.")
self.log(cr, uid, inv_id, message)
return res
except Exception, e:
if '"journal_id" viol' in e.args[0]:
@@ -354,9 +357,6 @@ class account_invoice(osv.osv):
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):
@@ -890,7 +890,9 @@ class account_invoice(osv.osv):
new_move_name = self.pool.get('account.move').browse(cr, uid, move_id).name
# make the invoice point to that move
self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name})
self.pool.get('account.move').post(cr, uid, [move_id])
# Pass invoice in context in method post: used if you want to get the same
# account move reference when creating the same invoice after a cancelled one:
self.pool.get('account.move').post(cr, uid, [move_id], context={'invoice':inv})
self._log_event(cr, uid, ids)
return True
@@ -922,7 +924,7 @@ class account_invoice(osv.osv):
invtype = obj_inv.type
number = obj_inv.number
move_id = obj_inv.move_id and obj_inv.move_id.id or False
reference = obj_inv.reference
reference = obj_inv.reference or ''
if not number:
tmp_context = {
'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id
@@ -955,8 +957,9 @@ class account_invoice(osv.osv):
'WHERE account_move_line.move_id = %s ' \
'AND account_analytic_line.move_id = account_move_line.id',
(ref, move_id))
message = _('Invoice ') + " '" + number + "' "+ _("is confirm")
self.log(cr, uid, id, message)
for inv_id, name in self.name_get(cr, uid, [id]):
message = _('Invoice ') + " '" + name + "' "+ _("is validated.")
self.log(cr, uid, inv_id, message)
return True
def action_cancel(self, cr, uid, ids, *args):
@@ -1175,9 +1178,15 @@ class account_invoice(osv.osv):
if l.account_id.id==src_account_id:
line_ids.append(l.id)
total += (l.debit or 0.0) - (l.credit or 0.0)
inv_id, name = self.name_get(cr, uid, [invoice.id], context=context)[0]
if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))) or writeoff_acc_id:
self.log(cr, uid, inv_id, _('Invoice ') + " '" + name + "' "+ _("is totally paid."))
self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context)
else:
code = invoice.currency_id.code
amt = str(pay_amount) + code + ' on ' + str(invoice.amount_total) + code + ' (' + str(total) + code + ' remaining)'
self.log(cr, uid, inv_id, _('Invoice ') + " '" + name + "' "+ _("is paid partially: ") + amt)
self.pool.get('account.move.line').reconcile_partial(cr, uid, line_ids, 'manual', context)
# Update the stored value (fields.function), so we write to trigger recompute
+4 -2
View File
@@ -63,7 +63,7 @@
<field name="quantity_max"/>
<field name="parent_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="user_id" invisible="1"/>
</tree>
</field>
@@ -131,8 +131,9 @@
<field name="res_model">account.analytic.account</field>
<field name="domain">[('parent_id','=',False)]</field>
<field name="view_type">tree</field>
<field name="view_mode">form,graph</field>
<field name="view_mode">form,graph</field>
<field name="view_id" ref="view_account_analytic_account_tree"/>
<field name="help">Analytic Charts of Accounts allows you to access to reports by analytic accounts (or cost accounts) . From this menu you can access to analytic balance, a report that relates the analytic accounts to the general accounts. It is useful for analyzing the profitability of projects, giving you the profitability of a project for the different operations that you used to carry out the project.</field>
</record>
<!-- <menuitem-->
<!-- action="action_account_analytic_account_tree2"-->
@@ -376,6 +377,7 @@
<field name="name">Print Analytic Journals</field>
<field name="res_model">account.analytic.journal</field>
<field name="view_type">tree</field>
<field name="help">To print an analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount.</field>
</record>
<menuitem action="action_account_analytic_journal_tree" id="account_analytic_journal_print" parent="account.next_id_40"/>
@@ -104,6 +104,7 @@
<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"/>
<field name="help">A tool search lets you know statistics on your analytics records that match your needs.</field>
</record>
<menuitem action="action_analytic_entries_report" id="menu_action_analytic_entries_report" parent="account.menu_finance_statistic_report_statement" sequence="4"/>
@@ -6,7 +6,7 @@
<field name="model">account.entries.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Entries Analysis">
<tree colors="blue:state in ('draft');black:state in ('posted')" string="Entries Analysis">
<field name="date" invisible="1"/>
<field name="date_created" invisible="1"/>
<field name="date_maturity" invisible="1"/>
@@ -118,6 +118,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_profit': 1,'search_default_group_account':1,'search_default_group_month': 1, 'group_by_no_leaf':1,'group_by':[]}</field>
<field name="help">A tool search lets you know statistics on your different financial accounts that match your needs.</field>
</record>
<menuitem action="action_account_entries_report_all" id="menu_action_account_entries_report_all" parent="account.menu_finance_statistic_report_statement" sequence="2"/>
</data>
@@ -6,7 +6,7 @@
<field name="model">account.invoice.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Invoices Analysis">
<tree colors="blue:state in ('draft');gray:state in ('cancel','paid');black:state in ('proforma','proforma2')" string="Invoices Analysis">
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
@@ -138,6 +138,8 @@
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1,'search_default_product':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_account_invoice_report_search"/>
<field name="help">A tool search lets you know statistics on invoices that match your needs.</field>
</record>
<menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_statistic_report_statement" sequence="0"/>
@@ -89,7 +89,7 @@
<field name="model">report.invoice.created</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');black:state not in ('draft') " string="Invoices">
<tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in('paid','cancel') " string="Invoices">
<field name="create_date" select="1"/>
<field name="name" select="1"/>
<field name="type"/>
@@ -35,6 +35,7 @@
<field name="view_id" ref="account_aged_balance_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
<field name="help">Aged Partner Balance is a more detailed report of your receivables by intervals. When opening that report, Open ERP asks for the name of the company, the fiscal period and the size of the interval to be analyzed (in days). Open ERP then calculates a table of credit balance by period. So if you request an interval of 30 days OpenERP generates an analysis of creditors for the past month, past two months, and so on. </field>
</record>
<menuitem
@@ -29,15 +29,15 @@ class account_automatic_reconcile(osv.osv_memory):
_description = 'Automatic Reconcile'
_columns = {
'account_ids': fields.many2many('account.account', 'reconcile_account_rel', 'reconcile_id', 'account_id', 'Account to reconcile', domain = [('reconcile','=',1)], \
'account_ids': fields.many2many('account.account', 'reconcile_account_rel', 'reconcile_id', 'account_id', 'Accounts to Reconcile', domain = [('reconcile','=',1)], \
help = 'If no account is specified, the reconciliation will be made using every accounts that can be reconcilied'),
'writeoff_acc_id': fields.many2one('account.account', 'Account'),
'journal_id': fields.many2one('account.journal', 'Journal'),
'period_id': fields.many2one('account.period', 'Period'),
'max_amount': fields.float('Maximum write-off amount'),
'power': fields.selection([(p, str(p)) for p in range(2, 10)], 'Power', required=True, help='Number of partial amounts that can be combined to find a balance point can be chosen as the power of the automatic reconciliation'),
'date1': fields.date('Start of period', required=True),
'date2': fields.date('End of period', required=True),
'date1': fields.date('Starting Date', required=True),
'date2': fields.date('Ending Date', required=True),
'reconciled': fields.integer('Reconciled transactions', readonly=True),
'unreconciled': fields.integer('Not reconciled transactions', readonly=True),
'allow_write_off': fields.boolean('Allow write off')
@@ -54,6 +54,7 @@ class account_automatic_reconcile(osv.osv_memory):
'date2': time.strftime('%Y-%m-%d'),
'reconciled': _get_reconciled,
'unreconciled': _get_unreconciled,
'power':2
}
#TODO: cleanup and comment this code... For now, it is awfulllll
@@ -245,4 +246,4 @@ class account_automatic_reconcile(osv.osv_memory):
account_automatic_reconcile()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -7,33 +7,33 @@
<field name="model">account.automatic.reconcile</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Reconciliation">
<group width="660" height="430">
<separator string="Options" colspan="4"/>
<group>
<field name="account_ids" colspan="4" domain="[('reconcile','=',1)]"/>
<field name="date1"/>
<field name="date2"/>
<field name="power"/>
<field name="allow_write_off"/>
</group>
<newline/>
<group attrs="{'readonly':[('allow_write_off', '!=', True)]}">
<separator string="Write-Off Move" colspan="4"/>
<field name="max_amount"/>
<field name="writeoff_acc_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
<field name="journal_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
<field name="period_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
</group>
<separator string ="" colspan="4"/>
<group colspan="2" col="4">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="reconcile" string="Reconcile" type="object" icon="terp-stock_effects-object-colorize"/>
</group>
</group>
</form>
<form string="Reconciliation">
<group width="660" height="430">
<separator string="Options" colspan="4"/>
<group>
<field name="account_ids" colspan="4" domain="[('reconcile','=',1)]"/>
<field name="date1"/>
<field name="date2"/>
<field name="power"/>
<field name="allow_write_off"/>
</group>
<newline/>
<group attrs="{'readonly':[('allow_write_off', '!=', True)]}">
<separator string="Write-Off Move" colspan="4"/>
<field name="max_amount"/>
<field name="writeoff_acc_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
<field name="journal_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
<field name="period_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
</group>
<separator string ="" colspan="4"/>
<group colspan="2" col="4">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="reconcile" string="Reconcile" type="object" icon="terp-stock_effects-object-colorize"/>
</group>
</group>
</form>
</field>
</record>
</record>
<record id="action_account_automatic_reconcile" model="ir.actions.act_window">
<field name="name">Account Automatic Reconcile</field>
@@ -44,31 +44,32 @@
<field name="view_id" ref="account_automatic_reconcile_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
<field name="help">For an invoice to be considered as paid, the invoice entries must be reconciled with counterparts, usually payments. With the automatic reconciliation functionality, OpenERP make its own search for entries to reconcile in a series of accounts. It tries to find entries for each partner where the amounts correspond.</field>
</record>
<menuitem
icon="STOCK_EXECUTE"
name="Automatic Reconciliation"
action="action_account_automatic_reconcile"
id="menu_automatic_reconcile"
parent="periodical_processing_reconciliation"/>
<menuitem
icon="STOCK_EXECUTE"
name="Automatic Reconciliation"
action="action_account_automatic_reconcile"
id="menu_automatic_reconcile"
parent="periodical_processing_reconciliation"/>
<record id="account_automatic_reconcile_view1" model="ir.ui.view">
<field name="name">Automatic reconcile unreconcile</field>
<field name="model">account.automatic.reconcile</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Reconciliation result">
<field name="reconciled"/>
<newline/>
<field name="unreconciled"/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Ok" icon="terp-dialog-close" default_focus="1"/>
</group>
</form>
<form string="Reconciliation result">
<field name="reconciled"/>
<newline/>
<field name="unreconciled"/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Ok" icon="terp-dialog-close" default_focus="1"/>
</group>
</form>
</field>
</record>
</record>
</data>
</data>
</openerp>
@@ -7,41 +7,41 @@
<field name="model">account.balance.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select period">
<group width="650" height="200">
<field name="company_id" groups="base.group_multi_company"/>
<field name="display_account" required = "True"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
<newline/>
<group colspan="4" col="6">
<separator colspan="4"/>
<newline/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group>
</form>
<form string="Select period">
<group width="650" height="200">
<field name="company_id" groups="base.group_multi_company"/>
<field name="display_account" required = "True"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
<newline/>
<group colspan="4" col="6">
<separator colspan="4"/>
<newline/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group>
</form>
</field>
</record>
</record>
<record id="action_account_balance_report" model="ir.actions.act_window">
<record id="action_account_balance_report" model="ir.actions.act_window">
<field name="name">Account Balance</field>
<field name="res_model">account.balance.report</field>
<field name="type">ir.actions.act_window</field>
@@ -51,7 +51,7 @@
<field name="target">new</field>
</record>
<record model="ir.values" id="action_account_balance_report_values">
<record model="ir.values" id="action_account_balance_report_values">
<field name="model_id" ref="account.model_account_account" />
<field name="object" eval="1" />
<field name="name">Account Balance</field>
@@ -59,19 +59,19 @@
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_balance_report'))" />
<field name="key">action</field>
<field name="model">account.account</field>
</record>
</record>
<record id="account_balance_report_account_view" model="ir.ui.view">
<record id="account_balance_report_account_view" model="ir.ui.view">
<field name="name">Account Balance</field>
<field name="model">account.balance.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Chart">
<field name="Account_list"/>
<separator colspan="4"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
</form>
<form string="Select Chart">
<field name="Account_list"/>
<separator colspan="4"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
</form>
</field>
</record>
@@ -86,11 +86,11 @@
<field name="target">new</field>
</record>
<menuitem icon="STOCK_PRINT"
name="Account Balance"
action="action_account_balance_account_report"
id="menu_account_balance_report"
parent="account.menu_generic_report"/>
<menuitem icon="STOCK_PRINT"
name="Account Balance"
action="action_account_balance_account_report"
id="menu_account_balance_report"
parent="account.final_accounting_reports"/>
</data>
</data>
</openerp>
@@ -2,27 +2,27 @@
<openerp>
<data>
<record id="view_account_central_journal" model="ir.ui.view">
<record id="view_account_central_journal" model="ir.ui.view">
<field name="name">Account central Journal</field>
<field name="model">account.central.journal</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Print Central Journal">
<group height="370" width="400">
<group>
<separator string="Journals"/><newline/>
<field name="journal_id" nolabel="1"/><newline/>
<separator string="Periods"/><newline/>
<field name="period_id" nolabel="1"/><newline/>
</group>
<newline/>
<group>
<separator colspan="4"/>
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
</group>
</group>
</form>
<form string="Print Central Journal">
<group height="370" width="400">
<group>
<separator string="Journals"/><newline/>
<field name="journal_id" nolabel="1"/><newline/>
<separator string="Periods"/><newline/>
<field name="period_id" nolabel="1"/><newline/>
</group>
<newline/>
<group>
<separator colspan="4"/>
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
</group>
</group>
</form>
</field>
</record>
@@ -35,12 +35,12 @@
<field name="target">new</field>
</record>
<menuitem
name="Central Journals"
parent="account.menu_generic_report"
action="action_account_central_journal"
id="menu_account_central_journal"
icon="STOCK_PRINT"/>
<menuitem
name="Central Journals"
parent="account.menu_journals_report"
action="action_account_central_journal"
id="menu_account_central_journal"
icon="STOCK_PRINT"/>
</data>
</openerp>
</data>
</openerp>
@@ -58,6 +58,11 @@ cancelled, please check the box !'))
'WHERE fiscalyear_id = %s', ('done', fy_id))
cr.execute('UPDATE account_fiscalyear ' \
'SET state = %s WHERE id = %s', ('done', fy_id))
# Log message for Fiscalyear
fy_pool = self.pool.get('account.fiscalyear')
fy_code = fy_pool.browse(cr, uid, fy_id, context=context).code
fy_pool.log(cr, uid, fy_id, "Fiscal year '%s' is closed, no more modification allowed." % (fy_code))
return {}
account_fiscalyear_close_state()
@@ -2,27 +2,27 @@
<openerp>
<data>
<record id="view_account_general_journal" model="ir.ui.view">
<record id="view_account_general_journal" model="ir.ui.view">
<field name="name">Account Genral Journal</field>
<field name="model">account.general.journal</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Print General Journal">
<group height="380" width="400">
<group>
<separator string="Journals"/><newline/>
<field name="journal_id" nolabel="1"/><newline/>
<separator string="Periods"/><newline/>
<field name="period_id" nolabel="1"/><newline/>
</group>
<newline/>
<group>
<separator colspan="4"/>
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
</group>
</group>
</form>
<form string="Print General Journal">
<group height="380" width="400">
<group>
<separator string="Journals"/><newline/>
<field name="journal_id" nolabel="1"/><newline/>
<separator string="Periods"/><newline/>
<field name="period_id" nolabel="1"/><newline/>
</group>
<newline/>
<group>
<separator colspan="4"/>
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
</group>
</group>
</form>
</field>
</record>
@@ -35,12 +35,12 @@
<field name="target">new</field>
</record>
<menuitem
name="General Journals"
parent="account.menu_generic_report"
action="action_account_general_journal"
id="menu_account_general_journal"
icon="STOCK_PRINT"/>
<menuitem
name="General Journals"
parent="account.menu_journals_report"
action="action_account_general_journal"
id="menu_account_general_journal"
icon="STOCK_PRINT"/>
</data>
</openerp>
</data>
</openerp>
@@ -96,7 +96,7 @@
<menuitem
icon="STOCK_PRINT"
name="General Ledger"
parent="account.menu_generic_report"
parent="account.final_accounting_reports"
action="action_account_general_ledger_menu"
id="menu_general_ledger"
/>
@@ -25,15 +25,15 @@
<field name="target">new</field>
</record>
<record model="ir.values" id="action_account_invoice_confirm_values">
<field name="model_id" ref="account.model_account_invoice" />
<field name="object" eval="1" />
<field name="name">Confirm Draft Invoices</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_confirm'))" />
<field name="key">action</field>
<field name="model">account.invoice</field>
</record>
<!-- <record model="ir.values" id="action_account_invoice_confirm_values">-->
<!-- <field name="model_id" ref="account.model_account_invoice" />-->
<!-- <field name="object" eval="1" />-->
<!-- <field name="name">Confirm Draft Invoices</field>-->
<!-- <field name="key2">client_action_multi</field>-->
<!-- <field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_confirm'))" />-->
<!-- <field name="key">action</field>-->
<!-- <field name="model">account.invoice</field>-->
<!-- </record>-->
<record id="account_invoice_cancel_view" model="ir.ui.view">
<field name="name">account.invoice.cancel.form</field>
@@ -59,15 +59,15 @@
<field name="target">new</field>
</record>
<record model="ir.values" id="action_account_invoice_cancel_values">
<field name="model_id" ref="account.model_account_invoice" />
<field name="object" eval="1" />
<field name="name">Cancel Selected Invoices</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_cancel'))" />
<field name="key">action</field>
<field name="model">account.invoice</field>
</record>
<!-- <record model="ir.values" id="action_account_invoice_cancel_values">-->
<!-- <field name="model_id" ref="account.model_account_invoice" />-->
<!-- <field name="object" eval="1" />-->
<!-- <field name="name">Cancel Selected Invoices</field>-->
<!-- <field name="key2">client_action_multi</field>-->
<!-- <field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_cancel'))" />-->
<!-- <field name="key">action</field>-->
<!-- <field name="model">account.invoice</field>-->
<!-- </record>-->
</data>
</openerp>
@@ -25,9 +25,10 @@
<field name="res_model">account.move.bank.reconcile</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_move_bank_reconcile"/>
<field name="target">new</field>
<field name="view_id" ref="view_account_move_bank_reconcile"/>
<field name="target">new</field>
<field name="help">Bank Reconciliation consists of verifying that your bank statement corresponds with the entries (or records) of that account in your accounting system.</field>
</record>
</data>
</openerp>
</openerp>
@@ -50,6 +50,7 @@
<field name="view_id" ref="account_partner_balance_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
<field name="help">This report is analysis by partner. It is a PDF report containing one line per partner representing the cumulative credit balance.</field>
</record>
<menuitem icon="STOCK_PRINT"
@@ -59,4 +60,4 @@
parent="account.next_id_22"/>
</data>
</openerp>
</openerp>
@@ -46,6 +46,11 @@ class account_period_close(osv.osv_memory):
for id in context['active_ids']:
cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
cr.execute('update account_period set state=%s where id=%s', (mode, id))
# Log message for Period
period_pool = self.pool.get('account.period')
for period_id, name in period_pool.name_get(cr, uid, [id]):
period_pool.log(cr, uid, period_id, "Period '%s' is closed, no more modification allowed for this period." % (name))
return {}
account_period_close()
@@ -27,8 +27,8 @@
<field name="res_model">account.period.close</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_period_close"/>
<field name="target">new</field>
<field name="view_id" ref="view_account_period_close"/>
<field name="target">new</field>
</record>
<record id="action_idea_post_vote_values" model="ir.values">
@@ -42,4 +42,4 @@
</record>
</data>
</openerp>
</openerp>
@@ -76,11 +76,6 @@
<field name="target">new</field>
</record>
<menuitem
parent="account.menu_finance_legal_statement"
id="final_accounting_reports"
name="Accounting Reports"/>
<menuitem icon="STOCK_PRINT"
name="Profit And Loss"
action="action_pl_balance_account_report"
@@ -61,7 +61,7 @@
<menuitem
name="Journals"
parent="account.menu_generic_report"
parent="account.menu_journals_report"
action="action_account_print_journal"
id="menu_account_print_journal"
icon="STOCK_PRINT"/>
@@ -53,6 +53,7 @@
<field name="view_id" ref="account_partner_ledger_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
<field name="help">To get detailed information about a partner you can ask for the Partner Ledgers.</field>
</record>
<menuitem icon="STOCK_PRINT"
@@ -10,7 +10,8 @@
<form string="Create Entries From Models">
<group height="240" width="510">
<separator string="This wizard will create recurring accounting entries" colspan="4"/>
<field name="model"/>
<label string="Select recurring to create a manualy recurring accounting entries" width="400"/>
<field name="model" colspan="4" nolabel="1"/>
<separator colspan="4"/>
<group colspan="4" col="2">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
@@ -50,7 +51,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Use Model">
<group colspan="4" col="6">
<group colspan="4" col="6" width="300" height="70">
<label string = "Entry Lines Created." colspan="2"/>
<newline/>
<button icon="gtk-ok" special="cancel" string="Ok"/>
@@ -66,7 +67,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Use Model">
<group colspan="4" col="6">
<group colspan="4" col="6" width="300" height="70">
<label string = "Are you sure you want to create entries?" colspan="2"/>
<newline/>
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
@@ -27,8 +27,9 @@
<field name="res_model">validate.account.move</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="validate_account_move_view"/>
<field name="target">new</field>
<field name="view_id" ref="validate_account_move_view"/>
<field name="target">new</field>
<field name="help">The process of ledger is the process of transferring debit and credit amounts from a journal of original entry to a ledger book.</field>
</record>
<menuitem
@@ -33,6 +33,7 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="help">This menu print a VAT declaration based on invoices or payments. You can select one or several periods of the fiscal year. Information required for a tax declaration is automatically generated by Open ERP from invoices (or payments, in some countries). This data is updated in real time. That’s very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter.</field>
</record>
<menuitem
+42 -22
View File
@@ -1,23 +1,27 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_analytic_analysis
# Dutch (Belgium) 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: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 15:34:14+0000\n"
"PO-Revision-Date: 2009-08-28 15:34:14+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"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-07-20 12:11+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Dutch (Belgium) <nl_BE@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_invoiced:0
msgid "Number of hours that can be invoiced plus those that already have been invoiced."
msgid ""
"Number of hours that can be invoiced plus those that already have been "
"invoiced."
msgstr ""
#. module: account_analytic_analysis
@@ -41,6 +45,7 @@ msgid "Computed using the formula: Maximum Quantity - Hours Tot."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_all
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all
msgid "All Analytic Accounts"
msgstr ""
@@ -78,8 +83,10 @@ msgstr ""
#. module: account_analytic_analysis
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr "De objectnaam moet beginnen met x_ en mag geen speciale karakters bevatten !"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"De objectnaam moet beginnen met x_ en mag geen speciale karakters bevatten !"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_new
@@ -110,7 +117,9 @@ msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,last_worked_invoiced_date:0
msgid "If invoice from the costs, this is the date of the latest work or cost that have been invoiced."
msgid ""
"If invoice from the costs, this is the date of the latest work or cost that "
"have been invoiced."
msgstr ""
#. module: account_analytic_analysis
@@ -130,7 +139,9 @@ msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_quantity:0
msgid "Number of hours you spent on the analytic account (from timesheet). It computes on all journal of type 'general'."
msgid ""
"Number of hours you spent on the analytic account (from timesheet). It "
"computes on all journal of type 'general'."
msgstr ""
#. module: account_analytic_analysis
@@ -140,7 +151,10 @@ msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_theorical:0
msgid "Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist."
msgid ""
"Based on the costs you had on the project, what would have been the revenue "
"if all these costs have been invoiced at the normal sale price provided by "
"the pricelist."
msgstr ""
#. module: account_analytic_analysis
@@ -174,7 +188,8 @@ msgstr ""
#. module: account_analytic_analysis
#: model:ir.module.module,description:account_analytic_analysis.module_meta_information
msgid "Modify account analytic view to show\n"
msgid ""
"Modify account analytic view to show\n"
"important data for project manager of services companies.\n"
"Add menu to show relevant information for each manager."
msgstr ""
@@ -252,7 +267,9 @@ msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_non_invoiced:0
msgid "Number of hours (from journal of type 'general') that can be invoiced if you invoice based on analytic account."
msgid ""
"Number of hours (from journal of type 'general') that can be invoiced if you "
"invoice based on analytic account."
msgstr ""
#. module: account_analytic_analysis
@@ -267,7 +284,9 @@ msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_to_invoice:0
msgid "If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs."
msgid ""
"If invoice from analytic account, the remaining amount you can invoice to "
"the customer based on the total costs."
msgstr ""
#. module: account_analytic_analysis
@@ -312,6 +331,7 @@ msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,total_cost:0
msgid "Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets."
msgid ""
"Total of costs for this account. It includes real costs (from invoices) and "
"indirect costs, like time spent on timesheets."
msgstr ""
+22 -384
View File
@@ -1,20 +1,21 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_analytic_plans
# Vietnamese 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: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:00:38+0000\n"
"PO-Revision-Date: 2009-08-28 16:00:38+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"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-07-20 03:43+0000\n"
"Last-Translator: Business Link Development Technologies <Unknown>\n"
"Language-Team: Vietnamese <vi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
@@ -23,8 +24,9 @@ msgstr ""
#. module: account_analytic_plans
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr "Tên đối tượng phải bắt đầu bằng chữ x_ và không chứa ký tự đặc biệt"
#. module: account_analytic_plans
#: model:ir.actions.report.xml,name:account_analytic_plans.account_analytic_account_crossovered_analytic
@@ -222,374 +224,9 @@ msgstr ""
#. module: account_analytic_plans
#: model:ir.module.module,description:account_analytic_plans.module_meta_information
msgid "This module allows to use several analytic plans, according to the general journal,\n"
"so that multiple analytic lines are created when the invoice or the entries\n"
"are confirmed.\n"
"\n"
"For example, you can define the following analytic structure:\n"
" Projects\n"
" Project 1\n"
" SubProj 1.1\n"
" SubProj 1.2\n"
" Project 2\n"
" Salesman\n"
" Eric\n"
" Fabien\n"
"\n"
"Here, we have two plans: Projects and Salesman. An invoice line must\n"
"be able to write analytic entries in the 2 plans: SubProj 1.1 and\n"
"Fabien. The amount can also be split. The following example is for\n"
"an invoice that touches the two subproject and assigned to one salesman:\n"
"\n"
"Plan1:\n"
" SubProject 1.1 : 50%\n"
" SubProject 1.2 : 50%\n"
"Plan2:\n"
" Eric: 100%\n"
"\n"
"So when this line of invoice will be confirmed, it will generate 3 analytic lines,\n"
"for one account entry.\n"
" "
msgstr ""
#. module: account_analytic_plans
#: model:ir.module.module,shortdesc:account_analytic_plans.module_meta_information
msgid "Multiple-plans management in Analytic Accounting"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_line
msgid "Analytic Plan Lines"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Crossovered Analytic -"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,plan_id:0
msgid "Model's Plan"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account2_ids:0
msgid "Account2 Id"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Amount"
msgstr ""
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_id:0
msgid "Root account of this plan."
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account6_ids:0
msgid "Account6 Id"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Quantity"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account_ids:0
msgid "Account Id"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Code"
msgstr ""
#. module: account_analytic_plans
#: wizard_button:create.model,info,end:0
msgid "OK"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,root_analytic_id:0
msgid "Root Account"
msgstr ""
#. module: account_analytic_plans
#: wizard_view:create.model,info:0
msgid "This distribution model has been saved. You will be able to reuse it later."
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,sequence:0
msgid "Sequence"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,analytic_account_id:0
msgid "Analytic Account"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.default,analytics_id:0
#: view:account.analytic.plan.instance:0
#: field:account.analytic.plan.instance,name:0
#: field:account.invoice.line,analytics_id:0
#: field:account.move.line,analytics_id:0
msgid "Analytic Distribution"
msgstr ""
#. module: account_analytic_plans
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_plan_instance_action
msgid "Analytic Distribution's models"
msgstr ""
#. module: account_analytic_plans
#: wizard_button:wizard.crossovered.analytic,init,end:0
msgid "Cancel"
msgstr ""
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,date1:0
msgid "Start Date"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "at"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "From Date"
msgstr ""
# This file contains the translation of the following modules:
# * account_analytic_plans
#
msgid ""
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:00:38+0000\n"
"PO-Revision-Date: 2009-08-28 16:00:38+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_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
msgid "Account4 Id"
msgstr ""
#. module: account_analytic_plans
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.report.xml,name:account_analytic_plans.account_analytic_account_crossovered_analytic
#: model:ir.actions.wizard,name:account_analytic_plans.account_analytic_account_inverted_balance_report
msgid "Crossovered Analytic"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account5_ids:0
msgid "Account5 Id"
msgstr ""
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,date2:0
msgid "End Date"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,rate:0
msgid "Rate (%)"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,name:0
#: field:account.analytic.plan.line,plan_id:0
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_form_action
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_plan_action
msgid "Analytic Plan"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance_line
msgid "Analytic Instance Line"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Lines"
msgstr ""
#. module: account_analytic_plans
#: wizard_button:wizard.crossovered.analytic,init,print:0
msgid "Print"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "To Date"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,plan_id:0
msgid "Plan Id"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_instance_action
msgid "Analytic Distribution's Models"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Account Name"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Line"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,code:0
msgid "Distribution Code"
msgstr ""
#. module: account_analytic_plans
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,name:0
msgid "Plan Name"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Printing date"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Percentage"
msgstr ""
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,empty_line:0
msgid "Dont show empty lines"
msgstr ""
#. module: account_analytic_plans
#: wizard_view:wizard.crossovered.analytic,init:0
msgid "Select Information"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
msgid "Account3 Id"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,journal_id:0
#: wizard_field:wizard.crossovered.analytic,init,journal_ids:0
msgid "Analytic Journal"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "100.00%"
msgstr ""
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,ref:0
msgid "Analytic Account Ref."
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account :"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
msgid "Analytic Plan Line"
msgstr ""
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account Reference:"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.wizard,name:account_analytic_plans.create_model
msgid "Create Model"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan,default_instance_id:0
msgid "Default Entries"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,plan_ids:0
#: field:account.journal,plan_id:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan
msgid "Analytic Plans"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,min_required:0
msgid "Minimum Allowed (%)"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account1_ids:0
msgid "Account1 Id"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,max_required:0
msgid "Maximum Allowed (%)"
msgstr ""
#. module: account_analytic_plans
#: wizard_view:create.model,info:0
msgid "Distribution Model Saved"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
msgid "Analytic Plan Instance"
msgstr ""
#. module: account_analytic_plans
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_instance_model_open
msgid "Distribution Models"
msgstr ""
#. module: account_analytic_plans
#: model:ir.module.module,description:account_analytic_plans.module_meta_information
msgid "This module allows to use several analytic plans, according to the general journal,\n"
"This module allows to use several analytic plans, according to the general "
"journal,\n"
"so that multiple analytic lines are created when the invoice or the entries\n"
"are confirmed.\n"
"\n"
@@ -614,7 +251,8 @@ msgid "This module allows to use several analytic plans, according to the genera
"Plan2:\n"
" Eric: 100%\n"
"\n"
"So when this line of invoice will be confirmed, it will generate 3 analytic lines,\n"
"So when this line of invoice will be confirmed, it will generate 3 analytic "
"lines,\n"
"for one account entry.\n"
" "
msgstr ""
@@ -687,7 +325,8 @@ msgstr ""
#. module: account_analytic_plans
#: wizard_view:create.model,info:0
msgid "This distribution model has been saved. You will be able to reuse it later."
msgid ""
"This distribution model has been saved. You will be able to reuse it later."
msgstr ""
#. module: account_analytic_plans
@@ -733,4 +372,3 @@ msgstr ""
#: rml:account.analytic.account.crossovered.analytic:0
msgid "From Date"
msgstr ""
@@ -163,7 +163,7 @@
<field name="model">crossovered.budget</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Budget">
<tree colors="blue:state in ('draft');gray:state in ('done','cancel');black:state in ('confirm','validate')" string="Budget">
<field name="name" colspan="1" select="1"/>
<field name="code" colspan="1" select="1" />
<field name="state"/>
+1
View File
@@ -20,6 +20,7 @@
##############################################################################
import account_coda_import
import coda_import
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -208,7 +208,8 @@ class account_coda_import(osv.osv_memory):
line=lines[value]
reconcile_id = False
if line['toreconcile']:
rec_id = move_line_obj.search(cr, uid, [('name', '=', line['name']), ('reconcile_id', '=', False), ('account_id.reconcile', '=', True)])
name = line['name'][:3] + '/' + line['name'][3:7] + '/' + line['name'][7:]
rec_id = pool.get('account.move.line').search(cr, uid, [('name','=', name),('reconcile_id','=',False),('account_id.reconcile','=',True)])
if rec_id:
reconcile_id = statement_reconcile_obj.create(cr, uid, {
'line_ids': [(6, 0, rec_id)]
@@ -296,4 +297,4 @@ class account_coda_import(osv.osv_memory):
account_coda_import()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+347
View File
@@ -0,0 +1,347 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import pooler
import time
import datetime
import wizard
import netsvc
import base64
from osv import osv
from tools.translate import _
codawiz_form = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Select your bank journal :" />
<field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
<newline />
<field name="def_payable" /> <field name="def_receivable" />
<newline />
<field name="awaiting_account" />
<separator string="Clic on 'New' to select your file :" colspan="4"/>
<field name="coda"/>
</form>
"""
codawiz_fields = {
'journal_id' : {
'string':'Bank Journal',
'type':'many2one',
'relation':'account.journal',
'required':True,
},
'coda' : {
'string':'Coda File',
'type':'binary',
'required':True,
},
'def_payable' : {
'string' : 'Default Payable Account',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'domain':[('type','=','payable')],
'help': 'Set here the payable account that will be used, by default, if the partner is not found',
},
'def_receivable' : {
'string' : 'Default receivable Account',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'domain':[('type','=','receivable')],
'help': 'Set here the receivable account that will be used, by default, if the partner is not found',
},
'awaiting_account' : {
'string' : 'Default Account for Unrecognized Movement',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'help': 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',
}
}
result_form = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="500"/>
</form>
"""
result_fields = {
'note' : {'string':'Log','type':'text'}
}
def _coda_parsing(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
codafile = data['form']['coda']
journal_code = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context).code
def_pay_acc = data['form']['def_payable']
def_rec_acc = data['form']['def_receivable']
str_log = ""
err_log = "Errors:\n------\n"
nb_err=0
std_log=''
str_log1 = "Coda File is Imported : "
str_not=''
str_not1=''
bank_statements=[]
recordlist = base64.decodestring(codafile).split('\n')
recordlist.pop()
for line in recordlist:
if line[0] == '0':
# header data
bank_statement = {}
bank_statement["bank_statement_line"]={}
bank_statement_lines = {}
bank_statement['date'] = str2date(line[5:11])
bank_statement['journal_id']=data['form']['journal_id']
period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))])
bank_statement['period_id'] = period_id[0]
bank_statement['state']='draft'
elif line[0] == '1':
# old balance data
bal_start = list2float(line[43:58])
if line[42] == '1':
bal_start = - bal_start
bank_statement["balance_start"]= bal_start
bank_statement["acc_number"]=line[5:17]
bank_statement["acc_holder"]=line[64:90]
bank_statement['name'] = journal_code + ' ' + str(line[2:5])
elif line[0]=='2':
# movement data record 2
if line[1]=='1':
# movement data record 2.1
if bank_statement_lines.has_key(line[2:6]):
continue
st_line = {}
st_line['extra_note'] = ''
st_line['statement_id']=0
st_line['ref'] = line[2:10]
st_line['date'] = time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
st_line_amt = list2float(line[32:47])
if line[61]=='1':
st_line['toreconcile'] = True
st_line['name']=line[65:77]
else:
st_line['toreconcile'] = False
st_line['name']=line[62:115]
st_line['free_comm'] = st_line['name']
st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[47:53]),"%y/%m/%d")),
st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
st_line['partner_id']=0
if line[31] == '1':
st_line_amt = - st_line_amt
st_line['account_id'] = def_pay_acc
else:
st_line['account_id'] = def_rec_acc
st_line['amount'] = st_line_amt
bank_statement_lines[line[2:6]]=st_line
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
elif line[1] == '3':
# movement data record 3.1
st_line_name = line[2:6]
st_line_partner_acc = str(line[10:47]).strip()
cntry_number=line[10:47].strip()
contry_name=line[47:125].strip()
bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line_partner_acc)])
bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
if bank_ids:
bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context)
if line and bank.partner_id:
bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
if bank_statement_lines[st_line_name]['amount'] < 0 :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
else :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
else:
nb_err += 1
err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number,contry_name)
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[0]=='3':
if line[1] == '1':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113]
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115]
elif line[1] == '3':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100]
elif line[0]=='8':
# new balance record
bal_end = list2float(line[42:57])
if line[41] == '1':
bal_end = - bal_end
bank_statement["balance_end_real"]= bal_end
elif line[0]=='9':
# footer record
bank_statements.append(bank_statement)
#end for
bkst_list=[]
for statement in bank_statements:
try:
bk_st_id = pool.get('account.bank.statement').create(cr,uid,{
'journal_id': statement['journal_id'],
'date':time.strftime('%Y-%m-%d',time.strptime(statement['date'],"%y/%m/%d")),
'period_id':statement['period_id'],
'balance_start': statement["balance_start"],
'balance_end_real': statement["balance_end_real"],
'state': 'draft',
'name': statement['name'],
})
lines=statement["bank_statement_line"]
for value in lines:
line=lines[value]
reconcile_id = False
if line['toreconcile']:
name = line['name'][:3] + '/' + line['name'][3:7] + '/' + line['name'][7:]
rec_id = pool.get('account.move.line').search(cr, uid, [('name','=', name),('reconcile_id','=',False),('account_id.reconcile','=',True)])
if rec_id:
reconcile_id = pool.get('account.bank.statement.reconcile').create(cr, uid, {
'line_ids': [(6, 0, rec_id)]
}, context=context)
mv = pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context)
if mv.partner_id:
line['partner_id'] = mv.partner_id.id
if line['amount'] < 0 :
line['account_id'] = mv.partner_id.property_account_payable.id
else :
line['account_id'] = mv.partner_id.property_account_receivable.id
str_not1 = ''
if line.has_key('contry_name') and line.has_key('cntry_number'):
str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"],line["cntry_number"],line["free_comm"]+line['extra_note'],line["val_date"][0],line["entry_date"][0])
id=pool.get('account.bank.statement.line').create(cr,uid,{
'name':line['name'],
'date': line['date'],
'type':line['amount']>0 and 'customer' or 'supplier',
'amount': line['amount'],
'partner_id':line['partner_id'] or 0,
'account_id':line['account_id'],
'statement_id': bk_st_id,
'reconcile_id': reconcile_id,
'note':str_not1,
'ref':line['ref'],
})
str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"],statement["acc_holder"])
std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
%(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
bkst_list.append(bk_st_id)
except osv.except_osv, e:
cr.rollback()
nb_err+=1
err_log += '\n Application Error : ' + str(e)
raise # REMOVEME
except Exception, e:
cr.rollback()
nb_err+=1
err_log += '\n System Error : '+str(e)
raise # REMOVEME
except :
cr.rollback()
nb_err+=1
err_log += '\n Unknown Error'
raise
err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
err_log += '\nNumber of error :'+ str(nb_err) +'\n'
pool.get('account.coda').create(cr, uid,{
'name':codafile,
'statement_ids': [(6, 0, bkst_list,)],
'note':str_log1+str_not+std_log+err_log,
'journal_id':data['form']['journal_id'],
'date':time.strftime("%Y-%m-%d"),
'user_id':uid,
})
return {'note':str_log1 + std_log + err_log ,'journal_id': data['form']['journal_id'], 'coda': data['form']['coda'],'statment_ids':bkst_list}
def str2date(date_str):
return time.strftime("%y/%m/%d",time.strptime(date_str,"%d%m%y"))
def str2float(str):
try:
return float(str)
except:
return 0.0
def list2float(lst):
try:
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
except:
return 0.0
class coda_import(wizard.interface):
def _action_open_window(self, cr, uid, data, context):
form=data['form']
return {
'domain':"[('id','in',%s)]"%(form['statment_ids']),
'name': 'Statement',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.bank.statement',
'view_id': False,
'type': 'ir.actions.act_window',
}
states = {
'init' : {
'actions' : [],
'result' : {'type' : 'form',
'arch' : codawiz_form,
'fields' : codawiz_fields,
'state' : [('end', '_Close'),('extraction', '_Ok') ]}
},
'extraction' : {
'actions' : [_coda_parsing],
'result' : {'type' : 'form',
'arch' : result_form,
'fields' : result_fields,
'state' : [('end', '_Close'),('open', '_Open Statement')]}
},
'open': {
'actions': [],
'result': {'type': 'action', 'action': _action_open_window, 'state': 'end'}
},
}
coda_import("account.coda_import")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -95,7 +95,7 @@
<field name="type">tree</field>
<field eval="32" name="priority"/>
<field name="arch" type="xml">
<tree editable="bottom" string="Partner entries">
<tree colors="blue:state in ('draft');black:state in ('validate')" editable="bottom" string="Partner entries">
<field name="date"/>
<field name="move_id"/>
<field name="ref"/>
@@ -177,7 +177,7 @@
<field name="type">tree</field>
<field eval="4" name="priority"/>
<field name="arch" type="xml">
<tree string="Payment order">
<tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" editable="bottom" string="Payment order">
<field name="reference"/>
<field name="mode"/>
<field name="date_planned"/>
+2 -1
View File
@@ -22,6 +22,7 @@
import time
from osv import fields
from osv import osv
from tools.translate import _
journal2type = {
'cash':'rec_voucher',
@@ -367,7 +368,7 @@ class account_voucher(osv.osv):
'move_ids':[(6, 0,line_ids)]
}
message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm")
message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirmed")
self.log(cr, uid, inv.id, message)
self.write(cr, uid, [inv.id], rec)
+16 -4
View File
@@ -6,7 +6,7 @@
<field name="model">account.voucher</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Accounting Vouchers">
<tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open','proforma','posted','recheck','audit')" string="Accounting Vouchers">
<field name="date"/>
<field name="number"/>
<field name="name"/>
@@ -139,12 +139,24 @@
</field>
</record>
<record id="account_cash_statement_graph" model="ir.ui.view">
<field name="name">account.voucher.graph</field>
<field name="model">account.voucher</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Voucher Statistics" type="bar">
<field name="date"/>
<field name="amount" operator="+"/>
</graph>
</field>
</record>
<!-- Receipt Vouchers -->
<record model="ir.actions.act_window" id="action_receipt_vou_voucher_list">
<field name="name">Receivable Vouchers</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="domain">[('journal_id.type','=','sale')]</field>
<field name="context">{'type':'sale'}</field>
@@ -158,7 +170,7 @@
<field name="name">Payable Vouchers</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="domain">[('journal_id.type','=','purchase')]</field>
<field name="context">{'type':'purchase'}</field>
@@ -172,7 +184,7 @@
<field name="name">Journal Vouchers</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'type':'general'}</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="search_view_id" ref="view_voucher_filter"/>
+266
View File
@@ -0,0 +1,266 @@
# Estonian translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-06-18 10:59+0000\n"
"PO-Revision-Date: 2010-07-22 20:10+0000\n"
"Last-Translator: lyyser <logard.1961@gmail.com>\n"
"Language-Team: Estonian <et@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-23 04:08+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr "Alamkontod"
#. module: analytic
#: help:account.analytic.line,amount_currency:0
msgid ""
"The amount expressed in the related account currency if not equal to the "
"company one."
msgstr ""
#. module: analytic
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Objekti nimi peab algama x_'ga ja ei tohi sisaldada ühtegi erisümbolit !"
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
msgstr "Konto nimi"
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
msgstr ""
#. module: analytic
#: help:account.analytic.line,currency_id:0
msgid "The related account currency if not equal to the company one."
msgstr ""
#. module: analytic
#: model:ir.module.module,description:analytic.module_meta_information
msgid ""
"Module for defining analytic accounting object.\n"
" "
msgstr ""
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
msgstr "Riik/Osariik"
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
msgstr "Konto haldur"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Draft"
msgstr "Mustand"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
msgstr "Suletud"
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
msgstr "Deebet"
#. module: analytic
#: help:account.analytic.account,state:0
msgid ""
"* When an account is created its in 'Draft' state. "
" \n"
"* If any associated partner is there, it can be in 'Open' state. "
" \n"
"* If any pending balance is there it can be in 'Pending'. "
" \n"
"* And finally when all the transactions are over, it can be in 'Close' "
"state. \n"
"* The project can be in either if the states 'Template' and 'Running'.\n"
" If it is template then we can make projects based on the template projects. "
"If its in 'Running' state it is a normal project. "
" \n"
" If it is to be reviewed then the state is 'Pending'.\n"
" When the project is completed the state is set to 'Done'."
msgstr ""
#. module: analytic
#: field:account.analytic.account,type:0
msgid "Account Type"
msgstr "Konto tüüp"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
msgstr "Mall"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
msgstr "Ootel"
#. module: analytic
#: model:ir.model,name:analytic.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: analytic
#: field:account.analytic.account,description:0
#: field:account.analytic.line,name:0
msgid "Description"
msgstr "Kirjeldus"
#. module: analytic
#: help:account.analytic.line,amount:0
msgid ""
"Calculated by multiplying the quantity and the price given in the Product's "
"cost price."
msgstr ""
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
msgstr "Ettevõte"
#. module: analytic
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Quantity"
msgstr ""
#. module: analytic
#: field:account.analytic.line,user_id:0
msgid "User"
msgstr "Kasutaja"
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr "Ülem analüütiline konto"
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
msgstr "Kuupäev"
#. module: analytic
#: field:account.analytic.account,currency_id:0
#: field:account.analytic.line,currency_id:0
msgid "Account currency"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
msgstr "Vaade"
#. module: analytic
#: help:account.analytic.account,quantity_max:0
msgid "Sets the higher limit of quantity of hours."
msgstr ""
#. module: analytic
#: field:account.analytic.account,credit:0
msgid "Credit"
msgstr "Krediit"
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
msgstr "Kogus"
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr "Kontakt"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
msgstr "Katkestatud"
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
msgstr "Balanss"
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
msgstr "Alguskuupäev"
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
msgstr "Kvantiteet"
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
msgstr "Lõppkuupäev"
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Account Code"
msgstr "Konto kood"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
msgstr "Normaalne"
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
msgstr "Täielik konto nimi"
#. module: analytic
#: field:account.analytic.line,account_id:0
#: model:ir.model,name:analytic.model_account_analytic_account
#: model:ir.module.module,shortdesc:analytic.module_meta_information
msgid "Analytic Account"
msgstr "Analüütiline konto"
#. module: analytic
#: field:account.analytic.account,company_currency_id:0
msgid "Currency"
msgstr "Rahaühik"
#. module: analytic
#: field:account.analytic.line,amount_currency:0
msgid "Amount currency"
msgstr ""
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
msgstr "Seotud partner"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
msgstr "Ava"
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
msgstr "Analüütilised kirjed"
+275
View File
@@ -0,0 +1,275 @@
# Chinese (Simplified) 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: 2010-06-18 10:59+0000\n"
"PO-Revision-Date: 2010-07-19 19:39+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr "子项"
#. module: analytic
#: help:account.analytic.line,amount_currency:0
msgid ""
"The amount expressed in the related account currency if not equal to the "
"company one."
msgstr "如果不是同一公司, 这金额表示相关项的货币"
#. module: analytic
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr "对象名必须以x_开头并且不能包含特殊字符"
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
msgstr "项名称"
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
msgstr "指定金额的数量用来计算"
#. module: analytic
#: help:account.analytic.line,currency_id:0
msgid "The related account currency if not equal to the company one."
msgstr "如果不是同一公司, 这相关项的货币"
#. module: analytic
#: model:ir.module.module,description:analytic.module_meta_information
msgid ""
"Module for defining analytic accounting object.\n"
" "
msgstr ""
"模块定义辅助核算对象\n"
" "
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
msgstr "状态"
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
msgstr "项管理"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Draft"
msgstr "草稿"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
msgstr "已关闭"
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
msgstr "借方"
#. module: analytic
#: help:account.analytic.account,state:0
msgid ""
"* When an account is created its in 'Draft' state. "
" \n"
"* If any associated partner is there, it can be in 'Open' state. "
" \n"
"* If any pending balance is there it can be in 'Pending'. "
" \n"
"* And finally when all the transactions are over, it can be in 'Close' "
"state. \n"
"* The project can be in either if the states 'Template' and 'Running'.\n"
" If it is template then we can make projects based on the template projects. "
"If its in 'Running' state it is a normal project. "
" \n"
" If it is to be reviewed then the state is 'Pending'.\n"
" When the project is completed the state is set to 'Done'."
msgstr ""
"*当创建这项时为'草稿'状态.\n"
"*如果有任何相关的业务伙伴它是'待处理'状态.\n"
"*如果有任何悬而未决的差额它为'悬而未决'状态.\n"
"*当所有交易已结束, 它是'关闭'状态\n"
"\n"
"*该项目状态可为其中之一, 如果是'模板'状态我们能按项目模板来建造项目, 如果为'运行中'它是一正常项目\n"
"如果需要审查则状态为'悬而未决'\n"
"当项目结束状态为'完成'"
#. module: analytic
#: field:account.analytic.account,type:0
msgid "Account Type"
msgstr "项类型"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
msgstr "模板"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
msgstr "悬而未决"
#. module: analytic
#: model:ir.model,name:analytic.model_account_analytic_line
msgid "Analytic Line"
msgstr "辅助核算明细"
#. module: analytic
#: field:account.analytic.account,description:0
#: field:account.analytic.line,name:0
msgid "Description"
msgstr "说明"
#. module: analytic
#: help:account.analytic.line,amount:0
msgid ""
"Calculated by multiplying the quantity and the price given in the Product's "
"cost price."
msgstr "乘与数量和价格, 提供产品的成本价格"
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
msgstr "公司"
#. module: analytic
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Quantity"
msgstr "最大数量"
#. module: analytic
#: field:account.analytic.line,user_id:0
msgid "User"
msgstr "用户"
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr "上级辅助核算项"
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
msgstr "日期"
#. module: analytic
#: field:account.analytic.account,currency_id:0
#: field:account.analytic.line,currency_id:0
msgid "Account currency"
msgstr "辅助核算项货币"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
msgstr "视图"
#. module: analytic
#: help:account.analytic.account,quantity_max:0
msgid "Sets the higher limit of quantity of hours."
msgstr "设置较高的小时数限制"
#. module: analytic
#: field:account.analytic.account,credit:0
msgid "Credit"
msgstr "贷方"
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
msgstr "金额"
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr "联系方式"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
msgstr "已取消"
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
msgstr "差额"
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
msgstr "开始日期"
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
msgstr "数量"
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
msgstr "结束日期"
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Account Code"
msgstr "辅助核算项代码"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
msgstr "正常"
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
msgstr "所有项目名称"
#. module: analytic
#: field:account.analytic.line,account_id:0
#: model:ir.model,name:analytic.model_account_analytic_account
#: model:ir.module.module,shortdesc:analytic.module_meta_information
msgid "Analytic Account"
msgstr "辅助核算项"
#. module: analytic
#: field:account.analytic.account,company_currency_id:0
msgid "Currency"
msgstr "货币"
#. module: analytic
#: field:account.analytic.line,amount_currency:0
msgid "Amount currency"
msgstr "货币金额"
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
msgstr "相关业务伙伴"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
msgstr "待处理"
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
msgstr "辅助核算记录"
+3 -3
View File
@@ -231,7 +231,7 @@
<field name="type">tree</field>
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<tree string="Catalog">
<tree colors="blue:state in ('unsold','draft');black:state in ('sold','taken_away');gray:state in ('paid') " string="Catalog">
<field name="obj_num" string="Ref" select="1"/>
<field name="name" select="1"/>
<field name="ach_login"/>
@@ -1366,7 +1366,7 @@ Auction adjudication
<field name="model">report.auction.adjudication</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Total adjudication">
<tree colors="blue:state in ('draft');black:state in ('close')" string="Total adjudication">
<field name="name" select="1"/>
<field name="adj_total" select="1"/>
<field name="state" select="1"/>
@@ -1540,7 +1540,7 @@ Object encoded
<field name="model">report.unclassified.objects</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Unclassified objects">
<tree colors="blue:state in ('draft','unsold');black:state in ('sold');gray:state in ('paid')"string="Unclassified objects">
<field name="obj_num" string="Ref" select="1"/>
<field name="name" select="1"/>
<field name="ach_login"/>
+2 -2
View File
@@ -37,7 +37,7 @@
<field name="model">audittrail.rule</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="AuditTrail Rules">
<tree colors="blue:state in ('draft');black:state in ('subscribed')" string="AuditTrail Rules">
<field name="name" />
<field name="object_id"/>
<field name="user_id" />
@@ -157,7 +157,7 @@
<field name="view_type">form</field>
</record>
<menuitem name="Logs" id="menu_action_audittrail_log_tree"
action="action_audittrail_log_tree" parent="menu_action_audittrail" />
action="action_audittrail_log_tree" parent="menu_action_audittrail" />
</data>
</openerp>
@@ -124,6 +124,17 @@ the rule to mark CC(mail to any other person defined in actions)."),
_order = 'sequence'
def onchange_model_id(self, cr, uid, ids, name):
res = {'domain':{'filter_id':[]}}
if name:
model_name = self.pool.get('ir.model').read(cr, uid, [name], ['model'])
if model_name:
mod_name = model_name[0]['model']
res['domain'] = {'filter_id': [('model_id','=',mod_name)]}
else:
res['value'] = {'filter_id':False}
return res
def pre_action(self, cr, uid, ids, model, context=None):
# Searching for action rules
cr.execute("SELECT model.model, rule.id FROM base_action_rule rule \
@@ -14,7 +14,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Action Rule">
<field name="name" select="1"/>
<field name="name" select="1" on_change="onchange_model_id(name)"/>
<field name="active"/>
<field name="sequence"/>
<field name="filter_id"/>
-1
View File
@@ -1147,7 +1147,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it.")
}
_defaults = {
'state': 'tentative',
'class': 'public',
+48 -48
View File
@@ -1,43 +1,43 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_contact
#
# * base_contact
# Giedrius Slavinskas <giedrius.slavinskas@gmail.com>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Project-Id-Version: OpenERP Server 5.0.1\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-18 05:58+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-07-21 07:52+0000\n"
"Last-Translator: Giedrius Slavinskas <giedrius.slavinskas@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:01+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: lt\n"
#. module: base_contact
#: field:res.partner.job,sequence_contact:0
msgid "Contact Seq."
msgstr "Kontaktų seka"
msgstr "Kontakto seka"
#. module: base_contact
#: model:ir.model,name:base_contact.model_res_partner_contact
msgid "res.partner.contact"
msgstr "res.partner.contact"
msgstr "Partnerių kontaktai"
#. module: base_contact
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Objekto pavadinimas turi prasidėti su x_ ir jame negali būti specialių "
"simbolių!"
"Objekto pavadinimas turi prasidėti x_ ir neturėti jokių specialių simbolių !"
#. module: base_contact
#: field:res.partner.job,function_id:0
msgid "Partner Function"
msgstr ""
msgstr "Partnerio pareigos"
#. module: base_contact
#: model:ir.actions.act_window,name:base_contact.action_partner_contact_form
@@ -52,7 +52,7 @@ msgstr "Kontaktai"
#. module: base_contact
#: field:res.partner.job,sequence_partner:0
msgid "Partner Seq."
msgstr "Partnerių seka"
msgstr "Partnerio seka"
#. module: base_contact
#: selection:res.partner.job,state:0
@@ -92,22 +92,22 @@ msgstr ""
#. module: base_contact
#: view:res.partner.address:0
msgid "# of Contacts"
msgstr ""
msgstr "Kontaktai"
#. module: base_contact
#: help:res.partner.job,other:0
msgid "Additional phone field"
msgstr ""
msgstr "Papildomos informacijos laukas"
#. module: base_contact
#: model:process.node,name:base_contact.process_node_function0
msgid "Function"
msgstr "Funkcija"
msgstr "Adresas"
#. module: base_contact
#: field:res.partner.job,fax:0
msgid "Fax"
msgstr ""
msgstr "Faksas"
#. module: base_contact
#: field:res.partner.contact,lang_id:0
@@ -117,7 +117,7 @@ msgstr "Kalba"
#. module: base_contact
#: field:res.partner.job,phone:0
msgid "Phone"
msgstr "Tel. Nr."
msgstr "Telefonas"
#. module: base_contact
#: model:process.transition,note:base_contact.process_transition_contacttofunction0
@@ -127,12 +127,12 @@ msgstr ""
#. module: base_contact
#: field:res.partner.contact,title:0
msgid "Title"
msgstr ""
msgstr "Antraštė"
#. module: base_contact
#: view:res.partner.job:0
msgid "Contact Functions"
msgstr ""
msgstr "Kontaktų pareigos"
#. module: base_contact
#: model:ir.module.module,shortdesc:base_contact.module_meta_information
@@ -144,7 +144,7 @@ msgstr ""
msgid ""
"Order of importance of this job title in the list of job title of the linked "
"partner"
msgstr ""
msgstr "Pareigos pagal svarbumą susijusiam partneriui."
#. module: base_contact
#: field:res.partner.contact,email:0
@@ -155,7 +155,7 @@ msgstr "El. paštas"
#. module: base_contact
#: field:res.partner.job,date_stop:0
msgid "Date Stop"
msgstr ""
msgstr "Pabaigos data"
#. module: base_contact
#: view:res.partner:0
@@ -167,25 +167,25 @@ msgstr "Adresas"
#: model:ir.actions.act_window,name:base_contact.action_res_partner_job
#: model:ir.ui.menu,name:base_contact.menu_action_res_partner_job
msgid "Contact's Jobs"
msgstr ""
msgstr "Kontaktų pareigos"
#. module: base_contact
#: field:res.partner.contact,country_id:0
msgid "Nationality"
msgstr ""
msgstr "Tautybė"
#. module: base_contact
#: help:res.partner.job,sequence_contact:0
msgid ""
"Order of importance of this address in the list of addresses of the linked "
"contact"
msgstr ""
msgstr "Adresai pagal svarbumą sąraše."
#. module: base_contact
#: field:res.partner.address,job_id:0
#: field:res.partner.contact,job_id:0
msgid "Main Job"
msgstr ""
msgstr "Pagrindinės pareigos"
#. module: base_contact
#: view:res.partner:0
@@ -195,17 +195,17 @@ msgstr "Kategorijos"
#. module: base_contact
#: field:res.partner.contact,function_id:0
msgid "Main Function"
msgstr ""
msgstr "Pagrindinė funkcija"
#. module: base_contact
#: model:process.transition,note:base_contact.process_transition_partnertoaddress0
msgid "Define partners and their addresses."
msgstr ""
msgstr "Pasirinkite partnerius ir jų adresus"
#. module: base_contact
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Netinkamas XML peržiūros struktūrai!"
#. module: base_contact
#: model:process.process,name:base_contact.process_process_basecontactprocess0
@@ -215,58 +215,58 @@ msgstr ""
#. module: base_contact
#: view:res.partner.contact:0
msgid "Seq."
msgstr ""
msgstr "Seka"
#. module: base_contact
#: field:res.partner.job,extension:0
msgid "Extension"
msgstr ""
msgstr "Papildomas telefonas"
#. module: base_contact
#: field:res.partner.contact,mobile:0
msgid "Mobile"
msgstr "Mob. tel."
msgstr "Mobilus telefonas"
#. module: base_contact
#: help:res.partner.job,extension:0
msgid "Internal/External extension phone number"
msgstr ""
msgstr "Vidinis/išorinis papildomas telefono numeris"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_contacts0
msgid "People you work with."
msgstr ""
msgstr "Bendradarbiai"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Extra Information"
msgstr ""
msgstr "Papildoma informacija"
#. module: base_contact
#: view:res.partner.contact:0
#: field:res.partner.contact,job_ids:0
msgid "Functions and Addresses"
msgstr ""
msgstr "Pareigos ir adresai"
#. module: base_contact
#: field:res.partner.contact,active:0
msgid "Active"
msgstr ""
msgstr "Aktyvus"
#. module: base_contact
#: field:res.partner.job,contact_id:0
msgid "Contact"
msgstr "Kontaktai"
msgstr "Kontaktas"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_partners0
msgid "Companies you work with."
msgstr ""
msgstr "Įmonė kurioje jūs dirbate."
#. module: base_contact
#: field:res.partner.contact,partner_id:0
msgid "Main Employer"
msgstr ""
msgstr "Pagrindinis darbdavys"
#. module: base_contact
#: model:process.transition,name:base_contact.process_transition_functiontoaddress0
@@ -281,7 +281,7 @@ msgstr "Partnerių kontaktai"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Partner Contact"
msgstr "Partnerio kontaktas"
msgstr "Partnerio kontaktai"
#. module: base_contact
#: model:process.node,name:base_contact.process_node_partners0
@@ -292,17 +292,17 @@ msgstr "Partneriai"
#: model:process.node,name:base_contact.process_node_addresses0
#: view:res.partner:0
msgid "Addresses"
msgstr ""
msgstr "Adresai"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_addresses0
msgid "Working and private addresses."
msgstr ""
msgstr "Darbo ir asmeninis adresai."
#. module: base_contact
#: field:res.partner.contact,name:0
msgid "Last Name"
msgstr ""
msgstr "Pavardė"
#. module: base_contact
#: field:res.partner.job,state:0
@@ -313,22 +313,22 @@ msgstr "Būsena"
#: view:res.partner.contact:0
#: view:res.partner.job:0
msgid "General"
msgstr "Bendras"
msgstr "Bendrasis"
#. module: base_contact
#: selection:res.partner.job,state:0
msgid "Past"
msgstr ""
msgstr "Buvęs"
#. module: base_contact
#: view:res.partner.contact:0
msgid "General Information"
msgstr "Bendra informacija"
msgstr "Bendroji informacija"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_function0
msgid "Jobs at a same partner address."
msgstr ""
msgstr "Darbai su to paties partnerio adresu."
#. module: base_contact
#: field:res.partner.job,name:0
@@ -348,7 +348,7 @@ msgstr ""
#. module: base_contact
#: field:res.partner.contact,website:0
msgid "Website"
msgstr "Interneto svetainė"
msgstr "Svetainė"
#. module: base_contact
#: field:res.partner.contact,birthdate:0
+3 -1
View File
@@ -43,7 +43,9 @@
'init_xml': ['base_setup_data.xml'],
'update_xml': ['security/ir.model.access.csv',
'base_setup_installer.xml',
'base_setup_todo.xml','gtk_contact_form.xml'],
'base_setup_todo.xml',
# 'gtk_contact_form.xml'
],
'demo_xml': ['base_setup_demo.xml'],
'installable': True,
'active': True,
+11 -11
View File
@@ -23,18 +23,18 @@
<attribute name="string">Install Generic Modules</attribute>
</separator>
<group colspan="8">
<field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="misc_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="misc_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<separator string="Install Specific Business Modules" colspan="4"/>
<field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="profile_auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="profile_auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
</group>
</data>
</field>
+1 -1
View File
@@ -88,7 +88,7 @@ class base_setup_company(osv.osv_memory):
'city':fields.char('City', size=128),
'state_id':fields.selection(_get_all_states, 'State'),
'country_id':fields.selection(_get_all_countries, 'Country'),
'email':fields.char('E-mail', size=64, required=True),
'email':fields.char('E-mail', size=64),
'phone':fields.char('Phone', size=64),
'currency':fields.many2one('res.currency', 'Currency', required=True),
'rml_header1':fields.char('Report Header', size=200,
+44 -39
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-11-18 06:43+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-07-20 22:26+0000\n"
"Last-Translator: Paulius Sladkevičius <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-06-22 04:14+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board
@@ -21,32 +21,34 @@ msgstr ""
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Objekto pavadinimas turi prasidėti x_ ir negali turėti jokių specialiųjų "
"ženklų !"
#. module: board
#: model:ir.model,name:board.model_board_board
msgid "board.board"
msgstr ""
msgstr "Veiklos monitoringas"
#. module: board
#: field:board.note,user_id:0
msgid "Author"
msgstr ""
msgstr "Autorius"
#. module: board
#: model:ir.module.module,shortdesc:board.module_meta_information
msgid "Dashboard main module"
msgstr ""
msgstr "Veiklos monitoringo modulis"
#. module: board
#: view:board.note:0
#: field:board.note,note:0
msgid "Note"
msgstr ""
msgstr "Pastaba"
#. module: board
#: field:board.board.line,width:0
msgid "Width"
msgstr ""
msgstr "Plotis"
#. module: board
#: constraint:ir.actions.act_window:0
@@ -56,39 +58,39 @@ msgstr ""
#. module: board
#: field:board.board.line,name:0
msgid "Title"
msgstr ""
msgstr "Antraštė"
#. module: board
#: model:ir.actions.act_window,name:board.action_view_board_list_form
#: model:ir.ui.menu,name:board.menu_view_board_form
msgid "Dashboard Definition"
msgstr ""
msgstr "Veiklos monitoringo nustatymai"
#. module: board
#: model:ir.actions.act_window,name:board.action_view_board_note_form
#: model:ir.ui.menu,name:board.menu_view_board_note_form
msgid "Publish a note"
msgstr ""
msgstr "Publikuoti pastabą"
#. module: board
#: wizard_view:board.board.menu.create,init:0
msgid "Menu Information"
msgstr ""
msgstr "Meniu informacija"
#. module: board
#: field:board.board,line_ids:0
msgid "Action Views"
msgstr ""
msgstr "Vaizdas"
#. module: board
#: model:ir.model,name:board.model_board_note
msgid "board.note"
msgstr ""
msgstr "Pastaba"
#. module: board
#: field:board.note,date:0
msgid "Date"
msgstr ""
msgstr "Data"
#. module: board
#: model:ir.ui.menu,name:board.next_id_50
@@ -98,122 +100,125 @@ msgstr "Nustatymai"
#. module: board
#: field:board.note.type,name:0
msgid "Note Type"
msgstr ""
msgstr "Pastabos tipas"
#. module: board
#: wizard_view:board.board.menu.create,init:0
msgid "Create Menu For Dashboard"
msgstr ""
msgstr "Sukurti meniu veiklos monitoringui"
#. module: board
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Netinkamas XML peržiūros strūkturai!"
#. module: board
#: wizard_field:board.board.menu.create,init,menu_parent_id:0
msgid "Parent Menu"
msgstr ""
msgstr "Bazinis meniu"
#. module: board
#: view:board.note:0
msgid "Notes"
msgstr ""
msgstr "Pastabos"
#. module: board
#: model:ir.model,name:board.model_board_note_type
msgid "board.note.type"
msgstr ""
msgstr "Monitoringo pastabų tipas"
#. module: board
#: view:board.board:0
#: field:board.board,name:0
#: field:board.board.line,board_id:0
msgid "Dashboard"
msgstr ""
msgstr "Veiklos monitoringas"
#. module: board
#: model:ir.module.module,description:board.module_meta_information
msgid "Base module for all dashboards."
msgstr ""
msgstr "Veiklos monitoringo pagrindinis modulis"
#. module: board
#: field:board.board.line,position:0
msgid "Position"
msgstr ""
msgstr "Pareigos"
#. module: board
#: model:ir.actions.act_window,name:board.dashboard_open
msgid "Open Dashboard"
msgstr ""
msgstr "Atidaryti veiklos monitoringą"
#. module: board
#: wizard_field:board.board.menu.create,init,menu_name:0
msgid "Menu Name"
msgstr ""
msgstr "Meniu pavadinimas"
#. module: board
#: field:board.note,type:0
msgid "Note type"
msgstr ""
msgstr "Pastabos tipas"
#. module: board
#: selection:board.board.line,position:0
msgid "Left"
msgstr ""
msgstr "Kairėje"
#. module: board
#: field:board.board,view_id:0
msgid "Board View"
msgstr ""
msgstr "Veiklos monitoringas"
#. module: board
#: selection:board.board.line,position:0
msgid "Right"
msgstr ""
msgstr "Dešinėje"
#. module: board
#: field:board.board.line,sequence:0
msgid "Sequence"
msgstr ""
msgstr "Seka"
#. module: board
#: view:board.board:0
#: wizard_button:board.board.menu.create,init,create_menu:0
msgid "Create Menu"
msgstr ""
msgstr "Sukurti meniu"
#. module: board
#: model:ir.ui.menu,name:board.dashboard_menu
msgid "Dashboards"
msgstr ""
msgstr "Veiklos monitoringas"
#. module: board
#: field:board.board.line,height:0
msgid "Height"
msgstr ""
msgstr "Aukštis"
#. module: board
#: model:ir.actions.wizard,name:board.wizard_board_create_menu
msgid "Create Board Menu"
msgstr ""
msgstr "Sukurti veiklos monitoringo meniu"
#. module: board
#: wizard_button:board.board.menu.create,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Atšaukti"
#. module: board
#: view:board.board:0
msgid "Dashboard View"
msgstr ""
msgstr "Veiklos monitoringo vaizdas"
#. module: board
#: model:ir.model,name:board.model_board_board_line
msgid "board.board.line"
msgstr ""
msgstr "Monitoringo eilutė"
#. module: board
#: field:board.note,name:0
msgid "Subject"
msgstr ""
msgstr "Tema"
#~ msgid "Action"
#~ msgstr "Veiksmas"
+7
View File
@@ -301,6 +301,13 @@ class crm_case(object):
self.write(cr, uid, ids, {'state': 'cancel',
'active': True})
self._action(cr, uid, cases, 'cancel')
for case in cases:
message = "The " + self._description + " '" + case.name + "' has been Cancelled."
#TODO: Need to differentiate lead and opportunity
# if hasattr(case, 'type'):
# #TO CHECK: hasattr gives warning for other crm objects that don't have field 'type'
# message = "The " + (case.type or 'Case').title() + " '" + case.name + "' has been Cancelled."
self.log(cr, uid, case.id, message)
return True
def case_pending(self, cr, uid, ids, *args):
+1 -1
View File
@@ -41,7 +41,7 @@
<group colspan="2" col="2">
<separator string="Plugins" colspan="4" />
<field name="thunderbird" />
<label string="*Outlook*" />
<!-- <label string="*Outlook*" />-->
<!-- TODO <field name="outlook" />-->
</group>
</group>
+6 -3
View File
@@ -198,7 +198,8 @@ class crm_lead(osv.osv, crm_case):
self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
message = _('The Lead') + " '" + name + "' "+ _("has been written as Open.")
type = self.browse(cr, uid, id).type or 'Lead'
message = (_('The ') + type.title()) + " '" + name + "' "+ _("has been Opened.")
self.log(cr, uid, id, message)
return res
@@ -213,8 +214,10 @@ class crm_lead(osv.osv, crm_case):
res = super(crm_lead, self).case_close(cr, uid, ids, args)
self.write(cr, uid, ids, {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
for (id, name) in self.name_get(cr, uid, ids):
message = _('The Lead') + " '" + name + "' "+ _("has been written as Closed.")
self.log(cr, uid, id, message)
lead = self.browse(cr, uid, id)
if lead.type == 'lead':
message = _('The Lead') + " '" + name + "' "+ _("has been Closed.")
self.log(cr, uid, id, message)
return res
def convert_opportunity(self, cr, uid, ids, context=None):
+15 -1
View File
@@ -122,7 +122,21 @@ class crm_meeting(osv.osv, crm_case):
}
return value
def case_open(self, cr, uid, ids, *args):
"""Confirms meeting
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of Meeting Ids
@param *args: Tuple Value for additional Params
"""
res = super(crm_meeting, self).case_open(cr, uid, ids, args)
for (id, name) in self.name_get(cr, uid, ids):
message = _('The Meeting') + " '" + name + "' "+ _("has been Confirmed.")
self.log(cr, uid, id, message)
return res
crm_meeting()
class calendar_attendee(osv.osv):
+8 -6
View File
@@ -36,8 +36,6 @@ AVAILABLE_STATES = [
class crm_opportunity(osv.osv):
""" Opportunity Cases """
_name = "crm.lead"
_description = "Opportunity"
_order = "priority,date_action,id desc"
_inherit = 'crm.lead'
_columns = {
@@ -72,8 +70,10 @@ class crm_opportunity(osv.osv):
self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Won.")
self.log(cr, uid, id, message)
opp = self.browse(cr, uid, id)
if opp.type == 'opportunity':
message = _('The Opportunity') + " '" + name + "' "+ _("has been Won.")
self.log(cr, uid, id, message)
return res
def case_mark_lost(self, cr, uid, ids, *args):
@@ -93,8 +93,10 @@ class crm_opportunity(osv.osv):
res = self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Lost.")
self.log(cr, uid, id, message)
opp = self.browse(cr, uid, id)
if opp.type == 'opportunity':
message = _('The Opportunity') + " '" + name + "' "+ _("has been Lost.")
self.log(cr, uid, id, message)
return res
def case_cancel(self, cr, uid, ids, *args):
+1 -1
View File
@@ -38,7 +38,7 @@
<field name="model">crm.phonecall</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
<tree colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
<field name="date" string="Date"/>
<field name="name" string="Call Summary"/>
<field name="partner_id" string="Partner"/>
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-19 03:41+0000\n"
"X-Launchpad-Export-Date: 2010-07-21 03:42+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
+360 -330
View File
File diff suppressed because it is too large Load Diff
+381 -376
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -9,7 +9,7 @@
<field name="model">crm.lead.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Leads Analysis">
<tree colors="blue:state in ('draft');black:state in ('open','pending','done');gray:state in ('cancel') " string="Leads Analysis">
<field name="name" invisible="1"/>
<field name="state" invisible="1"/>
<field name="stage_id" invisible="1"/>
@@ -154,7 +154,7 @@
<field name="model">crm.lead.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Opportunities Analysis">
<tree colors="blue:state in ('draft');black:state in ('open','pending','done');gray:state in ('cancel') " string="Opportunities Analysis">
<field name="name" invisible="1"/>
<field name="month" invisible="1"/>
<field name="section_id" invisible="1" groups="base.group_extended"/>
@@ -9,7 +9,7 @@
<field name="model">crm.phonecall.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Phone calls">
<tree colors="blue:state in ('draft');black:state in ('open','pending','done');gray:state in ('cancel') " string="Phone calls">
<field name="name" invisible="1"/>
<field name="month" invisible="1"/>
<field name="section_id" invisible="1"/>
+2 -2
View File
@@ -12,7 +12,7 @@
<field name="arch" type="xml">
<page string="History" position="inside">
<field name="opportunity_ids" colspan="4" nolabel="1">
<tree string="Opportunities" colors="blue:state=='pending';grey:state=='cancel')">
<tree string="Opportunities" colors="blue:state=='pending';gray:state=='cancel')">
<field name="create_date"/>
<field name="name"/>
<field name="type"/>
@@ -45,7 +45,7 @@
</tree>
</field>
<field name="opportunity_assigned_ids" colspan="4" nolabel="1">
<tree string="Assigned Opportunities" colors="blue:state=='pending';grey:state=='cancel')">
<tree string="Assigned Opportunities" colors="blue:state=='pending';gray:state=='cancel')">
<field name="create_date"/>
<field name="name"/>
<field name="type"/>
+6 -2
View File
@@ -187,12 +187,14 @@ class crm_lead_forward_to_partner(osv.osv_memory):
email_re = r'([^ ,<@]+@[^> ,]+)'
email_cc = re.findall(email_re, case.email_cc or '')
new_cc = []
if case.email_cc:
new_cc.append(case.email_cc)
for to in this.email_to.split(','):
email_to = re.findall(email_re, to)
email_to = email_to and email_to[0] or ''
if email_to not in email_cc:
new_cc.append(to)
to_write.update({'email_cc' : case.email_cc or '' + ','.join(new_cc)})
to_write.update({'email_cc' : ', '.join(new_cc) })
case_pool.write(cr, uid, case.id, to_write, context=context)
return {}
@@ -231,7 +233,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
"Partner: %s" % (lead.partner_id and lead.partner_id.name_get()[0][1]),
"Contact: %s" % (pa.name or ''),
"Title: %s" % (pa.title or ''),
"Function: %s" % (pa.function and pa.function.name_get()[0][1] or ''),
"Function: %s" % (pa.function or ''),
"Street: %s" % (pa.street or ''),
"Street2: %s" % (pa.street2 or ''),
"Zip: %s" % (pa.zip or ''),
@@ -242,6 +244,8 @@ class crm_lead_forward_to_partner(osv.osv_memory):
"Phone: %s" % (pa.phone or ''),
"Fax: %s" % (pa.fax or ''),
"Mobile: %s" % (pa.mobile or ''),
"Lead Category: %s" % (lead.categ_id and lead.categ_id.name or ''),
"Details: %s" % (lead.description or ''),
]
return "\n".join(body + ['---'])
+1 -1
View File
@@ -28,7 +28,7 @@ class crm_claim(osv.osv, crm.crm_case):
Crm claim
"""
_name = "crm.claim"
_description = "Claim Cases"
_description = "Claim"
_order = "id desc"
_inherit = ['mailgate.thread']
_columns = {
+1 -1
View File
@@ -57,7 +57,7 @@
<field name="model">crm.claim</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Claims" colors="blue:state=='pending';black:state=='open';grey:state in ('close', 'cancel')">
<tree string="Claims" colors="blue:state=='pending';black:state=='open';gray:state in ('close', 'cancel')">
<field name="name"/>
<field name="partner_id"/>
<field name="user_id" />
+1 -1
View File
@@ -26,7 +26,7 @@ class crm_fundraising(osv.osv, crm.crm_case):
""" Fund Raising Cases """
_name = "crm.fundraising"
_description = "Fund Raising Cases"
_description = "Fund Raising"
_order = "id desc"
_inherit = ['mailgate.thread']
_columns = {
@@ -9,7 +9,7 @@
<field name="model">crm.fundraising.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Fundraising">
<tree colors="blue:state in ('draft');black:state in ('open','pending');gray:state in ('done','cancel') " string="Fundraising">
<field name="name" invisible="1"/>
<field name="month" invisible="1"/>
<field name="section_id" invisible="1"/>
+1 -1
View File
@@ -27,7 +27,7 @@ class crm_helpdesk(osv.osv, crm.crm_case):
""" Helpdesk Cases """
_name = "crm.helpdesk"
_description = "Helpdesk Cases"
_description = "Helpdesk"
_order = "id desc"
_inherit = ['mailgate.thread']
_columns = {
+1 -1
View File
@@ -168,7 +168,7 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Helpdesk Support Tree"
colors="black:state=='open';blue:state=='pending';grey:state in ('cancel','close')">
colors="black:state=='open';blue:state=='pending';gray:state in ('cancel','close')">
<field name="name" string="Query" />
<field name="partner_id" string="Partner"/>
<field name="date" string="Date"/>
@@ -9,7 +9,7 @@
<field name="model">crm.helpdesk.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Helpdesk">
<tree colors="blue:state in ('draft');black:state in ('open','pending');gray:state in ('done','cancel') " string="Helpdesk">
<field name="name" />
<field name="month"/>
<field name="section_id" />
+31 -29
View File
@@ -7,58 +7,58 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-01-10 01:56+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"PO-Revision-Date: 2010-07-19 19:55+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:16+0000\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm_profiling
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr "对象名称必须以“x_”起头且不能包含任何特殊字符!"
msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
#. module: crm_profiling
#: field:crm_profiling.answer,question_id:0
#: field:crm_profiling.question,name:0
#: model:ir.model,name:crm_profiling.model_crm_profiling_question
msgid "Question"
msgstr ""
msgstr "问题"
#. module: crm_profiling
#: wizard_button:open_questionnaire,init,open:0
msgid "Open Questionnaire"
msgstr ""
msgstr "待处理调查问卷"
#. module: crm_profiling
#: field:crm.segmentation,child_ids:0
msgid "Child Profiles"
msgstr ""
msgstr "子配置"
#. module: crm_profiling
#: model:ir.module.module,shortdesc:crm_profiling.module_meta_information
msgid "crm_profiling management"
msgstr ""
msgstr "crm配置管理"
#. module: crm_profiling
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "在动作定义中输入的对象名称错误"
msgstr "在动作定义中使用了无效的模快名。"
#. module: crm_profiling
#: field:crm_profiling.answer,name:0
#: model:ir.model,name:crm_profiling.model_crm_profiling_answer
msgid "Answer"
msgstr ""
msgstr "答案"
#. module: crm_profiling
#: view:res.partner:0
msgid "Profiling"
msgstr ""
msgstr "配置中"
#. module: crm_profiling
#: field:crm_profiling.questionnaire,description:0
@@ -68,71 +68,73 @@ msgstr "说明"
#. module: crm_profiling
#: field:crm.segmentation,answer_no:0
msgid "Excluded Answers"
msgstr ""
msgstr "排除的答案"
#. module: crm_profiling
#: view:crm_profiling.answer:0
#: view:crm_profiling.question:0
#: field:res.partner,answers_ids:0
msgid "Answers"
msgstr ""
msgstr "答案"
#. module: crm_profiling
#: wizard_field:open_questionnaire,init,questionnaire_name:0
msgid "Questionnaire name"
msgstr ""
msgstr "调查问卷名称"
#. module: crm_profiling
#: view:res.partner:0
msgid "Use a questionnaire"
msgstr ""
msgstr "使用的调查问卷"
#. module: crm_profiling
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "无效的视图结构xml文件!"
#. module: crm_profiling
#: view:crm_profiling.questionnaire:0
#: model:ir.actions.act_window,name:crm_profiling.open_questionnaires
#: model:ir.ui.menu,name:crm_profiling.menu_segm_questionnaire
msgid "Questionnaires"
msgstr ""
msgstr "调查问卷"
#. module: crm_profiling
#: code:addons/crm_profiling/crm_profiling.py:0
#: field:crm_profiling.questionnaire,name:0
#: model:ir.model,name:crm_profiling.model_crm_profiling_questionnaire
#: wizard_view:open_questionnaire,init:0
#, python-format
msgid "Questionnaire"
msgstr ""
msgstr "调查问卷"
#. module: crm_profiling
#: constraint:crm.segmentation:0
msgid "Error ! You can not create recursive profiles."
msgstr ""
msgstr "错误! 你不能创建递归的配置"
#. module: crm_profiling
#: field:crm.segmentation,profiling_active:0
msgid "Use The Profiling Rules"
msgstr ""
msgstr "使用这配置规则"
#. module: crm_profiling
#: view:crm_profiling.question:0
#: field:crm_profiling.question,answers_ids:0
msgid "Avalaible answers"
msgstr ""
msgstr "可用答案"
#. module: crm_profiling
#: field:crm.segmentation,answer_yes:0
msgid "Included Answers"
msgstr ""
msgstr "包括答案"
#. module: crm_profiling
#: help:crm.segmentation,profiling_active:0
msgid ""
"Check this box if you want to use this tab as part of the segmentation rule. "
"If not checked, the criteria beneath will be ignored"
msgstr ""
msgstr "勾选此项, 如果你想使用这tab做为细分规则的一部分, 如果不选下面的标准将被忽略"
#. module: crm_profiling
#: view:crm_profiling.question:0
@@ -140,30 +142,30 @@ msgstr ""
#: model:ir.actions.act_window,name:crm_profiling.open_questions
#: model:ir.ui.menu,name:crm_profiling.menu_segm_answer
msgid "Questions"
msgstr ""
msgstr "问题"
#. module: crm_profiling
#: field:crm.segmentation,parent_id:0
msgid "Parent Profile"
msgstr ""
msgstr "上级配置"
#. module: crm_profiling
#: wizard_button:open_questionnaire,init,end:0
#: wizard_button:open_questionnaire,open,end:0
msgid "Cancel"
msgstr ""
msgstr "取消"
#. module: crm_profiling
#: view:crm.segmentation:0
msgid "Partner Segmentations"
msgstr "业务伙伴分类"
msgstr "业务伙伴细分"
#. module: crm_profiling
#: model:ir.actions.wizard,name:crm_profiling.wizard_open_questionnaire
msgid "Using a questionnaire"
msgstr ""
msgstr "使用一调查问卷"
#. module: crm_profiling
#: wizard_button:open_questionnaire,open,compute:0
msgid "Save Data"
msgstr ""
msgstr "保存日期"
+28 -28
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-20 07:47+0000\n"
"PO-Revision-Date: 2010-07-20 03:54+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 03:56+0000\n"
"X-Launchpad-Export-Date: 2010-07-21 03:42+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: delivery
@@ -45,7 +45,7 @@ msgstr "邮递送货"
#. module: delivery
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "无效XML视图结构!"
msgstr "无效的视图结构xml文件!"
#. module: delivery
#: constraint:res.partner:0
@@ -60,17 +60,17 @@ msgstr "状态"
#. module: delivery
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "在这动作定义中有无效的模块名"
msgstr "在动作定义中使用了无效的模快名。"
#. module: delivery
#: help:res.partner,property_delivery_carrier:0
msgid "This delivery method will be used when invoicing from packing."
msgstr "这送货方式将用在包装的发票上"
msgstr "这交货方式将用在包装的发票上"
#. module: delivery
#: model:ir.model,name:delivery.model_delivery_grid
msgid "Delivery Grid"
msgstr "送货网"
msgstr "交货表格"
#. module: delivery
#: field:delivery.grid,zip_from:0
@@ -85,13 +85,13 @@ msgstr "固定的"
#. module: delivery
#: field:delivery.grid,line_ids:0
msgid "Grid Line"
msgstr "网格明细"
msgstr "表格行"
#. module: delivery
#: model:ir.actions.act_window,name:delivery.action_delivery_grid_form
#: model:ir.ui.menu,name:delivery.menu_action_delivery_grid_form
msgid "Delivery Pricelist"
msgstr "送货价格表"
msgstr "交货价格表"
#. module: delivery
#: model:ir.actions.act_window,name:delivery.action_picking_tree5
@@ -102,38 +102,38 @@ msgstr "在接收产生发票草稿"
#. module: delivery
#: model:ir.model,name:delivery.model_delivery_grid_line
msgid "Delivery line of grid"
msgstr "运费表格行"
msgstr "交货表格行"
#. module: delivery
#: model:ir.ui.menu,name:delivery.menu_delivery
msgid "Delivery"
msgstr "送货"
msgstr "交货"
#. module: delivery
#: view:delivery.grid.line:0
msgid "Grid Lines"
msgstr "网格明细"
msgstr "表格行"
#. module: delivery
#: field:delivery.grid.line,grid_id:0
msgid "Grid"
msgstr "网格"
msgstr "表格"
#. module: delivery
#: view:res.partner:0
msgid "Deliveries Properties"
msgstr "送货属性"
msgstr "交货属性"
#. module: delivery
#: field:delivery.carrier,active:0
#: field:delivery.grid,active:0
msgid "Active"
msgstr "现用"
msgstr "有效"
#. module: delivery
#: view:delivery.grid:0
msgid "Grid definition"
msgstr "网格定义"
msgstr "表格定义"
#. module: delivery
#: selection:delivery.grid.line,type:0
@@ -149,7 +149,7 @@ msgstr "="
#. module: delivery
#: field:delivery.carrier,product_id:0
msgid "Delivery Product"
msgstr "产品送货"
msgstr "产品交货"
#. module: delivery
#: view:delivery.grid.line:0
@@ -159,7 +159,7 @@ msgstr "条件"
#. module: delivery
#: model:ir.model,name:delivery.model_delivery_carrier
msgid "Carrier and delivery grids"
msgstr "货运公司和运费表格"
msgstr "货运公司和交货表格"
#. module: delivery
#: field:delivery.grid.line,standard_price:0
@@ -206,7 +206,7 @@ msgstr "可变的"
#. module: delivery
#: field:delivery.grid,name:0
msgid "Grid Name"
msgstr "运费表格名称"
msgstr "表格名"
#. module: delivery
#: view:delivery.carrier:0
@@ -231,7 +231,7 @@ msgstr "最大值"
#. module: delivery
#: wizard_button:delivery.sale.order,init,delivery:0
msgid "Add Delivery Costs"
msgstr "增加送货成本"
msgstr "增加交货成本"
#. module: delivery
#: wizard_field:delivery.sale.order,init,carrier_id:0
@@ -239,12 +239,12 @@ msgstr "增加送货成本"
#: model:ir.ui.menu,name:delivery.menu_action_delivery_carrier_form
#: field:res.partner,property_delivery_carrier:0
msgid "Delivery Method"
msgstr "送货方式"
msgstr "交货方式"
#. module: delivery
#: field:sale.order,id:0
msgid "ID"
msgstr "标识符"
msgstr "ID"
#. module: delivery
#: field:delivery.grid.line,operator:0
@@ -254,12 +254,12 @@ msgstr "运算符"
#. module: delivery
#: model:ir.module.module,shortdesc:delivery.module_meta_information
msgid "Carriers and deliveries"
msgstr "运输公司和送货"
msgstr "运输公司和交货"
#. module: delivery
#: field:delivery.carrier,grids_id:0
msgid "Delivery Grids"
msgstr "送货网"
msgstr "交货表格"
#. module: delivery
#: selection:delivery.grid.line,type:0
@@ -284,7 +284,7 @@ msgid ""
"Allows you to add delivery methods in sales orders and packing. You can "
"define your own carrier and delivery grids for prices. When creating "
"invoices from picking, Open ERP is able to add and compute the shipping line."
msgstr "允许你在销售单和包装中增加送货方式.你能定义自己的运输公司和送货网的价格.当创建领料/提货发票时,系统可以增加和计算运输明细"
msgstr "允许你在销售单和包装中增加交货方式. 你能定义自己的运输公司和交货表格的价格. 当创建包装发票时, 系统可以增加和计算运输明细"
#. module: delivery
#: field:delivery.grid,zip_to:0
@@ -301,12 +301,12 @@ msgstr "包装要开发票"
#: help:sale.order,carrier_id:0
msgid ""
"Complete this field if you plan to invoice the shipping based on packing."
msgstr "如果你计划基于包装开运输发票请完整填写这字段"
msgstr "如果你计划根据运输这包装开发票请完整填写这字段"
#. module: delivery
#: model:ir.actions.wizard,name:delivery.wizard_deliver_line_add
msgid "Delivery Costs"
msgstr "送货成本"
msgstr "交货成本"
#. module: delivery
#: field:delivery.grid.line,list_price:0
@@ -321,7 +321,7 @@ msgstr "错误:无效EAN编码"
#. module: delivery
#: view:delivery.grid:0
msgid "Delivery grids"
msgstr "运费表格"
msgstr "交货表格"
#. module: delivery
#: wizard_button:delivery.sale.order,init,end:0
@@ -331,7 +331,7 @@ msgstr "取消"
#. module: delivery
#: field:sale.order,carrier_id:0
msgid "Delivery method"
msgstr "送货方式"
msgstr "交货方式"
#. module: delivery
#: field:delivery.carrier,price:0
+1 -1
View File
@@ -53,7 +53,7 @@
],
'demo_xml': [ 'document_demo.xml','board_document_demo.xml'],
'test': [
'test/document_test.yml',
'test/document_test2.yml',
],
'installable': True,
'active': False,
+5 -5
View File
@@ -53,7 +53,7 @@
<menuitem id="menu_reporting" name="Reporting" sequence="2" parent="knowledge.menu_document"/>
<menuitem
name="Dashboard"
id="menu_board_document"
id="menu_reports_document"
parent="menu_reporting"
sequence="0"
icon="terp-graph"
@@ -61,10 +61,10 @@
<menuitem
parent="menu_board_document"
parent="menu_reports_document"
action="open_board_document_manager"
sequence="1"
id="menu_board_document_manager"
id="menu_reports_document_manager"
icon="terp-graph"/>
<record model="ir.ui.view" id="board_document_manager_form1">
@@ -107,10 +107,10 @@
</record>
<menuitem
parent="menu_board_document"
parent="menu_reports_document"
action="open_board_document_manager1"
sequence="1"
id="menu_board_document_manager1"
id="menu_reports_document_manager1"
icon="terp-graph"/>
</data>
</openerp>
+4 -1
View File
@@ -153,7 +153,10 @@ class contentIndex(object):
if realfname :
fname = realfname
else:
bname,ext = os.path.splitext(filename)
try:
bname,ext = os.path.splitext(filename or 'test.tmp')
except Exception:
bname, ext = filename, 'tmp'
fd, fname = tempfile.mkstemp(suffix=ext)
os.write(fd, content)
os.close(fd)
+17 -4
View File
@@ -58,7 +58,9 @@ class document_directory_content(osv.osv):
'suffix': fields.char('Suffix', size=16),
'report_id': fields.many2one('ir.actions.report.xml', 'Report'),
'extension': fields.selection(_extension_get, 'Document Type', required=True, size=4),
'include_name': fields.boolean('Include Record Name', help="Check this field if you want that the name of the file start by the record name."),
'include_name': fields.boolean('Include Record Name',
help="Check this field if you want that the name of the file to contain the record name." \
"\nIf set, the directory will have to be a resource one."),
'directory_id': fields.many2one('document.directory', 'Directory'),
}
_defaults = {
@@ -88,12 +90,19 @@ class document_directory_content(osv.osv):
tname = (content.prefix or '') + (content.suffix or '') + (content.extension or '')
if tname.find('/'):
tname=tname.replace('/', '_')
act_id = False
if 'dctx_res_id' in node.dctx:
act_id = node.dctx['dctx_res_id']
elif hasattr(node, 'res_id'):
act_id = node.res_id
else:
act_id = node.context.context.get('res_id',False)
if not nodename:
n = nodes.node_content(tname, node, node.context,content)
n = nodes.node_content(tname, node, node.context,content, act_id=act_id)
res2.append( n)
else:
if nodename == tname:
n = nodes.node_content(tname, node, node.context,content)
n = nodes.node_content(tname, node, node.context,content, act_id=act_id)
n.fill_fields(cr)
res2.append(n)
return res2
@@ -108,6 +117,10 @@ class document_directory_content(osv.osv):
raise Exception("Invalid content: %s" % node.extension)
report = self.pool.get('ir.actions.report.xml').browse(cr, uid, node.report_id)
srv = netsvc.Service._services['report.'+report.report_name]
pdf,pdftype = srv.create(cr, uid, [node.context.context['res_id']], {}, {})
ctx = node.context.context.copy()
ctx.update(node.dctx)
pdf,pdftype = srv.create(cr, uid, [node.act_id,], {}, context=ctx)
return pdf
document_directory_content()
#eof
+91 -50
View File
@@ -28,6 +28,7 @@ import os
import pooler
import netsvc
from osv.orm import except_orm
#import StringIO
from psycopg2 import Binary
@@ -46,7 +47,10 @@ class document_file(osv.osv):
def _data_get(self, cr, uid, ids, name, arg, context):
fbrl = self.browse(cr, uid, ids, context=context)
nctx = nodes.get_node_context(cr, uid, context)
nctx = nodes.get_node_context(cr, uid, context={})
# nctx will /not/ inherit the caller's context. Most of
# it would be useless, anyway (like active_id, active_model,
# bin_size etc.)
result = {}
bin_size = context.get('bin_size', False)
for fbro in fbrl:
@@ -66,39 +70,38 @@ class document_file(osv.osv):
if not value:
return True
fbro = self.browse(cr, uid, id, context=context)
nctx = nodes.get_node_context(cr, uid, context)
nctx = nodes.get_node_context(cr, uid, context={})
fnode = nodes.node_file(None, None, nctx, fbro)
res = fnode.set_data(cr, base64.decodestring(value), fbro)
return res
_columns = {
'user_id': fields.many2one('res.users', 'Owner', select=1),
'group_ids': fields.many2many('res.groups', 'document_group_rel', 'item_id', 'group_id', 'Groups'),
# the directory id now is mandatory. It can still be computed automatically.
'parent_id': fields.many2one('document.directory', 'Directory', select=1),
'file_size': fields.integer('File Size', required=True),
'file_type': fields.char('Content Type', size=128),
# Columns from ir.attachment:
'create_date': fields.datetime('Date Created', readonly=True),
'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
'write_date': fields.datetime('Date Modified', readonly=True),
'write_uid': fields.many2one('res.users', 'Last Modification User', readonly=True),
'res_model': fields.char('Attached Model', size=64, readonly=True),
'res_id': fields.integer('Attached ID', readonly=True),
# If ir.attachment contained any data before document is installed, preserve
# the data, don't drop the column!
'db_datas': fields.binary('Data', oldname='datas'),
'index_content': fields.text('Indexed Content'),
'write_date': fields.datetime('Date Modified', readonly=True),
'write_uid': fields.many2one('res.users', 'Last Modification User', readonly=True),
'create_date': fields.datetime('Date Created', readonly=True),
'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
'store_method': fields.selection([('db', 'Database'), ('fs', 'Filesystem'), ('link', 'Link')], "Storing Method"),
'datas': fields.function(_data_get, method=True, fnct_inv=_data_set, string='File Content', type="binary", nodrop=True),
'url': fields.char('File URL',size=64),
'store_fname': fields.char('Stored Filename', size=200),
'res_model': fields.char('Attached Model', size=64), #res_model
'res_id': fields.integer('Attached ID'), #res_id
'partner_id':fields.many2one('res.partner', 'Partner', select=1),
'type':fields.selection([
('url','URL'),
('binary','Binary'),
],'Type', help="Type is used to separate URL and binary File"),
# Fields of document:
'user_id': fields.many2one('res.users', 'Owner', select=1),
# 'group_ids': fields.many2many('res.groups', 'document_group_rel', 'item_id', 'group_id', 'Groups'),
# the directory id now is mandatory. It can still be computed automatically.
'parent_id': fields.many2one('document.directory', 'Directory', select=1, required=True),
'index_content': fields.text('Indexed Content'),
'partner_id':fields.many2one('res.partner', 'Partner', select=1),
'company_id': fields.many2one('res.company', 'Company'),
'file_size': fields.integer('File Size', required=True),
'file_type': fields.char('Content Type', size=128),
# fields used for file storage
'store_fname': fields.char('Stored Filename', size=200),
}
def __get_def_directory(self, cr, uid, context=None):
@@ -109,8 +112,6 @@ class document_file(osv.osv):
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'ir.attachment', context=c),
'user_id': lambda self, cr, uid, ctx:uid,
'file_size': lambda self, cr, uid, ctx:0,
'store_method': lambda *args: 'db',
'type': 'binary',
'parent_id': __get_def_directory
}
_sql_constraints = [
@@ -122,7 +123,7 @@ class document_file(osv.osv):
res_model = vals.get('res_model', False)
res_id = vals.get('res_id', 0)
if op == 'write':
for file in self.browse(cr, uid, ids):
for file in self.browse(cr, uid, ids): # FIXME fields_only
if not name:
name = file.name
if not parent_id:
@@ -156,8 +157,44 @@ class document_file(osv.osv):
return False
if not self._check_duplication(cr, uid, vals, ids, 'write'):
raise osv.except_osv(_('ValidateError'), _('File name must be unique!'))
result = super(document_file, self).write(cr, uid, ids, vals, context=context)
cr.commit()
# if nodes call this write(), they must skip the code below
from_node = context and context.get('__from_node', False)
if (('parent_id' in vals) or ('name' in vals)) and not from_node:
# perhaps this file is renaming or changing directory
nctx = nodes.get_node_context(cr,uid,context={})
dirobj = self.pool.get('document.directory')
if 'parent_id' in vals:
dbro = dirobj.browse(cr, uid, vals['parent_id'], context=context)
dnode = nctx.get_dir_node(cr, dbro)
else:
dbro = None
dnode = None
ids2 = []
result = False
for fbro in self.browse(cr, uid, ids, context=context):
if ('parent_id' not in vals or fbro.parent_id.id == vals['parent_id']) \
and ('name' not in vals or fbro.name == vals['name']) :
ids2.append(fbro.id)
continue
fnode = nctx.get_file_node(cr, fbro)
res = fnode.move_to(cr, dnode or fnode.parent, vals.get('name', fbro.name), fbro, dbro, True)
if isinstance(res, dict):
vals2 = vals.copy()
vals2.update(res)
wid = res.get('id', fbro.id)
result = super(document_file,self).write(cr,uid,wid,vals2,context=context)
# TODO: how to handle/merge several results?
elif res == True:
ids2.append(fbro.id)
elif res == False:
pass
ids = ids2
if 'file_size' in vals: # only write that field using direct SQL calls
del vals['file_size']
if len(ids) and len(vals):
result = super(document_file,self).write(cr, uid, ids, vals, context=context)
cr.commit() # ?
return result
def create(self, cr, uid, vals, context=None):
@@ -170,26 +207,10 @@ class document_file(osv.osv):
vals['res_id'] = context.get('default_res_id', False)
if not vals.get('res_model', False) and context.get('default_res_model', False):
vals['res_model'] = context.get('default_res_model', False)
if vals.get('res_id', False) and vals.get('res_model', False):
obj_model = self.pool.get(vals['res_model'])
result = obj_model.read(cr, uid, [vals['res_id']], ['name', 'partner_id', 'address_id'], context=context)
if len(result):
obj = result[0]
if obj_model._name == 'res.partner':
vals['partner_id'] = obj['id']
elif obj.get('address_id', False):
if isinstance(obj['address_id'], tuple) or isinstance(obj['address_id'], list):
address_id = obj['address_id'][0]
else:
address_id = obj['address_id']
address = self.pool.get('res.partner.address').read(cr, uid, [address_id], context=context)
if len(address):
vals['partner_id'] = address[0]['partner_id'][0] or False
elif obj.get('partner_id', False):
if isinstance(obj['partner_id'], tuple) or isinstance(obj['partner_id'], list):
vals['partner_id'] = obj['partner_id'][0]
else:
vals['partner_id'] = obj['partner_id']
if vals.get('res_id', False) and vals.get('res_model', False) \
and not vals.get('partner_id', False):
vals['partner_id'] = self.__get_partner_id(cr, uid, \
vals['res_model'], vals['res_id'], context)
datas = None
if vals.get('link', False) :
@@ -198,13 +219,33 @@ class document_file(osv.osv):
else:
datas = vals.get('datas', False)
vals['file_size'] = datas and len(datas) or 0
if datas:
vals['file_size'] = len(datas)
else:
if vals.get('file_size'):
del vals['file_size']
if not self._check_duplication(cr, uid, vals):
raise osv.except_osv(_('ValidateError'), _('File name must be unique!'))
result = super(document_file, self).create(cr, uid, vals, context)
cr.commit()
cr.commit() # ?
return result
def __get_partner_id(self, cr, uid, res_model, res_id, context):
""" A helper to retrieve the associated partner from any res_model+id
It is a hack that will try to discover if the mentioned record is
clearly associated with a partner record.
"""
obj_model = self.pool.get(res_model)
if obj_model._name == 'res.partner':
return res_id
elif 'partner_id' in obj_model._columns and obj_model._columns['partner_id']._obj == 'res.partner':
bro = obj_model.browse(cr, uid, res_id, context=context)
return bro.partner_id.id
elif 'address_id' in obj_model._columns and obj_model._columns['address_id']._obj == 'res.partner.address':
bro = obj_model.browse(cr, uid, res_id, context=context)
return bro.address_id.partner_id.id
return False
def unlink(self, cr, uid, ids, context={}):
stor = self.pool.get('document.storage')
unres = []
+2 -5
View File
@@ -9,7 +9,7 @@
</record>
<record model="document.storage" id="storage_default">
<field name="name">Default DB storage</field>
<field name="name">Database storage</field>
<field name="type">db</field>
<field name="user_id" ref="base.user_admin"/>
</record>
@@ -17,7 +17,7 @@
<record model="document.directory" id="dir_root">
<field name="name">Documents</field>
<field name="user_id" ref="base.user_admin"/>
<field name="storage_id" ref="storage_default"/>
<field name="storage_id" ref="storage_default"/>
<field name="ressource_id">0</field>
</record>
@@ -25,7 +25,6 @@
<field name="name">My Folder</field>
<field name="parent_id" ref="dir_root"/>
<field name="user_id" ref="base.user_admin"/>
<field name="storage_id" ref="storage_default"/>
<field name="ressource_id">0</field>
</record>
@@ -35,7 +34,6 @@
<field name="parent_id" ref="dir_root"/>
<field name="type">ressource</field>
<field name="ressource_tree">1</field>
<field name="storage_id" ref="storage_default"/>
<field name="ressource_id">0</field>
<field name="ressource_type_id" search="[('model','=','res.partner.category')]" />
@@ -57,7 +55,6 @@
<field name="name">Personal Folders</field>
<field name="parent_id" ref="dir_root"/>
<field name="type">ressource</field>
<field name="storage_id" ref="storage_default"/>
<field name="ressource_type_id" ref="base.model_res_users" />
<field name="ressource_id">0</field>
+36 -18
View File
@@ -39,20 +39,27 @@ class document_directory(osv.osv):
'write_uid': fields.many2one('res.users', 'Last Modification User', readonly=True),
'create_date': fields.datetime('Date Created', readonly=True),
'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
'file_type': fields.char('Content Type', size=32),
'domain': fields.char('Domain', size=128, help="Use a domain if you want to apply an automatic filter on visible resources."),
'user_id': fields.many2one('res.users', 'Owner'),
'storage_id': fields.many2one('document.storage', 'Storage'),
'group_ids': fields.many2many('res.groups', 'document_directory_group_rel', 'item_id', 'group_id', 'Groups'),
'parent_id': fields.many2one('document.directory', 'Parent Item'),
'parent_id': fields.many2one('document.directory', 'Parent Directory', select=1),
'child_ids': fields.one2many('document.directory', 'parent_id', 'Children'),
'file_ids': fields.one2many('ir.attachment', 'parent_id', 'Files'),
'content_ids': fields.one2many('document.directory.content', 'directory_id', 'Virtual Files'),
'type': fields.selection([('directory','Static Directory'),('ressource','Other Resources')], 'Type', required=True),
'ressource_type_id': fields.many2one('ir.model', 'Directories Mapped to Objects',
help="Select an object here and Open ERP will create a mapping for each of these " \
"objects, using the given domain, when browsing through FTP."),
'type': fields.selection([
('directory','Static Directory'),
('ressource','Folders per resource'),
],
'Type', required=True, select=1,
help="Defines directory's behaviour."),
'ressource_type_id': fields.many2one('ir.model', 'Resource model',
help="Select an object here and there will be one folder per record of that resource."),
'resource_field': fields.many2one('ir.model.fields', 'Name field', help='Field to be used as name on resource directories. If empty, the "name" will be used.'),
'resource_find_all': fields.boolean('Find all resources', required=True,
help="If true, all attachments that match this resource will " \
" be located. If false, only ones that have this as parent." ),
'ressource_parent_type_id': fields.many2one('ir.model', 'Parent Model',
help="If you put an object here, this directory template will appear bellow all of these objects. " \
"Don't put a parent directory if you select a parent model."),
@@ -60,7 +67,7 @@ class document_directory(osv.osv):
'ressource_tree': fields.boolean('Tree Structure',
help="Check this if you want to use the same tree structure as the object selected in the system."),
'dctx_ids': fields.one2many('document.directory.dctx', 'dir_id', 'Context fields'),
'company_id': fields.many2one('res.company', 'Company'),
'company_id': fields.many2one('res.company', 'Company'),
}
@@ -99,10 +106,12 @@ class document_directory(osv.osv):
'type': lambda *args: 'directory',
'ressource_id': lambda *a: 0,
'storage_id': _get_def_storage,
'resource_find_all': True,
}
_sql_constraints = [
('dirname_uniq', 'unique (name,parent_id,ressource_id,ressource_parent_type_id)', 'The directory name must be unique !'),
('no_selfparent', 'check(parent_id <> id)', 'Directory cannot be parent of itself!')
('no_selfparent', 'check(parent_id <> id)', 'Directory cannot be parent of itself!'),
('dir_parented', 'check(parent_id IS NOT NULL OR storage_id IS NOT NULL)', 'Directory must have a parent or a storage')
]
def name_get(self, cr, uid, ids, context={}):
res = []
@@ -190,18 +199,25 @@ class document_directory(osv.osv):
"""
if not context:
context = {}
lang = context.get('lang',False)
if not lang:
user = self.pool.get('res.users').browse(cr, uid, uid)
lang = user.context_lang
context['lang'] = lang
try: #just instrumentation
return nodes.get_node_context(cr, uid, context).get_uri(cr, uri)
except Exception,e:
print "exception: ",e
raise
return nodes.get_node_context(cr, uid, context).get_uri(cr, uri)
def get_dir_permissions(self, cr, uid, ids ):
"""Check what permission user 'uid' has on directory 'id'
"""
assert len(ids) == 1
id = ids[0]
cr.execute( "SELECT count(dg.item_id) AS needs, count(ug.uid) AS has " \
" FROM document_directory_group_rel dg " \
" LEFT OUTER JOIN res_groups_users_rel ug " \
" ON (dg.group_id = ug.gid AND ug.uid = %s) " \
" WHERE dg.item_id = %s ", (uid, id))
needs, has = cr.fetchone()
if needs and not has:
return 1 # still allow to descend into.
else:
return 15
def _locate_child(self, cr, uid, root_id, uri,nparent, ncontext):
""" try to locate the node in uri,
@@ -274,6 +290,8 @@ class document_directory(osv.osv):
raise osv.except_osv(_('ValidateError'), _('Directory name contains special characters!'))
return super(document_directory,self).create(cr, uid, vals, context)
# TODO def unlink(...
document_directory()
class document_directory_dctx(osv.osv):
+466 -39
View File
@@ -24,7 +24,10 @@ from osv import osv, fields
import os
import tools
import base64
import errno
import logging
from StringIO import StringIO
import psycopg2
from tools.misc import ustr
from tools.translate import _
@@ -33,7 +36,9 @@ from osv.orm import except_orm
import random
import string
import pooler
import netsvc
import nodes
from content_index import cntIndex
DMS_ROOT_PATH = tools.config.get('document_path', os.path.join(tools.config.get('root_path'), 'filestore'))
@@ -84,6 +89,222 @@ def create_directory(path):
os.makedirs(path)
return dir_name
class nodefd_file(nodes.node_descriptor):
""" A descriptor to a real file
Inheriting directly from file doesn't work, since file exports
some read-only attributes (like 'name') that we don't like.
"""
def __init__(self, parent, path, mode):
nodes.node_descriptor.__init__(self, parent)
self.__file = open(path, mode)
if mode.endswith('b'):
mode = mode[:-1]
self.mode = mode
for attr in ('closed', 'read', 'write', 'seek', 'tell'):
setattr(self,attr, getattr(self.__file, attr))
def close(self):
# TODO: locking in init, close()
fname = self.__file.name
self.__file.close()
if self.mode in ('w', 'w+', 'r+'):
par = self._get_parent()
cr = pooler.get_db(par.context.dbname).cursor()
icont = ''
mime = ''
filename = par.path
if isinstance(filename, (tuple, list)):
filename = '/'.join(filename)
try:
mime, icont = cntIndex.doIndex(None, filename=filename,
content_type=None, realfname=fname)
except Exception:
logging.getLogger('document.storage').debug('Cannot index file:', exc_info=True)
pass
try:
icont_u = ustr(icont)
except UnicodeError:
icont_u = ''
try:
fsize = os.stat(fname).st_size
cr.execute("UPDATE ir_attachment " \
" SET index_content = %s, file_type = %s, " \
" file_size = %s " \
" WHERE id = %s",
(icont_u, mime, fsize, par.file_id))
par.content_length = fsize
par.content_type = mime
cr.commit()
cr.close()
except Exception:
logging.getLogger('document.storage').warning('Cannot save file indexed content:', exc_info=True)
elif self.mode in ('a', 'a+' ):
try:
par = self._get_parent()
cr = pooler.get_db(par.context.dbname).cursor()
fsize = os.stat(fname).st_size
cr.execute("UPDATE ir_attachment SET file_size = %s " \
" WHERE id = %s",
(fsize, par.file_id))
par.content_length = fsize
cr.commit()
cr.close()
except Exception:
logging.getLogger('document.storage').warning('Cannot save file appended content:', exc_info=True)
class nodefd_db(StringIO, nodes.node_descriptor):
""" A descriptor to db data
"""
def __init__(self, parent, ira_browse, mode):
nodes.node_descriptor.__init__(self, parent)
if mode.endswith('b'):
mode = mode[:-1]
if mode in ('r', 'r+'):
cr = ira_browse._cr # reuse the cursor of the browse object, just now
cr.execute('SELECT db_datas FROM ir_attachment WHERE id = %s',(ira_browse.id,))
data = cr.fetchone()[0]
StringIO.__init__(self, data)
elif mode in ('w', 'w+'):
StringIO.__init__(self, None)
# at write, we start at 0 (= overwrite), but have the original
# data available, in case of a seek()
elif mode == 'a':
StringIO.__init__(self, None)
else:
logging.getLogger('document.storage').error("Incorrect mode %s specified", mode)
raise IOError(errno.EINVAL, "Invalid file mode")
self.mode = mode
def close(self):
# we now open a *separate* cursor, to update the data.
# FIXME: this may be improved, for concurrency handling
par = self._get_parent()
uid = par.context.uid
cr = pooler.get_db(par.context.dbname).cursor()
try:
if self.mode in ('w', 'w+', 'r+'):
data = self.getvalue()
icont = ''
mime = ''
filename = par.path
if isinstance(filename, (tuple, list)):
filename = '/'.join(filename)
try:
mime, icont = cntIndex.doIndex(data, filename=filename,
content_type=None, realfname=None)
except Exception:
logging.getLogger('document.storage').debug('Cannot index file:', exc_info=True)
pass
try:
icont_u = ustr(icont)
except UnicodeError:
icont_u = ''
out = psycopg2.Binary(data)
cr.execute("UPDATE ir_attachment " \
"SET db_datas = %s, file_size=%s, " \
" index_content= %s, file_type=%s " \
" WHERE id = %s",
(out, len(data), icont_u, mime, par.file_id))
elif self.mode == 'a':
data = self.getvalue()
out = psycopg2.Binary(data)
cr.execute("UPDATE ir_attachment " \
"SET db_datas = COALESCE(db_datas,'') || %s, " \
" file_size = COALESCE(file_size, 0) + %s " \
" WHERE id = %s",
(out, len(data), par.file_id))
cr.commit()
except Exception, e:
logging.getLogger('document.storage').exception('Cannot update db file #%d for close:', par.file_id)
raise
finally:
cr.close()
StringIO.close(self)
class nodefd_db64(StringIO, nodes.node_descriptor):
""" A descriptor to db data, base64 (the old way)
It stores the data in base64 encoding at the db. Not optimal, but
the transparent compression of Postgres will save the day.
"""
def __init__(self, parent, ira_browse, mode):
nodes.node_descriptor.__init__(self, parent)
if mode.endswith('b'):
mode = mode[:-1]
if mode in ('r', 'r+'):
StringIO.__init__(self, base64.decodestring(ira_browse.db_datas))
elif mode in ('w', 'w+'):
StringIO.__init__(self, None)
# at write, we start at 0 (= overwrite), but have the original
# data available, in case of a seek()
elif mode == 'a':
StringIO.__init__(self, None)
else:
logging.getLogger('document.storage').error("Incorrect mode %s specified", mode)
raise IOError(errno.EINVAL, "Invalid file mode")
self.mode = mode
def close(self):
# we now open a *separate* cursor, to update the data.
# FIXME: this may be improved, for concurrency handling
par = self._get_parent()
uid = par.context.uid
cr = pooler.get_db(par.context.dbname).cursor()
try:
if self.mode in ('w', 'w+', 'r+'):
data = self.getvalue()
icont = ''
mime = ''
filename = par.path
if isinstance(filename, (tuple, list)):
filename = '/'.join(filename)
try:
mime, icont = cntIndex.doIndex(data, filename=filename,
content_type=None, realfname=None)
except Exception:
logging.getLogger('document.storage').debug('Cannot index file:', exc_info=True)
pass
try:
icont_u = ustr(icont)
except UnicodeError:
icont_u = ''
cr.execute('UPDATE ir_attachment SET db_datas = %s::bytea, file_size=%s, ' \
'index_content = %s, file_type = %s ' \
'WHERE id = %s',
(base64.encodestring(out), len(out), icont_u, mime, par.file_id))
elif self.mode == 'a':
out = self.getvalue()
# Yes, we're obviously using the wrong representation for storing our
# data as base64-in-bytea
cr.execute("UPDATE ir_attachment " \
"SET db_datas = encode( (COALESCE(decode(encode(db_datas,'escape'),'base64'),'') || decode(%s, 'base64')),'base64')::bytea , " \
" file_size = COALESCE(file_size, 0) + %s " \
" WHERE id = %s",
(base64.encodestring(out), len(out), par.file_id))
cr.commit()
except Exception, e:
logging.getLogger('document.storage').exception('Cannot update db file #%d for close:', par.file_id)
raise
finally:
cr.close()
StringIO.close(self)
class document_storage(osv.osv):
""" The primary object for data storage.
@@ -110,7 +331,7 @@ class document_storage(osv.osv):
'group_ids': fields.many2many('res.groups', 'document_storage_group_rel', 'item_id', 'group_id', 'Groups'),
'dir_ids': fields.one2many('document.directory', 'parent_id', 'Directories'),
'type': fields.selection([('db', 'Database'), ('filestore', 'Internal File storage'),
('realstore', 'External file storage'), ('virtual', 'Virtual storage')], 'Type', required=True),
('realstore','External file storage'),], 'Type', required=True),
'path': fields.char('Path', size=250, select=1, help="For file storage, the root path of the storage"),
'online': fields.boolean('Online', help="If not checked, media is currently offline and its contents not available", required=True),
'readonly': fields.boolean('Read Only', help="If set, media is for reading only"),
@@ -133,6 +354,49 @@ class document_storage(osv.osv):
('path_uniq', 'UNIQUE(type,path)', "The storage path must be unique!")
]
def __get_random_fname(self, path):
flag = None
# This can be improved
if os.path.isdir(path):
for dirs in os.listdir(path):
if os.path.isdir(os.path.join(path, dirs)) and len(os.listdir(os.path.join(path, dirs))) < 4000:
flag = dirs
break
flag = flag or create_directory(path)
filename = random_name()
return os.path.join(flag, filename)
def __prepare_realpath(self, cr, file_node, ira, store_path, do_create=True):
""" Cleanup path for realstore, create dirs if needed
@param file_node the node
@param ira ir.attachment browse of the file_node
@param store_path the path of the parent storage object, list
@param do_create create the directories, if needed
@return tuple(path "/var/filestore/real/dir/", npath ['dir','fname.ext'] )
"""
file_node.fix_ppath(cr, ira)
npath = file_node.full_path() or []
# npath may contain empty elements, for root directory etc.
npath = filter(lambda x: x is not None, npath)
# if self._debug:
# self._doclog.debug('Npath: %s', npath)
for n in npath:
if n == '..':
raise ValueError("Invalid '..' element in path")
for ch in ('*', '|', "\\", '/', ':', '"', '<', '>', '?',):
if ch in n:
raise ValueError("Invalid char %s in path %s" %(ch, n))
dpath = [store_path,]
dpath += npath[:-1]
path = os.path.join(*dpath)
if not os.path.isdir(path):
self._doclog.debug("Create dirs: %s", path)
os.makedirs(path)
return path, npath
def get_data(self, cr, uid, id, file_node, context=None, fil_obj=None):
""" retrieve the contents of some file_node having storage_id = id
optionally, fil_obj could point to the browse object of the file
@@ -141,15 +405,71 @@ class document_storage(osv.osv):
if not context:
context = {}
boo = self.browse(cr, uid, id, context)
if not boo.online:
raise IOError(errno.EREMOTE, 'medium offline')
if fil_obj:
ira = fil_obj
else:
ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context)
return self.__get_data_3(cr, uid, boo, ira, context)
def __get_data_3(self, cr, uid, boo, ira, context):
def get_file(self, cr, uid, id, file_node, mode, context=None):
""" Return a file-like object for the contents of some node
"""
if context is None:
context = {}
boo = self.browse(cr, uid, id, context)
if not boo.online:
raise RuntimeError('media offline')
raise IOError(errno.EREMOTE, 'medium offline')
if boo.readonly and mode not in ('r', 'rb'):
raise IOError(errno.EPERM, "Readonly medium")
ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context)
if boo.type == 'filestore':
if not ira.store_fname:
# On a migrated db, some files may have the wrong storage type
# try to fix their directory.
if mode in ('r','r+'):
if ira.file_size:
self._doclog.warning( "ir.attachment #%d does not have a filename, but is at filestore, fix it!" % ira.id)
raise IOError(errno.ENOENT, 'No file can be located')
else:
store_fname = self.__get_random_fname(boo.path)
cr.execute('UPDATE ir_attachment SET store_fname = %s WHERE id = %s',
(store_fname, ira.id))
fpath = os.path.join(boo.path, store_fname)
else:
fpath = os.path.join(boo.path, ira.store_fname)
return nodefd_file(file_node, path=fpath, mode=mode)
elif boo.type == 'db':
# TODO: we need a better api for large files
return nodefd_db(file_node, ira_browse=ira, mode=mode)
elif boo.type == 'db64':
return nodefd_db64(file_node, ira_browse=ira, mode=mode)
elif boo.type == 'realstore':
path, npath = self.__prepare_realpath(cr, file_node, ira, boo.path,
do_create = (mode[1] in ('w','a')) )
fpath = os.path.join(path, npath[-1])
if (not os.path.exists(fpath)) and mode[1] == 'r':
raise IOError("File not found: %s" % fpath)
elif mode[1] in ('w', 'a') and not ira.store_fname:
store_fname = os.path.join(*npath)
cr.execute('UPDATE ir_attachment SET store_fname = %s WHERE id = %s',
(store_fname, ira.id))
return nodefd_file(file_node, path=fpath, mode=mode)
elif boo.type == 'virtual':
raise ValueError('Virtual storage does not support static files')
else:
raise TypeError("No %s storage" % boo.type)
def __get_data_3(self, cr, uid, boo, ira, context):
if boo.type == 'filestore':
if not ira.store_fname:
# On a migrated db, some files may have the wrong storage type
@@ -159,13 +479,21 @@ class document_storage(osv.osv):
return None
fpath = os.path.join(boo.path, ira.store_fname)
return file(fpath, 'rb').read()
elif boo.type == 'db':
elif boo.type == 'db64':
# TODO: we need a better api for large files
if ira.db_datas:
out = base64.decodestring(ira.db_datas)
else:
out = ''
return out
elif boo.type == 'db':
# We do an explicit query, to avoid type transformations.
cr.execute('SELECT db_datas FROM ir_attachment WHERE id = %s', (ira.id,))
res = cr.fetchone()
if res:
return res[0]
else:
return ''
elif boo.type == 'realstore':
if not ira.store_fname:
# On a migrated db, some files may have the wrong storage type
@@ -179,7 +507,11 @@ class document_storage(osv.osv):
elif not ira.store_fname:
return None
else:
raise IOError("File not found: %s" % fpath)
raise IOError(errno.ENOENT, "File not found: %s" % fpath)
elif boo.type == 'virtual':
raise ValueError('Virtual storage does not support static files')
else:
raise TypeError("No %s storage" % boo.type)
@@ -197,30 +529,25 @@ class document_storage(osv.osv):
ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context)
if not boo.online:
raise RuntimeError('media offline')
raise IOError(errno.EREMOTE, 'medium offline')
if boo.readonly:
raise IOError(errno.EPERM, "Readonly medium")
self._doclog.debug( "Store data for ir.attachment #%d" % ira.id)
store_fname = None
fname = None
if boo.type == 'filestore':
path = boo.path
try:
flag = None
# This can be improved
if os.path.isdir(path):
for dirs in os.listdir(path):
if os.path.isdir(os.path.join(path, dirs)) and len(os.listdir(os.path.join(path, dirs))) < 4000:
flag = dirs
break
flag = flag or create_directory(path)
filename = random_name()
fname = os.path.join(path, flag, filename)
store_fname = self.__get_random_fname(path)
fname = os.path.join(path, store_fname)
fp = file(fname, 'wb')
fp.write(data)
fp.close()
self._doclog.debug( "Saved data to %s" % fname)
filesize = len(data) # os.stat(fname).st_size
store_fname = os.path.join(flag, filename)
# TODO Here, an old file would be left hanging.
except Exception, e:
@@ -228,27 +555,19 @@ class document_storage(osv.osv):
raise except_orm(_('Error!'), str(e))
elif boo.type == 'db':
filesize = len(data)
# will that work for huge data? TODO
# will that work for huge data?
out = psycopg2.Binary(data)
cr.execute('UPDATE ir_attachment SET db_datas = %s WHERE id = %s',
(out, file_node.file_id))
elif boo.type == 'db64':
filesize = len(data)
# will that work for huge data?
out = base64.encodestring(data)
cr.execute('UPDATE ir_attachment SET db_datas = %s WHERE id = %s',
(out, file_node.file_id))
elif boo.type == 'realstore':
try:
file_node.fix_ppath(cr, ira)
npath = file_node.full_path() or []
# npath may contain empty elements, for root directory etc.
for i, n in enumerate(npath):
if n == None:
del npath[i]
for n in npath:
for ch in ('*', '|', "\\", '/', ':', '"', '<', '>', '?', '..'):
if ch in n:
raise ValueError("Invalid char %s in path %s" %(ch, n))
dpath = [boo.path,]
dpath += npath[:-1]
path = os.path.join(*dpath)
if not os.path.isdir(path):
os.makedirs(path)
path, npath = self.__prepare_realpath(cr, file_node, ira, boo.path, do_create=True)
fname = os.path.join(path, npath[-1])
fp = file(fname,'wb')
fp.write(data)
@@ -260,6 +579,10 @@ class document_storage(osv.osv):
except Exception,e :
self._doclog.warning("Couldn't save data:", exc_info=True)
raise except_orm(_('Error!'), str(e))
elif boo.type == 'virtual':
raise ValueError('Virtual storage does not support static files')
else:
raise TypeError("No %s storage" % boo.type)
@@ -276,16 +599,21 @@ class document_storage(osv.osv):
self._doclog.debug('Cannot index file:', exc_info=True)
pass
try:
icont_u = ustr(icont)
except UnicodeError:
icont_u = ''
# a hack: /assume/ that the calling write operation will not try
# to write the fname and size, and update them in the db concurrently.
# We cannot use a write() here, because we are already in one.
cr.execute('UPDATE ir_attachment SET store_fname = %s, file_size = %s, index_content = %s, file_type = %s WHERE id = %s',
(store_fname, filesize, ustr(icont), mime, file_node.file_id))
(store_fname, filesize, icont_u, mime, file_node.file_id))
file_node.content_length = filesize
file_node.content_type = mime
return True
except Exception, e :
self._doclog.warning( "Couldn't save data:", exc_info=True)
self._doclog.warning("Couldn't save data:", exc_info=True)
# should we really rollback once we have written the actual data?
# at the db case (only), that rollback would be safe
raise except_orm(_('Error at doc write!'), str(e))
@@ -295,7 +623,10 @@ class document_storage(osv.osv):
files that have to be removed, too. """
if not storage_bo.online:
raise RuntimeError('media offline')
raise IOError(errno.EREMOTE, 'medium offline')
if storage_bo.readonly:
raise IOError(errno.EPERM, "Readonly medium")
if storage_bo.type == 'filestore':
fname = fil_bo.store_fname
@@ -303,7 +634,7 @@ class document_storage(osv.osv):
return None
path = storage_bo.path
return (storage_bo.id, 'file', os.path.join(path, fname))
elif storage_bo.type == 'db':
elif storage_bo.type in ('db', 'db64'):
return None
elif storage_bo.type == 'realstore':
fname = fil_bo.store_fname
@@ -312,7 +643,7 @@ class document_storage(osv.osv):
path = storage_bo.path
return ( storage_bo.id, 'file', os.path.join(path, fname))
else:
raise TypeError("No %s storage" % boo.type)
raise TypeError("No %s storage" % storage_bo.type)
def do_unlink(self, cr, uid, unres):
for id, ktype, fname in unres:
@@ -326,6 +657,102 @@ class document_storage(osv.osv):
return True
def simple_rename(self, cr, uid, file_node, new_name, context=None):
""" A preparation for a file rename.
It will not affect the database, but merely check and perhaps
rename the realstore file.
@return the dict of values that can safely be be stored in the db.
"""
sbro = self.browse(cr, uid, file_node.storage_id, context=context)
assert sbro, "The file #%d didn't provide storage" % file_node.file_id
if not sbro.online:
raise IOError(errno.EREMOTE, 'medium offline')
if sbro.readonly:
raise IOError(errno.EPERM, "Readonly medium")
if sbro.type in ('filestore', 'db', 'db64'):
# nothing to do for a rename, allow to change the db field
return { 'name': new_name, 'datas_fname': new_name }
elif sbro.type == 'realstore':
ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context)
path, npath = self.__prepare_realpath(cr, file_node, ira, sbro.path, do_create=False)
fname = ira.store_fname
if not fname:
self._doclog.warning("Trying to rename a non-stored file")
if fname != os.path.join(*npath):
self._doclog.warning("inconsistency in realstore: %s != %s" , fname, repr(npath))
oldpath = os.path.join(path, npath[-1])
newpath = os.path.join(path, new_name)
os.rename(oldpath, newpath)
store_path = npath[:-1]
store_path.append(new_name)
store_fname = os.path.join(*store_path)
return { 'name': new_name, 'datas_fname': new_name, 'store_fname': store_fname }
else:
raise TypeError("No %s storage" % boo.type)
def simple_move(self, cr, uid, file_node, ndir_bro, context=None):
""" A preparation for a file move.
It will not affect the database, but merely check and perhaps
move the realstore file.
@param ndir_bro a browse object of document.directory, where this
file should move to.
@return the dict of values that can safely be be stored in the db.
"""
sbro = self.browse(cr, uid, file_node.storage_id, context=context)
assert sbro, "The file #%d didn't provide storage" % file_node.file_id
if not sbro.online:
raise IOError(errno.EREMOTE, 'medium offline')
if sbro.readonly:
raise IOError(errno.EPERM, "Readonly medium")
par = ndir_bro
psto = None
while par:
if par.storage_id:
psto = par.storage_id.id
break
par = par.parent_id
if file_node.storage_id != psto:
self._doclog.debug('Cannot move file %r from %r to %r', file_node, file_node.parent, ndir_bro.name)
raise NotImplementedError('Cannot move files between storage media')
if sbro.type in ('filestore', 'db', 'db64'):
# nothing to do for a rename, allow to change the db field
return { 'parent_id': ndir_bro.id }
elif sbro.type == 'realstore':
raise NotImplementedError("Cannot move in realstore, yet") # TODO
fname = fil_bo.store_fname
if not fname:
return ValueError("Tried to rename a non-stored file")
path = storage_bo.path
oldpath = os.path.join(path, fname)
for ch in ('*', '|', "\\", '/', ':', '"', '<', '>', '?', '..'):
if ch in new_name:
raise ValueError("Invalid char %s in name %s" %(ch, new_name))
file_node.fix_ppath(cr, ira)
npath = file_node.full_path() or []
dpath = [path,]
dpath.extend(npath[:-1])
dpath.append(new_name)
newpath = os.path.join(*dpath)
# print "old, new paths:", oldpath, newpath
os.rename(oldpath, newpath)
return { 'name': new_name, 'datas_fname': new_name, 'store_fname': new_name }
else:
raise TypeError("No %s storage" % boo.type)
document_storage()
+59 -42
View File
@@ -16,7 +16,7 @@
<field name="online"/>
<field name="readonly"/>
</group>
<group colspan="2" attrs="{'invisible':[('type','=','db')]}">
<group colspan="2" attrs="{'invisible':[('type','in',['db', 'db64'])]}">
<field name="path"/>
</group>
</form>
@@ -61,6 +61,7 @@
name="Storage Media"
action="action_document_storage_form"
id="menu_document_storage_media"
groups="base.group_extended"
parent="menu_document_management_configuration"/>
<record model="ir.ui.view" id="view_document_directory_form">
@@ -68,27 +69,35 @@
<field name="model">document.directory</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Directories">
<form string="Directories" col="6">
<field name="name" select="1" colspan="4"/>
<field name="user_id"/>
<field name="parent_id"/>
<field name="storage_id" />
<field name="storage_id" widget="selection" />
<field name="user_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<notebook colspan="4">
<page string="Definition">
<separator string="Directory Type" colspan="4"/>
<field name="type"/>
<field name="ressource_type_id" on_change="onchange_content_id(ressource_type_id)" attrs="{'required': [('type','=','ressource')], 'readonly': [('type','=','static')]}"/>
<newline/>
<field name="domain" attrs="{'required': [('type','=','ressource')], 'readonly': [('type','=','static')]}"/>
<field name="ressource_tree"/>
<field name="resource_field" domain="[('model_id','=',ressource_type_id), ('ttype', 'in', ('char', 'selection', 'date', 'datetime'))]"/>
<field name="ressource_id" select="2" readonly="1"/>
<field name="ressource_parent_type_id"/>
<group colspan="4" col="4" attrs="{'invisible': [('type','!=','ressource')]}">
<field name="ressource_type_id" on_change="onchange_content_id(ressource_type_id)"
attrs="{'required': [('type','=','ressource')] }"/>
<field name="resource_find_all" groups="base.group_extended" />
<newline/>
<field name="resource_field" domain="[('model_id','=',ressource_type_id), ('ttype', 'in', ('char', 'selection', 'date', 'datetime'))]"/>
<field name="ressource_tree"/>
<newline/>
<field name="domain" attrs="{'required': [('type','=','ressource')], 'readonly': [('type','=','static')]}"/>
</group>
<group colspan="4" col="4">
<field name="ressource_parent_type_id"/>
<field name="ressource_id" select="2" readonly="1"/>
</group>
</page>
<page string="Generated Files">
<page string="Generated Files" groups="base.group_extended">
<label colspan="4" string="For each entry here, virtual files will appear in this folder." />
<field name="content_ids" nolabel="1" colspan="4" attrs="{'readonly': [('ressource_type_id','=',False)]}">
<field name="content_ids" nolabel="1" colspan="4" >
<form string="Contents">
<field name="name"/>
<field name="sequence"/>
@@ -108,6 +117,7 @@
</field>
</page>
<page string="Dynamic context" groups="base.group_extended">
<label colspan="4" string="Define words in the context, for all child directories and files" />
<field name="dctx_ids" nolabel="1" colspan="4">
<tree string="Fields" editable="bottom">
<field name="field"/>
@@ -120,6 +130,8 @@
</field>
</page>
<page string="Security">
<label colspan="4" string="Only members of these groups will have access to this directory and its files." />
<label colspan="4" string="These groups, however, do NOT apply to children directories, which must define their own groups." />
<field name="group_ids" colspan="4" nolabel="1"/>
</page>
</notebook>
@@ -213,44 +225,46 @@
<field name="arch" type="xml">
<form string="Documents">
<group colspan="4" col="6">
<field name="name" select="1" />
<field name="type"/>
<field name="name" select="1" colspan="4" />
<field name="parent_id"/>
<newline/>
<field name="user_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="Attachment">
<group col="2" colspan="2">
<separator string="Data" colspan="2"/>
<field name="type"/>
<newline />
<group col="2" colspan="2" attrs="{'invisible':[('type','=','url')]}">
<field name="datas" filename="datas_fname"/>
<field name="datas_fname" select="1"/>
<field name="datas" filename="datas_fname"/>
<field name="datas_fname" select="1"/>
</group>
<group col="2" colspan="2" attrs="{'invisible':[('type','=','binary')]}">
<field name="url" widget="url"/>
<field name="url" widget="url"/>
</group>
</group>
<group col="2" colspan="2">
<separator string="Relation" colspan="2"/>
<field name="res_name" readonly="1"/>
<field name="partner_id"/>
<field name="user_id"/>
</group>
<group col="4" colspan="4">
<separator string="History" colspan="4"/>
<group col="4" colspan="4">
<field name="create_uid"/>
<field name="create_date"/>
</group>
<group col="4" colspan="4">
<field name="write_uid"/>
<field name="write_date"/>
<field name="res_id" invisible="True"/>
<group col="2" colspan="2" attrs="{'invisible': [('res_id','=',0)]}">
<separator string="Attached To" colspan="2"/>
<field name="res_model" readonly="True" invisible="True"/>
<field name="res_name" readonly="1"/>
</group>
<separator string="Related to" colspan="2"/>
<field name="partner_id"/>
</group>
<group col="2" colspan="2" groups="base.group_extended">
<separator string="Created" colspan="2"/>
<field name="create_uid" readonly="1"/>
<field name="create_date" readonly="1"/>
</group>
<group col="2" colspan="2" groups="base.group_extended">
<separator string="Modified" colspan="2"/>
<field name="write_uid" readonly="1"/>
<field name="write_date" readonly="1"/>
</group>
</page>
<page string="Security">
<field name="group_ids" colspan="4" nolabel="1"/>
</page>
<page string="Indexed Content" groups="base.group_extended">
<field name="index_content" colspan="4" nolabel="1"/>
@@ -269,11 +283,13 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="IR Attachment">
<filter icon="terp-go-month" string="Recent"
help="less 1 month modified/created attachments"
<filter icon="terp-go-month" string="Recent Month"
help="Attachment modified/created last 30 days"
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="parent_id" />
<field name="user_id">
<filter icon="terp-personal"
domain="[('user_id','=', False)]"
@@ -284,9 +300,9 @@
<newline/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-personal" domain="[]"
context="{'group_by':'partner_id'}" />
context="{'group_by':'partner_id'}" groups="base.group_extended"/>
<filter string="Directory" icon="terp-folder-green" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Type" domain="[]" context="{'group_by':'type'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}" groups="base.group_extended"/>
<filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Company" icon="terp-personal" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
</group>
@@ -301,11 +317,12 @@
<field name="arch" type="xml">
<tree colors="blue:type in ('url',)">
<field name="name"/>
<field name="type"/>
<field name="datas_fname"/>
<field name="parent_id" />
<field name="user_id"/>
<field name="create_date"/>
<field name="write_date"/>
<field name="partner_id" groups="base.group_extended" />
<field name="type" groups="base.group_extended"/>
</tree>
</field>
+116 -87
View File
@@ -1,76 +1,77 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * document
# * document
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Project-Id-Version: OpenERP Server 5.0.10\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 13:52+0000\n"
"Last-Translator: Donatas Stonys TeraxIT <donatelonow@hotmail.com>\n"
"PO-Revision-Date: 2010-07-20 22:11+0000\n"
"Last-Translator: Paulius Sladkevičius <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-06-22 04:18+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document
#: field:document.directory,create_date:0
msgid "Date Created"
msgstr ""
msgstr "Sukūrimo data"
#. module: document
#: field:document.directory,ressource_id:0
msgid "Resource ID"
msgstr ""
msgstr "Šaltinio ID"
#. module: document
#: field:document.directory.content,include_name:0
msgid "Include Record Name"
msgstr ""
msgstr "Įtraukti įrašo pavadinimą"
#. module: document
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Objekto pavadinimas turi prasidėti x_ ir neturėti jokių specialių simbolių!"
#. module: document
#: field:ir.actions.report.xml,model_id:0
msgid "Model Id"
msgstr ""
msgstr "Modelio ID"
#. module: document
#: constraint:document.directory:0
msgid "Error! You can not create recursive Directories."
msgstr ""
msgstr "Klaida ! Jūs negalite sukurti pasikartojančių katalogų."
#. module: document
#: model:ir.ui.menu,name:document.menu_document_configuration
msgid "Document Configuration"
msgstr ""
msgstr "Dokumentų konfigūracija"
#. module: document
#: view:ir.attachment:0
msgid "Preview"
msgstr ""
msgstr "Peržiūrėti"
#. module: document
#: field:ir.attachment,store_method:0
msgid "Storing Method"
msgstr ""
msgstr "Laikymo metodas"
#. module: document
#: model:ir.actions.act_window,name:document.action_config_auto_directory
msgid "Auto Configure Directory"
msgstr ""
msgstr "Automatinis katalogų konfigūravimas"
#. module: document
#: field:ir.attachment,file_size:0
msgid "File Size"
msgstr ""
msgstr "Failo dydis"
#. module: document
#: help:document.directory.content,include_name:0
@@ -78,47 +79,50 @@ msgid ""
"Check this field if you want that the name of the file start by the record "
"name."
msgstr ""
"Pažymėkite šį lauką, jeigu norite kad failo pavadinimas prasidėtų taip pat "
"kaip įrašo pavadinimas."
#. module: document
#: selection:document.directory,type:0
msgid "Other Resources"
msgstr ""
msgstr "Kiti ištekliai"
#. module: document
#: field:document.directory,ressource_parent_type_id:0
msgid "Parent Model"
msgstr ""
msgstr "Tėvinis modelis"
#. module: document
#: view:document.configuration.wizard:0
msgid "Document Management System."
msgstr ""
msgstr "Dokumentų valdymo sistema"
#. module: document
#: view:ir.attachment:0
msgid "Attachment"
msgstr ""
msgstr "Priedas"
#. module: document
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Netinkamas modelio pavadinimas veiksmo apibrėžime."
#. module: document
#: selection:document.directory,type:0
msgid "Static Directory"
msgstr ""
msgstr "Statinis katalogas"
#. module: document
#: model:ir.model,name:document.model_document_directory_content_type
msgid "Directory Content Type"
msgstr ""
msgstr "Katalogo turinio tipas"
#. module: document
#: help:document.directory,domain:0
msgid ""
"Use a domain if you want to apply an automatic filter on visible resources."
msgstr ""
"Naudoti sritį, jei norite taikyti automatinį filtrą matomiems ištekliams."
#. module: document
#: help:document.directory,ressource_tree:0
@@ -126,69 +130,73 @@ msgid ""
"Check this if you want to use the same tree structure as the object selected "
"in the system."
msgstr ""
"Pažymėkite, jeigu norite naudoti tokią pačią medžio struktūrą kaip "
"pasirinkto objekto."
#. module: document
#: field:document.directory,type:0
msgid "Type"
msgstr ""
msgstr "Tipas"
#. module: document
#: model:ir.actions.act_window,name:document.action_document_directory_tree
#: model:ir.ui.menu,name:document.menu_document_directories_tree
msgid "Directorie's Structure"
msgstr ""
msgstr "Katalogų struktūra"
#. module: document
#: field:document.directory,parent_id:0
msgid "Parent Item"
msgstr ""
msgstr "Tėvinis katalogas"
#. module: document
#: view:ir.attachment:0
msgid "File Information"
msgstr ""
msgstr "Failo informacija"
#. module: document
#: field:document.directory,file_ids:0 view:ir.attachment:0
#: field:document.directory,file_ids:0
#: view:ir.attachment:0
msgid "Files"
msgstr ""
msgstr "Failai"
#. module: document
#: field:ir.attachment,store_fname:0
msgid "Stored Filename"
msgstr ""
msgstr "Išsaugotas failo vardas"
#. module: document
#: field:document.directory,write_uid:0 field:ir.attachment,write_uid:0
#: field:document.directory,write_uid:0
#: field:ir.attachment,write_uid:0
msgid "Last Modification User"
msgstr ""
msgstr "Paskutinis pakeitęs naudotojas"
#. module: document
#: view:document.configuration.wizard:0
msgid "Configure"
msgstr ""
msgstr "Konfigūruoti"
#. module: document
#: field:document.directory,ressource_tree:0
msgid "Tree Structure"
msgstr ""
msgstr "Medžio struktūra"
#. module: document
#: field:ir.attachment,title:0
msgid "Resource Title"
msgstr ""
msgstr "Resurso antraštė"
#. module: document
#: model:ir.actions.todo,note:document.config_auto_directory
msgid ""
"This wizard will configure the URL of the server of the document management "
"system."
msgstr ""
msgstr "Šis vedlys konfigūruoja dokumentų valdymo sistemos serverio URL"
#. module: document
#: model:ir.model,name:document.model_document_directory_content
msgid "Directory Content"
msgstr ""
msgstr "Katalogo turinys"
#. module: document
#: help:document.directory,ressource_parent_type_id:0
@@ -196,31 +204,34 @@ msgid ""
"If you put an object here, this directory template will appear bellow all of "
"these objects. Don't put a parent directory if you select a parent model."
msgstr ""
"Jeigu jūs įtraukėte objektą čia, visi šio objekto katalogų šablonai atsiras "
"apačioje. Nenaudokite tėvinio katalogo, jei pasirinksite tėvinį modelį."
#. module: document
#: model:ir.ui.menu,name:document.menu_document
msgid "Document Management"
msgstr ""
msgstr "Dokumentų valdymas"
#. module: document
#: selection:ir.attachment,store_method:0
msgid "Link"
msgstr ""
msgstr "Nuoroda"
#. module: document
#: view:document.directory:0
msgid "Directory Type"
msgstr ""
msgstr "Katalogo tipas"
#. module: document
#: field:document.directory,group_ids:0 field:ir.attachment,group_ids:0
#: field:document.directory,group_ids:0
#: field:ir.attachment,group_ids:0
msgid "Groups"
msgstr ""
msgstr "Grupės"
#. module: document
#: field:document.directory.content,report_id:0
msgid "Report"
msgstr ""
msgstr "Ataskaita"
#. module: document
#: help:document.configuration.wizard,host:0
@@ -228,6 +239,8 @@ msgid ""
"Put here the server address or IP. Keep localhost if you don't know what to "
"write."
msgstr ""
"Įrašykite keletą adresų ar IP. Palikite localhost, jeigu nežinote, ką "
"įrašyti."
#. module: document
#: view:document.configuration.wizard:0
@@ -235,31 +248,34 @@ msgid ""
"This wizard will automatically configure the document management system "
"according to modules installed on your system."
msgstr ""
"Šis vedlys automatiškai konfigūruoja dokumentų valdymo sistemą pagal "
"modulius įdiegtus joje."
#. module: document
#: view:ir.attachment:0
msgid "Data"
msgstr ""
msgstr "Duomenys"
#. module: document
#: view:ir.attachment:0
msgid "Notes"
msgstr ""
msgstr "Pastabos"
#. module: document
#: view:ir.attachment:0 field:ir.attachment,index_content:0
#: view:ir.attachment:0
#: field:ir.attachment,index_content:0
msgid "Indexed Content"
msgstr ""
msgstr "Indekso turinys"
#. module: document
#: view:document.directory:0
msgid "Definition"
msgstr ""
msgstr "Aprašymas"
#. module: document
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Netinkamas XML peržiūros architektūrai!"
#. module: document
#: model:ir.module.module,description:document.module_meta_information
@@ -273,91 +289,93 @@ msgstr ""
#. module: document
#: field:document.directory,name:0
msgid "Name"
msgstr ""
msgstr "Pavadinimas"
#. module: document
#: field:document.directory.content.type,code:0
msgid "Extension"
msgstr ""
msgstr "Plėtinys"
#. module: document
#: selection:ir.attachment,store_method:0
msgid "Database"
msgstr ""
msgstr "Duomenų bazė"
#. module: document
#: field:document.directory,content_ids:0
msgid "Virtual Files"
msgstr ""
msgstr "Virtualūs failai"
#. module: document
#: view:document.directory:0
#: model:ir.ui.menu,name:document.menu_document_directories
msgid "Directories"
msgstr ""
msgstr "Katalogai"
#. module: document
#: view:document.directory:0
msgid "Seq."
msgstr ""
msgstr "Seka"
#. module: document
#: model:ir.module.module,shortdesc:document.module_meta_information
msgid "Integrated Document Management System"
msgstr ""
msgstr "Integruota dokumentų valdymo sistema"
#. module: document
#: field:document.directory.content,directory_id:0
#: field:ir.attachment,parent_id:0
msgid "Directory"
msgstr ""
msgstr "Katalogas"
#. module: document
#: field:document.directory,user_id:0 field:ir.attachment,user_id:0
#: field:document.directory,user_id:0
#: field:ir.attachment,user_id:0
msgid "Owner"
msgstr ""
msgstr "Savininkas"
#. module: document
#: model:ir.model,name:document.model_document_configuration_wizard
msgid "document.configuration.wizard"
msgstr ""
msgstr "Dokumentų konfigūracija"
#. module: document
#: view:ir.attachment:0
msgid "Attached To"
msgstr ""
msgstr "Prisegtas"
#. module: document
#: selection:ir.attachment,store_method:0
msgid "Filesystem"
msgstr ""
msgstr "Failų sistema"
#. module: document
#: field:document.directory,file_type:0
#: field:document.directory.content.type,name:0
#: field:ir.attachment,file_type:0
msgid "Content Type"
msgstr ""
msgstr "Turinio tipas"
#. module: document
#: view:document.directory:0 view:ir.attachment:0
#: view:document.directory:0
#: view:ir.attachment:0
msgid "Security"
msgstr ""
msgstr "Saugumas"
#. module: document
#: model:ir.ui.menu,name:document.menu_document_browse
msgid "Browse Files Using FTP"
msgstr ""
msgstr "Ieškoti failų naudojant FTP"
#. module: document
#: field:document.directory,ressource_type_id:0
msgid "Directories Mapped to Objects"
msgstr ""
msgstr "Katalogai priskirti objektams"
#. module: document
#: view:ir.attachment:0
msgid "History"
msgstr ""
msgstr "Istorija"
#. module: document
#: help:document.directory,ressource_type_id:0
@@ -365,102 +383,105 @@ msgid ""
"Select an object here and Open ERP will create a mapping for each of these "
"objects, using the given domain, when browsing through FTP."
msgstr ""
"Jei naršote per FTP, čia pasirinkite objektą, Open ERP sukurs aplanką "
"kiekvienam iš jų, naudojant pasirinktą sritį."
#. module: document
#: view:ir.attachment:0
msgid "Others Info"
msgstr ""
msgstr "Kita informacija"
#. module: document
#: field:document.directory,domain:0
msgid "Domain"
msgstr ""
msgstr "Sritis"
#. module: document
#: field:document.directory,write_date:0 field:ir.attachment,write_date:0
#: field:document.directory,write_date:0
#: field:ir.attachment,write_date:0
msgid "Date Modified"
msgstr ""
msgstr "Modifikavimo data"
#. module: document
#: field:document.directory.content,suffix:0
msgid "Suffix"
msgstr ""
msgstr "Sufiksas"
#. module: document
#: field:document.configuration.wizard,host:0
msgid "Server Address"
msgstr ""
msgstr "Serverio adresas"
#. module: document
#: model:ir.actions.url,name:document.action_document_browse
msgid "Browse Files"
msgstr ""
msgstr "Ieškoti failų"
#. module: document
#: field:document.directory.content,name:0
msgid "Content Name"
msgstr ""
msgstr "Turinio pavadinimas"
#. module: document
#: model:ir.model,name:document.model_document_directory
#: field:process.node,directory_id:0
msgid "Document directory"
msgstr ""
msgstr "Dokumentų katalogas"
#. module: document
#: field:document.directory,create_uid:0
msgid "Creator"
msgstr ""
msgstr "Kūrėjas"
#. module: document
#: view:document.directory:0
msgid "Auto-Generated Files"
msgstr ""
msgstr "Automatiškai sugeneruoti failai"
#. module: document
#: field:document.directory.content,sequence:0
msgid "Sequence"
msgstr ""
msgstr "Seka"
#. module: document
#: model:ir.ui.menu,name:document.menu_document_files
msgid "Search a File"
msgstr ""
msgstr "Ieškoti failo"
#. module: document
#: view:document.configuration.wizard:0
msgid "Auto Configure"
msgstr ""
msgstr "Automatinis konfigūravimas"
#. module: document
#: view:document.configuration.wizard:0
msgid "Cancel"
msgstr ""
msgstr "Atšaukti"
#. module: document
#: field:ir.attachment,partner_id:0
msgid "Partner"
msgstr ""
msgstr "Partneris"
#. module: document
#: view:document.directory:0
msgid "PDF Report"
msgstr ""
msgstr "PDF ataskaita"
#. module: document
#: field:document.directory.content,extension:0
msgid "Document Type"
msgstr ""
msgstr "Dokumento tipas"
#. module: document
#: field:document.directory,child_ids:0
msgid "Children"
msgstr ""
msgstr "Vaikai"
#. module: document
#: view:document.directory:0
msgid "Contents"
msgstr ""
msgstr "Turinys"
#. module: document
#: model:ir.actions.act_window,name:document.action_view_files_by_partner
@@ -623,3 +644,11 @@ msgstr ""
#: field:report.document.wall,last:0
msgid "Last Posted Time"
msgstr ""
#, python-format
#~ msgid "Directory name must be unique!"
#~ msgstr "Katalogo pavadinimas turi būti unikalus!"
#, python-format
#~ msgid "Directory name contains special characters!"
#~ msgstr "Katalogo pavadinime yra specialiųjų simbolių!"
+51 -65
View File
@@ -1,25 +1,25 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * document
# * document
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-20 08:19+0000\n"
"PO-Revision-Date: 2010-07-20 07:27+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:18+0000\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document
#: field:document.directory,create_date:0
msgid "Date Created"
msgstr "建立日期"
msgstr "创建日期"
#. module: document
#: field:document.directory,ressource_id:0
@@ -77,7 +77,7 @@ msgstr "文件大小"
msgid ""
"Check this field if you want that the name of the file start by the record "
"name."
msgstr "如果你想文件名开始是记录名称请选择它."
msgstr "如果你想文件名是这记录的名称请选择它."
#. module: document
#: selection:document.directory,type:0
@@ -87,7 +87,7 @@ msgstr "其它资源"
#. module: document
#: field:document.directory,ressource_parent_type_id:0
msgid "Parent Model"
msgstr "上级式样"
msgstr "上级模型"
#. module: document
#: view:document.configuration.wizard:0
@@ -102,7 +102,7 @@ msgstr "附件"
#. module: document
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "在这动作定义中有无效的模块名"
msgstr "在动作定义中使用了无效的模快名。"
#. module: document
#: selection:document.directory,type:0
@@ -112,20 +112,20 @@ msgstr "静态目录"
#. module: document
#: model:ir.model,name:document.model_document_directory_content_type
msgid "Directory Content Type"
msgstr "目录内容分类"
msgstr "目录内容类型"
#. module: document
#: help:document.directory,domain:0
msgid ""
"Use a domain if you want to apply an automatic filter on visible resources."
msgstr "如果你想使用可见资源的自动过滤这是使用的范围"
msgstr "如果你想对可得到的资源自动过滤, 规定一个范围"
#. module: document
#: help:document.directory,ressource_tree:0
msgid ""
"Check this if you want to use the same tree structure as the object selected "
"in the system."
msgstr "如果你想在系统中使用相同的对象树状结构请选择这"
msgstr "如果你想使用树结构象系统选定对象, 请选择这"
#. module: document
#: field:document.directory,type:0
@@ -149,7 +149,8 @@ msgid "File Information"
msgstr "文件信息"
#. module: document
#: field:document.directory,file_ids:0 view:ir.attachment:0
#: field:document.directory,file_ids:0
#: view:ir.attachment:0
msgid "Files"
msgstr "文件"
@@ -159,7 +160,8 @@ msgid "Stored Filename"
msgstr "保存文件名"
#. module: document
#: field:document.directory,write_uid:0 field:ir.attachment,write_uid:0
#: field:document.directory,write_uid:0
#: field:ir.attachment,write_uid:0
msgid "Last Modification User"
msgstr "最近修改用户"
@@ -176,14 +178,14 @@ msgstr "树结构"
#. module: document
#: field:ir.attachment,title:0
msgid "Resource Title"
msgstr "标题"
msgstr "资源标题"
#. module: document
#: model:ir.actions.todo,note:document.config_auto_directory
msgid ""
"This wizard will configure the URL of the server of the document management "
"system."
msgstr "这向导将配置文档管理系统的URL"
msgstr "这向导将配置服务器文档管理系统的URL"
#. module: document
#: model:ir.model,name:document.model_document_directory_content
@@ -195,9 +197,7 @@ msgstr "目录内容"
msgid ""
"If you put an object here, this directory template will appear bellow all of "
"these objects. Don't put a parent directory if you select a parent model."
msgstr ""
"如果你在这填上对象,这目录的模板将涵盖所有的对象.如果您选择母公司模式不要填入"
"父目录"
msgstr "如果你在这填上对象, 这目录的模板将出现在所有的对象. 如果您选择上级模式不要填入上级目录"
#. module: document
#: model:ir.ui.menu,name:document.menu_document
@@ -215,7 +215,8 @@ msgid "Directory Type"
msgstr "目录类型"
#. module: document
#: field:document.directory,group_ids:0 field:ir.attachment,group_ids:0
#: field:document.directory,group_ids:0
#: field:ir.attachment,group_ids:0
msgid "Groups"
msgstr "组"
@@ -249,7 +250,8 @@ msgid "Notes"
msgstr "备注"
#. module: document
#: view:ir.attachment:0 field:ir.attachment,index_content:0
#: view:ir.attachment:0
#: field:ir.attachment,index_content:0
msgid "Indexed Content"
msgstr "内容索引"
@@ -261,7 +263,7 @@ msgstr "定义"
#. module: document
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "无效XML视图结构!"
msgstr "无效的视图结构xml文件!"
#. module: document
#: model:ir.module.module,description:document.module_meta_information
@@ -284,7 +286,7 @@ msgstr "名称"
#. module: document
#: field:document.directory.content.type,code:0
msgid "Extension"
msgstr "延伸"
msgstr "扩展"
#. module: document
#: selection:ir.attachment,store_method:0
@@ -305,7 +307,7 @@ msgstr "目录"
#. module: document
#: view:document.directory:0
msgid "Seq."
msgstr "序号"
msgstr "序列"
#. module: document
#: model:ir.module.module,shortdesc:document.module_meta_information
@@ -319,14 +321,15 @@ msgid "Directory"
msgstr "说明"
#. module: document
#: field:document.directory,user_id:0 field:ir.attachment,user_id:0
#: field:document.directory,user_id:0
#: field:ir.attachment,user_id:0
msgid "Owner"
msgstr "拥有者"
#. module: document
#: model:ir.model,name:document.model_document_configuration_wizard
msgid "document.configuration.wizard"
msgstr "文档结构向导"
msgstr ""
#. module: document
#: view:ir.attachment:0
@@ -346,7 +349,8 @@ msgid "Content Type"
msgstr "内容类型"
#. module: document
#: view:document.directory:0 view:ir.attachment:0
#: view:document.directory:0
#: view:ir.attachment:0
msgid "Security"
msgstr "安全"
@@ -370,10 +374,7 @@ msgstr "日志"
msgid ""
"Select an object here and Open ERP will create a mapping for each of these "
"objects, using the given domain, when browsing through FTP."
msgstr ""
"选择一对象,系统将创建一个每个对象的列表,使用给定的域,通过FTP浏览\"\n"
"document,view,document.directory,0,Seq.,序列\n"
"document,field,document.directory.content"
msgstr "通过FTP浏览, 使用给定的域, 在这选择一对象, 系统将创建一个每个对象的列表,"
#. module: document
#: view:ir.attachment:0
@@ -383,10 +384,11 @@ msgstr "其它信息"
#. module: document
#: field:document.directory,domain:0
msgid "Domain"
msgstr "隶属"
msgstr "域"
#. module: document
#: field:document.directory,write_date:0 field:ir.attachment,write_date:0
#: field:document.directory,write_date:0
#: field:ir.attachment,write_date:0
msgid "Date Modified"
msgstr "修改日期"
@@ -474,19 +476,19 @@ msgstr "内容"
#. module: document
#: model:ir.actions.act_window,name:document.action_view_files_by_partner
msgid "Files Per Month"
msgstr "月度文件"
msgstr "每月文件"
#. module: document
#: model:ir.actions.act_window,name:document.action_view_wall
#: model:ir.ui.menu,name:document.menu_action_view_my_document_report_shame
#: view:report.document.wall:0
msgid "Wall of Shame"
msgstr "羞愧者名单"
msgstr "耻辱之墙"
#. module: document
#: model:ir.model,name:document.model_report_files_partner
msgid "Files details by Partners"
msgstr "业务伙伴文件详细信息"
msgstr "业务伙伴的文件详情"
#. module: document
#: model:ir.ui.menu,name:document.menu_action_view_my_document_report_all
@@ -502,7 +504,7 @@ msgstr "我的文件"
#. module: document
#: view:report.document.user:0
msgid "Files by users"
msgstr "用户文件"
msgstr "用户的文件"
#. module: document
#: view:report.files.partner:0
@@ -517,17 +519,17 @@ msgstr "我的文件(所有月份)"
#. module: document
#: field:report.document.wall,file_name:0
msgid "Last Posted File Name"
msgstr "最近发布的文件名"
msgstr "最近上传的文件"
#. module: document
#: model:ir.ui.menu,name:document.menu_action_view_my_document_report
msgid "Reporting"
msgstr "内部报表"
msgstr "报表"
#. module: document
#: model:ir.model,name:document.model_report_document_wall
msgid "Users that did not inserted documents since one month"
msgstr "一个月以来用户没有新文件"
msgstr "一个月内没有新文件的用户"
#. module: document
#: view:report.files.partner:0
@@ -548,28 +550,28 @@ msgstr "用户"
#: model:ir.ui.menu,name:document.menu_action_view_my_document_report_all_userfile
#: model:ir.ui.menu,name:document.menu_action_view_my_document_report_this_userfile
msgid "All Users files"
msgstr "所有用户文件"
msgstr "所有用户的文件"
#. module: document
#: model:ir.actions.act_window,name:document.action_view_my_document_tree
msgid "My files (This months)"
msgstr "我的文件(这月)"
msgstr "我的文件(本月)"
#. module: document
#: model:ir.model,name:document.model_report_document_user
msgid "Files details by Users"
msgstr "用户详细信息"
msgstr "用户的文件详情"
#. module: document
#: field:report.document.file,nbr:0 field:report.document.user,nbr:0
#: field:report.files.partner,nbr:0
msgid "# of Files"
msgstr "文件号"
msgstr "# 文件"
#. module: document
#: model:ir.actions.act_window,name:document.action_view_user_graph
msgid "Files By Users"
msgstr "用户文件"
msgstr "用户的文件"
#. module: document
#: model:ir.module.module,shortdesc:report_document.module_meta_information
@@ -579,12 +581,12 @@ msgstr "文档管理 - 报表"
#. module: document
#: model:ir.actions.act_window,name:document.action_view_all_document_tree1
msgid "All Users files (All months)"
msgstr "所有文件(所有月份)"
msgstr "所有用户的文件(所有月份)"
#. module: document
#: model:ir.model,name:document.model_report_document_file
msgid "Files details by Directory"
msgstr "文件详细目录"
msgstr "目录文件详情"
#. module: document
#: field:report.document.user,change_date:0
@@ -596,7 +598,7 @@ msgstr "修改日期"
#: model:ir.actions.act_window,name:document.action_view_size_month
#: view:report.document.file:0
msgid "File Size by Month"
msgstr "这月的文件大小"
msgstr "按月度排列文件大小"
#. module: document
#: field:report.document.user,file_title:0
@@ -609,13 +611,13 @@ msgstr "文件名"
#: field:report.document.user,name:0 field:report.document.wall,month:0
#: field:report.document.wall,name:0 field:report.files.partner,name:0
msgid "Month"
msgstr "月"
msgstr "月份"
#. module: document
#: model:ir.actions.act_window,name:document.action_view_files_by_month_graph
#: view:report.document.user:0
msgid "Files by Month"
msgstr "这月的文件"
msgstr "按月度排列文件"
#. module: document
#: model:ir.actions.act_window,name:document.action_view_document_by_resourcetype_graph
@@ -626,7 +628,7 @@ msgstr "文件的资源类型"
#. module: document
#: model:ir.actions.act_window,name:document.action_view_all_document_tree
msgid "All Users files (This month)"
msgstr "所有文件(所有月份)"
msgstr "所有用户的文件(本月)"
#. module: document
#: field:report.document.wall,last:0
@@ -635,19 +637,3 @@ msgstr "最近的发布时间"
#~ msgid "Active"
#~ msgstr "生效"
#~ msgid ""
#~ "\n"
#~ " Reporting for the Document Management module:\n"
#~ " * My Files\n"
#~ " * All users Files \n"
#~ " "
#~ msgstr ""
#~ "\n"
#~ " 报告文档管理模块:\n"
#~ "\t\t- 我的文件\n"
#~ "\t\t- 所有用户的文件 \n"
#~ " "
#~ msgid "Files Per Partner"
#~ msgstr "每个业务伙伴文件"
+682 -176
View File
File diff suppressed because it is too large Load Diff
+11 -11
View File
@@ -33,22 +33,22 @@
</field>
</record>
<record id="view_report_document_user_search" model="ir.ui.view">
<record id="view_report_document_user_search" model="ir.ui.view">
<field name="name">report.document.user.search</field>
<field name="model">report.document.user</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="All users files">
<group col="12" colspan="4">
<group col="12" colspan="4">
<separator orientation="vertical"/>
<filter icon="terp-go-year" string="This Year" domain="[('name','=',time.localtime()[0])]" help="All Months Files"/>
<filter icon="terp-go-month" string="This Month" domain="[('month','=',time.localtime()[1])]" help="This Months Files"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="user" select="1"/>
<field name="directory" select="1"/>
</group>
<filter icon="terp-go-year" string="This Year" domain="[('name','=',time.localtime()[0])]" help="All Months Files"/>
<filter icon="terp-go-month" string="This Month" domain="[('month','=',time.localtime()[1])]" help="This Months Files"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="user" select="1"/>
<field name="directory" select="1"/>
</group>
</search>
</field>
</record>
@@ -61,7 +61,7 @@
<field name="res_model">report.document.user</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="context">{"search_default_user":uid}</field>
<field name="context">{'search_default_user': 'user_id'}</field>
<field name="search_view_id" ref="view_report_document_user_search"/>
</record>
+72
View File
@@ -0,0 +1,72 @@
-
In order to test the document management
-
I make sure the default installation has some storage and root directory.
-
!assert {model: document.storage, id: storage_default }:
- id != False
-
!assert {model: document.directory, id: dir_root}:
- storage_id != False
-
I create a "Testing" folder where all the test data will go.
-
!record {model: document.directory, id: dir_tests }:
name: 'Testing'
parent_id: dir_root
-
I create an attachment into the root folder (w. empty fields, test that
defaults work)
-
!record {model: ir.attachment, id: file_test1 }:
name: Test file
-
I delete the attachment from the root folder
-
!delete {model: ir.attachment, id: file_test1, search: }
-
I create an attachment into the Testing folder.
-
!record {model: ir.attachment, id: file_test2 }:
name: Test file 2
parent_id: dir_tests
-
I update the attachment with data, namely "abcd"
-
!record {model: ir.attachment, id: file_test2 }:
datas: "abcd"
-
I test that the datas of the attachment are correct
-
!assert {model: ir.attachment, id: file_test2 }:
- datas == "abcd\n"
- file_size == 5
- file_type == 'text/plain'
-
I rename the attachment.
-
!record {model: ir.attachment, id: file_test2 }:
name: Test renamed 2
-
I search the testing folder for attachments.
-
!python {model: ir.attachment}: |
ids = self.search(cr, uid, [('parent_id.name','=', 'Testing'), ('name','=','Test renamed 2')])
assert ids == [ ref("file_test2") ], ids
-
I create an attachment to a 3rd resource, eg. a res.country
-
!record {model: ir.attachment, id: attach_3rd }:
name: 'Res country attachment.txt'
parent_id: dir_tests
datas: 'defg'
res_model: res.country
res_id: !eval ref("base.za")
-
I search for the res.country attachment
-
!python {model: ir.attachment}: |
ids = self.search(cr, uid, [('res_model', '=', 'res.country'), ('res_id', '=', ref("base.za"))])
assert ids == [ ref("attach_3rd")], ids
-
!delete {model: ir.attachment, id: attach_3rd, search: }

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