[MERGE] sync with latest trunk

bzr revid: odo@openerp.com-20111013170327-9rvfdkbgj01hdgxb
This commit is contained in:
Olivier Dony 2011-10-13 19:03:27 +02:00
commit 3bffe65b2c
545 changed files with 21353 additions and 10782 deletions

View File

@ -23,7 +23,7 @@ import account
import installer
import project
import partner
import invoice
import account_invoice
import account_bank_statement
import account_bank
import account_cash_statement
@ -32,7 +32,7 @@ import account_analytic_line
import wizard
import report
import product
import sequence
import ir_sequence
import company
import res_currency
import edi

View File

@ -22,7 +22,7 @@
"name" : "Accounting and Financial Management",
"version" : "1.1",
"author" : "OpenERP SA",
"category": 'Finance',
"category": 'Accounting & Finance',
'complexity': "normal",
"description": """
Accounting and Financial Management.
@ -103,8 +103,7 @@ module named account_voucher.
'account_end_fy.xml',
'account_invoice_view.xml',
'partner_view.xml',
'data/account_invoice.xml',
'data/account_data2.xml',
'data/account_data.xml',
'account_invoice_workflow.xml',
'project/project_view.xml',
'project/project_report.xml',
@ -119,7 +118,7 @@ module named account_voucher.
'process/statement_process.xml',
'process/customer_invoice_process.xml',
'process/supplier_invoice_process.xml',
'sequence_view.xml',
'ir_sequence_view.xml',
'company_view.xml',
'board_account_view.xml',
"wizard/account_report_profit_loss_view.xml",

View File

@ -346,6 +346,52 @@ class account_account(osv.osv):
res[account.id] = level
return res
def _set_credit_debit(self, cr, uid, account_id, name, value, arg, context=None):
if context.get('config_invisible', True):
return True
account = self.browse(cr, uid, account_id, context=context)
diff = value - getattr(account,name)
if not diff:
return True
journal_obj = self.pool.get('account.journal')
jids = journal_obj.search(cr, uid, [('type','=','situation'),('centralisation','=',1),('company_id','=',account.company_id.id)], context=context)
if not jids:
raise osv.except_osv(_('Error!'),_("You need an Opening journal with centralisation checked to set the initial balance!"))
period_obj = self.pool.get('account.period')
pids = period_obj.search(cr, uid, [('special','=',True),('company_id','=',account.company_id.id)], context=context)
if not pids:
raise osv.except_osv(_('Error!'),_("No opening/closing period defined, please create one to set the initial balance!"))
move_obj = self.pool.get('account.move.line')
move_id = move_obj.search(cr, uid, [
('journal_id','=',jids[0]),
('period_id','=',pids[0]),
('account_id','=', account_id),
(name,'>', 0.0),
('name','=', _('Opening Balance'))
], context=context)
if move_id:
move = move_obj.browse(cr, uid, move_id[0], context=context)
move_obj.write(cr, uid, move_id[0], {
name: diff+getattr(move,name)
}, context=context)
else:
if diff<0.0:
raise osv.except_osv(_('Error!'),_("Unable to adapt the initial balance (negative value)!"))
nameinv = (name=='credit' and 'debit') or 'credit'
move_id = move_obj.create(cr, uid, {
'name': _('Opening Balance'),
'account_id': account_id,
'journal_id': jids[0],
'period_id': pids[0],
name: diff,
nameinv: 0.0
}, context=context)
return True
_columns = {
'name': fields.char('Name', size=128, required=True, select=True),
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
@ -370,9 +416,9 @@ class account_account(osv.osv):
'child_consol_ids': fields.many2many('account.account', 'account_account_consol_rel', 'child_id', 'parent_id', 'Consolidated Children'),
'child_id': fields.function(_get_child_ids, type='many2many', relation="account.account", string="Child Accounts"),
'balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Balance', multi='balance'),
'credit': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Credit', multi='balance'),
'debit': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Debit', multi='balance'),
'reconcile': fields.boolean('Reconcile', help="Check this if the user is allowed to reconcile entries in this account."),
'credit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Credit', multi='balance'),
'debit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Debit', multi='balance'),
'reconcile': fields.boolean('Allow Reconciliation', help="Check this box if this account allows reconciliation of journal items."),
'shortcut': fields.char('Shortcut', size=12),
'tax_ids': fields.many2many('account.tax', 'account_account_tax_default_rel',
'account_id', 'tax_id', 'Default Taxes'),
@ -672,32 +718,22 @@ class account_journal(osv.osv):
return super(account_journal, self).write(cr, uid, ids, vals, context=context)
def create_sequence(self, cr, uid, vals, context=None):
""" Create new no_gap entry sequence for every new Joural
"""
Create new entry sequence for every new Joural
"""
seq_pool = self.pool.get('ir.sequence')
seq_typ_pool = self.pool.get('ir.sequence.type')
name = vals['name']
code = vals['code'].lower()
types = {
'name': name,
'code': code
}
seq_typ_pool.create(cr, uid, types)
# in account.journal code is actually the prefix of the sequence
# whereas ir.sequence code is a key to lookup global sequences.
prefix = vals['code'].upper()
seq = {
'name': name,
'code': code,
'active': True,
'prefix': code + "/%(year)s/",
'name': vals['name'],
'implementation':'no_gap',
'prefix': prefix + "/%(year)s/",
'padding': 4,
'number_increment': 1
}
if 'company_id' in vals:
seq['company_id'] = vals['company_id']
return seq_pool.create(cr, uid, seq)
return self.pool.get('ir.sequence').create(cr, uid, seq)
def create(self, cr, uid, vals, context=None):
if not 'sequence_id' in vals or not vals['sequence_id']:
@ -1177,22 +1213,10 @@ class account_move(osv.osv):
return False
return True
def _check_period_journal(self, cursor, user, ids, context=None):
for move in self.browse(cursor, user, ids, context=context):
for line in move.line_id:
if line.period_id.id != move.period_id.id:
return False
if line.journal_id.id != move.journal_id.id:
return False
return True
_constraints = [
(_check_centralisation,
'You can not create more than one move per period on centralized journal',
['journal_id']),
(_check_period_journal,
'You can not create journal items on different periods/journals in the same journal entry',
['line_id']),
]
def post(self, cr, uid, ids, context=None):
@ -1214,7 +1238,7 @@ class account_move(osv.osv):
else:
if journal.sequence_id:
c = {'fiscalyear_id': move.period_id.fiscalyear_id.id}
new_name = obj_sequence.get_id(cr, uid, journal.sequence_id.id, context=c)
new_name = obj_sequence.next_by_id(cr, uid, journal.sequence_id.id, c)
else:
raise osv.except_osv(_('Error'), _('No sequence defined on the journal !'))
@ -1475,8 +1499,6 @@ class account_move(osv.osv):
# Update the move lines (set them as valid)
obj_move_line.write(cr, uid, line_draft_ids, {
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
'state': 'valid'
}, context, check=False)
@ -1517,8 +1539,6 @@ class account_move(osv.osv):
# We can't validate it (it's unbalanced)
# Setting the lines as draft
obj_move_line.write(cr, uid, line_ids, {
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
'state': 'draft'
}, context, check=False)
# Create analytic lines for the valid moves
@ -2598,7 +2618,8 @@ class account_fiscal_position_template(osv.osv):
'name': fields.char('Fiscal Position Template', size=64, required=True),
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'account_ids': fields.one2many('account.fiscal.position.account.template', 'position_id', 'Account Mapping'),
'tax_ids': fields.one2many('account.fiscal.position.tax.template', 'position_id', 'Tax Mapping')
'tax_ids': fields.one2many('account.fiscal.position.tax.template', 'position_id', 'Tax Mapping'),
'note': fields.text('Notes', translate=True),
}
account_fiscal_position_template()
@ -2682,7 +2703,7 @@ class account_financial_report(osv.osv):
return res
_columns = {
'name': fields.char('Report Name', size=128, required=True),
'name': fields.char('Report Name', size=128, required=True, translate=True),
'parent_id': fields.many2one('account.financial.report', 'Parent'),
'children_ids': fields.one2many('account.financial.report', 'parent_id', 'Account Report'),
'sequence': fields.integer('Sequence'),
@ -2730,7 +2751,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
_columns = {
'company_id':fields.many2one('res.company', 'Company', required=True),
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Bank Accounts', required=True),
'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Cash and Banks', required=True),
'code_digits':fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"),
'seq_journal':fields.boolean('Separated Journal Sequences', help="Check this box if you want to use a different sequence for each created journal. Otherwise, all will use the same sequence."),
"sale_tax": fields.many2one("account.tax.template", "Default Sale Tax"),
@ -2778,7 +2799,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
def _get_default_accounts(self, cr, uid, context=None):
return [
{'acc_name': _('Bank Account'),'account_type':'bank'},
{'acc_name': _('Cash'),'account_type':'cash'}
]

View File

@ -123,7 +123,7 @@ class account_analytic_line(osv.osv):
ctx['uom'] = unit
amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
amount = amount_unit * quantity or 1.0
amount = amount_unit * quantity or 0.0
result = round(amount, prec)
if not flag:
result *= -1

View File

@ -340,9 +340,9 @@ class account_bank_statement(osv.osv):
else:
if st.journal_id.sequence_id:
c = {'fiscalyear_id': st.period_id.fiscalyear_id.id}
st_number = obj_seq.get_id(cr, uid, st.journal_id.sequence_id.id, context=c)
st_number = obj_seq.next_by_id(cr, uid, st.journal_id.sequence_id.id, context=c)
else:
st_number = obj_seq.get(cr, uid, 'account.bank.statement')
st_number = obj_seq.next_by_code(cr, uid, 'account.bank.statement')
for line in st.move_line_ids:
if line.state <> 'valid':

View File

@ -13,7 +13,7 @@
<field name="inherit_id" ref="base.view_partner_bank_form"/>
<field name="arch" type="xml">
<group name="bank" position="after">
<group name="accounting" col="2" colspan="2" attrs="{'invisible': [('company_id','=', False)]}">
<group name="accounting" col="2" colspan="2" attrs="{'invisible': [('company_id','=', False)]}" groups="base.group_extended">
<separator string="Accounting Information" colspan="2"/>
<field name="journal_id"/>
</group>
@ -23,16 +23,16 @@
<record id="action_bank_tree" model="ir.actions.act_window">
<field name="name">Bank Accounts</field>
<field name="name">Setup your Bank Accounts</field>
<field name="res_model">res.partner.bank</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context" eval="{'default_partner_id':ref('base.main_partner'), 'company_hide':False, 'default_company_id':ref('base.main_company'), 'search_default_my_bank':1}"/>
<field name="help">Configure your company's bank account and select those that must appear on the report footer. You can drag &amp; drop bank in the list view to reorder bank accounts. If you use the accounting application of OpenERP, journals and accounts will be created automatically based on these data.</field>
<field name="help">Configure your company's bank account and select those that must appear on the report footer. You can reorder banks in the list view. If you use the accounting application of OpenERP, journals and accounts will be created automatically based on these data.</field>
</record>
<menuitem
sequence="0"
parent="account.account_account_menu"
parent="account.account_account_menu"
id="menu_action_bank_tree"
action="action_bank_tree"/>

View File

@ -294,9 +294,9 @@ class account_cash_statement(osv.osv):
if statement.name and statement.name == '/':
if statement.journal_id.sequence_id:
c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
st_number = obj_seq.get_id(cr, uid, statement.journal_id.sequence_id.id, context=c)
st_number = obj_seq.next_by_id(cr, uid, statement.journal_id.sequence_id.id, context=c)
else:
st_number = obj_seq.get(cr, uid, 'account.cash.statement')
st_number = obj_seq.next_by_code(cr, uid, 'account.cash.statement')
vals.update({
'name': st_number
})

View File

@ -11,7 +11,7 @@
<attribute name="string">Accounting Application Configuration</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Configure Your Accounting Chart</attribute>
<attribute name="string">Configure Your Chart of Accounts</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">The default Chart of Accounts is matching your country selection. If no certified Chart of Accounts exists for your specified country, a generic one can be installed and will be selected by default.</attribute>
@ -26,7 +26,7 @@
<group colspan="8" position="inside">
<group colspan="4" width="600">
<field name="charts"/>
<group colspan="4" groups="base.group_extended">
<group colspan="4" groups="account.group_account_user">
<separator col="4" colspan="4" string="Configure Fiscal Year"/>
<field name="company_id" colspan="4" widget="selection"/><!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<field name="date_start" on_change="on_change_start_date(date_start)"/>
@ -43,28 +43,8 @@
</field>
</record>
<record id="view_account_modules_installer" model="ir.ui.view">
<field name="name">account.installer.modules.form</field>
<field name="model">base.setup.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base_setup.view_base_setup_installer"/>
<field name="arch" type="xml">
<data>
<xpath expr="//group[@name='account_accountant']" position="replace">
<newline/>
<separator string="Accounting &amp; Finance Features" colspan="4"/>
<field name="account_followup"/>
<field name="account_payment"/>
<field name="account_analytic_plans"/>
<field name="account_anglo_saxon"/>
<field name="account_asset"/>
</xpath>
</data>
</field>
</record>
<record id="action_account_configuration_installer" model="ir.actions.act_window">
<field name="name">Accounting Chart Configuration</field>
<field name="name">Install your Chart of Accounts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer</field>
<field name="view_id" ref="view_account_configuration_installer"/>
@ -85,25 +65,13 @@
<field name="type">automatic</field>
</record>
<record id="action_bank_account_configuration_installer" model="ir.actions.act_window">
<field name="name">Define your Bank Account</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner.bank</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
</record>
<record id="bank_account_configuration_todo" model="ir.actions.todo">
<field name="action_id" ref="action_bank_account_configuration_installer" />
<field name="category_id" ref="category_accounting_configuration" />
</record>
<record id="action_view_financial_accounts_installer" model="ir.actions.act_window">
<field name="name">Review your Financial Accounts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'config_invisible': False}</field>
</record>
<record id="view_financial_accounts_todo" model="ir.actions.todo">
@ -113,11 +81,12 @@
</record>
<record id="action_review_financial_journals_installer" model="ir.actions.act_window">
<field name="name">Review your Financial Journal</field>
<field name="name">Review your Financial Journals</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.journal</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help">Setup your accounting journals. For bank accounts, it's better to use the 'Setup Your Bank Accounts' tool that will automatically create the accounts and journals for you.</field>
</record>
<record id="review_financial_journals_todo" model="ir.actions.todo">
@ -131,6 +100,7 @@
<field name="res_model">account.payment.term</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help">Payment terms define the conditions to pay a customer or supplier invoice in one or several payments. Customers periodic reminders will use the payment terms for each letter. Each customer or supplier can be assigned to one of these payment terms.</field>
</record>
<record id="review_payment_terms_todo" model="ir.actions.todo">

