[MERGE]: Merge with lp:openobject-addons
bzr revid: aag@tinyerp.com-20111010045536-nvhufpd0j5da0882
@@ -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
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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']:
|
||||
@@ -1214,7 +1250,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 !'))
|
||||
|
||||
@@ -2730,7 +2766,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 +2814,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'}
|
||||
]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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 & 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"/>
|
||||
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
@@ -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 & 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">
|
||||
|
||||
@@ -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
|
||||
@@ -970,7 +972,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 +983,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 +1002,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\',\'<>\',\'view\'), (\'type\',\'<>\',\'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 +1231,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'],
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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
|
||||
|
||||
@@ -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-09-30 07:02+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-29 04:36+0000\n"
|
||||
"X-Generator: Launchpad (build 14049)\n"
|
||||
"X-Launchpad-Export-Date: 2011-10-01 05:08+0000\n"
|
||||
"X-Generator: Launchpad (build 14071)\n"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
@@ -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
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"name" : "Accountant Access",
|
||||
"version" : "1.1",
|
||||
"author" : "OpenERP SA",
|
||||
"category": 'Finance',
|
||||
"category": 'Hidden',
|
||||
'complexity': "normal",
|
||||
"description": """
|
||||
Accounting Access Rights.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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",],
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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 ""
|
||||
@@ -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.
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"name" : "Cancel Entries",
|
||||
"version" : "1.1",
|
||||
"author" : "OpenERP SA",
|
||||
"category": 'Finance',
|
||||
"category": 'Hidden',
|
||||
'complexity': "normal",
|
||||
"description": """
|
||||
Allows cancelling accounting entries.
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{
|
||||
'name': 'Charts of Accounts',
|
||||
'version': '1.1',
|
||||
'category': 'Finance',
|
||||
'category': 'Hidden',
|
||||
'description': """
|
||||
Remove minimal account chart.
|
||||
=============================
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"],
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -280,6 +280,7 @@
|
||||
<form string="Customer Payment">
|
||||
<group col="6" colspan="4">
|
||||
<field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)" string="Customer"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="amount"
|
||||
invisible="context.get('line_type', False)"
|
||||
string="Paid Amount"
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
==============================================================================================================
|
||||
|
||||
@@ -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.
|
||||
====================================================================================================
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
===========================================================================================
|
||||
|
||||
@@ -123,9 +123,6 @@ class audittrail_rule(osv.osv):
|
||||
#End Loop
|
||||
return True
|
||||
|
||||
audittrail_rule()
|
||||
|
||||
|
||||
class audittrail_log(osv.osv):
|
||||
"""
|
||||
For Audittrail Log
|
||||
@@ -161,9 +158,6 @@ class audittrail_log(osv.osv):
|
||||
}
|
||||
_order = "timestamp desc"
|
||||
|
||||
audittrail_log()
|
||||
|
||||
|
||||
class audittrail_log_line(osv.osv):
|
||||
"""
|
||||
Audittrail Log Line.
|
||||
@@ -181,9 +175,6 @@ class audittrail_log_line(osv.osv):
|
||||
'field_description': fields.char('Field Description', size=64),
|
||||
}
|
||||
|
||||
audittrail_log_line()
|
||||
|
||||
|
||||
class audittrail_objects_proxy(object_proxy):
|
||||
""" Uses Object proxy for auditing changes on object of subscribed Rules"""
|
||||
|
||||
@@ -289,8 +280,7 @@ class audittrail_objects_proxy(object_proxy):
|
||||
#End Loop
|
||||
return True
|
||||
|
||||
|
||||
def log_fct(self, db, uid, model, method, fct_src, *args):
|
||||
def log_fct(self, cr, uid, model, method, fct_src, *args):
|
||||
"""
|
||||
Logging function: This function is performs logging oprations according to method
|
||||
@param db: the current database
|
||||
@@ -304,8 +294,7 @@ class audittrail_objects_proxy(object_proxy):
|
||||
uid_orig = uid
|
||||
uid = 1
|
||||
res2 = args
|
||||
pool = pooler.get_pool(db)
|
||||
cr = pooler.get_db(db).cursor()
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
resource_pool = pool.get(model)
|
||||
log_pool = pool.get('audittrail.log')
|
||||
model_pool = pool.get('ir.model')
|
||||
@@ -316,8 +305,7 @@ class audittrail_objects_proxy(object_proxy):
|
||||
model = model_pool.browse(cr, uid, model_id)
|
||||
|
||||
if method in ('create'):
|
||||
res_id = fct_src(db, uid_orig, model.model, method, *args)
|
||||
cr.commit()
|
||||
res_id = fct_src(cr, uid_orig, model.model, method, *args)
|
||||
resource = resource_pool.read(cr, uid, res_id, args[0].keys())
|
||||
vals = {
|
||||
"method": method,
|
||||
@@ -338,14 +326,12 @@ class audittrail_objects_proxy(object_proxy):
|
||||
lines.append(line)
|
||||
self.create_log_line(cr, uid, log_id, model, lines)
|
||||
|
||||
cr.commit()
|
||||
cr.close()
|
||||
return res_id
|
||||
|
||||
elif method in ('read'):
|
||||
res_ids = args[0]
|
||||
old_values = {}
|
||||
res = fct_src(db, uid_orig, model.model, method, *args)
|
||||
res = fct_src(cr, uid_orig, model.model, method, *args)
|
||||
if type(res) == list:
|
||||
for v in res:
|
||||
old_values[v['id']] = v
|
||||
@@ -370,8 +356,6 @@ class audittrail_objects_proxy(object_proxy):
|
||||
lines.append(line)
|
||||
|
||||
self.create_log_line(cr, uid, log_id, model, lines)
|
||||
cr.commit()
|
||||
cr.close()
|
||||
return res
|
||||
|
||||
elif method in ('unlink'):
|
||||
@@ -401,9 +385,7 @@ class audittrail_objects_proxy(object_proxy):
|
||||
lines.append(line)
|
||||
|
||||
self.create_log_line(cr, uid, log_id, model, lines)
|
||||
res = fct_src(db, uid_orig, model.model, method, *args)
|
||||
cr.commit()
|
||||
cr.close()
|
||||
res = fct_src(cr, uid_orig, model.model, method, *args)
|
||||
return res
|
||||
else:
|
||||
res_ids = []
|
||||
@@ -428,8 +410,7 @@ class audittrail_objects_proxy(object_proxy):
|
||||
old_values_text[field] = self.get_value_text(cr, uid, field, resource[field], model)
|
||||
old_values[resource_id] = {'text':old_values_text, 'value': old_value}
|
||||
|
||||
res = fct_src(db, uid_orig, model.model, method, *args)
|
||||
cr.commit()
|
||||
res = fct_src(cr, uid_orig, model.model, method, *args)
|
||||
|
||||
if res_ids:
|
||||
for resource in resource_pool.read(cr, uid, res_ids):
|
||||
@@ -457,107 +438,40 @@ class audittrail_objects_proxy(object_proxy):
|
||||
lines.append(line)
|
||||
|
||||
self.create_log_line(cr, uid, log_id, model, lines)
|
||||
cr.commit()
|
||||
cr.close()
|
||||
return res
|
||||
return True
|
||||
|
||||
|
||||
|
||||
def execute(self, db, uid, model, method, *args, **kw):
|
||||
"""
|
||||
Overrides Object Proxy execute method
|
||||
@param db: the current database
|
||||
@param uid: the current user's ID for security checks,
|
||||
@param object: Object who's values are being changed
|
||||
@param method: get any method and create log
|
||||
|
||||
@return: Returns result as per method of Object proxy
|
||||
"""
|
||||
uid_orig = uid
|
||||
uid = 1
|
||||
pool = pooler.get_pool(db)
|
||||
model_pool = pool.get('ir.model')
|
||||
rule_pool = pool.get('audittrail.rule')
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr.autocommit(True)
|
||||
logged_uids = []
|
||||
fct_src = super(audittrail_objects_proxy, self).execute
|
||||
|
||||
def my_fct(db, uid, model, method, *args):
|
||||
rule = False
|
||||
model_ids = model_pool.search(cr, uid, [('model', '=', model)])
|
||||
def check_rules(self, cr, uid, model, method):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
# Check if auditrails is installed for that db and then if one rule match
|
||||
if 'audittrail.rule' in pool.models:
|
||||
model_ids = pool.get('ir.model').search(cr, 1, [('model', '=', model)])
|
||||
model_id = model_ids and model_ids[0] or False
|
||||
if model_id:
|
||||
rule_ids = pool.get('audittrail.rule').search(cr, 1, [('object_id', '=', model_id), ('state', '=', 'subscribed')])
|
||||
for rule in pool.get('audittrail.rule').read(cr, 1, rule_ids, ['user_id','log_read','log_write','log_create','log_unlink','log_action','log_workflow']):
|
||||
if len(rule['user_id'])==0 or uid in rule['user_id']:
|
||||
if rule.get('log_'+method,0):
|
||||
return True
|
||||
elif method not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink', 'write', 'create'):
|
||||
if rule['log_action']:
|
||||
return True
|
||||
|
||||
for model_name in pool.obj_list():
|
||||
if model_name == 'audittrail.rule':
|
||||
rule = True
|
||||
if not rule:
|
||||
return fct_src(db, uid_orig, model, method, *args)
|
||||
if not model_id:
|
||||
return fct_src(db, uid_orig, model, method, *args)
|
||||
def execute_cr(self, cr, uid, model, method, *args, **kw):
|
||||
fct_src = super(audittrail_objects_proxy, self).execute_cr
|
||||
if self.check_rules(cr,uid,model,method):
|
||||
res = self.log_fct(cr, uid, model, method, fct_src, *args)
|
||||
else:
|
||||
res = fct_src(cr, uid, model, method, *args)
|
||||
return res
|
||||
|
||||
rule_ids = rule_pool.search(cr, uid, [('object_id', '=', model_id), ('state', '=', 'subscribed')])
|
||||
if not rule_ids:
|
||||
return fct_src(db, uid_orig, model, method, *args)
|
||||
|
||||
for thisrule in rule_pool.browse(cr, uid, rule_ids):
|
||||
for user in thisrule.user_id:
|
||||
logged_uids.append(user.id)
|
||||
if not logged_uids or uid in logged_uids:
|
||||
if method in ('read', 'write', 'create', 'unlink'):
|
||||
if getattr(thisrule, 'log_' + method):
|
||||
return self.log_fct(db, uid_orig, model, method, fct_src, *args)
|
||||
|
||||
elif method not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink', 'write', 'create'):
|
||||
if thisrule.log_action:
|
||||
return self.log_fct(db, uid_orig, model, method, fct_src, *args)
|
||||
|
||||
return fct_src(db, uid_orig, model, method, *args)
|
||||
try:
|
||||
res = my_fct(db, uid, model, method, *args)
|
||||
return res
|
||||
finally:
|
||||
cr.close()
|
||||
|
||||
def exec_workflow(self, db, uid, model, method, *args, **argv):
|
||||
uid_orig = uid
|
||||
uid = 1
|
||||
|
||||
pool = pooler.get_pool(db)
|
||||
logged_uids = []
|
||||
fct_src = super(audittrail_objects_proxy, self).exec_workflow
|
||||
field = method
|
||||
rule = False
|
||||
model_pool = pool.get('ir.model')
|
||||
rule_pool = pool.get('audittrail.rule')
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr.autocommit(True)
|
||||
try:
|
||||
model_ids = model_pool.search(cr, uid, [('model', '=', model)])
|
||||
for obj_name in pool.obj_list():
|
||||
if obj_name == 'audittrail.rule':
|
||||
rule = True
|
||||
if not rule:
|
||||
return super(audittrail_objects_proxy, self).exec_workflow(db, uid_orig, model, method, *args, **argv)
|
||||
if not model_ids:
|
||||
return super(audittrail_objects_proxy, self).exec_workflow(db, uid_orig, model, method, *args, **argv)
|
||||
|
||||
rule_ids = rule_pool.search(cr, uid, [('object_id', 'in', model_ids), ('state', '=', 'subscribed')])
|
||||
if not rule_ids:
|
||||
return super(audittrail_objects_proxy, self).exec_workflow(db, uid_orig, model, method, *args, **argv)
|
||||
|
||||
for thisrule in rule_pool.browse(cr, uid, rule_ids):
|
||||
for user in thisrule.user_id:
|
||||
logged_uids.append(user.id)
|
||||
if not logged_uids or uid in logged_uids:
|
||||
if thisrule.log_workflow:
|
||||
return self.log_fct(db, uid_orig, model, method, fct_src, *args)
|
||||
return super(audittrail_objects_proxy, self).exec_workflow(db, uid_orig, model, method, *args, **argv)
|
||||
|
||||
return True
|
||||
finally:
|
||||
cr.close()
|
||||
def exec_workflow_cr(self, cr, uid, model, method, *args, **argv):
|
||||
fct_src = super(audittrail_objects_proxy, self).exec_workflow_cr
|
||||
if self.check_rules(cr,uid,model,'workflow'):
|
||||
res = self.log_fct(cr, uid, model, method, fct_src, *args)
|
||||
else:
|
||||
res = fct_src(cr, uid, model, method, *args)
|
||||
return res
|
||||
|
||||
audittrail_objects_proxy()
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
@@ -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
|
||||
@@ -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')}
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 940 B |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 419 B |
|
After Width: | Height: | Size: 328 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 671 B |
|
After Width: | Height: | Size: 455 B |
|
After Width: | Height: | Size: 520 B |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,135 @@
|
||||
|
||||
openerp.auth_openid = function(instance) {
|
||||
|
||||
var QWeb = instance.web.qweb;
|
||||
QWeb.add_template('/auth_openid/static/src/xml/auth_openid.xml');
|
||||
|
||||
instance.web.Login = instance.web.Login.extend({
|
||||
start: function() {
|
||||
this._super.apply(this, arguments);
|
||||
var self = this;
|
||||
|
||||
this.$openid_selected_button = $();
|
||||
this.$openid_selected_input = $();
|
||||
this.$openid_selected_provider = null;
|
||||
|
||||
|
||||
var openIdProvider = null;
|
||||
if (this.has_local_storage && this.remember_creditentials) {
|
||||
openIdProvider = localStorage.getItem('openid-provider');
|
||||
}
|
||||
|
||||
if (openIdProvider) {
|
||||
$openid_selected_provider = openIdProvider;
|
||||
this.do_openid_select('a[href="#' + openIdProvider + '"]', openIdProvider, true);
|
||||
|
||||
if (this.has_local_storage && this.remember_creditentials) {
|
||||
this.$openid_selected_input.find('input').val(localStorage.getItem('openid-login'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.do_openid_select('a[data-url=""]', 'login,password', true);
|
||||
}
|
||||
|
||||
this.$element.find('a[data-url]').click(function (event) {
|
||||
event.preventDefault();
|
||||
var selected_oidh = $(this).attr('href').substr(1);
|
||||
if (selected_oidh != self.$openid_selected_provider) {
|
||||
self.do_openid_select(this, selected_oidh);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
do_openid_select: function (button, provider, noautosubmit) {
|
||||
var self = this;
|
||||
|
||||
self.$openid_selected_button.add(self.$openid_selected_input).removeClass('selected');
|
||||
self.$openid_selected_button = self.$element.find(button).addClass('selected');
|
||||
|
||||
var input = _(provider.split(',')).map(function(p) { return 'tr[data-provider="'+p+'"]'; }).join(',');
|
||||
self.$openid_selected_input = self.$element.find(input).addClass('selected');
|
||||
|
||||
self.$openid_selected_input.find('input:first').focus();
|
||||
self.$openid_selected_provider = (self.$openid_selected_button.attr('href') || '').substr(1);
|
||||
|
||||
if (self.has_local_storage && self.remember_creditentials) {
|
||||
localStorage.setItem('openid-provider', self.$openid_selected_provider);
|
||||
}
|
||||
|
||||
if (!noautosubmit && self.$openid_selected_input.length == 0) {
|
||||
self.$element.find('form').submit();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
on_login_invalid: function() {
|
||||
var self = this;
|
||||
var fragment = jQuery.deparam.fragment();
|
||||
if (fragment.loginerror != undefined) {
|
||||
this.rpc('/auth_openid/login/status', {}, function(result) {
|
||||
if (_.contains(['success', 'failure'], result.status) && result.message) {
|
||||
self.notification.warn('Invalid OpenID Login', result.message);
|
||||
}
|
||||
if (result.status === 'setup_needed' && result.message) {
|
||||
window.location.replace(result.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
return this._super();
|
||||
},
|
||||
|
||||
on_submit: function(ev) {
|
||||
|
||||
var dataurl = this.$openid_selected_button.attr('data-url');
|
||||
|
||||
if(!dataurl) {
|
||||
// login-password submitted
|
||||
this._super(ev);
|
||||
} else {
|
||||
ev.preventDefault();
|
||||
|
||||
var id = this.$openid_selected_input.find('input').val();
|
||||
if (this.has_local_storage && this.remember_creditentials) {
|
||||
localStorage.setItem('openid-login', id);
|
||||
}
|
||||
|
||||
var db = this.$element.find("form [name=db]").val();
|
||||
var openid_url = dataurl.replace('{id}', id);
|
||||
|
||||
this.do_openid_login(db, openid_url);
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
do_openid_login: function(db, openid_url) {
|
||||
var self = this;
|
||||
this.rpc('/auth_openid/login/verify', {'db': db, 'url': openid_url}, function(result) {
|
||||
if (result.error) {
|
||||
self.notification.warn(result.title, result.error);
|
||||
self.on_login_invalid();
|
||||
return;
|
||||
}
|
||||
if (result.session_id) {
|
||||
self.session.session_id = result.session_id;
|
||||
self.session.session_save();
|
||||
}
|
||||
if (result.action === 'post') {
|
||||
document.open();
|
||||
document.write(result.value);
|
||||
document.close();
|
||||
} else if (result.action === 'redirect') {
|
||||
window.location.replace(result.value);
|
||||
} else {
|
||||
// XXX display error ?
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- vim:fdl=1: -->
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-extend="Login">
|
||||
<t t-jquery=".oe_box2 tr:first td:nth-child(2)" t-operation="append">
|
||||
<ul class="openid_providers">
|
||||
<li><a href="#login,password" title="Password" data-url="" id="btn_password">Password</a></li>
|
||||
<li><a href="#google" title="Google" data-url="https://www.google.com/accounts/o8/id">Google</a></li>
|
||||
<li><a href="#googleapps" title="Google Apps" data-url="https://www.google.com/accounts/o8/site-xrds?hd={id}">Google</a></li>
|
||||
<li><a href="#launchpad" title="Launchpad" data-url="https://launchpad.net/~{id}">Launchpad</a></li>
|
||||
<li><a href="#openid_url" title="OpenID" data-url="{id}">OpenID</a></li>
|
||||
</ul>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<t t-extend="Login">
|
||||
<t t-jquery=".oe_box2 tr:first" t-operation="after">
|
||||
<tr>
|
||||
<td><label for="googleapps">Google Apps Domain:</label></td>
|
||||
<td><input type="text" name="googleapps" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="launchpad">Username:</label></td>
|
||||
<td><input type="text" name="launchpad" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="openid_url">OpenID URL:</label></td>
|
||||
<td><input type="text" name="openid_url" /></td>
|
||||
</tr>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<t t-extend="Login">
|
||||
<t t-jquery=".oe_box2 tr:has(input[name!='db'])">
|
||||
//this.addClass('auth_choice'); // XXX for some reason, not all tr tags are HTMLElement's and thus, jQuery decide to not change the class...
|
||||
this.attr('class', 'auth_choice');
|
||||
this.each(function() {
|
||||
var $i = $(this);
|
||||
$i.attr('data-provider', $i.find('input').attr('name'));
|
||||
});
|
||||
</t>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/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 contextlib import contextmanager
|
||||
from openerp.modules.registry import RegistryManager
|
||||
|
||||
KEY_LENGTH = 16
|
||||
|
||||
SREG2AX = { # from http://www.axschema.org/types/#sreg
|
||||
'nickname': 'http://axschema.org/namePerson/friendly',
|
||||
'email': 'http://axschema.org/contact/email',
|
||||
'fullname': 'http://axschema.org/namePerson',
|
||||
'dob': 'http://axschema.org/birthDate',
|
||||
'gender': 'http://axschema.org/person/gender',
|
||||
'postcode': 'http://axschema.org/contact/postalCode/home',
|
||||
'country': 'http://axschema.org/contact/country/home',
|
||||
'language': 'http://axschema.org/pref/language',
|
||||
'timezone': 'http://axschema.org/pref/timezone',
|
||||
}
|
||||
|
||||
|
||||
@contextmanager
|
||||
def cursor(db):
|
||||
cr = RegistryManager.get(db).db.cursor()
|
||||
try:
|
||||
yield cr
|
||||
finally:
|
||||
cr.close()
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
{
|
||||
'name': 'Action Rule',
|
||||
'version': '1.0',
|
||||
'category': 'Tools',
|
||||
'complexity': "expert",
|
||||
'category': 'Generic Modules/Others',
|
||||
'category': 'Hidden',
|
||||
'description': """
|
||||
This module allows to implement action rules for any object.
|
||||
============================================================
|
||||
|
||||
@@ -34,7 +34,7 @@ It supports:
|
||||
- Recurring events
|
||||
- Invitations to people""",
|
||||
"author" : "OpenERP SA",
|
||||
'category': 'Tools',
|
||||
'category': 'Hidden',
|
||||
'website': 'http://www.openerp.com',
|
||||
"init_xml" : [
|
||||
'base_calendar_data.xml'
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{
|
||||
'name': 'Base Contact',
|
||||
'version': '1.0',
|
||||
'category': 'Tools',
|
||||
'category': 'Hidden',
|
||||
'complexity': "expert",
|
||||
'description': """
|
||||
This module allows you to manage your contacts entirely.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"author" : ['OpenERP SA', "FS3"],
|
||||
"maintainer" : "OpenERP SA",
|
||||
"website" : "http://www.openerp.com",
|
||||
"category" : "Tools",
|
||||
"category" : "Hidden",
|
||||
'complexity': "easy",
|
||||
"description": """
|
||||
Replaces cleartext passwords in the database with a secure hash
|
||||
|
||||
@@ -8,19 +8,19 @@ 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-06-06 18:09+0000\n"
|
||||
"Last-Translator: doingit.cl <Unknown>\n"
|
||||
"PO-Revision-Date: 2011-10-03 17:17+0000\n"
|
||||
"Last-Translator: David Acevedo Toledo <Unknown>\n"
|
||||
"Language-Team: Spanish (Chile) <es_CL@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-09-05 05:58+0000\n"
|
||||
"X-Generator: Launchpad (build 13830)\n"
|
||||
"X-Launchpad-Export-Date: 2011-10-04 05:02+0000\n"
|
||||
"X-Generator: Launchpad (build 14071)\n"
|
||||
|
||||
#. module: base_crypt
|
||||
#: sql_constraint:res.users:0
|
||||
msgid "You can not have two users with the same login !"
|
||||
msgstr ""
|
||||
msgstr "¡No puede tener dos usuarios con el mismo nombre!"
|
||||
|
||||
#. module: base_crypt
|
||||
#: model:ir.model,name:base_crypt.model_res_users
|
||||
@@ -31,18 +31,19 @@ msgstr "res.users"
|
||||
#: constraint:res.users:0
|
||||
msgid "The chosen company is not in the allowed companies for this user"
|
||||
msgstr ""
|
||||
"La compañía seleccionada no está autorizada como compañía para este usuario"
|
||||
"La compañía seleccionada no está dentro de las compañías autorizadas para "
|
||||
"este usuario"
|
||||
|
||||
#. module: base_crypt
|
||||
#: code:addons/base_crypt/crypt.py:132
|
||||
#, python-format
|
||||
msgid "Please specify the password !"
|
||||
msgstr ""
|
||||
msgstr "¡Por favor, escriba una contraseña!"
|
||||
|
||||
#. module: base_crypt
|
||||
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
|
||||
msgid "Base - Password Encryption"
|
||||
msgstr ""
|
||||
msgstr "Base - Encriptación de la Contraseña"
|
||||
|
||||
#. module: base_crypt
|
||||
#: code:addons/base_crypt/crypt.py:132
|
||||
@@ -70,3 +71,19 @@ msgid ""
|
||||
"unless you are using a secure protocol such as XML-RPCS.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"Este módulo sustituye la contraseña escrita en texto plano por una "
|
||||
"codificada,\n"
|
||||
"previniendo que alguien pueda leer la contraseña original.\n"
|
||||
"Para un usuario existente, el sustitución de la contraseña en texto plano se "
|
||||
"realiza la primera vez\n"
|
||||
"que el usuario se conecte después de instalar base_crypt.\n"
|
||||
"Después de instalar este módulo los usuarios no podrán recuperar su "
|
||||
"contraseña olvidada,\n"
|
||||
"un administrador tendrá que cambiarla por una nueva.\n"
|
||||
"\n"
|
||||
"Nota: instalar este módulo no significa que pueda ignorar las medidas "
|
||||
"básicas de seguridad,\n"
|
||||
"como la contraseña que es enviada por el cliente que sigue sin ser "
|
||||
"codificada en la red,\n"
|
||||
"a menos que utilice un protocolo seguro como XML-RPCS.\n"
|
||||
" "
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
# Serbian Latin 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-05 13:25+0000\n"
|
||||
"Last-Translator: Milan Milosevic <Unknown>\n"
|
||||
"Language-Team: Serbian Latin <sr@latin@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-06 04:36+0000\n"
|
||||
"X-Generator: Launchpad (build 14085)\n"
|
||||
|
||||
#. module: base_crypt
|
||||
#: sql_constraint:res.users:0
|
||||
msgid "You can not have two users with the same login !"
|
||||
msgstr "Ne možete imati dva korisnika sa istom prijavom!"
|
||||
|
||||
#. module: base_crypt
|
||||
#: model:ir.model,name:base_crypt.model_res_users
|
||||
msgid "res.users"
|
||||
msgstr "res.users"
|
||||
|
||||
#. module: base_crypt
|
||||
#: constraint:res.users:0
|
||||
msgid "The chosen company is not in the allowed companies for this user"
|
||||
msgstr "Odabrana firma nije u dozvoljena firmama za ovog korisnika"
|
||||
|
||||
#. module: base_crypt
|
||||
#: code:addons/base_crypt/crypt.py:132
|
||||
#, python-format
|
||||
msgid "Please specify the password !"
|
||||
msgstr "Molimo odredite lozinku"
|
||||
|
||||
#. module: base_crypt
|
||||
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
|
||||
msgid "Base - Password Encryption"
|
||||
msgstr "Baza - Šifrovanje lozinke"
|
||||
|
||||
#. module: base_crypt
|
||||
#: code:addons/base_crypt/crypt.py:132
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgstr "Greška"
|
||||
|
||||
#. module: base_crypt
|
||||
#: model:ir.module.module,description:base_crypt.module_meta_information
|
||||
msgid ""
|
||||
"This module replaces the cleartext password in the database with a password "
|
||||
"hash,\n"
|
||||
"preventing anyone from reading the original password.\n"
|
||||
"For your existing user base, the removal of the cleartext passwords occurs "
|
||||
"the first time\n"
|
||||
"a user logs into the database, after installing base_crypt.\n"
|
||||
"After installing this module it won't be possible to recover a forgotten "
|
||||
"password for your\n"
|
||||
"users, the only solution is for an admin to set a new password.\n"
|
||||
"\n"
|
||||
"Note: installing this module does not mean you can ignore basic security "
|
||||
"measures,\n"
|
||||
"as the password is still transmitted unencrypted on the network (by the "
|
||||
"client),\n"
|
||||
"unless you are using a secure protocol such as XML-RPCS.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"Ovaj modul zamenjuje vidljivu lozinku u bazi podataka znacima,\n"
|
||||
"što onemogućava bilo koga da pročita originalnu lozinku.\n"
|
||||
"Što se tiče Vaše baze podataka, ukidanje vidljive lozinke dešava se prvi put "
|
||||
"pošto se korisnik prijavi u bazu podataka, po instalaciji base_crypt.\n"
|
||||
"Po instalaciji ovog modula neće biti moguće izmeniti zaboravljenu lozinku za "
|
||||
"Vaše korisnike, jedino rešenje će biti da im administrator postavi novu "
|
||||
"lozinku.\n"
|
||||
"\n"
|
||||
"Beleška: Instaliranje ovog modula ne znači da možete ignorisati osnovne "
|
||||
"sigurnosne mere,\n"
|
||||
"budući da se lozinka i dalje prenosi nešifrovana u mreži (od strane "
|
||||
"klijenta),\n"
|
||||
"ukoliko ne koristite siguran protokol kao XML-RPCS.\n"
|
||||
" "
|
||||
@@ -21,7 +21,7 @@
|
||||
{
|
||||
'name': 'Create IBAN bank accounts',
|
||||
'version': '1.0',
|
||||
'category': 'Finance',
|
||||
'category': 'Hidden',
|
||||
'complexity': "easy",
|
||||
'description': """
|
||||
This module installs the base for IBAN (International Bank Account Number) bank accounts and checks for its validity.
|
||||
|
||||
@@ -8,19 +8,19 @@ 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: 2010-12-23 15:48+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"PO-Revision-Date: 2011-10-05 13:32+0000\n"
|
||||
"Last-Translator: Milan Milosevic <Unknown>\n"
|
||||
"Language-Team: Serbian latin <sr@latin@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-09-05 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 13830)\n"
|
||||
"X-Launchpad-Export-Date: 2011-10-06 04:36+0000\n"
|
||||
"X-Generator: Launchpad (build 14085)\n"
|
||||
|
||||
#. module: base_iban
|
||||
#: model:ir.module.module,shortdesc:base_iban.module_meta_information
|
||||
msgid "Create IBAN bank accounts"
|
||||
msgstr "Kreiraj IBAN nalog banke"
|
||||
msgstr "Napravi IBAN nalog banke"
|
||||
|
||||
#. module: base_iban
|
||||
#: code:addons/base_iban/base_iban.py:120
|
||||
@@ -28,7 +28,7 @@ msgstr "Kreiraj IBAN nalog banke"
|
||||
msgid ""
|
||||
"The IBAN does not seems to be correct. You should have entered something "
|
||||
"like this %s"
|
||||
msgstr "IBAN izgleda da nije ispravan. TRebas uneti nesto nalik na %s"
|
||||
msgstr "IBAN izgleda da nije ispravan. Trebalo je uneti nešto kao %s"
|
||||
|
||||
#. module: base_iban
|
||||
#: model:res.partner.bank.type.field,name:base_iban.bank_zip_field
|
||||
@@ -43,7 +43,7 @@ msgstr "Međunarodni broj Bankovnog računa"
|
||||
#. module: base_iban
|
||||
#: model:ir.model,name:base_iban.model_res_partner_bank
|
||||
msgid "Bank Accounts"
|
||||
msgstr "Bankovni Računi"
|
||||
msgstr "Bankovni računi"
|
||||
|
||||
#. module: base_iban
|
||||
#: model:res.partner.bank.type.field,name:base_iban.bank_country_field
|
||||
@@ -64,7 +64,7 @@ msgstr "iban"
|
||||
#: code:addons/base_iban/base_iban.py:121
|
||||
#, python-format
|
||||
msgid "The IBAN is invalid, It should begin with the country code"
|
||||
msgstr "IBAN je neispravan, trebalo bi da pocinje sa kodom zemlje"
|
||||
msgstr "IBAN je neispravan, trebalo bi da počinje sa kodom zemlje"
|
||||
|
||||
#. module: base_iban
|
||||
#: field:res.partner.bank,iban:0
|
||||
@@ -74,7 +74,7 @@ msgstr "IBAN"
|
||||
#. module: base_iban
|
||||
#: model:res.partner.bank.type,name:base_iban.bank_iban
|
||||
msgid "IBAN Account"
|
||||
msgstr "IBAN konto"
|
||||
msgstr "IBAN račun"
|
||||
|
||||
#. module: base_iban
|
||||
#: model:ir.module.module,description:base_iban.module_meta_information
|
||||
@@ -85,11 +85,16 @@ msgid ""
|
||||
"\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Ovaj modul instalira bazu za IBAN (Međunarodni broj bankovnog računa) "
|
||||
"bankovne račune i proverava im validnost.\n"
|
||||
"\n"
|
||||
" "
|
||||
|
||||
#. module: base_iban
|
||||
#: model:res.partner.bank.type.field,name:base_iban.bank_acc_number_field
|
||||
msgid "acc_number"
|
||||
msgstr "Broj konta"
|
||||
msgstr "acc_number"
|
||||
|
||||
#~ msgid "Invalid XML for View Architecture!"
|
||||
#~ msgstr "Nevažeći XML za pregled arhitekture"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
{
|
||||
'name': 'Module Technical Guide in Restructured Text ',
|
||||
'version': '1.0',
|
||||
'category': 'Tools',
|
||||
'category': 'Hidden',
|
||||
'description': """
|
||||
This module generates the Technical Guides of selected modules in Restructured Text format (RST).
|
||||
=================================================================================================
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{
|
||||
'name': 'Base module quality - To check the quality of other modules' ,
|
||||
'version': '1.0',
|
||||
'category': 'Tools',
|
||||
'category': 'Hidden',
|
||||
'description': """
|
||||
The aim of this module is to check the quality of other modules.
|
||||
================================================================
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{
|
||||
'name': 'Module Record',
|
||||
'version': '1.0',
|
||||
'category': 'Tools',
|
||||
'category': 'Hidden',
|
||||
'description': """
|
||||
This module allows you to create a new module without any development.
|
||||
======================================================================
|
||||
|
||||
@@ -8,24 +8,24 @@ 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: 2010-12-23 10:53+0000\n"
|
||||
"Last-Translator: qdp (OpenERP) <qdp-launchpad@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2011-10-05 13:53+0000\n"
|
||||
"Last-Translator: Milan Milosevic <Unknown>\n"
|
||||
"Language-Team: Serbian <sr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2011-09-05 05:10+0000\n"
|
||||
"X-Generator: Launchpad (build 13830)\n"
|
||||
"X-Launchpad-Export-Date: 2011-10-06 04:36+0000\n"
|
||||
"X-Generator: Launchpad (build 14085)\n"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,info,category:0
|
||||
msgid "Category"
|
||||
msgstr "Категорија"
|
||||
msgstr "Kategorija"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_view:base_module_record.module_record_objects,save:0
|
||||
msgid "Information"
|
||||
msgstr "Informacija"
|
||||
msgstr "Informacije"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_view:base_module_record.module_record_objects,save:0
|
||||
@@ -34,9 +34,9 @@ msgid ""
|
||||
"publish it on OpenERP.com, in the 'Modules' section. You can do it through "
|
||||
"the website or using features of the 'base_module_publish' module."
|
||||
msgstr ""
|
||||
"Ako mislite da vas modul moze zainteresovati i druge ljude, mozete ga "
|
||||
"publikovati na OpenERP.com u sekciji 'Moduli'. To mozete uciniti preko "
|
||||
"websajta ili koristeci mogucnosti modula 'base_module_publish' ."
|
||||
"Ako mislite da Vaš modul može zainteresovati i druge ljude, Voleli bismo da "
|
||||
"ga objabvite na OpenERP.com u sekciji 'Moduli'. To možete učiniti preko "
|
||||
"vebsajta ili koristeći mogućnosti modula 'base_module_publish' ."
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_button:base_module_record.module_record_data,info,end:0
|
||||
@@ -48,7 +48,7 @@ msgstr "Kraj"
|
||||
#: wizard_view:base_module_record.module_record_data,init:0
|
||||
#: wizard_view:base_module_record.module_record_objects,init:0
|
||||
msgid "Choose objects to record"
|
||||
msgstr "Izaberi objekat za cuvanje"
|
||||
msgstr "Izaberi stavke za čuvanje"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,info,author:0
|
||||
@@ -58,13 +58,13 @@ msgstr "Autor"
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,info,directory_name:0
|
||||
msgid "Directory Name"
|
||||
msgstr "Ime Direktorijuma"
|
||||
msgstr "Ime fascikle"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_data,init,filter_cond:0
|
||||
#: wizard_field:base_module_record.module_record_objects,init,filter_cond:0
|
||||
msgid "Records only"
|
||||
msgstr "Samo Zapisi"
|
||||
msgstr "Samo zapisi"
|
||||
|
||||
#. module: base_module_record
|
||||
#: model:ir.model,name:base_module_record.model_ir_module_record
|
||||
@@ -74,12 +74,12 @@ msgstr "ir.module.record"
|
||||
#. module: base_module_record
|
||||
#: selection:base_module_record.module_record_objects,info,data_kind:0
|
||||
msgid "Demo Data"
|
||||
msgstr "Demo Podaci"
|
||||
msgstr "Demo podaci"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,save,module_filename:0
|
||||
msgid "Filename"
|
||||
msgstr "Ime Fajla"
|
||||
msgstr "Ime datoteke"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,info,version:0
|
||||
@@ -92,7 +92,7 @@ msgstr "Verzija"
|
||||
#: wizard_view:base_module_record.module_record_data,save_yaml:0
|
||||
#: wizard_view:base_module_record.module_record_objects,init:0
|
||||
msgid "Objects Recording"
|
||||
msgstr "Objekti se Snimaju"
|
||||
msgstr "Zapisi stavki"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_data,init,check_date:0
|
||||
@@ -107,29 +107,29 @@ msgstr "Zapis od Datuma"
|
||||
#: wizard_view:base_module_record.module_record_objects,save:0
|
||||
#: wizard_view:base_module_record.module_record_objects,save_yaml:0
|
||||
msgid "Module Recording"
|
||||
msgstr "Snimanje Modula"
|
||||
msgstr "Zapisivanje modula"
|
||||
|
||||
#. module: base_module_record
|
||||
#: model:ir.actions.wizard,name:base_module_record.wizard_base_module_record_objects
|
||||
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_module_record_objects
|
||||
msgid "Export Customizations As a Module"
|
||||
msgstr "Izvezi Podesavanja kao Modul"
|
||||
msgstr "Izvezi podešavanja kao modul"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_view:base_module_record.module_record_objects,save:0
|
||||
msgid "Thanks in advance for your contribution."
|
||||
msgstr "Hvala unaprijed na Vašem Doprinosu"
|
||||
msgstr "Hvala unapred na Vašem doprinosu"
|
||||
|
||||
#. module: base_module_record
|
||||
#: help:base_module_record.module_record_data,init,objects:0
|
||||
#: help:base_module_record.module_record_objects,init,objects:0
|
||||
msgid "List of objects to be recorded"
|
||||
msgstr "Lista Objekata za zapis"
|
||||
msgstr "Spisak stavki za zapis"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,info,description:0
|
||||
msgid "Full Description"
|
||||
msgstr "Puni Opis"
|
||||
msgstr "Puni opis"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,info,name:0
|
||||
@@ -140,63 +140,63 @@ msgstr "Naziv Modula"
|
||||
#: wizard_field:base_module_record.module_record_data,init,objects:0
|
||||
#: wizard_field:base_module_record.module_record_objects,init,objects:0
|
||||
msgid "Objects"
|
||||
msgstr "Objekti"
|
||||
msgstr "Stavka"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,save,module_file:0
|
||||
#: wizard_field:base_module_record.module_record_objects,save_yaml,yaml_file:0
|
||||
msgid "Module .zip File"
|
||||
msgstr ".zip datoteka Modula"
|
||||
msgstr ".zip datoteka modula"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_view:base_module_record.module_record_objects,save:0
|
||||
msgid "Module successfully created !"
|
||||
msgstr "Modul uspješno kreiran !"
|
||||
msgstr "Modul uspešno napravljen !"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_view:base_module_record.module_record_objects,save_yaml:0
|
||||
msgid "YAML file successfully created !"
|
||||
msgstr "YAML fajl je uspesno kreiran !"
|
||||
msgstr "YAML datoteka uspešno napravljena !"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_view:base_module_record.module_record_data,info:0
|
||||
#: wizard_view:base_module_record.module_record_data,save_yaml:0
|
||||
msgid "Result, paste this to your module's xml"
|
||||
msgstr "Rezultat, zalepi ovo u tvoj xml modul"
|
||||
msgstr "Rezultat, zalepite ovo u Vaš xml modul"
|
||||
|
||||
#. module: base_module_record
|
||||
#: selection:base_module_record.module_record_data,init,filter_cond:0
|
||||
#: selection:base_module_record.module_record_objects,init,filter_cond:0
|
||||
msgid "Created"
|
||||
msgstr "Kreirano"
|
||||
msgstr "Napravljeno"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_view:base_module_record.module_record_data,end:0
|
||||
#: wizard_view:base_module_record.module_record_objects,end:0
|
||||
msgid "Thanks For using Module Recorder"
|
||||
msgstr "Hvala što ste koristili Snimač Modula"
|
||||
msgstr "Hvala što ste koristili Zapisivač modula"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,info,website:0
|
||||
msgid "Documentation URL"
|
||||
msgstr "URL Dokumentacije"
|
||||
msgstr "URL Dokumentacija"
|
||||
|
||||
#. module: base_module_record
|
||||
#: selection:base_module_record.module_record_data,init,filter_cond:0
|
||||
#: selection:base_module_record.module_record_objects,init,filter_cond:0
|
||||
msgid "Modified"
|
||||
msgstr "Izmenjen"
|
||||
msgstr "Izmenjeno"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_button:base_module_record.module_record_data,init,record:0
|
||||
#: wizard_button:base_module_record.module_record_objects,init,record:0
|
||||
msgid "Record"
|
||||
msgstr "Snima"
|
||||
msgstr "Zapis"
|
||||
|
||||
#. module: base_module_record
|
||||
#: model:ir.module.module,shortdesc:base_module_record.module_meta_information
|
||||
msgid "Module Record"
|
||||
msgstr "Snimanje Modula"
|
||||
msgstr "Zapisivanje modula"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_button:base_module_record.module_record_objects,info,save:0
|
||||
@@ -207,13 +207,13 @@ msgstr "Nastavi"
|
||||
#: model:ir.actions.wizard,name:base_module_record.wizard_base_module_record_data
|
||||
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_module_record_data
|
||||
msgid "Export Customizations As Data File"
|
||||
msgstr "Eksportuj POdesavanja kao Data fajl"
|
||||
msgstr "Izvezi podešavanja kao data datoteku"
|
||||
|
||||
#. module: base_module_record
|
||||
#: code:addons/base_module_record/wizard/base_module_save.py:129
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgstr "Greska"
|
||||
msgstr "Greška"
|
||||
|
||||
#. module: base_module_record
|
||||
#: selection:base_module_record.module_record_objects,info,data_kind:0
|
||||
@@ -224,12 +224,12 @@ msgstr "Obični podaci"
|
||||
#: wizard_button:base_module_record.module_record_data,end,end:0
|
||||
#: wizard_button:base_module_record.module_record_objects,end,end:0
|
||||
msgid "OK"
|
||||
msgstr "U redu"
|
||||
msgstr "OK"
|
||||
|
||||
#. module: base_module_record
|
||||
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_mod_rec
|
||||
msgid "Module Creation"
|
||||
msgstr "Kreacija Modula"
|
||||
msgstr "Pravljenje Modula"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_objects,info,data_kind:0
|
||||
@@ -239,7 +239,7 @@ msgstr "Tip Podataka"
|
||||
#. module: base_module_record
|
||||
#: wizard_view:base_module_record.module_record_objects,info:0
|
||||
msgid "Module Information"
|
||||
msgstr "Informacija o Modulu"
|
||||
msgstr "Informacija o modulu"
|
||||
|
||||
#. module: base_module_record
|
||||
#: wizard_field:base_module_record.module_record_data,init,info_yaml:0
|
||||
@@ -296,6 +296,26 @@ msgid ""
|
||||
"module.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Ovaj modul omogućava da napravite novi modul bez ikakvog razvoja.\n"
|
||||
"Zapisuje sve operacije na stavkama za vreme sesija zapisivanaj i\n"
|
||||
"pravi .ZIP modul. Tako da možete napraviti sopstvene module direknto iz\n"
|
||||
"OpenERP klijenta.\n"
|
||||
"\n"
|
||||
"Ova verzija radi za pravljenje i izmenu postojećih zapisa. Iznova "
|
||||
"obračunava\n"
|
||||
"međuzavisnosti i veze između svih tipova vidžeta (man2one, many2many, ...).\n"
|
||||
"\n"
|
||||
"Ovo bi trebalo da Vam pomogne da lako pravite ponovo upotrebljive module, "
|
||||
"koje možete ponovo objaviti,\n"
|
||||
"za korisnička podešavanja i demo/testiranje podataka.\n"
|
||||
"\n"
|
||||
"Kako ga koristiti:\n"
|
||||
"Pokrenite Administration/Customization/Module Creation/Export Customizations "
|
||||
"kao pomoćni modul.\n"
|
||||
"Izaberite datum i vreme kao kriterijume za zapis i stavke za zapis i "
|
||||
"zapišite modul.\n"
|
||||
" "
|
||||
|
||||
#~ msgid ""
|
||||
#~ "The Object name must start with x_ and not contain any special character !"
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
{
|
||||
'name': 'Statistical Report Creator',
|
||||
'name': 'Query Builder',
|
||||
'version': '1.0',
|
||||
'category': 'Tools',
|
||||
'category': 'Advanced Reporting',
|
||||
'complexity': "expert",
|
||||
'description': """
|
||||
This module allows you to create any statistic report on several objects.
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
{
|
||||
'name': 'OpenOffice Report Designer Interface',
|
||||
'name': 'OpenOffice Report Designer',
|
||||
'version': '0.1',
|
||||
'category': 'Tools',
|
||||
'category': 'Advanced Reporting',
|
||||
'complexity': "normal",
|
||||
'description': """
|
||||
This module is used along with OpenERP OpenOffice Plugin.
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<button colspan="1" icon="gtk-close" special="cancel" string="_Close" invisible="not context.get('menu',False)"/>
|
||||
<button name="action_next" icon="gtk-go-forward" type="object" string="Configure" colspan="1" invisible="context.get('menu',False)"/>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Skip']" position="replace">
|
||||
<button name="action_skip" icon="gtk-jump-to" special="cancel" type="object" string="Skip" colspan="1" invisible="context.get('menu',False)"/>
|
||||
<xpath expr="//button[@string='Cancel']" position="replace">
|
||||
<button name="action_skip" icon="gtk-jump-to" special="cancel" type="object" string="Cancel" colspan="1" invisible="context.get('menu',False)"/>
|
||||
</xpath>
|
||||
<xpath expr="//separator[@string="vsep"]" position="attributes">
|
||||
<attribute name="string"/>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{
|
||||
'name': 'Base Setup',
|
||||
'version': '1.0',
|
||||
'category': 'Tools',
|
||||
'category': 'Hidden',
|
||||
'complexity': "easy",
|
||||
'description': """
|
||||
This module helps to configure the system at the installation of a new database.
|
||||
|
||||
@@ -20,123 +20,300 @@
|
||||
##############################################################################
|
||||
import pytz
|
||||
|
||||
import simplejson
|
||||
import cgi
|
||||
import pooler
|
||||
import tools
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
from lxml import etree
|
||||
|
||||
#Application and feature chooser, this could be done by introspecting ir.modules
|
||||
DEFAULT_MODULES = {
|
||||
'Customer Relationship Management' : ['crm',],
|
||||
'Sales Management' : ['sale',],
|
||||
'Project Management' : ['project',],
|
||||
'Knowledge Management' : ['document',],
|
||||
'Warehouse Management' : ['stock',],
|
||||
'Manufacturing' : ['mrp', 'procurement'],
|
||||
'Accounting & Finance' : ['account'],
|
||||
'Purchase Management' : ['purchase'],
|
||||
'Human Resources' : ['hr',],
|
||||
'Point of Sales' : ['pos',],
|
||||
'Marketing' : ['marketing',],
|
||||
}
|
||||
|
||||
class base_setup_installer(osv.osv_memory):
|
||||
_name = 'base.setup.installer'
|
||||
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
_install_if = {
|
||||
('sale','crm'): ['sale_crm'],
|
||||
('sale','project'): ['project_mrp'],
|
||||
}
|
||||
_columns = {
|
||||
# Generic modules
|
||||
'crm':fields.boolean('Customer Relationship Management',
|
||||
help="Helps you track and manage relations with customers such as"
|
||||
" leads, requests or issues. Can automatically send "
|
||||
"reminders, escalate requests or trigger business-specific "
|
||||
"actions based on standard events."),
|
||||
'sale':fields.boolean('Sales Management',
|
||||
help="Helps you handle your quotations, sale orders and invoicing"
|
||||
"."),
|
||||
'project':fields.boolean('Project Management',
|
||||
help="Helps you manage your projects and tasks by tracking them, "
|
||||
"generating plannings, etc..."),
|
||||
'knowledge':fields.boolean('Knowledge Management',
|
||||
help="Lets you install addons geared towards sharing knowledge "
|
||||
"with and between your employees."),
|
||||
'stock':fields.boolean('Warehouse Management',
|
||||
help="Helps you manage your inventory and main stock operations: delivery orders, receptions, etc."),
|
||||
'mrp':fields.boolean('Manufacturing',
|
||||
help="Helps you manage your manufacturing processes and generate "
|
||||
"reports on those processes."),
|
||||
'account_voucher':fields.boolean('Invoicing & Payments',
|
||||
help="Allows you to create your invoices and track the payments. It is an easier version of the accounting module for managers who are not accountants."),
|
||||
'account_accountant':fields.boolean('Accounting & Finance',
|
||||
help="Helps you handle your accounting needs, if you are not an accountant, we suggest you to install only the Invoicing "),
|
||||
'purchase':fields.boolean('Purchase Management',
|
||||
help="Helps you manage your purchase-related processes such as "
|
||||
"requests for quotations, supplier invoices, etc..."),
|
||||
'hr':fields.boolean('Human Resources',
|
||||
help="Helps you manage your human resources by encoding your employees structure, generating work sheets, tracking attendance and more."),
|
||||
'point_of_sale':fields.boolean('Point of Sales',
|
||||
help="Helps you get the most out of your points of sales with "
|
||||
"fast sale encoding, simplified payment mode encoding, "
|
||||
"automatic picking lists generation and more."),
|
||||
'marketing':fields.boolean('Marketing',
|
||||
help="Helps you manage your marketing campaigns step by step."),
|
||||
'profile_tools':fields.boolean('Extra Tools',
|
||||
help="Lets you install various interesting but non-essential tools "
|
||||
"like Survey, Lunch and Ideas box."),
|
||||
'report_designer':fields.boolean('Advanced Reporting',
|
||||
help="Lets you install various tools to simplify and enhance "
|
||||
"OpenERP's report creation."),
|
||||
# Vertical modules
|
||||
'product_expiry':fields.boolean('Food Industry',
|
||||
help="Installs a preselected set of OpenERP applications "
|
||||
"which will help you manage your industry."),
|
||||
'association':fields.boolean('Associations',
|
||||
help="Installs a preselected set of OpenERP "
|
||||
"applications which will help you manage your association "
|
||||
"more efficiently."),
|
||||
'auction':fields.boolean('Auction Houses',
|
||||
help="Installs a preselected set of OpenERP "
|
||||
"applications selected to help you manage your auctions "
|
||||
"as well as the business processes around them."),
|
||||
'selection' : fields.text('Selection'),
|
||||
}
|
||||
|
||||
def fields_get(self, cr, uid, fields=None, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if fields is None:
|
||||
fields = {}
|
||||
|
||||
fields = {}
|
||||
category_proxy = self.pool.get('ir.module.category')
|
||||
domain = [('parent_id', '=', False),
|
||||
('name', '!=', 'Uncategorized'),
|
||||
('visible', '=', True)]
|
||||
category_ids = category_proxy.search(cr, uid, domain, context=context)
|
||||
for category in category_proxy.browse(cr, uid, category_ids, context=context):
|
||||
category_name = 'category_%d' % (category.id,)
|
||||
fields[category_name] = {
|
||||
'type' : 'boolean',
|
||||
'string' : category.name,
|
||||
'name' : category_name,
|
||||
'help' : category.description,
|
||||
}
|
||||
|
||||
module_proxy = self.pool.get('ir.module.module')
|
||||
module_ids = module_proxy.search(cr, uid, [], context=context)
|
||||
for module in module_proxy.browse(cr, uid, module_ids, context=context):
|
||||
module_name = 'module_%d' % (module.id,)
|
||||
module_is_installed = module.state == 'installed'
|
||||
|
||||
fields[module_name] = {
|
||||
'type' : 'boolean',
|
||||
'string' : module.shortdesc,
|
||||
'name' : module_name,
|
||||
'help' : module.description,
|
||||
}
|
||||
|
||||
return fields
|
||||
|
||||
def default_get(self, cr, uid, fields=None, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if fields is None:
|
||||
fields = {}
|
||||
|
||||
result = {}
|
||||
|
||||
if 'dont_compute_virtual_attributes' not in context:
|
||||
module_proxy = self.pool.get('ir.module.module')
|
||||
module_ids = module_proxy.search(cr, uid, [], context=context)
|
||||
for module in module_proxy.browse(cr, uid, module_ids, context=context):
|
||||
result['module_%d' % (module.id,)] = module.state == 'installed'
|
||||
|
||||
cat_proxy = self.pool.get('ir.module.category')
|
||||
cat_ids = cat_proxy.search(cr, uid, [], context=context)
|
||||
for cat in cat_proxy.browse(cr, uid, cat_ids, context=context):
|
||||
m = DEFAULT_MODULES.get(cat.name,[])
|
||||
r = module_proxy.search(cr, uid, [('state','=','installed'),('name','in',m)])
|
||||
result['category_%d' % (cat.id,)] = bool(r)
|
||||
|
||||
return result
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='from', context=None, toolbar=False, submenu=False):
|
||||
def in_extended_view_group(cr, uid, context=None):
|
||||
try:
|
||||
model, group_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'group_extended')
|
||||
except ValueError:
|
||||
return False
|
||||
return group_id in self.pool.get('res.users').read(cr, uid, uid, ['groups_id'], context=context)['groups_id']
|
||||
|
||||
result = super(base_setup_installer, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu)
|
||||
|
||||
module_category_proxy = self.pool.get('ir.module.category')
|
||||
domain = [('parent_id', '=', False),
|
||||
('name', '!=', 'Uncategorized'),
|
||||
('visible', '=', True)]
|
||||
module_category_ids = module_category_proxy.search(cr, uid, domain, context=context, order='sequence asc')
|
||||
|
||||
arch = ['<form string="%s">' % _('Automatic Base Setup')]
|
||||
arch.append('<separator string="%s" colspan="4" />' % _('Install Applications'))
|
||||
module_proxy = self.pool.get('ir.module.module')
|
||||
|
||||
extended_view = in_extended_view_group(cr, uid, context=context)
|
||||
|
||||
for module_category in module_category_proxy.browse(cr, uid, module_category_ids, context=context):
|
||||
domain = [('category_id', '=', module_category.id)]
|
||||
if not extended_view:
|
||||
domain.append(('complexity', '!=', 'expert'))
|
||||
|
||||
modules = module_proxy.browse(cr, uid, module_proxy.search(cr, uid, domain, context=context), context=context)
|
||||
if not modules:
|
||||
continue
|
||||
|
||||
m = DEFAULT_MODULES.get(module_category.name, [])
|
||||
r = module_proxy.search(cr, uid, [('state', '=', 'installed'),('name', 'in', m)], context=context)
|
||||
readonly = bool(r)
|
||||
|
||||
attributes = {
|
||||
'name' : 'category_%d' % (module_category.id,),
|
||||
'on_change' : 'on_change_%s_%d(category_%d)' % ('category', module_category.id, module_category.id,),
|
||||
}
|
||||
if readonly:
|
||||
attributes['modifiers'] = simplejson.dumps({'readonly' : True})
|
||||
|
||||
arch.append("""<field %s />""" % (" ".join(["%s='%s'" % (key, value,)
|
||||
for key, value in attributes.iteritems()]),))
|
||||
|
||||
# Compute the modules to show
|
||||
for module_category in module_category_proxy.browse(cr, uid, module_category_ids, context=context):
|
||||
domain = [('category_id', '=', module_category.id)]
|
||||
|
||||
if not extended_view:
|
||||
domain.append(('complexity', '!=', 'expert'))
|
||||
|
||||
default_modules = DEFAULT_MODULES.get(module_category.name, False)
|
||||
if default_modules:
|
||||
domain.append(('name', 'not in', default_modules))
|
||||
|
||||
modules = module_proxy.browse(cr, uid, module_proxy.search(cr, uid, domain, context=context), context=context)
|
||||
|
||||
if not modules:
|
||||
continue
|
||||
|
||||
modifiers = {
|
||||
'invisible' : [('category_%d' % (module_category.id), '=', False)],
|
||||
}
|
||||
module_modifiers = dict(modifiers)
|
||||
|
||||
arch.append("""<separator string="%s Features" colspan="4" modifiers='%s'/>""" % (
|
||||
cgi.escape(module_category.name),
|
||||
simplejson.dumps(modifiers))
|
||||
)
|
||||
|
||||
for module in modules:
|
||||
#module_modifiers['readonly'] = module.state == 'installed'
|
||||
|
||||
arch.append("""<field name="module_%d" modifiers='%s' />""" % (
|
||||
module.id,
|
||||
simplejson.dumps(module_modifiers))
|
||||
)
|
||||
|
||||
arch.append(
|
||||
'<separator colspan="4" />'
|
||||
'<group colspan="4" col="2">'
|
||||
'<button special="cancel" string="Cancel" icon="gtk-cancel" />'
|
||||
'<button string="Install Modules" type="object" name="apply_cb" icon="gtk-apply" />'
|
||||
'</group>'
|
||||
)
|
||||
|
||||
arch.append('</form>')
|
||||
|
||||
result['arch'] = ''.join(arch)
|
||||
return result
|
||||
|
||||
def __getattr__(self, name):
|
||||
if name.startswith('on_change_category_'):
|
||||
def proxy(cr, uid, ids, value, context=None):
|
||||
item = 'category_%s' % name[len('on_change_category_'):]
|
||||
return self._on_change_selection(cr, uid, ids, item, value, context=context)
|
||||
return proxy
|
||||
return getattr(super(base_setup_installer, self), name)
|
||||
|
||||
def _on_change_selection(self, cr, uid, ids, item, value, context=None):
|
||||
if not isinstance(item, basestring) or not value:
|
||||
return {}
|
||||
|
||||
if item.startswith('category_') or item.startswith('module_'):
|
||||
object_name, identifier = item.split('_')
|
||||
else:
|
||||
return {}
|
||||
|
||||
values = {
|
||||
}
|
||||
|
||||
def _if_knowledge(self, cr, uid, ids, context=None):
|
||||
if self.pool.get('res.users').browse(cr, uid, uid, context=context)\
|
||||
.view == 'simple':
|
||||
return ['document_ftp']
|
||||
return None
|
||||
#if object_name == 'category':
|
||||
# module_ids = self.pool.get('ir.module.module').search(cr, uid, [('category_id', '=', int(identifier))], context=context)
|
||||
# for module_id in module_ids:
|
||||
# values['module_%d' % module_id] = 1
|
||||
|
||||
def _if_misc_tools(self, cr, uid, ids, context=None):
|
||||
return ['profile_tools']
|
||||
return {'value': values}
|
||||
|
||||
def onchange_moduleselection(self, cr, uid, ids, *args, **kargs):
|
||||
value = {}
|
||||
# Calculate progress
|
||||
closed, total = self.get_current_progress(cr, uid)
|
||||
progress = round(100. * closed / (total + len(filter(None, args))))
|
||||
value.update({'progress':progress})
|
||||
if progress < 10.:
|
||||
progress = 10.
|
||||
|
||||
return {'value':value}
|
||||
def create(self, cr, uid, values, context=None):
|
||||
to_install = {'categories' : [], 'modules' : []}
|
||||
|
||||
for key, value in values.iteritems():
|
||||
if value == 1 and (key.startswith('module_') or key.startswith('category_')):
|
||||
kind, identifier = key.split('_')
|
||||
if kind == 'category':
|
||||
to_install['categories'].append(long(identifier))
|
||||
if kind == 'module':
|
||||
to_install['modules'].append(long(identifier))
|
||||
|
||||
values = {
|
||||
'selection' : simplejson.dumps(to_install),
|
||||
}
|
||||
context.update(dont_compute_virtual_attributes=True)
|
||||
return super(base_setup_installer, self).create(cr, uid, values, context=context)
|
||||
|
||||
def apply_cb(self, cr, uid, ids, context=None):
|
||||
category_proxy = self.pool.get('ir.module.category')
|
||||
for installer in self.browse(cr, uid, ids, context=context):
|
||||
to_install = simplejson.loads(installer.selection)
|
||||
|
||||
proxy = self.pool.get('ir.module.module')
|
||||
|
||||
module_ids = proxy.search(cr, uid, [('id', 'in', to_install['modules'])], context=context)
|
||||
modules = set(record['name']
|
||||
for record in proxy.read(cr, uid, module_ids, ['name'], context=context))
|
||||
|
||||
category_ids = category_proxy.search(cr, uid, [('id', 'in', to_install['categories'])], context=context)
|
||||
selected_categories = set(record['name']
|
||||
for record in category_proxy.read(cr, uid, category_ids, ['name'], context=context))
|
||||
|
||||
# FIXME: Use a workaround, but can do better
|
||||
for category_name, default_modules in DEFAULT_MODULES.iteritems():
|
||||
if category_name in selected_categories:
|
||||
modules.update(default_modules)
|
||||
|
||||
# Special Cases:
|
||||
# * project_mrp: the dependencies are sale, project, procurement, mrp_jit
|
||||
if 'sale' in modules and 'project' in modules:
|
||||
modules.add('project_mrp')
|
||||
|
||||
need_update = False
|
||||
module_ids = proxy.search(cr, uid, [('name', 'in', list(modules))], context=context)
|
||||
if module_ids:
|
||||
proxy.state_update(cr, uid, module_ids, 'to install', ['uninstalled'], context=context)
|
||||
need_update = True
|
||||
|
||||
category_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'module_category_hidden_link')
|
||||
while True and category_id:
|
||||
cr.execute("select id, name from ir_module_module m where category_id = %s \
|
||||
and (select count(d.id) from ir_module_module_dependency d \
|
||||
where d.module_id = m.id) = (select count(d.id) from \
|
||||
ir_module_module_dependency d inner join ir_module_module m2 on d.name = m2.name \
|
||||
where d.module_id=m.id and m2.state in %s ) and state = %s",
|
||||
(category_id[1], ('installed', 'to install', 'to upgrade', ), 'uninstalled',))
|
||||
inner_modules = [name for _, name in cr.fetchall()]
|
||||
|
||||
module_ids = proxy.search(cr, uid, [('name', 'in', inner_modules)], context=context)
|
||||
if not module_ids:
|
||||
break
|
||||
|
||||
modules.update(inner_modules)
|
||||
|
||||
proxy.state_update(cr, uid, module_ids, 'to install', ['uninstalled'], context=context)
|
||||
need_update = True
|
||||
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
module_pool = self.pool.get('ir.module.module')
|
||||
modules_selected = []
|
||||
datas = self.read(cr, uid, ids, context=context)[0]
|
||||
for mod in datas.keys():
|
||||
if mod in ('id', 'progress'):
|
||||
continue
|
||||
if datas[mod] == 1:
|
||||
modules_selected.append(mod)
|
||||
|
||||
module_ids = module_pool.search(cr, uid, [('name', 'in', modules_selected)], context=context)
|
||||
need_install = False
|
||||
for module in module_pool.browse(cr, uid, module_ids, context=context):
|
||||
if module.state == 'uninstalled':
|
||||
module_pool.state_update(cr, uid, [module.id], 'to install', ['uninstalled'], context)
|
||||
need_install = True
|
||||
cr.commit()
|
||||
elif module.state == 'installed':
|
||||
domain = [('name', 'in', list(modules)),
|
||||
('state', '=', 'installed')]
|
||||
for module in proxy.browse(cr, uid, proxy.search(cr, uid, domain, context=context), context):
|
||||
cr.execute("update ir_actions_todo set state='open' \
|
||||
from ir_model_data as data where data.res_id = ir_actions_todo.id \
|
||||
and ir_actions_todo.type='special'\
|
||||
and data.model = 'ir.actions.todo' and data.module=%s", (module.name, ))
|
||||
if need_install:
|
||||
self.pool = pooler.restart_pool(cr.dbname, update_module=True)[1]
|
||||
return
|
||||
from ir_model_data as data where data.res_id = ir_actions_todo.id \
|
||||
and ir_actions_todo.type='special'\
|
||||
and data.model = 'ir.actions.todo' and data.module=%s", (module.name, ))
|
||||
|
||||
if need_update:
|
||||
cr.commit()
|
||||
self.pool = pooler.restart_pool(cr.dbname, update_module=True)[1]
|
||||
|
||||
if 'html' in context:
|
||||
return {'type' : 'ir.actions.reload'}
|
||||
else:
|
||||
return {'type' : 'ir.actions.act_window_close'}
|
||||
|
||||
#Migrate data from another application Conf wiz
|
||||
|
||||
@@ -158,11 +335,10 @@ class product_installer(osv.osv_memory):
|
||||
_name = 'product.installer'
|
||||
_inherit = 'res.config'
|
||||
_columns = {
|
||||
'customers': fields.selection([('create','Create'), ('import','Import')], 'Customers', size=32, required=True, help="Import or create customers"),
|
||||
|
||||
'customers': fields.selection([('create','Create'), ('import','Import')], 'Customers', size=32, required=True, help="Import or create customers"),
|
||||
}
|
||||
_defaults = {
|
||||
'customers': 'create',
|
||||
'customers': 'create',
|
||||
}
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
@@ -247,19 +423,19 @@ class specify_partner_terminology(osv.osv_memory):
|
||||
_name = 'base.setup.terminology'
|
||||
_inherit = 'res.config'
|
||||
_columns = {
|
||||
'partner': fields.selection([('Customer','Customer'),
|
||||
('Client','Client'),
|
||||
('Member','Member'),
|
||||
('Patient','Patient'),
|
||||
('Partner','Partner'),
|
||||
('Donor','Donor'),
|
||||
('Guest','Guest'),
|
||||
('Tenant','Tenant')
|
||||
],
|
||||
'Choose how to call a Customer', required=True ),
|
||||
'partner': fields.selection([
|
||||
('Customer','Customer'),
|
||||
('Client','Client'),
|
||||
('Member','Member'),
|
||||
('Patient','Patient'),
|
||||
('Partner','Partner'),
|
||||
('Donor','Donor'),
|
||||
('Guest','Guest'),
|
||||
('Tenant','Tenant')
|
||||
], 'How do you call a Customer', required=True ),
|
||||
}
|
||||
_defaults={
|
||||
'partner' :'Partner',
|
||||
'partner' :'Customer',
|
||||
}
|
||||
|
||||
def make_translations(self, cr, uid, ids, name, type, src, value, res_id=0, context=None):
|
||||
|
||||
@@ -1,93 +1,35 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_base_setup_installer" model="ir.ui.view">
|
||||
<field name="name">base.setup.installer.view</field>
|
||||
<field name="model">base.setup.installer</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.res_config_installer"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Install Applications</attribute>
|
||||
</form>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Select the Applications you want your system to cover. If you are not sure about your exact needs at this stage, you can easily install them later.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//separator[@string="vsep"]" position="attributes">
|
||||
<attribute name="string"/>
|
||||
<attribute name="rowspan">15</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Install</attribute>
|
||||
</xpath>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Install Applications</attribute>
|
||||
</separator>
|
||||
<group colspan="8">
|
||||
<field name="crm" />
|
||||
<field name="sale" />
|
||||
<field name="project" />
|
||||
<field name="knowledge" />
|
||||
<field name="stock" />
|
||||
<field name="mrp" />
|
||||
<field name="account_voucher" />
|
||||
<field name="account_accountant" />
|
||||
<field name="purchase" />
|
||||
<field name="hr" />
|
||||
<field name="profile_tools" />
|
||||
<field name="marketing" groups="base.group_extended" />
|
||||
<field name="point_of_sale"/>
|
||||
<field name="report_designer" groups="base.group_extended" />
|
||||
<separator string="Install Specific Industry Applications" colspan="4"/>
|
||||
<field name="association" />
|
||||
<field name="auction" />
|
||||
<field name="product_expiry" />
|
||||
<group name="crm"/>
|
||||
<group name="sale"/>
|
||||
<group name="project"/>
|
||||
<group name="knowledge"/>
|
||||
<group name="mrp"/>
|
||||
<group name="account_accountant"/>
|
||||
<group name="purchase"/>
|
||||
<group name="hr"/>
|
||||
<group name="profile_tools"/>
|
||||
<group name="marketing"/>
|
||||
<group name="report_designer"/>
|
||||
<group name="association"/>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_base_setup_installer" model="ir.actions.act_window">
|
||||
<field name="name">Install Applications</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">base.setup.installer</field>
|
||||
<field name="view_id" ref="view_base_setup_installer"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<record id="base_setup_installer_todo" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_base_setup_installer"/>
|
||||
<field name="category_id" ref="base.category_administration_config"/>
|
||||
<field name="sequence">2</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_base_setup_installer_beta">
|
||||
<field name="name">Install Applications</field>
|
||||
<field name="res_model">base.setup.installer</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="action_start_configurator" model="ir.actions.server">
|
||||
<field name="name">Start Configuration</field>
|
||||
<field name="model_id" ref="base.model_ir_actions_todo"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code" eval="'# obj is a browse_record and will provide stupid ids to method\n' 'action = pool.get(\'ir.actions.todo\').action_launch(cr, uid, ' + str([ref('base_setup_installer_todo')]) + ', context=context)'"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Add More Features" action="action_start_configurator" id="menu_view_base_module_configuration" parent="base.menu_config" type="server" icon="STOCK_EXECUTE" sequence="100"/>
|
||||
<record id="ir_ui_view_sc_configuration" model="ir.ui.view_sc">
|
||||
<field name="name">Add More Features</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="res_id" ref="menu_view_base_module_configuration"/>
|
||||
</record>
|
||||
<record id="base_setup_installer_todo" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_base_setup_installer_beta" />
|
||||
<field name="category_id" ref="base.category_administration_config"/>
|
||||
<field name="sequence">2</field>
|
||||
</record>
|
||||
|
||||
<record id="action_start_configurator" model="ir.actions.server">
|
||||
<field name="name">Start Configuration</field>
|
||||
<field name="model_id" ref="base.model_ir_actions_todo"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code" eval="'# obj is a browse_record and will provide stupid ids to method\n' 'action = pool.get(\'ir.actions.todo\').action_launch(cr, uid, ' + str([ref('base_setup_installer_todo')]) + ', context=context)'"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Add More Features" action="action_start_configurator" id="menu_view_base_module_configuration" parent="base.menu_config" type="server" icon="STOCK_EXECUTE" sequence="100"/>
|
||||
<record id="ir_ui_view_sc_configuration" model="ir.ui.view_sc">
|
||||
<field name="name">Add More Features</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="res_id" ref="menu_view_base_module_configuration" />
|
||||
</record>
|
||||
|
||||
<!-- Import or create customers configartion view -->
|
||||
<record id="action_import_create_installer" model="ir.actions.act_window">
|
||||
@@ -113,13 +55,13 @@
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Define default users preferences</attribute>
|
||||
<attribute name="string">Define Users's Preferences</attribute>
|
||||
</form>
|
||||
<xpath expr="//separator[@string="title"]" position="attributes">
|
||||
<attribute name="string">Define default users preferences</attribute>
|
||||
<attribute name="string">Define Users's Preferences</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Specify default values. This will set the default values for each new user, each user is free to change his own preferences.</attribute>
|
||||
<attribute name="string">This will set the default preferences for all users. After this, each user will be able to update his own preferences.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//separator[@string="vsep"]" position="attributes">
|
||||
<attribute name="string"/>
|
||||
@@ -148,6 +90,7 @@
|
||||
<record id="config_action_user_preferences_config_form" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_user_preferences_config_form"/>
|
||||
<field name="category_id" ref="base.category_administration_config"/>
|
||||
<field name="type">once</field>
|
||||
</record>
|
||||
|
||||
<!-- Create Additional Users -->
|
||||
@@ -156,14 +99,13 @@
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.users</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="base.view_users_form"/>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
</record>
|
||||
<record id="config_wizard_action_config_user_form" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_config_access_other_user"/>
|
||||
<field name="category_id" ref="base.category_administration_config"/>
|
||||
<field name="sequence">1000</field>
|
||||
<field name="state">done</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -182,7 +124,7 @@
|
||||
<attribute name="string">Specify Your Terminology</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Based on the industry needs you can use this wizard to change the terminologies for Partners. </attribute>
|
||||
<attribute name="string">You can use this wizard to change the terminologies for customers in the whole application.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//separator[@string="vsep"]" position="attributes">
|
||||
<attribute name="string"/>
|
||||
@@ -208,6 +150,7 @@
|
||||
<record id="config_action_partner_terminology_config_form" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_partner_terminology_config_form"/>
|
||||
<field name="category_id" ref="base.category_administration_config"/>
|
||||
<field name="type">once</field>
|
||||
</record>
|
||||
|
||||
<!-- Company config -->
|
||||
@@ -225,21 +168,6 @@
|
||||
<field name="category_id" ref="base.category_administration_config"/>
|
||||
<field name="sequence">1</field>
|
||||
</record>
|
||||
<!-- register Upload Logo configuration wizard -->
|
||||
<record id="base_setup_company_logo_action" model="ir.actions.act_window">
|
||||
<field name="name">Upload Your Company Logo</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.company</field>
|
||||
<field name="view_id" ref="base.view_company_form"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="context">{'res_id': user.company_id.id}</field>
|
||||
</record>
|
||||
<record id="config_wizard_action_res_company_logo" model="ir.actions.todo">
|
||||
<field name="action_id" ref="base_setup_company_logo_action"/>
|
||||
<field name="category_id" ref="base.category_administration_config"/>
|
||||
<field name="state">done</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||