View File

@ -23,8 +23,10 @@ import time
from datetime import datetime
from operator import itemgetter
from lxml import etree
import netsvc
from osv import fields, osv
from osv import fields, osv, orm
from tools.translate import _
import decimal_precision as dp
import tools
@ -492,8 +494,14 @@ class account_move_line(osv.osv):
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1),
'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True, readonly=True,
store = {
'account.move': (_get_move_lines, ['journal_id'], 20)
}),
'period_id': fields.related('move_id', 'period_id', string='Period', type='many2one', relation='account.period', required=True, select=True, readonly=True,
store = {
'account.move': (_get_move_lines, ['period_id'], 20)
}),
'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"),
'partner_id': fields.many2one('res.partner', 'Partner', select=1, ondelete='restrict'),
'date_maturity': fields.date('Due date', select=True ,help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."),
@ -970,7 +978,6 @@ class account_move_line(osv.osv):
fields = {}
flds = []
title = _("Accounting Entries") #self.view_header_get(cr, uid, view_id, view_type, context)
xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5" on_write="on_create_write" colors="red:state==\'draft\';black:state==\'valid\'">\n\t''' % (title)
ids = journal_pool.search(cr, uid, [])
journals = journal_pool.browse(cr, uid, ids, context=context)
@ -982,14 +989,14 @@ class account_move_line(osv.osv):
for field in journal.view_id.columns_id:
if not field.field in fields:
fields[field.field] = [journal.id]
fld.append((field.field, field.sequence, field.name))
fld.append((field.field, field.sequence))
flds.append(field.field)
common_fields[field.field] = 1
else:
fields.get(field.field).append(journal.id)
common_fields[field.field] = common_fields[field.field] + 1
fld.append(('period_id', 3, _('Period')))
fld.append(('journal_id', 10, _('Journal')))
fld.append(('period_id', 3))
fld.append(('journal_id', 10))
flds.append('period_id')
flds.append('journal_id')
fields['period_id'] = all_journal
@ -1001,62 +1008,71 @@ class account_move_line(osv.osv):
'tax_code_id': 50,
'move_id': 40,
}
for field_it in fld:
field = field_it[0]
document = etree.Element('tree', string=title, editable="top",
refresh="5", on_write="on_create_write",
colors="red:state=='draft';black:state=='valid'")
fields_get = self.fields_get(cr, uid, flds, context)
for field, _seq in fld:
if common_fields.get(field) == total:
fields.get(field).append(None)
# if field=='state':
# state = 'colors="red:state==\'draft\'"'
attrs = []
# if field=='state':
# state = 'colors="red:state==\'draft\'"'
f = etree.SubElement(document, 'field', name=field)
if field == 'debit':
attrs.append('sum = "%s"' % _("Total debit"))
f.set('sum', _("Total debit"))
elif field == 'credit':
attrs.append('sum = "%s"' % _("Total credit"))
f.set('sum', _("Total credit"))
elif field == 'move_id':
attrs.append('required = "False"')
f.set('required', 'False')
elif field == 'account_tax_id':
attrs.append('domain="[(\'parent_id\', \'=\' ,False)]"')
attrs.append("context=\"{'journal_id': journal_id}\"")
f.set('domain', "[('parent_id', '=' ,False)]")
f.set('context', "{'journal_id': journal_id}")
elif field == 'account_id' and journal.id:
attrs.append('domain="[(\'journal_id\', \'=\', journal_id),(\'type\',\'&lt;&gt;\',\'view\'), (\'type\',\'&lt;&gt;\',\'closed\')]" on_change="onchange_account_id(account_id, partner_id)"')
f.set('domain', "[('journal_id', '=', journal_id),('type','!=','view'), ('type','!=','closed')]")
f.set('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)"')
f.set('on_change', 'onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)')
elif field == 'journal_id':
attrs.append("context=\"{'journal_id': journal_id}\"")
f.set('context', "{'journal_id': journal_id}")
elif field == 'statement_id':
attrs.append("domain=\"[('state', '!=', 'confirm'),('journal_id.type', '=', 'bank')]\"")
f.set('domain', "[('state', '!=', 'confirm'),('journal_id.type', '=', 'bank')]")
elif field == 'date':
attrs.append('on_change="onchange_date(date)"')
f.set('on_change', 'onchange_date(date)')
elif field == 'analytic_account_id':
attrs.append('''groups="analytic.group_analytic_accounting"''') # Currently it is not working due to framework problem may be ..
# Currently it is not working due to being executed by superclass's fields_view_get
# f.set('groups', 'analytic.group_analytic_accounting')
pass
if field in ('amount_currency', 'currency_id'):
attrs.append('on_change="onchange_currency(account_id, amount_currency, currency_id, date, journal_id)"')
attrs.append('''attrs="{'readonly': [('state', '=', 'valid')]}"''')
f.set('on_change', 'onchange_currency(account_id, amount_currency, currency_id, date, journal_id)')
f.set('attrs', "{'readonly': [('state', '=', 'valid')]}")
if field in widths:
attrs.append('width="'+str(widths[field])+'"')
f.set('width', str(widths[field]))
if field in ('journal_id',):
attrs.append("invisible=\"context.get('journal_id', False)\"")
f.set("invisible", "context.get('journal_id', False)")
elif field in ('period_id',):
attrs.append("invisible=\"context.get('period_id', False)\"")
f.set("invisible", "context.get('period_id', False)")
else:
attrs.append("invisible=\"context.get('visible_id') not in %s\"" % (fields.get(field)))
xml += '''<field name="%s" %s/>\n''' % (field,' '.join(attrs))
f.set('invisible', "context.get('visible_id') not in %s" % (fields.get(field)))
xml += '''</tree>'''
result['arch'] = xml
result['fields'] = self.fields_get(cr, uid, flds, context)
orm.setup_modifiers(f, fields_get[field], context=context,
in_tree_view=True)
result['arch'] = etree.tostring(document, pretty_print=True)
result['fields'] = fields_get
return result
def _check_moves(self, cr, uid, context=None):
@ -1221,7 +1237,7 @@ class account_move_line(osv.osv):
vals['move_id'] = res[0]
if not vals.get('move_id', False):
if journal.sequence_id:
#name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id)
#name = self.pool.get('ir.sequence').next_by_id(cr, uid, journal.sequence_id.id)
v = {
'date': vals.get('date', time.strftime('%Y-%m-%d')),
'period_id': context['period_id'],
@ -1249,7 +1265,7 @@ class account_move_line(osv.osv):
break
# Automatically convert in the account's secondary currency if there is one and
# the provided values were not already multi-currency
if account.currency_id and not vals.get('ammount_currency') and account.currency_id.id != account.company_id.currency_id.id:
if account.currency_id and (vals.get('amount_currency', False) is False) and account.currency_id.id != account.company_id.currency_id.id:
vals['currency_id'] = account.currency_id.id
ctx = {}
if 'date' in vals:

View File

@ -24,8 +24,6 @@
<report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
<report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>
<report id="account_move_line_list" model="account.tax.code" name="account.tax.code.entries" rml="account/report/account_tax_code.rml" string="All Entries"/>
<report
auto="False"
id="account_vat_declaration"

View File

@ -162,17 +162,21 @@
<field name="arch" type="xml">
<form string="Account">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="parent_id"/>
<field name="type" select="1"/>
<field name="user_type" select="1"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="parent_id"/>
<field name="type" select="1"/>
<field name="user_type" select="1"/>
<field name="active" groups="base.group_extended" />
<newline/>
<field name="debit" invisible="context.get('config_invisible', True)"/>
<field name="credit" invisible="context.get('config_invisible', True)"/>
<field name="balance" invisible="context.get('config_invisible', True)"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field name="active" groups="base.group_extended" />
<newline/>
<group col="2" colspan="2">
<separator string="Currency" colspan="2"/>
@ -209,7 +213,6 @@
<field name="code"/>
<field name="name"/>
<field name="user_type"/>
<field name="type"/>
</group>
<newline/>
<group expand="0" string="Group By...">
@ -438,9 +441,9 @@
<field name="user_id" groups="base.group_extended"/>
<field name="currency"/>
</group>
<group colspan="2" col="2">
<group colspan="2" col="2" groups="base.group_extended">
<separator string="Validations" colspan="4"/>
<field name="allow_date" groups="base.group_extended"/>
<field name="allow_date"/>
</group>
<group colspan="2" col="2">
<separator string="Other Configuration" colspan="4"/>
@ -1193,7 +1196,7 @@
<field name="date"/>
<field name="account_id"/>
<field name="partner_id">
<filter help="Next Partner Entries to reconcile" name="next_partner" string="Next Partner to reconcile" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
<filter help="Next Partner Entries to reconcile" name="next_partner" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
</field>
</group>
<newline/>
@ -2375,8 +2378,7 @@
<attribute name="string">Accounting Application Configuration</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string"
>Generate Your Accounting Chart from a Chart Template</attribute>
<attribute name="string">Generate Your Chart of Accounts from a Chart Template</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>
@ -2388,13 +2390,13 @@
</xpath>
<group string="res_config_contents" position="replace">
<field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<field name ="code_digits" groups="base.group_extended"/>
<field name ="code_digits" groups="account.group_account_user"/>
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)"/>
<field name ="seq_journal" groups="base.group_extended"/>
<field name ="seq_journal" groups="account.group_account_user"/>
<field name="sale_tax" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
<field name="purchase_tax" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
<newline/> <!-- extended view because the web UI is not good for one2many -->
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list" groups="base.group_extended">
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list" groups="account.group_account_user">
<form string="Bank Information">
<field name="acc_name"/>
<field name="account_type"/>

View File

@ -21,26 +21,26 @@
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_income_view1">
<field name="name">Income View</field>
<field name="code">view</field>
<field name="report_type">income</field>
</record>
<record model="account.account.type" id="account_type_expense_view1">
<field name="name">Expense View</field>
<field name="code">expense</field>
<field name="report_type">expense</field>
</record>
<record model="account.account.type" id="account_type_asset_view1">
<field name="name">Asset View</field>
<field name="code">asset</field>
<field name="report_type">asset</field>
</record>
<record model="account.account.type" id="account_type_liability_view1">
<field name="name">Liability View</field>
<field name="code">liability</field>
<field name="report_type">liability</field>
</record>
<record model="account.account.type" id="account_type_income_view1">
<field name="name">Income View</field>
<field name="code">view</field>
<field name="report_type">income</field>
</record>
<record model="account.account.type" id="account_type_expense_view1">
<field name="name">Expense View</field>
<field name="code">expense</field>
<field name="report_type">expense</field>
</record>
<record model="account.account.type" id="account_type_asset_view1">
<field name="name">Asset View</field>
<field name="code">asset</field>
<field name="report_type">asset</field>
</record>
<record model="account.account.type" id="account_type_liability_view1">
<field name="name">Liability View</field>
<field name="code">liability</field>
<field name="report_type">liability</field>
</record>
<record model="account.account.type" id="conf_account_type_income">
<field name="name">Income</field>
@ -106,16 +106,16 @@
<!-- Account Templates-->
<record id="conf_chart0" model="account.account.template">
<field name="code">0</field>
<field name="name">Configurable Account Chart</field>
<field eval="0" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<!-- Account Templates-->
<record id="conf_chart0" model="account.account.template">
<field name="code">0</field>
<field name="name">Configurable Account Chart</field>
<field eval="0" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<!-- Balance Sheet -->
<!-- Balance Sheet -->
<record id="conf_bal" model="account.account.template">
<field name="code">1</field>
@ -125,120 +125,120 @@
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_fas" model="account.account.template">
<field name="code">10</field>
<field name="name">Fixed Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_fas" model="account.account.template">
<field name="code">10</field>
<field name="name">Fixed Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_xfa" model="account.account.template">
<field name="code">100</field>
<field name="name">Fixed Asset Account</field>
<field ref="conf_fas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_xfa" model="account.account.template">
<field name="code">100</field>
<field name="name">Fixed Asset Account</field>
<field ref="conf_fas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_nca" model="account.account.template">
<field name="code">11</field>
<field name="name">Net Current Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_nca" model="account.account.template">
<field name="code">11</field>
<field name="name">Net Current Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_cas" model="account.account.template">
<field name="code">110</field>
<field name="name">Current Assets</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_cas" model="account.account.template">
<field name="code">110</field>
<field name="name">Current Assets</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_stk" model="account.account.template">
<field name="code">1101</field>
<field name="name">Purchased Stocks</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_stk" model="account.account.template">
<field name="code">1101</field>
<field name="name">Purchased Stocks</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_a_recv" model="account.account.template">
<field name="code">1102</field>
<field name="name">Debtors</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">receivable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_a_recv" model="account.account.template">
<field name="code">1102</field>
<field name="name">Debtors</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">receivable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_receivable"/>
</record>
<record id="conf_ova" model="account.account.template">
<field name="code">1103</field>
<field name="name">Tax Paid</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_ova" model="account.account.template">
<field name="code">1103</field>
<field name="name">Tax Paid</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_bnk" model="account.account.template">
<field name="code">1104</field>
<field name="name">Bank Current Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_bnk" model="account.account.template">
<field name="code">1104</field>
<field name="name">Bank Current Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_o_income" model="account.account.template">
<field name="code">1106</field>
<field name="name">Opening Income Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<record id="conf_o_income" model="account.account.template">
<field name="code">1106</field>
<field name="name">Opening Income Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<record id="conf_cli" model="account.account.template">
<field name="code">111</field>
<field name="name">Current Liabilities</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_liability_view1"/>
</record>
<record id="conf_cli" model="account.account.template">
<field name="code">111</field>
<field name="name">Current Liabilities</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_liability_view1"/>
</record>
<record id="conf_a_pay" model="account.account.template">
<field name="code">1111</field>
<field name="name">Creditors</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">payable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_a_pay" model="account.account.template">
<field name="code">1111</field>
<field name="name">Creditors</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">payable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_payable"/>
</record>
<record id="conf_iva" model="account.account.template">
<field name="code">1112</field>
<field name="name">Tax Received</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_iva" model="account.account.template">
<field name="code">1112</field>
<field name="name">Tax Received</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_a_reserve_and_surplus" model="account.account.template">
<field name="code">1113</field>
<field name="name">Reserve and Profit/Loss Account</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_a_reserve_and_surplus" model="account.account.template">
<field name="code">1113</field>
<field name="name">Reserve and Profit/Loss Account</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_o_expense" model="account.account.template">
<field name="code">1114</field>
<field name="name">Opening Expense Account</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_o_expense" model="account.account.template">
<field name="code">1114</field>
<field name="name">Opening Expense Account</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<!-- Profit and Loss -->
@ -250,53 +250,53 @@
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_rev" model="account.account.template">
<field name="code">20</field>
<field name="name">Revenue</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_rev" model="account.account.template">
<field name="code">20</field>
<field name="name">Revenue</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_a_sale" model="account.account.template">
<field name="code">200</field>
<field name="name">Product Sales</field>
<field ref="conf_rev" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<record id="conf_a_sale" model="account.account.template">
<field name="code">200</field>
<field name="name">Product Sales</field>
<field ref="conf_rev" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<record id="conf_cos" model="account.account.template">
<field name="code">21</field>
<field name="name">Cost of Sales</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_cos" model="account.account.template">
<field name="code">21</field>
<field name="name">Cost of Sales</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_cog" model="account.account.template">
<field name="code">210</field>
<field name="name">Cost of Goods Sold</field>
<field ref="conf_cos" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_cog" model="account.account.template">
<field name="code">210</field>
<field name="name">Cost of Goods Sold</field>
<field ref="conf_cos" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_ovr" model="account.account.template">
<field name="code">22</field>
<field name="name">Overheads</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_expense_view1"/>
</record>
<record id="conf_ovr" model="account.account.template">
<field name="code">22</field>
<field name="name">Overheads</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_expense_view1"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="code">220</field>
<field name="name">Expenses</field>
<field ref="conf_ovr" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="code">220</field>
<field name="name">Expenses</field>
<field ref="conf_ovr" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_a_salary_expense" model="account.account.template">
<field name="code">221</field>
@ -315,126 +315,126 @@
<field name="name">Plan Fees </field>
</record>
<record id="tax_code_balance_net" model="account.tax.code.template">
<field name="name">Tax Balance to Pay</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<record id="tax_code_balance_net" model="account.tax.code.template">
<field name="name">Tax Balance to Pay</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<!-- Input TAX -->
<record id="tax_code_input" model="account.tax.code.template">
<field name="name">Tax Received</field>
<field name="parent_id" ref="tax_code_balance_net"/>
<field eval="-1" name="sign"/>
</record>
<!-- Input TAX -->
<record id="tax_code_input" model="account.tax.code.template">
<field name="name">Tax Received</field>
<field name="parent_id" ref="tax_code_balance_net"/>
<field eval="-1" name="sign"/>
</record>
<record id="tax_code_input_S" model="account.tax.code.template">
<field name="name">Tax Received Rate S (15%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_S" model="account.tax.code.template">
<field name="name">Tax Received Rate S (15%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_R" model="account.tax.code.template">
<field name="name">Tax Received Rate R (5%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_R" model="account.tax.code.template">
<field name="name">Tax Received Rate R (5%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_X" model="account.tax.code.template">
<field name="name">Tax Received Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_X" model="account.tax.code.template">
<field name="name">Tax Received Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_O" model="account.tax.code.template">
<field name="name">Tax Received Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_O" model="account.tax.code.template">
<field name="name">Tax Received Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<!-- Output TAX -->
<!-- Output TAX -->
<record id="tax_code_output" model="account.tax.code.template">
<field name="name">Tax Paid</field>
<field name="parent_id" ref="tax_code_balance_net"/>
</record>
<record id="tax_code_output" model="account.tax.code.template">
<field name="name">Tax Paid</field>
<field name="parent_id" ref="tax_code_balance_net"/>
</record>
<record id="tax_code_output_S" model="account.tax.code.template">
<field name="name">Tax Paid Rate S (15%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_S" model="account.tax.code.template">
<field name="name">Tax Paid Rate S (15%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_R" model="account.tax.code.template">
<field name="name">Tax Paid Rate R (5%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_R" model="account.tax.code.template">
<field name="name">Tax Paid Rate R (5%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_X" model="account.tax.code.template">
<field name="name">Tax Paid Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_X" model="account.tax.code.template">
<field name="name">Tax Paid Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_O" model="account.tax.code.template">
<field name="name">Tax Paid Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_O" model="account.tax.code.template">
<field name="name">Tax Paid Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<!-- Invoiced Base of TAX -->
<!-- Invoiced Base of TAX -->
<!-- Purchases -->
<!-- Purchases -->
<record id="tax_code_base_net" model="account.tax.code.template">
<field name="name">Tax Bases</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<record id="tax_code_base_net" model="account.tax.code.template">
<field name="name">Tax Bases</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<record id="tax_code_base_purchases" model="account.tax.code.template">
<field name="name">Taxable Purchases Base</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="tax_code_base_purchases" model="account.tax.code.template">
<field name="name">Taxable Purchases Base</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="tax_code_purch_S" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_S" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_R" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_R" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_X" model="account.tax.code.template">
<field name="name">Taxable Purchases Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_X" model="account.tax.code.template">
<field name="name">Taxable Purchases Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_O" model="account.tax.code.template">
<field name="name">Taxable Purchases Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_O" model="account.tax.code.template">
<field name="name">Taxable Purchases Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<!-- Sales -->
<!-- Sales -->
<record id="tax_code_base_sales" model="account.tax.code.template">
<field name="name">Base of Taxable Sales</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="tax_code_base_sales" model="account.tax.code.template">
<field name="name">Base of Taxable Sales</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="tax_code_sales_S" model="account.tax.code.template">
<field name="name">Taxable Sales Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_S" model="account.tax.code.template">
<field name="name">Taxable Sales Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_R" model="account.tax.code.template">
<field name="name">Taxable Sales Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_R" model="account.tax.code.template">
<field name="name">Taxable Sales Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_X" model="account.tax.code.template">
<field name="name">Taxable Sales Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_X" model="account.tax.code.template">
<field name="name">Taxable Sales Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_O" model="account.tax.code.template">
<field name="name">Taxable Sales Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_O" model="account.tax.code.template">
<field name="name">Taxable Sales Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="configurable_chart_template" model="account.chart.template">
<field name="name">Configurable Account Chart Template</field>
@ -450,7 +450,7 @@
<field name="property_reserve_and_surplus_account" ref="conf_a_reserve_and_surplus"/>
</record>
<!-- VAT Codes -->
<!-- VAT Codes -->
<!-- Purchases + Output VAT -->
<record id="otaxs" model="account.tax.template">
@ -569,9 +569,9 @@
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Mapping Templates -->
<!-- = = = = = = = = = = = = = = = -->
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Mapping Templates -->
<!-- = = = = = = = = = = = = = = = -->
<record id="fiscal_position_normal_taxes_template1" model="account.fiscal.position.template">
@ -584,40 +584,40 @@
<field name="chart_template_id" ref="configurable_chart_template"/>
</record>
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Position Tax Templates -->
<!-- = = = = = = = = = = = = = = = -->
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Position Tax Templates -->
<!-- = = = = = = = = = = = = = = = -->
<record id="fiscal_position_normal_taxes" model="account.fiscal.position.tax.template">
<record id="fiscal_position_normal_taxes" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_normal_taxes_template1"/>
<field name="tax_src_id" ref="itaxs"/>
<field name="tax_dest_id" ref="otaxs"/>
</record>
<record id="fiscal_position_tax_exempt" model="account.fiscal.position.tax.template">
<record id="fiscal_position_tax_exempt" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_tax_exempt_template2"/>
<field name="tax_src_id" ref="itaxx"/>
<field name="tax_dest_id" ref="otaxx"/>
</record>
<!-- Assigned Default Taxes For Different Account -->
<!-- Assigned Default Taxes For Different Account -->
<record id="conf_a_sale" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('itaxs')])]"/>
</record>
<record id="conf_a_sale" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('itaxs')])]"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('otaxs')])]"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('otaxs')])]"/>
</record>
<record id="action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="category_id" ref="account.category_accounting_configuration"/>
<field name="type">automatic</field>
</record>
<record id="action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="category_id" ref="account.category_accounting_configuration"/>
<field name="type">automatic</field>
</record>
</data>

View File

@ -469,66 +469,48 @@
Account Journal Sequences
-->
<record id="sequence_journal_type" model="ir.sequence.type">
<field name="name">Account Journal</field>
<field name="code">account.journal</field>
</record>
<record id="sequence_journal" model="ir.sequence">
<field name="name">Account Journal</field>
<field name="code">account.journal</field>
<field name="prefix"/>
</record>
<record id="sequence_sale_journal" model="ir.sequence">
<field name="name">Sale Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Sales Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">SAJ/%(year)s/</field>
</record>
<record id="sequence_refund_sales_journal" model="ir.sequence">
<field name="name">Sales Credit Note Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Sales Credit Note Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">SCNJ/%(year)s/</field>
</record>
<record id="sequence_purchase_journal" model="ir.sequence">
<field name="name">Purchase Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Expenses Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">EXJ/%(year)s/</field>
</record>
<record id="sequence_refund_purchase_journal" model="ir.sequence">
<field name="name">Expenses Credit Notes Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Expenses Credit Notes Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">ECNJ/%(year)s/</field>
</record>
<record id="sequence_bank_journal" model="ir.sequence">
<field name="name">Bank Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Bank Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">BNK/%(year)s/</field>
</record>
<record id="sequence_check_journal" model="ir.sequence">
<field name="name">Checks Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Checks Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">CHK/%(year)s/</field>
</record>
<record id="sequence_cash_journal" model="ir.sequence">
<field name="name">Cash Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Cash Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">CSH/%(year)s/</field>
</record>
<record id="sequence_opening_journal" model="ir.sequence">
<field name="name">Opening Entries Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Opening Entries Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">OPEJ/%(year)s/</field>
</record>
<record id="sequence_miscellaneous_journal" model="ir.sequence">
<field name="name">Miscellaneous Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Miscellaneous Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">MISJ/%(year)s/</field>
</record>
@ -538,7 +520,7 @@
-->
<record id="sequence_reconcile" model="ir.sequence.type">
<field name="name">Account reconcile sequence</field>
<field name="name">Account Reconcile</field>
<field name="code">account.reconcile</field>
</record>
<record id="sequence_reconcile_seq" model="ir.sequence">
@ -550,7 +532,7 @@
</record>
<record id="sequence_statement_type" model="ir.sequence.type">
<field name="name">Bank Statement</field>
<field name="name">Account Bank Statement</field>
<field name="code">account.bank.statement</field>
</record>
<record id="sequence_statement" model="ir.sequence">
@ -562,7 +544,7 @@
</record>
<record id="cash_sequence_statement_type" model="ir.sequence.type">
<field name="name">Cash Statement</field>
<field name="name">Account Cash Statement</field>
<field name="code">account.cash.statement</field>
</record>
<record id="cash_sequence_statement" model="ir.sequence">
@ -572,5 +554,30 @@
<field eval="1" name="number_next"/>
<field eval="1" name="number_increment"/>
</record>
<!--
Sequence for analytic account
-->
<record id="seq_type_analytic_account" model="ir.sequence.type">
<field name="name">Analytic account</field>
<field name="code">account.analytic.account</field>
</record>
<record id="seq_analytic_account" model="ir.sequence">
<field name="name">Analytic account sequence</field>
<field name="code">account.analytic.account</field>
<field eval="3" name="padding"/>
<field eval="2708" name="number_next"/>
</record>
<!--
Invoice requests (deprecated)
-->
<record id="req_link_invoice" model="res.request.link">
<field name="name">Invoice</field>
<field name="object">account.invoice</field>
</record>
</data>
</openerp>

View File

@ -1,75 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="req_link_invoice" model="res.request.link">
<field name="name">Invoice</field>
<field name="object">account.invoice</field>
</record>
<!--
Sequences types for invoices
-->
<record id="seq_type_out_invoice" model="ir.sequence.type">
<field name="name">Account Invoice Out</field>
<field name="code">account.invoice.out_invoice</field>
</record>
<record id="seq_type_in_invoice" model="ir.sequence.type">
<field name="name">Account Invoice In</field>
<field name="code">account.invoice.in_invoice</field>
</record>
<record id="seq_type_out_refund" model="ir.sequence.type">
<field name="name">Account Refund Out</field>
<field name="code">account.invoice.out_refund</field>
</record>
<record id="seq_type_in_refund" model="ir.sequence.type">
<field name="name">Account Refund In</field>
<field name="code">account.invoice.in_refund</field>
</record>
<!--
Sequences for invoices
-->
<record id="seq_out_invoice" model="ir.sequence">
<field name="name">Account Invoice Out</field>
<field name="code">account.invoice.out_invoice</field>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<record id="seq_in_invoice" model="ir.sequence">
<field name="name">Account Invoice In</field>
<field name="code">account.invoice.in_invoice</field>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<record id="seq_out_refund" model="ir.sequence">
<field name="name">Account Refund Out</field>
<field name="code">account.invoice.out_refund</field>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<record id="seq_in_refund" model="ir.sequence">
<field name="name">Account Refund In</field>
<field name="code">account.invoice.in_refund</field>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<!--
Sequences types for analytic account
-->
<record id="seq_type_analytic_account" model="ir.sequence.type">
<field name="name">Analytic account</field>
<field name="code">account.analytic.account</field>
</record>
<!--
Sequence for analytic account
-->
<record id="seq_analytic_account" model="ir.sequence">
<field name="name">Analytic account sequence</field>
<field name="code">account.analytic.account</field>
<field eval="3" name="padding"/>
<field eval="2708" name="number_next"/>
</record>
</data>
</openerp>

View File

@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-22 02:55+0000\n"
"PO-Revision-Date: 2011-09-30 23:12+0000\n"
"Last-Translator: Majed Majbour <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: 2011-09-23 04:38+0000\n"
"X-Generator: Launchpad (build 14012)\n"
"X-Launchpad-Export-Date: 2011-10-02 04:51+0000\n"
"X-Generator: Launchpad (build 14071)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
msgid "System payment"
msgstr "الدفع عن طريق النظام"
msgstr "نظام الدفع"
#. module: account
#: view:account.journal:0
@ -124,6 +124,8 @@ msgid ""
"If you unreconciliate transactions, you must also verify all the actions "
"that are linked to those transactions because they will not be disabled"
msgstr ""
"إذا كنت توافق على المعاملات ، يجب عليك أيضا التحقق من كافة الإجراءات التي "
"ترتبط بتلك المعاملات لأنه لن يكونوا غير مفعّلين"
#. module: account
#: report:account.tax.code.entries:0

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-28 14:57+0000\n"
"PO-Revision-Date: 2011-10-10 19:34+0000\n"
"Last-Translator: Raiko Pajur <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: 2011-09-30 04:40+0000\n"
"X-Generator: Launchpad (build 14071)\n"
"X-Launchpad-Export-Date: 2011-10-11 05:35+0000\n"
"X-Generator: Launchpad (build 14123)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@ -80,7 +80,7 @@ msgstr "Viga! Perioodi(de) kestvus(ed) on vale(d). "
#. module: account
#: field:account.analytic.line,currency_id:0
msgid "Account currency"
msgstr ""
msgstr "Konto valuuta"
#. module: account
#: view:account.tax:0
@ -1895,12 +1895,12 @@ msgstr ""
#: field:account.installer.modules,config_logo:0
#: field:wizard.multi.charts.accounts,config_logo:0
msgid "Image"
msgstr ""
msgstr "Pilt"
#. module: account
#: report:account.move.voucher:0
msgid "Canceled"
msgstr ""
msgstr "Tühistatud"
#. module: account
#: view:account.invoice:0

View File

@ -224,26 +224,4 @@ class account_installer(osv.osv_memory):
account_installer()
class account_installer_modules(osv.osv_memory):
_inherit = 'base.setup.installer'
_columns = {
'account_analytic_plans': fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment': fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup': fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_anglo_saxon': fields.boolean('Anglo-Saxon Accounting',
help="This module will support the Anglo-Saxons accounting methodology by "
"changing the accounting logic with stock transactions."),
'account_asset': fields.boolean('Assets Management',
help="Helps you to manage your assets and their depreciation entries."),
}
account_installer_modules()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -46,23 +46,14 @@ class ir_sequence(osv.osv):
'fiscal_ids': fields.one2many('account.sequence.fiscalyear',
'sequence_main_id', 'Sequences')
}
def get_id(self, cr, uid, sequence_id, test='id', context=None):
if context is None:
context = {}
cr.execute('select id from ir_sequence where '
+ test + '=%s and active=%s', (sequence_id, True,))
res = cr.dictfetchone()
if res:
for line in self.browse(cr, uid, res['id'],
context=context).fiscal_ids:
if line.fiscalyear_id.id == context.get('fiscalyear_id', False):
return super(ir_sequence, self).get_id(cr, uid,
line.sequence_id.id,
test="id",
context=context)
return super(ir_sequence, self).get_id(cr, uid, sequence_id, test,
context=context)
def _next(self, cr, uid, seq_ids, context=None):
for seq in self.browse(cr, uid, seq_ids, context):
for line in seq.fiscal_ids:
if line.fiscalyear_id.id == context.get('fiscalyear_id'):
return super(ir_sequence, self)._next(cr, uid, [line.sequence_id.id], context)
return super(ir_sequence, self)._next(cr, uid, seq_ids, context)
ir_sequence()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -45,7 +45,7 @@
<filter string="Associated Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Parent" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="State" icon="terp-folder-green" domain="[]" context="{'group_by':'state'}"/>
<filter string="State" icon="terp-folder-green" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
</group>
</search>
</field>
@ -65,6 +65,7 @@
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
<field name="state" invisible="1"/>
<field name="currency_id" groups="base.group_extended"/>
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>

View File

@ -33,7 +33,6 @@ import account_print_overdue
import account_aged_partner_balance
#import tax_report
import account_tax_report
import account_tax_code
import account_balance_landscape
import account_invoice_report
import account_report

View File

@ -1,63 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from report import report_sxw
def _get_country(record):
if record.partner_id \
and record.partner_id.address \
and record.partner_id.address[0].country_id:
return record.partner_id.address[0].country_id.code
else:
return ''
def _record_to_report_line(record):
return {'date': record.date,
'ref': record.ref,
'acode': record.account_id.code,
'name': record.name,
'debit': record.debit,
'credit': record.credit,
'pname': record.partner_id and record.partner_id.name or '',
'country': _get_country(record)
}
class account_tax_code_report(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(account_tax_code_report, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
'get_line':self.get_line,
})
def get_line(self, obj):
line_ids = self.pool.get('account.move.line').search(self.cr, self.uid, [('tax_code_id','=',obj.id)])
if not line_ids: return []
return map(_record_to_report_line,
self.pool.get('account.move.line')\
.browse(self.cr, self.uid, line_ids))
report_sxw.report_sxw('report.account.tax.code.entries', 'account.tax.code',
'addons/account/report/account_tax_code.rml', parser=account_tax_code_report, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,144 +0,0 @@
<?xml version="1.0"?>
<document filename="Accounting Entries.pdf">
<template pageSize="(595.0,842.0)" title="Accounting Entries" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="28.0" y1="42.0" width="539" height="758"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Line_Title">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_Line_Content_Detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
<blockTable colWidths="539.0" repeatRows="1" style="Table2">
<tr>
<td>
<para style="terp_header_Centre">Accounting Entries-[[ company.currency_id.name ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="52.0,68.0,55.0,110.0,130.0,64.0,60.0" repeatRows="1" style="Table_Line_Title">
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
</td>
<td>
<para style="terp_tblheader_Details">Voucher No</para>
</td>
<td>
<para style="terp_tblheader_Details">A/c Code</para>
</td>
<td>
<para style="terp_tblheader_Details">Third Party (Country)</para>
</td>
<td>
<para style="terp_tblheader_Details">Entry Label</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_8">[[ repeatIn(get_line(o),'line') ]]</para>
<blockTable colWidths="52.0,68.0,54.0,110.0,131.0,63.0,60.0" style="Table_Line_Content_Detail">
<tr>
<td>
<para style="terp_default_9">[[ not line and removeParentNode('blockTable') ]] [[ formatLang(line['date'],date=True) ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['ref'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['acode'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line['pname'] ]] ([[ line['country'] ]] )</para>
</td>
<td>
<para style="terp_default_9">[[ line['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['debit'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['credit'], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
</section>
</story>
</document>

View File

@ -33,11 +33,11 @@
-
!python {model: account.change.currency}: |
self.view_init(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
"active_model": "account.invoice", "tz": False, "active_ids":
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
})
self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
"active_model": "account.invoice", "tz": False, "active_ids":
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
})
-
@ -71,7 +71,7 @@
-
!python {model: account.change.currency}: |
self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
"active_model": "account.invoice", "tz": False, "active_ids":
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
})
-

View File

@ -26,7 +26,6 @@
code: NEW
type: situation
analytic_journal_id: sit
sequence_id: sequence_journal
default_debit_account_id: cash
default_credit_account_id: cash
company_id: base.main_company

View File

@ -42,7 +42,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_automatic_reconcile_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="context">{}</field>
<field name="target">new</field>
</record>

View File

@ -25,7 +25,7 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_account_change_currency"/>
<field name="context">{'record_id' : active_id}</field>
<field name="context">{}</field>
<field name="target">new</field>
</record>
</data>

View File

@ -28,7 +28,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_partner_reconcile_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="context">{}</field>
<field name="target">new</field>
</record>
<record model="ir.values" id="action_partner_reconcile_actino">

View File

@ -37,7 +37,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_aged_balance_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="context">{}</field>
<field name="target">new</field>
</record>

View File

@ -29,7 +29,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_partner_balance_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="context">{}</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>

View File

@ -34,7 +34,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_partner_ledger_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="context">{}</field>
<field name="target">new</field>
</record>

View File

@ -27,7 +27,7 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_account_state_open"/>
<field name="context">{'record_id' : active_id}</field>
<field name="context">{}</field>
<field name="target">new</field>
</record>

View File

@ -64,7 +64,7 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_unreconcile_reconcile_view"/>
<field name="context">{'record_id' : active_id}</field>
<field name="context">{}</field>
<field name="target">new</field>
</record>

View File

@ -66,7 +66,7 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="validate_account_move_line_view"/>
<field name="context">{'record_id' : active_id}</field>
<field name="context">{}</field>
<field name="target">new</field>
<field name="help">This wizard will validate all journal entries of a particular journal and period. Once journal entries are validated, you can not update them anymore.</field>
</record>

View File

@ -13,7 +13,7 @@
<newline/>
<field name="chart_tax_id" widget='selection'/>
<field name="fiscalyear_id"/>
<field name="based_on"/>
<!--- <field name="based_on"/>--> <!-- the option based_on 'payment' is probably not fully compliant with what the users understand with that term. So, currently, it's seems better to remove it from the view to avoid further problems -->
<separator string="Periods" colspan="4"/>
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" />
<field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" />
@ -43,4 +43,4 @@
icon="STOCK_PRINT"/>
</data>
</openerp>
</openerp>

View File

@ -22,7 +22,7 @@
"name" : "Accountant Access",
"version" : "1.1",
"author" : "OpenERP SA",
"category": 'Finance',
"category": 'Hidden',
'complexity': "normal",
"description": """
Accounting Access Rights.

View File

@ -23,7 +23,7 @@
{
'name' : 'Analytic Account View',
'version' : '1.1',
'category' : 'Finance',
'category' : 'Hidden',
'complexity': "normal",
'description': """
This module is for modifying account analytic view to show important data to project manager of services companies.

View File

@ -22,7 +22,7 @@
{
'name' : 'Account Analytic Defaults',
'version' : '1.0',
'category' : 'Finance',
'category' : 'Hidden',
'complexity': "normal",
'description': """Set default values for your analytic accounts
Allows to automatically select analytic accounts based on criterions:

View File

@ -73,8 +73,8 @@ class account_invoice_line(osv.osv):
_inherit = "account.invoice.line"
_description = "Invoice Line"
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context)
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None):
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context, company_id=company_id)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
if rec:
res_prod['value'].update({'account_analytic_id': rec.analytic_id.id})

View File

@ -21,9 +21,9 @@
{
'name' : 'Manage multiple plans in Analytic Accounting',
'name' : 'Multiple Analytic Plans',
'version' : '1.0',
'category' : 'Finance',
'category' : 'Accounting & Finance',
'complexity': "normal",
'description': """
This module allows to use several analytic plans, according to the general journal.

View File

@ -307,8 +307,8 @@ class account_invoice_line(osv.osv):
res ['analytics_id'] = line.analytics_id and line.analytics_id.id or False
return res
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context)
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None):
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context, company_id=company_id)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
if rec and rec.analytics_id:
res_prod['value'].update({'analytics_id': rec.analytics_id.id})
@ -462,7 +462,7 @@ sale_order_line()
class account_bank_statement(osv.osv):
_inherit = "account.bank.statement"
_name = "account.bank.statement"
def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, st_line_number, context=None):
account_move_line_pool = self.pool.get('account.move.line')
account_bank_statement_line_pool = self.pool.get('account.bank.statement.line')
@ -484,7 +484,7 @@ class account_bank_statement(osv.osv):
if not st_line.amount:
continue
return True
account_bank_statement()

View File

@ -7,14 +7,15 @@
<field name="res_model">account.analytic.plan</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_analytic_plans.account_analytic_plan_form"/>
<field name="view_id" eval="False"/>
<field name="help">To setup a multiple analytic plans environment, you must define the root analytic accounts for each plan set. Then, you must attach a plan set to your account journals.</field>
</record>
<record id="account_analytic_plan_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="account_analytic_plan_form_action_installer"/>
<field name="category_id" ref="account.category_accounting_configuration"/>
<field name="sequence">15</field>
</record>
<record id="account_analytic_plan_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="account_analytic_plan_form_action_installer"/>
<field name="category_id" ref="account.category_accounting_configuration"/>
<field name="sequence">15</field>
</record>
</data>
</openerp>

View File

@ -19,7 +19,7 @@
##############################################################################
{
"name" : "Stock Accounting for Anglo-Saxon countries",
"name" : "Anglo-Saxon Accouting",
"version" : "1.2",
"author" : "OpenERP SA, Veritos",
"website" : "http://tinyerp.com - http://veritos.nl",
@ -36,7 +36,7 @@ when the invoice is created to transfer this amount to the debtor or creditor ac
Secondly, price differences between actual purchase price and fixed product standard price are booked on a separate account""",
"images" : ["images/account_anglo_saxon.jpeg"],
"depends" : ["product", "purchase"],
"category" : "Warehouse",
"category" : "Accounting & Finance",
"init_xml" : [],
"demo_xml" : [],
"update_xml" : ["product_view.xml",],

View File

@ -20,16 +20,16 @@
##############################################################################
{
"name" : "Asset management",
"name" : "Assets Management",
"version" : "1.0",
"depends" : ["account"],
"author" : "Tiny",
"author" : "OpenERP S.A.",
"description": """Financial and accounting asset management.
This Module manages the assets owned by a company or an individual. It will keep track of depreciation's occurred on
those assets. And it allows to create Move's of the depreciation lines.
""",
"website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"category" : "Accounting & Finance",
"init_xml" : [
],
"demo_xml" : [ 'account_asset_demo.xml'

View File

@ -0,0 +1,529 @@
# Brazilian Portuguese translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-24 12:54+0000\n"
"PO-Revision-Date: 2011-09-30 14:07+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Brazilian Portuguese <pt_BR@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: 2011-10-01 05:08+0000\n"
"X-Generator: Launchpad (build 14071)\n"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_normal
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_list_normal
msgid "Open Assets"
msgstr ""
#. module: account_asset
#: field:account.asset.property,method_end:0
#: field:account.asset.property.history,method_end:0
msgid "Ending date"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation board"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
#: field:account.asset.asset,name:0
#: field:account.asset.board,asset_id:0
#: field:account.asset.property,asset_id:0
#: field:account.invoice.line,asset_id:0
#: field:account.move.line,asset_id:0
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_form
#: model:ir.model,name:account_asset.model_account_asset_asset
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_form
msgid "Asset"
msgstr ""
#. module: account_asset
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: account_asset
#: selection:account.asset.property,method:0
msgid "Linear"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Change duration"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,child_ids:0
msgid "Child assets"
msgstr ""
#. module: account_asset
#: field:account.asset.board,value_asset:0
msgid "Asset Value"
msgstr ""
#. module: account_asset
#: wizard_field:account.asset.modify,init,name:0
msgid "Reason"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
#: field:account.asset.asset,entry_ids:0
#: wizard_field:account.asset.compute,asset_compute,move_ids:0
msgid "Entries"
msgstr ""
#. module: account_asset
#: wizard_view:account.asset.compute,asset_compute:0
msgid "Generated entries"
msgstr ""
#. module: account_asset
#: wizard_field:account.asset.modify,init,method_delay:0
#: field:account.asset.property,method_delay:0
#: field:account.asset.property.history,method_delay:0
msgid "Number of interval"
msgstr ""
#. module: account_asset
#: wizard_button:account.asset.compute,asset_compute,asset_open:0
msgid "Open entries"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_list
#: model:ir.ui.menu,name:account_asset.menu_finance_Assets
#: model:ir.ui.menu,name:account_asset.menu_finance_config_Assets
msgid "Assets"
msgstr ""
#. module: account_asset
#: selection:account.asset.property,method:0
msgid "Progressive"
msgstr ""
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_draft
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_list_draft
msgid "Draft Assets"
msgstr ""
#. module: account_asset
#: wizard_view:account.asset.modify,init:0
#: wizard_field:account.asset.modify,init,note:0
#: view:account.asset.property.history:0
msgid "Notes"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Change history"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation entries"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Methods"
msgstr ""
#. module: account_asset
#: wizard_view:account.asset.modify,init:0
msgid "Asset properties to modify"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,partner_id:0
msgid "Partner"
msgstr ""
#. module: account_asset
#: wizard_field:account.asset.modify,init,method_period:0
#: field:account.asset.property,method_period:0
#: field:account.asset.property.history,method_period:0
msgid "Period per interval"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation duration"
msgstr ""
#. module: account_asset
#: field:account.asset.property,account_analytic_id:0
msgid "Analytic account"
msgstr ""
#. module: account_asset
#: field:account.asset.property,state:0
msgid "State"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation methods"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Other information"
msgstr ""
#. module: account_asset
#: field:account.asset.board,value_asset_cumul:0
msgid "Cumul. value"
msgstr ""
#. module: account_asset
#: view:account.asset.property:0
msgid "Assets methods"
msgstr ""
#. module: account_asset
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_asset_property
msgid "Asset property"
msgstr ""
#. module: account_asset
#: wizard_view:account.asset.compute,asset_compute:0
#: wizard_view:account.asset.compute,init:0
#: wizard_button:account.asset.compute,init,asset_compute:0
#: model:ir.actions.wizard,name:account_asset.wizard_asset_compute
#: model:ir.ui.menu,name:account_asset.menu_wizard_asset_compute
msgid "Compute assets"
msgstr ""
#. module: account_asset
#: wizard_view:account.asset.modify,init:0
#: wizard_button:account.asset.modify,init,asset_modify:0
#: model:ir.actions.wizard,name:account_asset.wizard_asset_modify
msgid "Modify asset"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Confirm asset"
msgstr ""
#. module: account_asset
#: view:account.asset.property.history:0
#: model:ir.model,name:account_asset.model_account_asset_property_history
msgid "Asset history"
msgstr ""
#. module: account_asset
#: field:account.asset.property,date:0
msgid "Date created"
msgstr ""
#. module: account_asset
#: model:ir.module.module,description:account_asset.module_meta_information
msgid ""
"Financial and accounting asset management.\n"
" Allows to define\n"
" * Asset category. \n"
" * Assets.\n"
" *Asset usage period and property.\n"
" "
msgstr ""
#. module: account_asset
#: field:account.asset.board,value_gross:0
#: field:account.asset.property,value_total:0
msgid "Gross value"
msgstr ""
#. module: account_asset
#: selection:account.asset.property,method_time:0
msgid "Ending period"
msgstr ""
#. module: account_asset
#: field:account.asset.board,name:0
msgid "Asset name"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Accounts information"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,note:0
#: field:account.asset.category,note:0
#: field:account.asset.property.history,note:0
msgid "Note"
msgstr ""
#. module: account_asset
#: selection:account.asset.asset,state:0
#: selection:account.asset.property,state:0
msgid "Draft"
msgstr ""
#. module: account_asset
#: field:account.asset.property,type:0
msgid "Depr. method type"
msgstr ""
#. module: account_asset
#: field:account.asset.property,account_asset_id:0
msgid "Asset account"
msgstr ""
#. module: account_asset
#: field:account.asset.property.history,asset_property_id:0
msgid "Method"
msgstr ""
#. module: account_asset
#: selection:account.asset.asset,state:0
msgid "Normal"
msgstr ""
#. module: account_asset
#: field:account.asset.property,method_progress_factor:0
msgid "Progressif factor"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,localisation:0
msgid "Localisation"
msgstr ""
#. module: account_asset
#: field:account.asset.property,method:0
msgid "Computation method"
msgstr ""
#. module: account_asset
#: field:account.asset.property,method_time:0
msgid "Time method"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,active:0
msgid "Active"
msgstr ""
#. module: account_asset
#: field:account.asset.property.history,user_id:0
msgid "User"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,property_ids:0
msgid "Asset method name"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,date:0
#: field:account.asset.property.history,date:0
msgid "Date"
msgstr ""
#. module: account_asset
#: field:account.asset.board,value_net:0
msgid "Net value"
msgstr ""
#. module: account_asset
#: wizard_view:account.asset.close,init:0
#: model:ir.actions.wizard,name:account_asset.wizard_asset_close
msgid "Close asset"
msgstr ""
#. module: account_asset
#: field:account.asset.property,history_ids:0
msgid "History"
msgstr ""
#. module: account_asset
#: field:account.asset.property,account_actif_id:0
msgid "Depreciation account"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,period_id:0
#: wizard_field:account.asset.compute,init,period_id:0
msgid "Period"
msgstr ""
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_category_form
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_category_form
msgid "Asset Category"
msgstr ""
#. module: account_asset
#: wizard_button:account.asset.close,init,end:0
#: wizard_button:account.asset.compute,init,end:0
#: wizard_button:account.asset.modify,init,end:0
msgid "Cancel"
msgstr ""
#. module: account_asset
#: selection:account.asset.asset,state:0
#: wizard_button:account.asset.compute,asset_compute,end:0
#: selection:account.asset.property,state:0
msgid "Close"
msgstr ""
#. module: account_asset
#: selection:account.asset.property,state:0
msgid "Open"
msgstr ""
#. module: account_asset
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: account_asset
#: model:ir.module.module,shortdesc:account_asset.module_meta_information
msgid "Asset management"
msgstr ""
#. module: account_asset
#: view:account.asset.board:0
#: field:account.asset.property,board_ids:0
#: model:ir.model,name:account_asset.model_account_asset_board
msgid "Asset board"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,state:0
msgid "Global state"
msgstr ""
#. module: account_asset
#: selection:account.asset.property,method_time:0
msgid "Delay"
msgstr ""
#. module: account_asset
#: wizard_view:account.asset.close,init:0
msgid "General information"
msgstr ""
#. module: account_asset
#: field:account.asset.property,journal_analytic_id:0
msgid "Analytic journal"
msgstr ""
#. module: account_asset
#: field:account.asset.property,name:0
msgid "Method name"
msgstr ""
#. module: account_asset
#: field:account.asset.property,journal_id:0
msgid "Journal"
msgstr ""
#. module: account_asset
#: field:account.asset.property.history,name:0
msgid "History name"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Close method"
msgstr ""
#. module: account_asset
#: field:account.asset.property,entry_asset_ids:0
msgid "Asset Entries"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,category_id:0
#: view:account.asset.category:0
#: field:account.asset.category,name:0
#: model:ir.model,name:account_asset.model_account_asset_category
msgid "Asset category"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,code:0
#: field:account.asset.category,code:0
msgid "Asset code"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,value_total:0
msgid "Total value"
msgstr ""
#. module: account_asset
#: selection:account.asset.asset,state:0
msgid "View"
msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "General info"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,sequence:0
msgid "Sequence"
msgstr ""
#. module: account_asset
#: field:account.asset.property,value_residual:0
msgid "Residual value"
msgstr ""
#. module: account_asset
#: wizard_button:account.asset.close,init,asset_close:0
msgid "End of asset"
msgstr ""
#. module: account_asset
#: selection:account.asset.property,type:0
msgid "Direct"
msgstr ""
#. module: account_asset
#: selection:account.asset.property,type:0
msgid "Indirect"
msgstr ""
#. module: account_asset
#: field:account.asset.asset,parent_id:0
msgid "Parent asset"
msgstr ""
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_tree
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_tree
msgid "Asset Hierarchy"
msgstr ""

View File

@ -21,9 +21,9 @@
{
'name': 'Budget Management',
'name': 'Budgets',
'version': '1.0',
'category': 'Finance',
'category': 'Project Management',
'complexity': "normal",
'description': """
This module allows accountants to manage analytic and crossovered budgets.

View File

@ -23,7 +23,7 @@
"name" : "Cancel Entries",
"version" : "1.1",
"author" : "OpenERP SA",
"category": 'Finance',
"category": 'Hidden',
'complexity': "normal",
"description": """
Allows cancelling accounting entries.

View File

@ -23,7 +23,7 @@
{
'name': 'Charts of Accounts',
'version': '1.1',
'category': 'Finance',
'category': 'Hidden',
'description': """
Remove minimal account chart.
=============================

View File

@ -23,7 +23,7 @@
"name" : "Account CODA - import bank statements from coda file",
"version" : "1.0",
"author" : "OpenERP SA",
"category" : "Finance",
"category" : "Hidden",
'complexity': "normal",
"description": """
Module provides functionality to import bank statements from coda files.

View File

@ -20,9 +20,9 @@
##############################################################################
{
'name': 'Reminders',
'name': 'Followups Management',
'version': '1.0',
'category': 'Finance',
'category': 'Accounting & Finance',
'complexity': "normal",
'description': """
Modules to automate letters for unpaid invoices, with multi-level recalls.
@ -52,10 +52,11 @@ Note that if you want to check the followup level for a given partner/account en
'security/ir.model.access.csv',
'wizard/account_followup_print_view.xml',
'report/account_followup_report.xml',
'account_followup_demo.xml', # Defined by default
'account_followup_view.xml',
'account_followup_data.xml'
'account_followup_data.xml',
],
'demo_xml': ['account_followup_demo.xml'],
'demo_xml': [],
'test': ['test/account_followup.yml'],
'installable': True,
'active': False,

View File

@ -3,7 +3,7 @@
<data noupdate="1">
<record id="demo_followup1" model="account_followup.followup">
<field name="name">Default follow-up</field>
<field name="name">Default Follow-Up</field>
<field name="company_id" ref="base.main_company"/>
<field name="description">First letter after 15 net days, 30 net days and 45 days end of month levels.</field>
</record>

View File

@ -6,7 +6,7 @@
<field name="model">account_followup.followup.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Follow-Up Lines">
<tree string="Follow-Up Steps">
<field name="name"/>
<field name="delay"/>
<field name="start" groups="base.group_extended"/>
@ -19,7 +19,7 @@
<field name="model">account_followup.followup.line</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Follow-Up Lines">
<form string="Follow-Up Steps">
<group col="6" colspan="4">
<field name="name"/>
<field name="delay"/>
@ -45,7 +45,7 @@
<form string="Follow-Up">
<field name="name"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<separator colspan="4" string=""/>
<newline/>
<field colspan="4" name="followup_line" nolabel="1"/>
</form>
</field>
@ -73,10 +73,6 @@
<field name="name"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
@ -169,6 +165,7 @@
<field name="res_model">account_followup.followup</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="context" eval="'{\'res_id\': %s}' % (ref('demo_followup1'),)"/>
<field name="view_id" ref="view_account_followup_followup_form"/>
</record>

View File

@ -23,7 +23,7 @@
{
'name': 'Improve Invoice Layout',
'version': '1.0',
'category': 'Finance',
'category': 'Hidden',
'complexity': "easy",
'description': """
This module provides some features to improve the layout of the invoices.

View File

@ -10,7 +10,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<field name="name" position="before">
<field name="state" select="1" on_change="onchange_invoice_line_view(state)" />
<field name="state" on_change="onchange_invoice_line_view(state)" />
<field name="sequence"/>
</field>
</field>
@ -23,6 +23,7 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<xpath expr="/tree/field[@name='name']" position="before">
<field name="state" invisible="1"/>
<field name="sequence" string="Seq."/>
</xpath>
</field>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-08-02 21:42+0000\n"
"Last-Translator: lyyser <Unknown>\n"
"PO-Revision-Date: 2011-10-10 19:40+0000\n"
"Last-Translator: Aare Vesi <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: 2011-09-05 05:26+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2011-10-11 05:35+0000\n"
"X-Generator: Launchpad (build 14123)\n"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
@ -25,7 +25,7 @@ msgstr "Vahesumma"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Note:"
msgstr ""
msgstr "Märkus:"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@ -97,13 +97,13 @@ msgstr ""
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "VAT :"
msgstr ""
msgstr "Käibemaks :"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Tel. :"
msgstr ""
msgstr "Tel. :"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@ -152,7 +152,7 @@ msgstr "Hind"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Invoice Date"
msgstr ""
msgstr "Arve kuupäev"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@ -207,12 +207,12 @@ msgstr "Tagasimakse"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Fax :"
msgstr ""
msgstr "Faks :"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
msgid "Total:"
msgstr ""
msgstr "Kokku:"
#. module: account_invoice_layout
#: view:account.invoice.special.msg:0
@ -249,12 +249,12 @@ msgstr ""
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Net Total :"
msgstr ""
msgstr "Netosumma:"
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Total :"
msgstr ""
msgstr "Kokku :"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@ -276,7 +276,7 @@ msgstr ""
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Origin"
msgstr ""
msgstr "Päritolu"
#. module: account_invoice_layout
#: field:account.invoice.line,state:0
@ -292,7 +292,7 @@ msgstr "Eraldusjoon"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Your Reference"
msgstr ""
msgstr "Teie viide"
#. module: account_invoice_layout
#: model:ir.module.module,shortdesc:account_invoice_layout.module_meta_information
@ -319,12 +319,12 @@ msgstr "Maks"
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_account_invoice_line
msgid "Invoice Line"
msgstr ""
msgstr "Arve rida"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
msgid "Net Total:"
msgstr ""
msgstr "Netosumma:"
#. module: account_invoice_layout
#: view:notify.message:0
@ -357,7 +357,7 @@ msgstr "Teade"
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Taxes :"
msgstr ""
msgstr "Maksud :"
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_notify_mesage_tree_form

View File

@ -20,10 +20,10 @@
##############################################################################
{
"name": "Payment Management",
"name": "Suppliers Payment Management",
"version": "1.1",
"author": "OpenERP SA",
"category": "Finance",
"category": "Accounting & Finance",
'complexity': "easy",
"description": """
Module to manage invoice payment.

View File

@ -10,7 +10,7 @@
</record>
<record id="payment_mode_1" model="payment.mode">
<field name="name">Direct Payment</field>
<field name="journal" ref="account.sales_journal"/>
<field name="journal" ref="account.bank_journal"/>
<field name="bank_id" ref="account_payment.partner_bank_1"/>
<field name="company_id" ref="base.main_company"/>
</record>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-10-30 09:28+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2011-10-10 19:42+0000\n"
"Last-Translator: Aare Vesi <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: 2011-09-05 05:25+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2011-10-11 05:35+0000\n"
"X-Generator: Launchpad (build 14123)\n"
#. module: account_payment
#: field:payment.order,date_scheduled:0
@ -353,12 +353,12 @@ msgstr "Makstav summa"
#. module: account_payment
#: report:payment.order:0
msgid "Currency"
msgstr ""
msgstr "Valuuta"
#. module: account_payment
#: view:account.payment.make.payment:0
msgid "Yes"
msgstr ""
msgstr "Jah"
#. module: account_payment
#: help:payment.line,info_owner:0
@ -466,7 +466,7 @@ msgstr "See kirje rida viitab telliva kliendi infole."
#. module: account_payment
#: view:payment.order.create:0
msgid "Search"
msgstr ""
msgstr "Otsing"
#. module: account_payment
#: model:ir.actions.report.xml,name:account_payment.payment_order1
@ -482,7 +482,7 @@ msgstr "Maksekuupäev"
#. module: account_payment
#: report:payment.order:0
msgid "Total:"
msgstr ""
msgstr "Kokku:"
#. module: account_payment
#: field:payment.order,date_created:0
@ -554,7 +554,7 @@ msgstr "Tehtud"
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_invoice
msgid "Invoice"
msgstr ""
msgstr "Arve"
#. module: account_payment
#: field:payment.line,communication:0
@ -668,7 +668,7 @@ msgstr "Nimi"
#. module: account_payment
#: report:payment.order:0
msgid "Bank Account"
msgstr ""
msgstr "Pangakonto"
#. module: account_payment
#: view:payment.line:0

View File

@ -8,15 +8,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Search Payment lines">
<group col="4" colspan="6">
<field name="duedate" />
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="search_entries" string="Search" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
<group col="4" colspan="6">
<field name="duedate" />
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="search_entries" string="Search" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
</field>
</record>
@ -25,15 +25,16 @@
<field name="model">payment.order.create</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Search Payment lines">
<group col="4" colspan="6">
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="create_payment" string="_Add to payment order" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
<form string="Search Payment lines">
<group col="4" colspan="6">
<field name="entries"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="create_payment" string="_Add to payment order" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
</field>
</record>

View File

@ -29,7 +29,7 @@ class payment_order_create(osv.osv_memory):
Create a payment object with lines corresponding to the account move line
to pay according to the date and the mode provided by the user.
Hypothesis:
- Small number of non-reconcilied move line, payment mode and bank account type,
- Small number of non-reconciled move line, payment mode and bank account type,
- Big number of partner and bank account.
If a type is given, unsuitable account Entry lines are ignored.
@ -48,12 +48,11 @@ class payment_order_create(osv.osv_memory):
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
res = super(payment_order_create, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
if context and 'line_ids' in context:
view_obj = etree.XML(res['arch'])
child = view_obj.getchildren()[0]
domain = '[("id", "in", '+ str(context['line_ids'])+')]'
field = etree.Element('field', attrib={'domain': domain, 'name':'entries', 'colspan':'4', 'height':'300', 'width':'800', 'nolabel':"1"})
child.addprevious(field)
res['arch'] = etree.tostring(view_obj)
doc = etree.XML(res['arch'])
nodes = doc.xpath("//field[@name='entries']")
for node in nodes:
node.set('domain', '[("id", "in", '+ str(context['line_ids'])+')]')
res['arch'] = etree.tostring(doc)
return res
def create_payment(self, cr, uid, ids, context=None):
@ -81,14 +80,14 @@ class payment_order_create(osv.osv_memory):
elif payment.date_prefered == 'fixed':
date_to_pay = payment.date_scheduled
payment_obj.create(cr, uid,{
'move_line_id': line.id,
'amount_currency': line.amount_to_pay,
'bank_id': line2bank.get(line.id),
'order_id': payment.id,
'partner_id': line.partner_id and line.partner_id.id or False,
'communication': line.ref or '/',
'date': date_to_pay,
'currency': line.invoice and line.invoice.currency_id.id or False,
'move_line_id': line.id,
'amount_currency': line.amount_to_pay,
'bank_id': line2bank.get(line.id),
'order_id': payment.id,
'partner_id': line.partner_id and line.partner_id.id or False,
'communication': line.ref or '/',
'date': date_to_pay,
'currency': line.invoice and line.invoice.currency_id.id or False,
}, context=context)
return {'type': 'ir.actions.act_window_close'}

View File

@ -76,7 +76,7 @@ class account_payment_populate_statement(osv.osv_memory):
statement.currency.id, line.amount_currency, context=ctx)
context.update({'move_line_ids': [line.move_line_id.id]})
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment', date=line.ml_maturity_date, context=context)
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), voucher_currency_id= statement.currency.id, ttype='payment', date=line.ml_maturity_date, context=context)
if line.move_line_id:
voucher_res = {

View File

@ -22,7 +22,7 @@
{
'name': 'Entries Sequence Numbering',
'version': '1.1',
'category': 'Finance',
'category': 'Hidden',
'complexity': "easy",
'description': """
This module maintains internal sequence number for accounting entries.

View File

@ -35,7 +35,7 @@ class account_move(osv.osv):
seq_no = False
for move in self.browse(cr, uid, ids, context=context):
if move.journal_id.internal_sequence_id:
seq_no = obj_sequence.get_id(cr, uid, move.journal_id.internal_sequence_id.id, context=context)
seq_no = obj_sequence.next_by_id(cr, uid, move.journal_id.internal_sequence_id.id, context=context)
if seq_no:
self.write(cr, uid, [move.id], {'internal_sequence_number': seq_no})
return res

View File

@ -32,7 +32,7 @@ Account Voucher module includes all the basic requirements of Voucher Entries fo
* Voucher Receipt
* Cheque Register
""",
"category" : "Finance",
"category" : "Hidden",
"website" : "http://tinyerp.com",
"images" : ["images/customer_payment.jpeg","images/journal_voucher.jpeg","images/sales_receipt.jpeg","images/supplier_voucher.jpeg"],
"depends" : ["account"],

View File

@ -674,7 +674,7 @@ class account_voucher(osv.osv):
if inv.number:
name = inv.number
elif inv.journal_id.sequence_id:
name = seq_obj.get_id(cr, uid, inv.journal_id.sequence_id.id)
name = seq_obj.next_by_id(cr, uid, inv.journal_id.sequence_id.id)
else:
raise osv.except_osv(_('Error !'), _('Please define a sequence on the journal !'))
if not inv.reference:
@ -781,7 +781,7 @@ class account_voucher(osv.osv):
if not (tax_data.base_code_id and tax_data.tax_code_id):
raise osv.except_osv(_('No Account Base Code and Account Tax Code!'),_("You have to configure account base code and account tax code on the '%s' tax!") % (tax_data.name))
sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1
move_line['amount_currency'] = company_currency <> current_currency and sign * line.amount or 0.0
move_line['amount_currency'] = company_currency <> current_currency and sign * line.amount or False
voucher_line = move_line_pool.create(cr, uid, move_line)
rec_ids = [voucher_line, line.move_line_id.id]
@ -843,8 +843,8 @@ class account_voucher(osv.osv):
'date': inv.date,
'credit': diff > 0 and diff or 0.0,
'debit': diff < 0 and -diff or 0.0,
#'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1, context=context_multi_currency) or 0.0,
#'currency_id': company_currency <> current_currency and current_currency or False,
'amount_currency': company_currency <> current_currency and inv.writeoff_amount or False,
'currency_id': company_currency <> current_currency and current_currency or False,
}
move_line_pool.create(cr, uid, move_line)
self.write(cr, uid, [inv.id], {
@ -1056,7 +1056,7 @@ class account_bank_statement_line(osv.osv):
for obj in self.browse(cr, uid, ids, context=context):
if obj.voucher_id:
diff = abs(obj.amount) - obj.voucher_id.amount
if not self.pool.get('res.currency').is_zero(cr, uid, obj.voucher_id.currency_id, diff):
if not self.pool.get('res.currency').is_zero(cr, uid, obj.statement_id.currency, diff):
return False
return True

View File

@ -24,7 +24,7 @@
"version": "1.1",
"author" : "OpenERP SA",
"website" : "http://www.openerp.com",
"category" : "Finance",
"category" : "Hidden",
"depends" : ["base", "decimal_precision"],
"description": """
Module for defining analytic accounting object.

View File

@ -22,7 +22,7 @@
{
'name': 'Analytic Journal Billing Rate, Define the default invoicing rate for a specific journal',
'version': '1.0',
'category': 'Human Resources',
'category': 'Hidden',
'description': """
This module allows you to define what is the default invoicing rate for a specific journal on a given account.
==============================================================================================================

View File

@ -23,7 +23,7 @@
{
'name': 'Human Resources',
'version': '1.0',
'category': 'Generic Modules/Others',
'category': 'Hidden',
'description': """
This module allows you to define what is the default function of a specific user on a given account.
====================================================================================================

View File

@ -24,7 +24,7 @@ from tools.translate import _
class analytic_user_funct_grid(osv.osv):
_name="analytic_user_funct_grid"
_name="analytic.user.funct.grid"
_description= "Relation table between users and products on a analytic account"
_columns={
'user_id': fields.many2one("res.users", "User", required=True,),
@ -39,7 +39,7 @@ class account_analytic_account(osv.osv):
_inherit = "account.analytic.account"
_columns = {
'user_product_ids': fields.one2many('analytic_user_funct_grid', 'account_id', 'Users/Products Rel.'),
'user_product_ids': fields.one2many('analytic.user.funct.grid', 'account_id', 'Users/Products Rel.'),
}
account_analytic_account()
@ -54,7 +54,7 @@ class hr_analytic_timesheet(osv.osv):
# Take the first found... if nothing found => return False
def _get_related_user_account_recursiv(self, cr, uid, user_id, account_id):
temp=self.pool.get('analytic_user_funct_grid').search(cr, uid, [('user_id', '=', user_id),('account_id', '=', account_id) ])
temp=self.pool.get('analytic.user.funct.grid').search(cr, uid, [('user_id', '=', user_id),('account_id', '=', account_id) ])
account=self.pool.get('account.analytic.account').browse(cr, uid, account_id)
if temp:
return temp
@ -81,7 +81,7 @@ class hr_analytic_timesheet(osv.osv):
return super(hr_analytic_timesheet, self).on_change_account_id(cr, uid, ids, account_id)
else:
#get the old values from super and add the value from the new relation analytic_user_funct_grid
r = self.pool.get('analytic_user_funct_grid').browse(cr, uid, temp)[0]
r = self.pool.get('analytic.user.funct.grid').browse(cr, uid, temp)[0]
res.setdefault('value',{})
res['value']= super(hr_analytic_timesheet, self).on_change_account_id(cr, uid, ids, account_id)['value']
res['value']['product_id'] = r.product_id.id
@ -119,7 +119,7 @@ class hr_analytic_timesheet(osv.osv):
temp = self._get_related_user_account_recursiv(cr, uid, user_id, account_id)
if temp:
#add the value from the new relation analytic_user_funct_grid
r = self.pool.get('analytic_user_funct_grid').browse(cr, uid, temp)[0]
r = self.pool.get('analytic.user.funct.grid').browse(cr, uid, temp)[0]
res['value']['product_id'] = r.product_id.id
#the change of product has to impact the amount, uom and general_account_id

View File

@ -5,7 +5,7 @@
<!-- analytic_user_funct_grid views -->
<record model="ir.ui.view" id="analytic_user_funct_grid_tree">
<field name="name">analytic_user_funct_grid.tree</field>
<field name="model">analytic_user_funct_grid</field>
<field name="model">analytic.user.funct.grid</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="User's Product for this Analytic Account" editable="bottom">
@ -17,7 +17,7 @@
<record model="ir.ui.view" id="analytic_user_funct_grid_form">
<field name="name">analytic_user_funct_grid.form</field>
<field name="model">analytic_user_funct_grid</field>
<field name="model">analytic.user.funct.grid</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="User's Product for this Analytic Account">
@ -55,7 +55,7 @@
</xpath>
</field>
</record>
<!-- hr_timesheet_sheet.sheet inherited view -->
<record model="ir.ui.view" id="hr_timesheet_sheet_form_inherit1">
<field name="name">hr.timesheet.sheet.form.form</field>

View File

@ -24,7 +24,7 @@
{
'name': 'Database Anonymization',
'version': '1.0',
'category': 'Tools',
'category': 'Hidden',
'complexity': "easy",
'description': """
This module allows you to anonymize a database.

View File

@ -0,0 +1,226 @@
# Estonian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-10-11 18:09+0000\n"
"Last-Translator: Aare Vesi <Unknown>\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: 2011-10-12 04:40+0000\n"
"X-Generator: Launchpad (build 14124)\n"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard
msgid "ir.model.fields.anonymize.wizard"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,field_name:0
msgid "Field Name"
msgstr "Välja Nimi:"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_id:0
msgid "Field"
msgstr "Väli"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,state:0
#: field:ir.model.fields.anonymize.wizard,state:0
msgid "State"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_import:0
msgid "Import"
msgstr "Import"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization
msgid "ir.model.fields.anonymization"
msgstr ""
#. module: anonymization
#: model:ir.module.module,shortdesc:anonymization.module_meta_information
msgid "Database anonymization module"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization.history,direction:0
msgid "Direction"
msgstr "Suund"
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_tree
#: view:ir.model.fields.anonymization:0
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_fields
msgid "Anonymized Fields"
msgstr ""
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization
msgid "Database anonymization"
msgstr ""
#. module: anonymization
#: code:addons/anonymization/anonymization.py:55
#: sql_constraint:ir.model.fields.anonymization:0
#, python-format
msgid "You cannot have two records having the same model and the same field"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Anonymized"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,state:0
msgid "unknown"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,model_id:0
msgid "Object"
msgstr "Objekt"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,filepath:0
msgid "File path"
msgstr "Faili asukoht"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,date:0
msgid "Date"
msgstr "Kuupäev"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_export:0
msgid "Export"
msgstr "Eksport"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Reverse the Database Anonymization"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Database Anonymization"
msgstr ""
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard
msgid "Anonymize database"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,field_ids:0
msgid "Fields"
msgstr "Väljad"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Clear"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "clear -> anonymized"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
#: field:ir.model.fields.anonymize.wizard,summary:0
msgid "Summary"
msgstr "Kokkuvõte"
#. module: anonymization
#: view:ir.model.fields.anonymization:0
msgid "Anonymized Field"
msgstr ""
#. module: anonymization
#: model:ir.module.module,description:anonymization.module_meta_information
msgid ""
"\n"
"This module allows you to anonymize a database.\n"
" "
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Unstable"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Exception occured"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Not Existing"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,model_name:0
msgid "Object Name"
msgstr "Objekti nimi"
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_history_tree
#: view:ir.model.fields.anonymization.history:0
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_history
msgid "Anonymization History"
msgstr ""
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history
msgid "ir.model.fields.anonymization.history"
msgstr ""
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymize_wizard
#: view:ir.model.fields.anonymize.wizard:0
msgid "Anonymize Database"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,name:0
msgid "File Name"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "anonymized -> clear"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Started"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Done"
msgstr ""
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,msg:0
#: field:ir.model.fields.anonymize.wizard,msg:0
msgid "Message"
msgstr ""

View File

@ -18,6 +18,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import profile_association
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,8 +23,7 @@
{
'name': 'Association profile',
'version': '0.1',
'category': 'General',
'category': 'Profile',
'category': 'Vertical Applications',
'complexity': "normal",
'description': """
This module is to configure modules related to an association.

View File

@ -1,53 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from lxml import etree
from osv import fields, osv
class profile_association_config_install_modules_wizard(osv.osv_memory):
_inherit = 'base.setup.installer'
_columns = {
'hr_expense':fields.boolean('Resources Management: Expenses Tracking', help="Tracks and manages employee expenses, and can "
"automatically re-invoice clients if the expenses are "
"project-related."),
'event_project':fields.boolean('Event Management: Events', help="Helps you to manage and organize your events."),
'project_gtd':fields.boolean('Getting Things Done',
help="GTD is a methodology to efficiently organise yourself and your tasks. This module fully integrates GTD principle with OpenERP's project management."),
'wiki': fields.boolean('Wiki', help="Lets you create wiki pages and page groups in order "
"to keep track of business knowledge and share it with "
"and between your employees."),
}
# Will be removed when rd-v61-al-config-depends will be done
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
res = super(profile_association_config_install_modules_wizard, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
doc = etree.XML(res['arch'])
for module in ['project_gtd','hr_expense']:
count = 0
for node in doc.xpath("//field[@name='%s']" % (module)):
count = count + 1
if count > 1:
node.set('invisible', '1')
res['arch'] = etree.tostring(doc)
return res
profile_association_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,24 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_confirm_install_module_form" model="ir.ui.view">
<field name="name">Association Application Configuration</field>
<field name="model">base.setup.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base_setup.view_base_setup_installer"/>
<field name="arch" type="xml">
<data>
<xpath expr="//group[@name='association']" position="replace">
<newline/>
<separator string="Associations Features" colspan="4" />
<field name="project_gtd" />
<field name="wiki" />
<field name="event_project" />
<field name="hr_expense" />
</xpath>
</data>
</field>
</record>
<menuitem
name="Association"
id="base.menu_association"

View File

@ -23,7 +23,7 @@
{
'name': 'Auction Management',
'version': '1.0',
'category': 'General',
'category': 'Vertical Applications',
'complexity': "normal",
'description': """
This module manages the records of artists, auction articles, buyers and sellers.

View File

@ -415,7 +415,7 @@ class auction_lots(osv.osv):
result = [ (r['id'], str(r['obj_num'])+' - '+r['name']) for r in self.read(cr, user, ids, ['name', 'obj_num'])]
return result
def name_search(self, cr, user, name, args=None, operator='ilike', context=None):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args = []
ids = []

View File

@ -23,7 +23,7 @@
{
'name': 'Audit Trail',
'version': '1.0',
'category': 'Tools',
'category': 'Hidden',
'description': """
This module lets administrator track every user operation on all the objects of the system.
===========================================================================================

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -15,26 +15,12 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
class marketing_installer(osv.osv_memory):
_inherit = 'base.setup.installer'
_columns = {
'email_template':fields.boolean('Automated E-Mails',
help="Helps you to design templates of emails and integrate them in your different processes."),
'marketing_campaign':fields.boolean('Marketing Campaigns',
help="Helps you to manage marketing campaigns and automate actions and communication steps."),
'crm_profiling':fields.boolean('Profiling Tools',
help="Helps you to perform segmentation of partners and design segmentation questionnaires")
}
_defaults = {
'marketing_campaign': lambda *a: 1,
}
marketing_installer()
import res_users
import controllers
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -2,7 +2,7 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -18,18 +18,30 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
class report_designer_installer(osv.osv_memory):
_inherit = 'base.setup.installer'
_columns = {
# Reporting
'base_report_designer':fields.boolean('OpenOffice Report Designer',help="Adds wizards to Import/Export .SXW report which "
"you can modify in OpenOffice.Once you have modified it you can "
"upload the report using the same wizard."),
'base_report_creator':fields.boolean('Query Builder',help="Allows you to create any statistic "
"reports on several objects. It's a SQL query builder and browser for end users."),
}
report_designer_installer()
{
'name': 'OpenID',
'version': '2.0',
'category': 'Hidden',
'description': """Allow users to login through OpenID.""",
'author': 'OpenERP s.a.',
'maintainer': 'OpenERP s.a.',
'website': 'http://www.openerp.com',
'depends': ['base'],
'data': [
'res_users.xml',
],
'js': [
'static/src/js/auth_openid.js',
],
'css': [
'static/src/css/openid.css',
],
'external_dependencies': {
'python' : ['openid'],
},
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,20 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>).
#
# 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 main

View File

@ -0,0 +1,225 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>).
#
# 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 logging
import os
import sys
import urllib
import werkzeug.urls
import werkzeug.exceptions
from openerp.modules.registry import RegistryManager
import web.common.http as openerpweb
from openid import oidutil
from openid.store import memstore
#from openid.store import filestore
from openid.consumer import consumer
from openid.cryptutil import randomString
from openid.extensions import ax, sreg
from .. import utils
_logger = logging.getLogger('web.auth_openid')
oidutil.log = logging.getLogger('openid').debug
class GoogleAppsAwareConsumer(consumer.GenericConsumer):
def complete(self, message, endpoint, return_to):
if message.getOpenIDNamespace() == consumer.OPENID2_NS:
server_url = message.getArg(consumer.OPENID2_NS, 'op_endpoint', consumer.no_default)
if server_url.startswith('https://www.google.com/a/'):
# update fields
for attr in ['claimed_id', 'identity']:
value = message.getArg(consumer.OPENID2_NS, attr)
value = 'https://www.google.com/accounts/o8/user-xrds?uri=%s' % urllib.quote_plus(value)
message.setArg(consumer.OPENID2_NS, attr, value)
# now, resign the message
assoc_handle = message.getArg(consumer.OPENID_NS, 'assoc_handle')
assoc = self.store.getAssociation(server_url, assoc_handle)
message.delArg(consumer.OPENID2_NS, 'sig')
message.delArg(consumer.OPENID2_NS, 'signed')
message = assoc.signMessage(message)
return super(GoogleAppsAwareConsumer, self).complete(message, endpoint, return_to)
class OpenIDController(openerpweb.Controller):
_cp_path = '/auth_openid/login'
_store = memstore.MemoryStore() # TODO use a filestore
_REQUIRED_ATTRIBUTES = ['email']
_OPTIONAL_ATTRIBUTES = 'nickname fullname postcode country language timezone'.split()
def _add_extensions(self, request):
"""Add extensions to the request"""
sreg_request = sreg.SRegRequest(required=self._REQUIRED_ATTRIBUTES,
optional=self._OPTIONAL_ATTRIBUTES)
request.addExtension(sreg_request)
ax_request = ax.FetchRequest()
for alias in self._REQUIRED_ATTRIBUTES:
uri = utils.SREG2AX[alias]
ax_request.add(ax.AttrInfo(uri, required=True, alias=alias))
for alias in self._OPTIONAL_ATTRIBUTES:
uri = utils.SREG2AX[alias]
ax_request.add(ax.AttrInfo(uri, required=False, alias=alias))
request.addExtension(ax_request)
def _get_attributes_from_success_response(self, success_response):
attrs = {}
all_attrs = self._REQUIRED_ATTRIBUTES + self._OPTIONAL_ATTRIBUTES
sreg_resp = sreg.SRegResponse.fromSuccessResponse(success_response)
if sreg_resp:
for attr in all_attrs:
value = sreg_resp.get(attr)
if value is not None:
attrs[attr] = value
ax_resp = ax.FetchResponse.fromSuccessResponse(success_response)
if ax_resp:
for attr in all_attrs:
value = ax_resp.getSingle(utils.SREG2AX[attr])
if value is not None:
attrs[attr] = value
return attrs
def _get_realm(self, req):
return req.httprequest.host_url
@openerpweb.jsonrequest
def verify(self, req, db, url):
redirect_to = werkzeug.urls.Href(req.httprequest.host_url + 'auth_openid/login/process')(session_id=req.session_id)
realm = self._get_realm(req)
session = dict(dbname=db, openid_url=url) # TODO add origin page ?
oidconsumer = consumer.Consumer(session, self._store)
try:
request = oidconsumer.begin(url)
except consumer.DiscoveryFailure, exc:
fetch_error_string = 'Error in discovery: %s' % (str(exc[0]),)
return {'error': fetch_error_string, 'title': 'OpenID Error'}
if request is None:
return {'error': 'No OpenID services found', 'title': 'OpenID Error'}
req.session.openid_session = session
self._add_extensions(request)
if request.shouldSendRedirect():
redirect_url = request.redirectURL(realm, redirect_to)
return {'action': 'redirect', 'value': redirect_url, 'session_id': req.session_id}
else:
form_html = request.htmlMarkup(realm, redirect_to)
return {'action': 'post', 'value': form_html, 'session_id': req.session_id}
@openerpweb.httprequest
def process(self, req, **kw):
session = getattr(req.session, 'openid_session', None)
if not session:
return werkzeug.utils.redirect('/')
oidconsumer = consumer.Consumer(session, self._store, consumer_class=GoogleAppsAwareConsumer)
query = req.httprequest.args
info = oidconsumer.complete(query, req.httprequest.base_url)
display_identifier = info.getDisplayIdentifier()
session['status'] = info.status
user_id = None
if info.status == consumer.SUCCESS:
dbname = session['dbname']
with utils.cursor(dbname) as cr:
registry = RegistryManager.get(dbname)
Modules = registry.get('ir.module.module')
installed = Modules.search_count(cr, 1, ['&', ('name', '=', 'auth_openid'), ('state', '=', 'installed')]) == 1
if installed:
Users = registry.get('res.users')
#openid_url = info.endpoint.canonicalID or display_identifier
openid_url = session['openid_url']
attrs = self._get_attributes_from_success_response(info)
attrs['openid_url'] = openid_url
session['attributes'] = attrs
openid_email = attrs.get('email', False)
domain = []
if openid_email:
domain += ['|', ('openid_email', '=', False)]
domain += [('openid_email', '=', openid_email)]
domain += [
('openid_url', '=', openid_url),
('active', '=', True),
]
ids = Users.search(cr, 1, domain)
assert len(ids) < 2
if ids:
user_id = ids[0]
login = Users.browse(cr, 1, user_id).login
key = randomString(utils.KEY_LENGTH, '0123456789abcdef')
Users.write(cr, 1, [user_id], {'openid_key': key})
# TODO fill empty fields with the ones from sreg/ax
cr.commit()
u = req.session.login(dbname, login, key)
if not user_id:
session['message'] = 'This OpenID identifier is not associated to any active users'
elif info.status == consumer.SETUP_NEEDED:
session['message'] = info.setup_url
elif info.status == consumer.FAILURE and display_identifier:
fmt = "Verification of %s failed: %s"
session['message'] = fmt % (display_identifier, info.message)
else: # FAILURE
# Either we don't understand the code or there is no
# openid_url included with the error. Give a generic
# failure message. The library should supply debug
# information in a log.
session['message'] = 'Verification failed.'
fragment = '#loginerror' if not user_id else ''
return werkzeug.utils.redirect('/web/webclient/home?debug=1'+fragment)
@openerpweb.jsonrequest
def status(self, req):
session = getattr(req.session, 'openid_session', {})
return {'status': session.get('status'), 'message': session.get('message')}

View File

@ -0,0 +1,94 @@
#!/usr/bin/env python
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp.osv import osv, fields
import openerp.exceptions
import tools
import utils
class res_users(osv.osv):
_inherit = 'res.users'
# TODO create helper fields for autofill openid_url and openid_email -> http://pad.openerp.com/web-openid
_columns = {
'openid_url': fields.char('OpenID URL', size=1024),
'openid_email': fields.char('OpenID Email', size=256,
help="Used for disambiguation in case of a shared OpenID URL"),
'openid_key': fields.char('OpenID Key', size=utils.KEY_LENGTH,
readonly=True),
}
def _check_openid_url_email(self, cr, uid, ids, context=None):
return all(self.search_count(cr, uid, [('active', '=', True), ('openid_url', '=', u.openid_url), ('openid_email', '=', u.openid_email)]) == 1 \
for u in self.browse(cr, uid, ids, context) if u.active and u.openid_url)
def _check_openid_url_email_msg(self, cr, uid, ids, context):
return "There is already an active user with this OpenID Email for this OpenID URL"
_constraints = [
(_check_openid_url_email, lambda self, *a, **kw: self._check_openid_url_email_msg(*a, **kw), ['active', 'openid_url', 'openid_email']),
]
def copy(self, cr, uid, rid, defaults=None, context=None):
reset_fields = 'openid_url openid_email'.split()
reset_values = dict.fromkeys(reset_fields, False)
if defaults is None:
defaults = reset_values
else:
defaults = dict(reset_values, **defaults)
defaults['openid_key'] = False
return super(res_users, self).copy(cr, uid, rid, defaults, context)
def login(self, db, login, password):
result = super(res_users, self).login(db, login, password)
if result:
return result
else:
with utils.cursor(db) as cr:
cr.execute('UPDATE res_users SET date=now() WHERE login=%s AND openid_key=%s AND active=%s RETURNING id',
(tools.ustr(login), tools.ustr(password), True))
res = cr.fetchone()
cr.commit()
return res[0] if res else False
def check(self, db, uid, passwd):
try:
return super(res_users, self).check(db, uid, passwd)
except openerp.exceptions.AccessDenied:
if not passwd:
raise
with utils.cursor(db) as cr:
cr.execute('''SELECT COUNT(1)
FROM res_users
WHERE id=%s
AND openid_key=%s
AND active=%s''',
(int(uid), passwd, True))
if not cr.fetchone()[0]:
raise
self._uid_cache.setdefault(db, {})[uid] = passwd
res_users()

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_users_form" model="ir.ui.view">
<field name="name">res.users.form</field>
<field name="model">res.users</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<notebook colspan="4" position="inside">
<page string="OpenID">
<field name="openid_url"/>
<field name="openid_email"/>
</page>
</notebook>
</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,64 @@
input[name='openid_url'] {
background: #fff url(../img/login-bg.gif) no-repeat 1px;
padding-left: 20px;
}
.auth_choice {
position: static;
display: none;
}
.openerp .login .oe_forms .oe_box2 td input[name="db"], .oe_forms .oe_box2 td select[name="db"] {
width: 50%;
float: left;
margin-top: 15px;
}
.openerp .login .oe_login_right_pane {
margin-left: 525px;
}
.openerp .login form {
width: 475px;
}
.openid_providers {
padding: 0;
list-style: none;
float: right;
}
.openid_providers li {
display: block;
float: left;
margin: 0 1px 3px 2px;
}
.openid_providers a {
display: block;
width: 24px;
height: 24px;
border: 1px solid #ddd;
background: #fff url(../img/openid_16.png) no-repeat 50%;
text-indent: -9999px;
overflow: hidden;
text-align: left;
}
.openid_providers a.selected {
border-color: #9A0404;
}
.openid_providers a[title="Password"] { background-image: url(../img/textfield_key.png); }
.openid_providers a[title="AOL"] { background-image: url(../img/aol.png); }
.openid_providers a[title="ClaimID"] { background-image: url(../img/claimid.png); }
.openid_providers a[title="Google"] { background-image: url(../img/googlefav.png); }
.openid_providers a[title="Google Apps"] { background-image: url(../img/marketplace.gif); }
.openid_providers a[title="MyOpenID"] { background-image: url(../img/myopenid.png); }
.openid_providers a[title="VeriSign"] { background-image: url(../img/verisign.png); }
.openid_providers a[title="Yahoo!"] { background-image: url(../img/yahoo.png); }
.openid_providers a[title="Launchpad"] { background-image: url(../img/launchpad.png); }
tr.auth_choice.selected {
display: table-row;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

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