[MERGE]: Merge with lp:openobject-addons

bzr revid: mma@tinyerp.com-20121003101055-2phrkr59lefzu4co
This commit is contained in:
Mayur Maheshwari (OpenERP) 2012-10-03 15:40:55 +05:30
commit 5eb45dc4a8
1047 changed files with 6965 additions and 110173 deletions

View File

@ -31,7 +31,7 @@ import decimal_precision as dp
from tools.translate import _
from tools.float_utils import float_round
from openerp import SUPERUSER_ID
import tools
_logger = logging.getLogger(__name__)
@ -227,7 +227,7 @@ class account_account(osv.osv):
while pos < len(args):
if args[pos][0] == 'code' and args[pos][1] in ('like', 'ilike') and args[pos][2]:
args[pos] = ('code', '=like', str(args[pos][2].replace('%', ''))+'%')
args[pos] = ('code', '=like', tools.ustr(args[pos][2].replace('%', ''))+'%')
if args[pos][0] == 'journal_id':
if not args[pos][2]:
del args[pos]
@ -595,12 +595,15 @@ class account_account(osv.osv):
res.append((record['id'], name))
return res
def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False):
def copy(self, cr, uid, id, default=None, context=None, done_list=None, local=False):
if default is None:
default = {}
else:
default = default.copy()
if done_list is None:
done_list = []
account = self.browse(cr, uid, id, context=context)
new_child_ids = []
if not default:
default = {}
default = default.copy()
default.update(code=_("%s (copy)") % (account['code'] or ''))
if not local:
done_list = []
@ -682,7 +685,7 @@ class account_journal_view(osv.osv):
_name = "account.journal.view"
_description = "Journal View"
_columns = {
'name': fields.char('Journal View', size=64, required=True),
'name': fields.char('Journal View', size=64, required=True, translate=True),
'columns_id': fields.one2many('account.journal.column', 'view_id', 'Columns')
}
_order = "name"
@ -777,11 +780,14 @@ class account_journal(osv.osv):
(_check_currency, 'Configuration error!\nThe currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']),
]
def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False):
journal = self.browse(cr, uid, id, context=context)
if not default:
def copy(self, cr, uid, id, default=None, context=None, done_list=None, local=False):
if default is None:
default = {}
default = default.copy()
else:
default = default.copy()
if done_list is None:
done_list = []
journal = self.browse(cr, uid, id, context=context)
default.update(
code=_("%s (copy)") % (journal['code'] or ''),
name=_("%s (copy)") % (journal['name'] or ''),
@ -1178,7 +1184,7 @@ class account_fiscalyear(osv.osv):
'end_journal_period_id':fields.many2one('account.journal.period','End of Year Entries Journal', readonly=True),
}
def copy(self, cr, uid, id, default={}, context=None):
def copy(self, cr, uid, id, default=None, context=None):
default.update({
'period_ids': [],
'end_journal_period_id': False
@ -1437,9 +1443,15 @@ class account_move(osv.osv):
result = super(account_move, self).create(cr, uid, vals, context)
return result
def copy(self, cr, uid, id, default={}, context=None):
def copy(self, cr, uid, id, default=None, context=None):
if context is None:
default = {}
else:
default = default.copy()
if context is None:
context = {}
else:
context = context.copy()
default.update({
'state':'draft',
'name':'/',
@ -1908,7 +1920,7 @@ class account_tax(osv.osv):
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"),
'company_id': fields.many2one('res.company', 'Company', required=True),
'description': fields.char('Tax Code',size=32),
'description': fields.char('Tax Code'),
'price_include': fields.boolean('Tax Included in Price', help="Check this if the price you use on the product and invoices includes this tax."),
'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Application', required=True)
@ -2269,7 +2281,10 @@ class account_model(osv.osv):
_defaults = {
'legend': lambda self, cr, uid, context:_('You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s: To Specify Year \n%(month)s: To Specify Month \n%(date)s: Current Date\n\ne.g. My model on %(date)s'),
}
def generate(self, cr, uid, ids, datas={}, context=None):
def generate(self, cr, uid, ids, data=None, context=None):
if data is None:
data = {}
move_ids = []
entry = {}
account_move_obj = self.pool.get('account.move')
@ -2280,8 +2295,8 @@ class account_model(osv.osv):
if context is None:
context = {}
if datas.get('date', False):
context.update({'date': datas['date']})
if data.get('date', False):
context.update({'date': data['date']})
move_date = context.get('date', time.strftime('%Y-%m-%d'))
move_date = datetime.strptime(move_date,"%Y-%m-%d")
@ -2467,10 +2482,10 @@ class account_subscription_line(osv.osv):
all_moves = []
obj_model = self.pool.get('account.model')
for line in self.browse(cr, uid, ids, context=context):
datas = {
data = {
'date': line.date,
}
move_ids = obj_model.generate(cr, uid, [line.subscription_id.model_id.id], datas, context)
move_ids = obj_model.generate(cr, uid, [line.subscription_id.model_id.id], data, context)
tocheck[line.subscription_id.id] = True
self.write(cr, uid, [line.id], {'move_id':move_ids[0]})
all_moves.extend(move_ids)
@ -2518,7 +2533,7 @@ class account_account_template(osv.osv):
'reconcile': fields.boolean('Allow Reconciliation', help="Check this option if you want the user to reconcile entries in this account."),
'shortcut': fields.char('Shortcut', size=12),
'note': fields.text('Note'),
'parent_id': fields.many2one('account.account.template', 'Parent Account Template', ondelete='cascade'),
'parent_id': fields.many2one('account.account.template', 'Parent Account Template', ondelete='cascade', domain=[('type','=','view')]),
'child_parent_ids':fields.one2many('account.account.template', 'parent_id', 'Children'),
'tax_ids': fields.many2many('account.tax.template', 'account_account_template_tax_rel', 'account_id', 'tax_id', 'Default Taxes'),
'nocreate': fields.boolean('Optional create', help="If checked, the new chart of accounts will not contain this by default."),
@ -2536,20 +2551,6 @@ class account_account_template(osv.osv):
(_check_recursion, 'Error!\nYou cannot create recursive account templates.', ['parent_id']),
]
def create(self, cr, uid, vals, context=None):
if 'parent_id' in vals:
parent = self.read(cr, uid, [vals['parent_id']], ['type'])
if parent and parent[0]['type'] != 'view':
raise osv.except_osv(_('Warning!'), _("You may only select a parent account of type 'View'."))
return super(account_account_template, self).create(cr, uid, vals, context=context)
def write(self, cr, uid, ids, vals, context=None):
if 'parent_id' in vals:
parent = self.read(cr, uid, [vals['parent_id']], ['type'])
if parent and parent[0]['type'] != 'view':
raise osv.except_osv(_('Warning!'), _("You may only select a parent account of type 'View'."))
return super(account_account_template, self).write(cr, uid, ids, vals, context=context)
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
@ -2828,7 +2829,7 @@ class account_tax_template(osv.osv):
'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Include in Base Amount', help="Set if the amount of tax must be included in the base amount before computing the next taxes."),
'description': fields.char('Internal Name', size=32),
'description': fields.char('Internal Name'),
'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Use In', required=True,),
'price_include': fields.boolean('Tax Included in Price', help="Check this if the price you use on the product and invoices includes this tax."),
}
@ -3250,7 +3251,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
property_obj.create(cr, uid, vals, context=context)
return True
def _install_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, acc_ref={}, taxes_ref={}, tax_code_ref={}, context=None):
def _install_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, acc_ref=None, taxes_ref=None, tax_code_ref=None, context=None):
'''
This function recursively loads the template objects and create the real objects from them.
@ -3268,6 +3269,12 @@ class wizard_multi_charts_accounts(osv.osv_memory):
* a last identical containing the mapping of tax code templates and tax codes
:rtype: tuple(dict, dict, dict)
'''
if acc_ref is None:
acc_ref = {}
if taxes_ref is None:
taxes_ref = {}
if tax_code_ref is None:
tax_code_ref = {}
template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context)
if template.parent_id:
tmp1, tmp2, tmp3 = self._install_template(cr, uid, template.parent_id.id, company_id, code_digits=code_digits, acc_ref=acc_ref, taxes_ref=taxes_ref, tax_code_ref=tax_code_ref, context=context)
@ -3280,7 +3287,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
tax_code_ref.update(tmp3)
return acc_ref, taxes_ref, tax_code_ref
def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref={}, taxes_ref={}, tax_code_ref={}, context=None):
def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref=None, taxes_ref=None, tax_code_ref=None, context=None):
'''
This function generates all the objects from the templates
@ -3298,6 +3305,12 @@ class wizard_multi_charts_accounts(osv.osv_memory):
* a last identical containing the mapping of tax code templates and tax codes
:rtype: tuple(dict, dict, dict)
'''
if account_ref is None:
account_ref = {}
if taxes_ref is None:
taxes_ref = {}
if tax_code_ref is None:
tax_code_ref = {}
template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context)
obj_tax_code_template = self.pool.get('account.tax.code.template')
obj_acc_tax = self.pool.get('account.tax')

View File

@ -29,12 +29,12 @@ class bank(osv.osv):
'currency_id': fields.related('journal_id', 'currency', type="many2one", relation='res.currency', readonly=True,
string="Currency", help="Currency of the related account journal."),
}
def create(self, cr, uid, data, context={}):
def create(self, cr, uid, data, context=None):
result = super(bank, self).create(cr, uid, data, context=context)
self.post_write(cr, uid, [result], context=context)
return result
def write(self, cr, uid, ids, data, context={}):
def write(self, cr, uid, ids, data, context=None):
result = super(bank, self).write(cr, uid, ids, data, context=context)
self.post_write(cr, uid, ids, context=context)
return result
@ -53,7 +53,7 @@ class bank(osv.osv):
data['currency_name'] = data['currency_id'] and currency_name[data['currency_id'][0]] or ''
return super(bank, self)._prepare_name_get(cr, uid, bank_dicts, context=context)
def post_write(self, cr, uid, ids, context={}):
def post_write(self, cr, uid, ids, context=None):
if isinstance(ids, (int, long)):
ids = [ids]

View File

@ -457,6 +457,8 @@ class account_bank_statement(osv.osv):
return res and res[0] or 0.0
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context=None):
if not journal_id:
return {}
balance_start = self._compute_balance_end_real(cr, uid, journal_id, context=context)
journal_data = self.pool.get('account.journal').read(cr, uid, journal_id, ['default_debit_account_id', 'company_id'], context=context)

View File

@ -508,8 +508,10 @@ class account_invoice(osv.osv):
if journal_id:
journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
currency_id = journal.currency and journal.currency.id or journal.company_id.currency_id.id
company_id = journal.company_id.id
result = {'value': {
'currency_id': currency_id,
'company_id': company_id,
}
}
return result
@ -1306,17 +1308,19 @@ class account_invoice(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("%s <b>created</b>.") % (_(self._get_document_type(obj.type))), context=context)
self.message_post(cr, uid, [obj.id], body=_("%s <b>created</b>.") % (self._get_document_type(obj.type)),
subtype="account.mt_invoice_new", context=context)
def confirm_paid_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("%s <b>paid</b>.") % (_(self._get_document_type(obj.type))), context=context)
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("%s <b>paid</b>.") % (self._get_document_type(obj.type)),
subtype="account.mt_invoice_paid", context=context)
def invoice_cancel_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("%s <b>cancelled</b>.") % (_(self._get_document_type(obj.type))), context=context)
self.message_post(cr, uid, [obj.id], body=_("%s <b>cancelled</b>.") % (self._get_document_type(obj.type)),
context=context)
account_invoice()
class account_invoice_line(osv.osv):
@ -1371,7 +1375,10 @@ class account_invoice_line(osv.osv):
'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True)
}
def _default_account_id(self, cr, uid, ids, context=None):
def _default_account_id(self, cr, uid, context=None):
# XXX this gets the default account for the user's company,
# it should get the default account for the invoice's company
# however, the invoice's company does not reach this point
prop = self.pool.get('ir.property').get(cr, uid, 'property_account_income_categ', 'product.category', context=context)
return prop and prop.id or False
@ -1401,7 +1408,7 @@ class account_invoice_line(osv.osv):
context = {}
company_id = company_id if company_id != None else context.get('company_id',False)
context = dict(context)
context.update({'company_id': company_id})
context.update({'company_id': company_id, 'force_company': company_id})
if not partner_id:
raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") )
if not product:
@ -1556,16 +1563,19 @@ class account_invoice_line(osv.osv):
def onchange_account_id(self, cr, uid, ids, product_id, partner_id, inv_type, fposition_id, account_id):
if not account_id:
return {}
taxes = self.pool.get('account.account').browse(cr, uid, account_id).tax_ids
unique_tax_ids = []
fpos = fposition_id and self.pool.get('account.fiscal.position').browse(cr, uid, fposition_id) or False
tax_ids = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
product_change_result = self.product_id_change(cr, uid, ids, product_id, False, type=inv_type,
partner_id=partner_id, fposition_id=fposition_id)
unique_tax_ids = set(tax_ids)
if product_change_result and 'value' in product_change_result and 'invoice_line_tax_id' in product_change_result['value']:
unique_tax_ids |= set(product_change_result['value']['invoice_line_tax_id'])
return {'value':{'invoice_line_tax_id': list(unique_tax_ids)}}
account = self.pool.get('account.account').browse(cr, uid, account_id)
if not product_id:
taxes = account.tax_ids
unique_tax_ids = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
else:
product_change_result = self.product_id_change(cr, uid, ids, product_id, False, type=inv_type,
partner_id=partner_id, fposition_id=fposition_id,
company_id=account.company_id.id)
if product_change_result and 'value' in product_change_result and 'invoice_line_tax_id' in product_change_result['value']:
unique_tax_ids = product_change_result['value']['invoice_line_tax_id']
return {'value':{'invoice_line_tax_id': unique_tax_ids}}
account_invoice_line()
@ -1650,14 +1660,13 @@ class account_invoice_tax(osv.osv):
for line in inv.invoice_line:
for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, line.product_id, inv.partner_id)['taxes']:
tax['price_unit'] = cur_obj.round(cr, uid, cur, tax['price_unit'])
val={}
val['invoice_id'] = inv.id
val['name'] = tax['name']
val['amount'] = tax['amount']
val['manual'] = False
val['sequence'] = tax['sequence']
val['base'] = tax['price_unit'] * line['quantity']
val['base'] = cur_obj.round(cr, uid, cur, tax['price_unit'] * line['quantity'])
if inv.type in ('out_invoice','in_invoice'):
val['base_code_id'] = tax['base_code_id']

View File

@ -299,8 +299,8 @@
<button name="invoice_open" states="draft" string="Validate" class="oe_highlight"/>
<button name="invoice_open" states="proforma2" string="Validate"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" groups="account.group_proforma_invoices"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='paid'/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" groups="base.group_no_one"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='open,proforma2,paid'/>
<button name="invoice_cancel" states="draft,proforma2,open" string="Cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<!--button name="%(account_invoices)d" string="Print Invoice" type="action" states="open,paid,proforma,sale,proforma2"/-->

View File

@ -562,6 +562,7 @@ class account_move_line(osv.osv):
'journal_id': lambda self, cr, uid, c: c.get('journal_id', False),
'credit': 0.0,
'debit': 0.0,
'amount_currency': 0.0,
'account_id': lambda self, cr, uid, c: c.get('account_id', False),
'period_id': lambda self, cr, uid, c: c.get('period_id', False),
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.move.line', context=c)
@ -1104,7 +1105,7 @@ class account_move_line(osv.osv):
'has been confirmed.') % res[2])
return res
def _remove_move_reconcile(self, cr, uid, move_ids=[], context=None):
def _remove_move_reconcile(self, cr, uid, move_ids=None, context=None):
# Function remove move rencocile ids related with moves
obj_move_line = self.pool.get('account.move.line')
obj_move_rec = self.pool.get('account.move.reconcile')
@ -1193,12 +1194,12 @@ class account_move_line(osv.osv):
jour_period_obj = self.pool.get('account.journal.period')
cr.execute('SELECT state FROM account_journal_period WHERE journal_id = %s AND period_id = %s', (journal_id, period_id))
result = cr.fetchall()
journal = journal_obj.browse(cr, uid, journal_id, context=context)
period = period_obj.browse(cr, uid, period_id, context=context)
for (state,) in result:
if state == 'done':
raise osv.except_osv(_('Error!'), _('You cannot add/modify entries in a closed journal.'))
raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
if not result:
journal = journal_obj.browse(cr, uid, journal_id, context=context)
period = period_obj.browse(cr, uid, period_id, context=context)
jour_period_obj.create(cr, uid, {
'name': (journal.code or journal.name)+':'+(period.name or ''),
'journal_id': journal.id,

View File

@ -1305,16 +1305,6 @@
Account.Entry Edition
-->
<record id="account_move_graph" model="ir.ui.view">
<field name="name">account.move.graph</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar">
<field name="period_id"/>
<field name="amount" operator="+"/>
</graph>
</field>
</record>
<record id="view_move_tree" model="ir.ui.view">
<field name="name">account.move.tree</field>
<field name="model">account.move</field>
@ -1338,8 +1328,8 @@
<field name="arch" type="xml">
<form string="Account Entry" version="7.0">
<header>
<button name="button_validate" states="draft" string="Post" type="object" class="oe_highlight"/>
<button name="button_cancel" states="posted" string="Cancel" type="object"/>
<button name="button_validate" states="draft" string="Post" type="object" class="oe_highlight" groups="account.group_account_invoice"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" groups="account.group_account_invoice"/>
<field name="state" widget="statusbar"/>
</header>
<sheet string="Journal Entries" >
@ -1488,7 +1478,7 @@
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
<field name="help" type="html">
@ -2037,7 +2027,7 @@
src_model="account.journal"/>
<act_window
context="{'search_default_reconcile_id':False, 'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
context="{'search_default_unreconciled':True, 'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
domain="[('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]"
id="act_account_partner_account_move_all"
name="Receivables &amp; Payables"
@ -2073,7 +2063,7 @@
id="account_template_folder"
name="Templates"
parent="menu_finance_accounting"
groups="base.group_multi_company"/>
groups="account.group_account_manager"/>
<menuitem
id="account_template_taxes"
name="Taxes"

View File

@ -518,7 +518,6 @@
<!--
Account Statement Sequences
-->
<record id="sequence_reconcile" model="ir.sequence.type">
<field name="name">Account Reconcile</field>
<field name="code">account.reconcile</field>
@ -554,8 +553,6 @@
<field eval="1" name="number_next"/>
<field eval="1" name="number_increment"/>
</record>
<!--
Invoice requests (deprecated)
-->
@ -564,7 +561,14 @@
<field name="object">account.invoice</field>
</record>
<!-- mail: subtypes -->
<record id="mt_invoice_new" model="mail.message.subtype">
<field name="name">created</field>
<field name="res_model">account.invoice</field>
</record>
<record id="mt_invoice_paid" model="mail.message.subtype">
<field name="name">paid</field>
<field name="res_model">account.invoice</field>
</record>
</data>
</openerp>

View File

@ -44,17 +44,17 @@ class account_fiscal_position(osv.osv):
return []
if not fposition_id:
return map(lambda x: x.id, taxes)
result = []
result = set()
for t in taxes:
ok = False
for tax in fposition_id.tax_ids:
if tax.tax_src_id.id == t.id:
if tax.tax_dest_id:
result.append(tax.tax_dest_id.id)
result.add(tax.tax_dest_id.id)
ok=True
if not ok:
result.append(t.id)
return result
result.add(t.id)
return list(result)
def map_account(self, cr, uid, fposition_id, account_id, context=None):
if not fposition_id:
@ -77,6 +77,12 @@ class account_fiscal_position_tax(osv.osv):
'tax_dest_id': fields.many2one('account.tax', 'Replacement Tax')
}
_sql_constraints = [
('tax_src_dest_uniq',
'unique (position_id,tax_src_id,tax_dest_id)',
'A tax fiscal position could be defined only once time on same taxes.')
]
account_fiscal_position_tax()
class account_fiscal_position_account(osv.osv):
@ -89,6 +95,12 @@ class account_fiscal_position_account(osv.osv):
'account_dest_id': fields.many2one('account.account', 'Account Destination', domain=[('type','<>','view')], required=True)
}
_sql_constraints = [
('account_src_dest_uniq',
'unique (position_id,account_src_id,account_dest_id)',
'An account fiscal position could be defined only once time on same accounts.')
]
account_fiscal_position_account()
class res_partner(osv.osv):

View File

@ -92,34 +92,7 @@
<field name="debit"/>
</group>
</group>
<field name="bank_ids">
<form string="Bank account" version="7.0">
<group col="4">
<field name="state"/>
<field name="acc_number"/>
</group>
<group>
<group name="owner" string="Bank Account Owner">
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<field name="owner_name"/>
<label for="street" string="Address"/>
<div>
<field name="street" placeholder="Street..."/>
<div>
<field name="zip" class="oe_inline" placeholder="ZIP"/>
<field name="city" class="oe_inline" placeholder="City"/>
</div>
<field name="state_id" placeholder="State" options='{"no_open": true}'/>
<field name="country_id" placeholder="Country" options='{"no_open": true}'/>
</div>
</group>
<group name="bank" string="Information About the Bank">
<field name="bank" on_change="onchange_bank_id(bank)"/>
<field name="bank_name"/>
<field name="bank_bic" placeholder="e.g. GEBABEBB"/>
</group>
</group>
</form>
<field name="bank_ids" context="{'default_partner_id': active_id, 'form_view_ref': 'base.view_partner_bank_form'}">
<tree string="Bank Details">
<field name="sequence" invisible="1"/>
<field name="acc_number"/>
@ -141,7 +114,7 @@
context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
src_model="res.partner"
view_type="form"
view_mode="tree,form,graph,calendar"/>
view_mode="tree,form,calendar"/>
</data>
</openerp>

View File

@ -73,7 +73,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph,form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_analytic_account_tree"/>
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
</record>
@ -114,9 +114,6 @@
</field>
</record>
<menuitem groups="analytic.group_analytic_accounting" id="next_id_40"
name="Analytic" parent="account.menu_finance_generic_reporting"
sequence="4"/>
<record id="view_account_analytic_line_form" model="ir.ui.view">
<field name="name">account.analytic.line.form</field>
@ -351,15 +348,6 @@
# Reporting
#
<record id="action_account_analytic_journal_tree" model="ir.actions.act_window">
<field name="name">Print Analytic Journals</field>
<field name="res_model">account.analytic.journal</field>
<field name="view_type">tree</field>
<field name="help">To print an analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount.</field>
</record>
<menuitem groups="analytic.group_analytic_accounting"
action="action_account_analytic_journal_tree"
id="account_analytic_journal_print" parent="account.next_id_40"/>
<record id="view_account_journal_1" model="ir.ui.view">
<field name="name">account.journal.form.1</field>
@ -372,16 +360,5 @@
</field>
</record>
<record id="analytic_accounts_graph" model="ir.ui.view">
<field name="name">analytic.accounts.graph</field>
<field name="model">account.analytic.account</field>
<field name="arch" type="xml">
<graph string="Analytic Account Statistics" type="bar">
<field name="complete_name"/>
<field name="balance" operator="+"/>
</graph>
</field>
</record>
</data>
</openerp>

View File

@ -47,4 +47,4 @@ class account_analytic_chart(osv.osv_memory):
return result
account_analytic_chart()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -52,4 +52,4 @@ class account_analytic_inverted_balance(osv.osv_memory):
}
account_analytic_inverted_balance()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -29,6 +29,7 @@ class account_analytic_journal_report(osv.osv_memory):
_columns = {
'date1': fields.date('Start of period', required=True),
'date2': fields.date('End of period', required=True),
'analytic_account_journal_id': fields.many2many('account.analytic.journal', 'account_analytic_journal_name', 'journal_line_id', 'journal_print_id', 'Analytic Journals', required=True),
}
_defaults = {
@ -40,8 +41,15 @@ class account_analytic_journal_report(osv.osv_memory):
if context is None:
context = {}
data = self.read(cr, uid, ids)[0]
ids_list = []
if context.get('active_id',False):
ids_list.append(context.get('active_id',False))
else:
record = self.browse(cr,uid,ids[0],context=context)
for analytic_record in record.analytic_account_journal_id:
ids_list.append(analytic_record.id)
datas = {
'ids': context.get('active_ids',[]),
'ids': ids_list,
'model': 'account.analytic.journal',
'form': data
}
@ -50,6 +58,14 @@ class account_analytic_journal_report(osv.osv_memory):
'report_name': 'account.analytic.journal',
'datas': datas,
}
def default_get(self, cr, uid, fields, context=None):
if context is None:
context = {}
res = super(account_analytic_journal_report, self).default_get(cr, uid, fields, context=context)
if 'analytic_account_journal_id' in fields:
res.update({'analytic_account_journal_id': context.get('active_ids',[])})
return res
account_analytic_journal_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -7,15 +7,16 @@
<field name="model">account.analytic.journal.report</field>
<field name="arch" type="xml">
<form string="Select Period" version="7.0">
<header>
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</header>
<group col="4">
<field name="date1"/>
<field name="date2"/>
<field name="analytic_account_journal_id" widget="many2many_tags" class="oe_inline" required="1"/>
</group>
<footer>
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field>
</record>
@ -38,6 +39,13 @@
<field name="key">action</field>
<field name="model">account.analytic.journal</field>
</record>
<menuitem groups="analytic.group_analytic_accounting" id="next_id_40"
name="Analytic" parent="account.menu_finance_generic_reporting"
sequence="4"/>
<menuitem groups="analytic.group_analytic_accounting"
action="account.action_account_analytic_journal"
id="account_analytic_journal_print" parent="account.next_id_40"/>
</data>
</openerp>

View File

@ -55,4 +55,4 @@ class project_account_analytic_line(osv.osv_memory):
project_account_analytic_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -68,7 +68,7 @@ class account_balance(report_sxw.rml_parse, common_report_header):
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
return super(account_balance ,self)._get_account(data)
def lines(self, form, ids=[], done=None):#, level=1):
def lines(self, form, ids=None, done=None):
def _process_child(accounts, disp_acc, parent):
account_rec = [acct for acct in accounts if acct['id']==parent][0]
currency_obj = self.pool.get('res.currency')

View File

@ -105,4 +105,4 @@ class journal_print(report_sxw.rml_parse, common_report_header):
report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/account_central_journal.rml', parser=journal_print, header='internal')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -158,4 +158,4 @@ class journal_print(report_sxw.rml_parse, common_report_header):
report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header='internal')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -284,4 +284,4 @@ class report_account_sales(osv.osv):
)""")
report_account_sales()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -160,7 +160,7 @@ class tax_report(report_sxw.rml_parse, common_report_header):
i+=1
return res
def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=[], context=None):
def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=None, context=None):
obj_tc = self.pool.get('account.tax.code')
ids = obj_tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)], order='sequence', context=context)
@ -171,7 +171,11 @@ class tax_report(report_sxw.rml_parse, common_report_header):
res += self._get_codes(based_on, company_id, code.id, level+1, context=context)
return res
def _add_codes(self, based_on, account_list=[], period_list=[], context=None):
def _add_codes(self, based_on, account_list=None, period_list=None, context=None):
if account_list is None:
account_list = []
if period_list is None:
period_list = []
res = []
obj_tc = self.pool.get('account.tax.code')
for account in account_list:

View File

@ -45,4 +45,3 @@ class res_currency_account(osv.osv):
res_currency_account()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -16,7 +16,7 @@
</record>
<record id="group_account_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Financial Manager</field>
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
<field name="implied_ids" eval="[(4, ref('group_account_user'))]"/>
</record>

View File

@ -32,11 +32,11 @@ class account_invoice_refund(osv.osv_memory):
_name = "account.invoice.refund"
_description = "Invoice Refund"
_columns = {
'date': fields.date('Operation Date', help='This date will be used as the invoice date for credit note and period will be chosen accordingly!'),
'date': fields.date('Date', help='This date will be used as the invoice date for credit note and period will be chosen accordingly!'),
'period': fields.many2one('account.period', 'Force period'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the credit note that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
'description': fields.char('Description', size=128, required=True),
'filter_refund': fields.selection([('refund', 'Create a draft refund'), ('cancel', 'Cancel: create credit note and reconcile'),('modify', 'Modify: create credit note, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Credit note base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
'description': fields.char('Reason', size=128, required=True),
'filter_refund': fields.selection([('refund', 'Create a draft credit note'), ('cancel', 'Cancel: create credit note and reconcile'),('modify', 'Modify: create credit note, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Credit note base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
}
def _get_journal(self, cr, uid, context=None):

View File

@ -7,19 +7,40 @@
<field name="model">account.invoice.refund</field>
<field name="arch" type="xml">
<form string="Credit Note" version="7.0">
<separator string="Credit Note Options"/>
<group col="4">
<field name="description"/>
<field name="journal_id" widget='selection'/>
<field name="date"/>
<field name="period"/>
<field name="filter_refund"/>
<group>
<group colspan="2">
<label for="filter_refund"/>
<div>
<field name="filter_refund" class="oe_inline"/>
<p attrs="{'invisible':[('filter_refund','&lt;&gt;','refund')]}" class="oe_grey">
You will be able to edit and validate this
credit note directly or keep it draft,
waiting for the document to be issued by
your supplier/customer.
</p>
<p attrs="{'invisible':[('filter_refund','&lt;&gt;','cancel')]}" class="oe_grey">
Use this option if you want to cancel an invoice you should not
have issued. The credit note will be created, validated and reconciled
with the invoice. You will not be able to modify the credit note.
</p>
<p attrs="{'invisible':[('filter_refund','&lt;&gt;','modify')]}" class="oe_grey">
Use this option if you want to cancel an invoice and create a new
one. The credit note will be created, validated and reconciled
with the current invoice. A new, draft, invoice will be created
so that you can edit it.
</p>
</div>
</group>
<group>
<field name="description"/>
<field name="journal_id" widget='selection'/>
</group><group>
<field name="date"/>
<field name="period"/>
</group>
</group>
<label string="Modify Invoice: Cancels the current invoice and creates a new copy of it ready for editing."/>
<label string="Credit Note: Creates the credit note, ready for editing."/>
<label string="Cancel Invoice: Creates the credit note, validate and reconcile it to cancel the current invoice."/>
<footer>
<button string='Refund' name="invoice_refund" type="object" class="oe_highlight"/>
<button string='Create Credit Note' name="invoice_refund" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
@ -28,7 +49,7 @@
</record>
<record id="action_account_invoice_refund" model="ir.actions.act_window">
<field name="name">Refund</field>
<field name="name">Refund Invoice</field>
<field name="res_model">account.invoice.refund</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>

View File

@ -71,4 +71,4 @@ class account_invoice_cancel(osv.osv_memory):
account_invoice_cancel()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -47,4 +47,4 @@ class account_journal_select(osv.osv_memory):
account_journal_select()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -61,4 +61,4 @@ the bank account\nin the journal definition for reconciliation.'))
account_move_bank_reconcile()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,7 +38,7 @@ class account_move_journal(osv.osv_memory):
_defaults = {
'target_move': 'all'
}
def _get_period(self, cr, uid, context={}):
def _get_period(self, cr, uid, context=None):
"""
Return default account period value
"""

View File

@ -52,4 +52,4 @@ class account_move_line_reconcile_select(osv.osv_memory):
account_move_line_reconcile_select()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -69,4 +69,4 @@ class account_move_line_select(osv.osv_memory):
account_move_line_select()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -41,4 +41,4 @@ class account_move_line_unreconcile_select(osv.osv_memory):
account_move_line_unreconcile_select()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,6 +23,7 @@ import time
from osv import fields, osv
from tools.translate import _
import decimal_precision as dp
class account_move_line_reconcile(osv.osv_memory):
"""
@ -32,9 +33,9 @@ class account_move_line_reconcile(osv.osv_memory):
_description = 'Account move line reconcile'
_columns = {
'trans_nbr': fields.integer('# of Transaction', readonly=True),
'credit': fields.float('Credit amount', readonly=True),
'debit': fields.float('Debit amount', readonly=True),
'writeoff': fields.float('Write-Off amount', readonly=True),
'credit': fields.float('Credit amount', readonly=True, digits_compute=dp.get_precision('Account')),
'debit': fields.float('Debit amount', readonly=True, digits_compute=dp.get_precision('Account')),
'writeoff': fields.float('Write-Off amount', readonly=True, digits_compute=dp.get_precision('Account')),
}
def default_get(self, cr, uid, fields, context=None):
@ -159,4 +160,4 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
account_move_line_reconcile_writeoff()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -41,4 +41,4 @@ class account_state_open(osv.osv_memory):
account_state_open()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -50,4 +50,4 @@ class account_subscription_generate(osv.osv_memory):
account_subscription_generate()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -50,4 +50,4 @@ class account_unreconcile_reconcile(osv.osv_memory):
account_unreconcile_reconcile()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -48,7 +48,7 @@
<field name="name">Contracts to Renew</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_user_id':uid, 'search_default_draft':1, 'search_default_pending':1, 'search_default_open':1, 'search_default_renew':1}</field>
<field name="domain">[('type','=','contract')]</field>
<field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
@ -72,7 +72,7 @@
<field name="name">Contracts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_mode">tree,form</field>
<field name="context">{'default_type':'contract', 'search_default_open':1, 'search_default_pending':1}</field>
<field name="domain">[('type','=','contract')]</field>
<field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>

View File

@ -34,7 +34,7 @@ class crossovered_analytic(report_sxw.rml_parse):
})
self.base_amount = 0.00
def find_children(self,ref_ids):
def find_children(self, ref_ids):
to_return_ids = []
final_list = []
parent_list = []
@ -53,7 +53,7 @@ class crossovered_analytic(report_sxw.rml_parse):
final_list.extend(set_list)
return final_list #to_return_ids[0]
def set_account(self,cats):
def set_account(self, cats):
lst = []
category = self.pool.get('account.analytic.account').read(self.cr, self.uid, cats)
for cat in category:
@ -62,7 +62,7 @@ class crossovered_analytic(report_sxw.rml_parse):
lst.extend(self.set_account(cat['child_ids']))
return lst
def _ref_lines(self,form):
def _ref_lines(self, form):
result = []
res = {}
acc_pool = self.pool.get('account.analytic.account')
@ -112,7 +112,9 @@ class crossovered_analytic(report_sxw.rml_parse):
result.append(res)
return result
def _lines(self, form, ids={}):
def _lines(self, form, ids=None):
if ids is None:
ids = {}
if not ids:
ids = self.ids

View File

@ -23,4 +23,4 @@ import stock
import purchase
import invoice
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,43 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
#class sale_order_line(osv.osv):
# _name = 'sale.order.line'
# _description = 'Sale Order line'
# _inherit = 'sale.order.line'
#
# def invoice_line_create(self, cr, uid, ids, context={}):
# line_ids = super('sale_order_line',self).invoice_line_create(cr, uid, ids, context)
# invoice_line_obj = self.pool.get('account.invoice.line')
# for line in invoice_line_obj.browse(cr, uid, line_ids):
# if line.product_id:
# a = line.product_id.product_tmpl_id.property_stock_account_output and line.product_id.product_tmpl_id.property_stock_account_output.id
# if not a:
# a = line.product_id.categ_id.property_stock_account_output_categ and line.product_id.categ_id.property_stock_account_output_categ.id
# if a:
# a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, a)
# invoice_line_obj.write(cr, uid, line.id, {'account_id':a})
#
#sale_order_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -75,7 +75,7 @@ class account_asset_asset(osv.osv):
_name = 'account.asset.asset'
_description = 'Asset'
def _get_period(self, cr, uid, context={}):
def _get_period(self, cr, uid, context=None):
periods = self.pool.get('account.period').find(cr, uid)
if periods:
return periods[0]
@ -176,7 +176,9 @@ class account_asset_asset(osv.osv):
year = depreciation_date.year
return True
def validate(self, cr, uid, ids, context={}):
def validate(self, cr, uid, ids, context=None):
if context is None:
context = {}
return self.write(cr, uid, ids, {
'state':'open'
}, context)
@ -304,7 +306,7 @@ class account_asset_asset(osv.osv):
default.update({'depreciation_line_ids': [], 'state': 'draft'})
return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)
def _compute_entries(self, cr, uid, ids, period_id, context={}):
def _compute_entries(self, cr, uid, ids, period_id, context=None):
result = []
period_obj = self.pool.get('account.period')
depreciation_obj = self.pool.get('account.asset.depreciation.line')
@ -350,7 +352,7 @@ class account_asset_depreciation_line(osv.osv):
'amount': fields.float('Depreciation Amount', required=True),
'remaining_value': fields.float('Amount to Depreciate', required=True),
'depreciated_value': fields.float('Amount Already Depreciated', required=True),
'depreciation_date': fields.char('Depreciation Date', size=64, select=1),
'depreciation_date': fields.date('Depreciation Date', select=1),
'move_id': fields.many2one('account.move', 'Depreciation Entry'),
'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)
}
@ -368,7 +370,7 @@ class account_asset_depreciation_line(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
if currency_obj.is_zero(cr, uid, line.asset_id.currency_id, line.remaining_value):
can_close = True
depreciation_date = line.asset_id.prorata and line.asset_id.purchase_date or time.strftime('%Y-%m-%d')
depreciation_date = time.strftime('%Y-%m-%d')
period_ids = period_obj.find(cr, uid, depreciation_date, context=context)
company_currency = line.asset_id.company_id.currency_id.id
current_currency = line.asset_id.currency_id.id

View File

@ -57,6 +57,7 @@ class account_invoice_line(osv.osv):
'partner_id': line.invoice_id.partner_id.id,
'company_id': line.invoice_id.company_id.id,
'currency_id': line.invoice_id.currency_id.id,
'purchase_date' : line.invoice_id.date_invoice,
}
changed_vals = asset_obj.onchange_category_id(cr, uid, [], vals['category_id'], context=context)
vals.update(changed_vals['value'])

View File

@ -50,7 +50,7 @@ class asset_asset_report(osv.osv):
select
min(dl.id) as id,
dl.name as name,
to_date(dl.depreciation_date, 'YYYY-MM-DD') as depreciation_date,
dl.depreciation_date as depreciation_date,
a.purchase_date as purchase_date,
(CASE WHEN (select min(d.id) from account_asset_depreciation_line as d
left join account_asset_asset as ac ON (ac.id=d.asset_id)
@ -77,7 +77,7 @@ class asset_asset_report(osv.osv):
from account_asset_depreciation_line dl
left join account_asset_asset a on (dl.asset_id=a.id)
group by
dl.amount,dl.asset_id,to_date(dl.depreciation_date, 'YYYY-MM-DD'),dl.name,
dl.amount,dl.asset_id,dl.depreciation_date,dl.name,
a.purchase_date, dl.move_check, a.state, a.category_id, a.partner_id, a.company_id,
a.purchase_value, a.id, a.salvage_value
)""")

View File

@ -76,7 +76,7 @@
<field name="ref" readonly="1"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<field name="type" on_change="onchange_type(partner_id, type)"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="account_id" domain="[('journal_id','=',journal_id)]"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
<field name="amount" readonly="1" sum="Total Amount"/>
<field name="globalisation_id" string="Glob. Id"/>
@ -100,7 +100,7 @@
<field name="ref" readonly="0"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<field name="type" on_change="onchange_type(partner_id, type)"/>
<field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id"/>
<field domain="[('journal_id', '=', journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
<field name="amount"/>
<field name="globalisation_id"/>

View File

@ -35,7 +35,9 @@ class analytic_account_budget_report(report_sxw.rml_parse):
})
self.context = context
def funct(self, object, form, ids={}, done=None, level=1):
def funct(self, object, form, ids=None, done=None, level=1):
if ids is None:
ids = {}
if not ids:
ids = self.ids
if not done:
@ -153,7 +155,7 @@ class analytic_account_budget_report(report_sxw.rml_parse):
tot['perc'] = float(tot['prac'] / tot['theo']) * 100
return result
def funct_total(self,form):
def funct_total(self, form):
result = []
res = {}
res = {
@ -167,4 +169,4 @@ class analytic_account_budget_report(report_sxw.rml_parse):
report_sxw.report_sxw('report.account.analytic.account.budget', 'account.analytic.account', 'addons/account_budget/report/analytic_account_budget_report.rml',parser=analytic_account_budget_report,header='internal')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -34,7 +34,9 @@ class budget_report(report_sxw.rml_parse):
})
self.context = context
def funct(self, object, form, ids={}, done=None, level=1):
def funct(self, object, form, ids=None, done=None, level=1):
if ids is None:
ids = {}
if not ids:
ids = self.ids
if not done:

View File

@ -37,7 +37,9 @@ class budget_report(report_sxw.rml_parse):
})
self.context = context
def funct(self, object, form, ids={}, done=None, level=1):
def funct(self, object, form, ids=None, done=None, level=1):
if ids is None:
ids = {}
if not ids:
ids = self.ids
if not done:

View File

@ -52,4 +52,4 @@ class account_budget_analytic(osv.osv_memory):
account_budget_analytic()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -53,4 +53,4 @@ class account_budget_crossvered_report(osv.osv_memory):
account_budget_crossvered_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -54,4 +54,4 @@ class account_budget_report(osv.osv_memory):
account_budget_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,4 +23,4 @@ import account_followup
import wizard
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,4 +21,4 @@
import account_followup_print
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -209,7 +209,7 @@ class account_followup_print_all(osv.osv_memory):
to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id}
return {'partner_ids': partner_list, 'to_update': to_update}
def do_mail(self ,cr, uid, ids, context=None):
def do_mail(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
move_obj = self.pool.get('account.move.line')
user_obj = self.pool.get('res.users')

View File

@ -29,4 +29,4 @@ import account_move_line
import account_invoice
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -50,4 +50,4 @@ class Invoice(osv.osv):
Invoice()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -26,7 +26,7 @@ from tools.translate import _
class account_move_line(osv.osv):
_inherit = "account.move.line"
def amount_to_pay(self, cr, uid, ids, name, arg={}, context=None):
def amount_to_pay(self, cr, uid, ids, name, arg=None, context=None):
""" Return the amount still to pay regarding all the payemnt orders
(excepting cancelled orders)"""
if not ids:
@ -117,4 +117,4 @@ class account_move_line(osv.osv):
account_move_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -139,7 +139,9 @@ class payment_order(osv.osv):
wf_service.trg_validate(uid, 'payment.order', ids[0], 'done', cr)
return True
def copy(self, cr, uid, id, default={}, context=None):
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default.update({
'state': 'draft',
'line_ids': [],

View File

@ -20,4 +20,4 @@
##############################################################################
import payment_order
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -77,7 +77,7 @@ class payment_order(report_sxw.rml_parse):
user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
def _get_account_name(self,bank_id):
def _get_account_name(self, bank_id):
if bank_id:
pool = pooler.get_pool(self.cr.dbname)
value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id])
@ -87,4 +87,4 @@ class payment_order(report_sxw.rml_parse):
report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="external")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,4 +23,4 @@ import account_payment_order
import account_payment_populate_statement
import account_payment_pay
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -88,7 +88,7 @@ class payment_order_create(osv.osv_memory):
'partner_id': line.partner_id and line.partner_id.id or False,
'communication': line.ref or '/',
'date': date_to_pay,
'currency': line.invoice and line.invoice.currency_id.id or False,
'currency': (line.invoice and line.invoice.currency_id.id) or line.journal_id.currency.id or line.journal_id.company_id.currency_id.id,
}, context=context)
return {'type': 'ir.actions.act_window_close'}
@ -120,4 +120,4 @@ class payment_order_create(osv.osv_memory):
payment_order_create()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -56,4 +56,4 @@ class account_payment_make_payment(osv.osv_memory):
account_payment_make_payment()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -120,4 +120,4 @@ class account_payment_populate_statement(osv.osv_memory):
account_payment_populate_statement()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -22,4 +22,4 @@
import account_sequence
import account_sequence_installer
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -24,4 +24,4 @@ import invoice
import report
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -32,11 +32,11 @@ class res_company(osv.osv):
_columns = {
'income_currency_exchange_account_id': fields.many2one(
'account.account',
string="Income Currency Rate",
string="Gain Exchange Rate Account",
domain="[('type', '=', 'other')]",),
'expense_currency_exchange_account_id': fields.many2one(
'account.account',
string="Expense Currency Rate",
string="Loss Exchange Rate Account",
domain="[('type', '=', 'other')]",),
}
@ -849,7 +849,7 @@ class account_voucher(osv.osv):
res['account_id'] = account_id
return {'value':res}
def _sel_context(self, cr, uid, voucher_id,context=None):
def _sel_context(self, cr, uid, voucher_id, context=None):
"""
Select the context to use accordingly if it needs to be multicurrency or not.
@ -957,11 +957,11 @@ class account_voucher(osv.osv):
if amount_residual > 0:
account_id = line.voucher_id.company_id.expense_currency_exchange_account_id
if not account_id:
raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Income Currency Rate' on the company, then create accounting entry for currency rate difference."))
raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Expense Currency Rate' on the company, then create accounting entry for currency rate difference."))
else:
account_id = line.voucher_id.company_id.income_currency_exchange_account_id
if not account_id:
raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Expense Currency Rate' on the company, then create accounting entry for currency rate difference."))
raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Income Currency Rate' on the company, then create accounting entry for currency rate difference."))
# Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise
# the receivable/payable account may have a secondary currency, which render this field mandatory
account_currency_id = company_currency <> current_currency and current_currency or False
@ -1275,7 +1275,9 @@ class account_voucher(osv.osv):
self.reconcile_send_note(cr, uid, [voucher.id], context=context)
return True
def copy(self, cr, uid, id, default={}, context=None):
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default.update({
'state': 'draft',
'number': False,
@ -1302,17 +1304,17 @@ class account_voucher(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s <b>created</b>." % self._document_type[obj.type or False]
self.message_post(cr, uid, [obj.id], body=message, context=context)
self.message_post(cr, uid, [obj.id], body=message, subtype="account_voucher.mt_voucher", context=context)
def post_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s '%s' is <b>posted</b>." % (self._document_type[obj.type or False], obj.move_id.name)
self.message_post(cr, uid, [obj.id], body=message, context=context)
self.message_post(cr, uid, [obj.id], body=message, subtype="account_voucher.mt_voucher", context=context)
def reconcile_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s <b>reconciled</b>." % self._document_type[obj.type or False]
self.message_post(cr, uid, [obj.id], body=message, context=context)
self.message_post(cr, uid, [obj.id], body=message, subtype="account_voucher.mt_voucher", context=context)
account_voucher()

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data noupdate="1">
<!-- notify all employees of module installation -->
<record model="mail.message" id="module_install_notification">
<field name="model">mail.group</field>
@ -13,5 +14,12 @@
<p>You can track customer payments easily and automate follow-ups. You get an overview of the discussion with your customers on each invoice for easier traceability. For advanced accounting features, you should install the "Accounting and Finance" module.</p>
]]></field>
</record>
<!-- mail: subtypes -->
<record id="mt_voucher" model="mail.message.subtype">
<field name="name">Status Change</field>
<field name="res_model">account.voucher</field>
</record>
</data>
</openerp>

View File

@ -23,4 +23,4 @@ import account_voucher
import account_voucher_print
import account_voucher_sales_receipt
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,7 +38,8 @@ that have no counterpart in the general financial accounts.
'security/analytic_security.xml',
'security/ir.model.access.csv',
'analytic_sequence.xml',
'analytic_view.xml'
'analytic_view.xml',
'analytic_data.xml'
],
'demo': [],
'installable': True,

View File

@ -284,7 +284,8 @@ class account_analytic_account(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name), context=context)
self.message_post(cr, uid, [obj.id], body=_("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name),
subtype="analytic.mt_account_status", context=context)
account_analytic_account()

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- mail: subtypes -->
<record id="mt_account_status" model="mail.message.subtype">
<field name="name">Status Change</field>
<field name="res_model">account.analytic.account</field>
</record>
</data>
</openerp>

View File

@ -1,63 +1,86 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * analytic_user_function
# Dutch (Belgium) translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 15:34:14+0000\n"
"PO-Revision-Date: 2009-08-28 15:34:14+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-10-02 07:35+0000\n"
"Last-Translator: Els Van Vossel (Agaplan) <Unknown>\n"
"Language-Team: Dutch (Belgium) <nl_BE@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-03 05:09+0000\n"
"X-Generator: Launchpad (build 16061)\n"
#. module: analytic_user_function
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#: field:analytic.user.funct.grid,product_id:0
msgid "Product"
msgstr "Product"
#. module: analytic_user_function
#: model:ir.model,name:analytic_user_function.model_analytic_user_funct_grid
msgid "Relation table between users and products on a analytic account"
msgstr ""
"Relatietabel tussen gebruikers en producten van een analytische rekening"
#. module: analytic_user_function
#: field:analytic_user_funct_grid,product_id:0
msgid "Product"
msgstr ""
#: constraint:hr.analytic.timesheet:0
msgid "You cannot modify an entry in a Confirmed/Done timesheet !."
msgstr "In een bevestigde/afgesloten uurrooster kunt u geen regels wijzigen."
#. module: analytic_user_function
#: field:analytic_user_funct_grid,account_id:0
#: field:analytic.user.funct.grid,account_id:0
#: model:ir.model,name:analytic_user_function.model_account_analytic_account
msgid "Analytic Account"
msgstr ""
msgstr "Analytische rekening"
#. module: analytic_user_function
#: view:account.analytic.account:0
#: field:account.analytic.account,user_product_ids:0
msgid "Users/Products Rel."
msgstr ""
msgstr "Rel. gebruikers/producten"
#. module: analytic_user_function
#: field:analytic_user_funct_grid,user_id:0
#: field:analytic.user.funct.grid,user_id:0
msgid "User"
msgstr "Gebruiker"
#. module: analytic_user_function
#: code:addons/analytic_user_function/analytic_user_function.py:96
#: code:addons/analytic_user_function/analytic_user_function.py:131
#, python-format
msgid "There is no expense account define for this product: \"%s\" (id:%d)"
msgstr ""
"Er is geen kostenrekening gedefinieerd voor dit product: \"%s\" (id:%d)"
#. module: analytic_user_function
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr "De objectnaam moet beginnen met x_ en mag geen speciale karakters bevatten !"
#: code:addons/analytic_user_function/analytic_user_function.py:95
#: code:addons/analytic_user_function/analytic_user_function.py:130
#, python-format
msgid "Error !"
msgstr "Fout"
#. module: analytic_user_function
#: model:ir.module.module,shortdesc:analytic_user_function.module_meta_information
msgid "Analytic User Function"
msgstr ""
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr "U kunt niet dezelfde analytische rekeningen maken."
#. module: analytic_user_function
#: view:analytic_user_funct_grid:0
#: model:ir.model,name:analytic_user_function.model_hr_analytic_timesheet
msgid "Timesheet Line"
msgstr "Uurroosterlijn"
#. module: analytic_user_function
#: view:analytic.user.funct.grid:0
msgid "User's Product for this Analytic Account"
msgstr ""
msgstr "Product van gebruiker voor deze analytische rekening"
#~ msgid ""
#~ "The Object name must start with x_ and not contain any special character !"
#~ msgstr ""
#~ "De objectnaam moet beginnen met x_ en mag geen speciale karakters bevatten !"

View File

@ -363,7 +363,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
})
raise osv.except_osv(error_type, error_msg)
def anonymize_database(self,cr, uid, ids, context=None):
def anonymize_database(self, cr, uid, ids, context=None):
"""Sets the 'anonymized' state to defined fields"""
# create a new history record:
@ -498,7 +498,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
'target':'new',
}
def reverse_anonymize_database(self,cr, uid, ids, context=None):
def reverse_anonymize_database(self, cr, uid, ids, context=None):
"""Set the 'clear' state to defined fields"""
ir_model_fields_anonymization_model = self.pool.get('ir.model.fields.anonymization')

View File

@ -202,7 +202,7 @@ class audittrail_objects_proxy(object_proxy):
res = value
return res
def create_log_line(self, cr, uid, log_id, model, lines=[]):
def create_log_line(self, cr, uid, log_id, model, lines=None):
"""
Creates lines for changed fields with its old and new values
@ -211,6 +211,8 @@ class audittrail_objects_proxy(object_proxy):
@param model: Object which values are being changed
@param lines: List of values for line is to be created
"""
if lines is None:
lines = []
pool = pooler.get_pool(cr.dbname)
obj_pool = pool.get(model.model)
model_pool = pool.get('ir.model')
@ -349,9 +351,9 @@ class audittrail_objects_proxy(object_proxy):
data[(model.id, resource_id)] = {'text':values_text, 'value': values}
return data
def prepare_audittrail_log_line(self, cr, uid, pool, model, resource_id, method, old_values, new_values, field_list=[]):
def prepare_audittrail_log_line(self, cr, uid, pool, model, resource_id, method, old_values, new_values, field_list=None):
"""
This function compares the old data (i.e before the method was executed) and the new data
This function compares the old data (i.e before the method was executed) and the new data
(after the method was executed) and returns a structure with all the needed information to
log those differences.
@ -375,9 +377,11 @@ class audittrail_objects_proxy(object_proxy):
(model.id, resource_id): []
}
The reason why the structure returned is build as above is because when modifying an existing
The reason why the structure returned is build as above is because when modifying an existing
record, we may have to log a change done in a x2many field of that object
"""
if field_list is None:
field_list = []
key = (model.id, resource_id)
lines = {
key: []
@ -416,7 +420,7 @@ class audittrail_objects_proxy(object_proxy):
lines[key].append(data)
return lines
def process_data(self, cr, uid, pool, res_ids, model, method, old_values={}, new_values={}, field_list=[]):
def process_data(self, cr, uid, pool, res_ids, model, method, old_values=None, new_values=None, field_list=None):
"""
This function processes and iterates recursively to log the difference between the old
data (i.e before the method was executed) and the new data and creates audittrail log
@ -435,6 +439,8 @@ class audittrail_objects_proxy(object_proxy):
on specific fields only.
:return: True
"""
if field_list is None:
field_list = []
# loop on all the given ids
for res_id in res_ids:
# compare old and new values and get audittrail log lines accordingly
@ -442,11 +448,13 @@ class audittrail_objects_proxy(object_proxy):
# if at least one modification has been found
for model_id, resource_id in lines:
name = pool.get(model.model).name_get(cr, uid, [resource_id])[0][1]
vals = {
'method': method,
'object_id': model_id,
'user_id': uid,
'res_id': resource_id,
'name': name,
}
if (model_id, resource_id) not in old_values and method not in ('copy', 'read'):
# the resource was not existing so we are forcing the method to 'create'
@ -484,7 +492,7 @@ class audittrail_objects_proxy(object_proxy):
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'):
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', 'read_group', 'import_data'):
if rule['log_action']:
return True

View File

@ -180,8 +180,8 @@ class CompanyLDAP(osv.osv):
"""
user_id = False
login = tools.ustr(login)
cr.execute("SELECT id, active FROM res_users WHERE login=%s", (login,))
login = tools.ustr(login.lower())
cr.execute("SELECT id, active FROM res_users WHERE lower(login)=%s", (login,))
res = cr.fetchone()
if res:
if res[1]:

View File

@ -14,7 +14,7 @@
<field name="ldap_server"/>
<field name="ldap_server_port"/>
<field name="ldap_binddn"/>
<field name="ldap_password"/>
<field name="ldap_password" password="True"/>
<field name="ldap_base"/>
<field name="ldap_filter"/>
<field name="create_user"/>

View File

@ -38,7 +38,10 @@ Allow users to login through Google OAuth2.
'security/ir.model.access.csv'
],
'js': ['static/src/js/auth_oauth.js'],
'css': ['static/lib/zocial/css/zocial.css'],
'css': [
'static/lib/zocial/css/zocial.css',
'static/src/css/auth_oauth.css',
],
'qweb': ['static/src/xml/auth_oauth.xml'],
'installable': True,
'auto_install': False,

View File

@ -2,6 +2,15 @@
<openerp>
<data>
<record id="provider_openerp" model="auth.oauth.provider">
<field name="name">OpenERP Accounts</field>
<field name="auth_endpoint">https://accounts.openerp.com/oauth2/auth</field>
<field name="scope">userinfo</field>
<field name="validation_endpoint">https://accounts.openerp.com/oauth2/tokeninfo</field>
<field name="data_endpoint"></field>
<field name="css_class">zocial openerp</field>
<field name="body">Sign in with OpenERP account</field>
</record>
<record id="provider_facebook" model="auth.oauth.provider">
<field name="name">Facebook Graph</field>
<field name="auth_endpoint">https://www.facebook.com/dialog/oauth</field>

View File

@ -16,10 +16,13 @@ class OAuthController(openerpweb.Controller):
@openerpweb.jsonrequest
def list_providers(self, req, dbname):
registry = openerp.modules.registry.RegistryManager.get(dbname)
with registry.cursor() as cr:
providers = registry.get('auth.oauth.provider')
l = providers.read(cr, SUPERUSER_ID, providers.search(cr, SUPERUSER_ID, [('enabled','=',True)]))
try:
registry = openerp.modules.registry.RegistryManager.get(dbname)
with registry.cursor() as cr:
providers = registry.get('auth.oauth.provider')
l = providers.read(cr, SUPERUSER_ID, providers.search(cr, SUPERUSER_ID, [('enabled','=',True)]))
except Exception:
l = []
return l
@openerpweb.httprequest

View File

@ -1,6 +1,7 @@
import logging
import urllib
import urlparse
import urllib2
import simplejson
@ -20,8 +21,11 @@ class res_users(osv.Model):
}
def auth_oauth_rpc(self, cr, uid, endpoint, access_token, context=None):
params = urllib.urlencode({'access_token':access_token})
url = endpoint + '?' + params
params = urllib.urlencode({ 'access_token': access_token })
if urlparse.urlparse(endpoint)[4]:
url = endpoint + '&' + params
else:
url = endpoint + '?' + params
f = urllib2.urlopen(url)
response = f.read()
return simplejson.loads(response)
@ -38,26 +42,32 @@ class res_users(osv.Model):
validation = self.auth_oauth_rpc(cr, uid, p.validation_endpoint, access_token)
if validation.get("error"):
raise openerp.exceptions.AccessDenied
login = validation['email']
if p.data_endpoint:
data = self.auth_oauth_rpc(cr, uid, p.data_endpoint, access_token)
validation.update(data)
# required
oauth_uid = validation['user_id']
name = self.auth_oauth_rpc(cr, uid, p.data_endpoint, access_token)['name']
credentials = (cr.dbname, login, access_token)
if not oauth_uid:
raise openerp.exceptions.AccessDenied
email = validation.get('email', 'provider_%d_user_%d' % (p.id, oauth_uid))
# optional
name = validation.get('name', email)
res = self.search(cr, uid, [("oauth_uid", "=", oauth_uid)])
if res:
self.write(cr, uid, res[0], {'oauth_access_token':access_token})
self.write(cr, uid, res[0], { 'oauth_access_token': access_token })
else:
# New user
new_user = {
'name': name,
'login': login,
'user_email': login,
'oauth_provider_id': 1,
'login': email,
'user_email': email,
'oauth_provider_id': p.id,
'oauth_uid': oauth_uid,
'oauth_access_token': access_token,
'active': True,
}
self.auth_signup_create(cr, uid, new_user)
credentials = (cr.dbname, email, access_token)
return credentials
def check_credentials(self, cr, uid, password):

View File

@ -0,0 +1,35 @@
.openerp .oe_application .zocial {
font: white;
}
.openerp .zocial.openerp:before {
content: "\E02E";
font-style: italic;
text-shadow: 0 1px 1px black;
}
.openerp a.zocial.openerp {
float: right;
border: 1px solid #222222;
color: white;
margin: 0;
background-color: #b92020;
background-image: -webkit-gradient(linear, left top, left bottom, from(#b92020), to(#600606));
background-image: -webkit-linear-gradient(top, #b92020, #600606);
background-image: -moz-linear-gradient(top, #b92020, #600606);
background-image: -ms-linear-gradient(top, #b92020, #600606);
background-image: -o-linear-gradient(top, #b92020, #600606);
background-image: linear-gradient(to bottom, #b92020, #600606);
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
text-shadow: none;
font-weight: normal;
}
.openerp .oe_login .oe_oauth_provider_login_button {
margin-top: 4px;
}

View File

@ -1,8 +1,9 @@
openerp.auth_oauth = function(instance) {
var QWeb = instance.web.qweb;
instance.web.Login = instance.web.Login.extend({
instance.web.Login.include({
start: function(parent, params) {
var self = this;
var d = this._super.apply(this, arguments);
this.$el.on('click', 'a.zocial', this.on_oauth_sign_in);
this.oauth_providers = [];
@ -11,7 +12,13 @@ openerp.auth_oauth = function(instance) {
} else if(this.params.oauth_error === 2) {
this.do_warn("Authentication error","");
}
return d.then(this.do_oauth_load);
return d.then(this.do_oauth_load).fail(function() {
self.do_oauth_load([]);
});
},
on_db_loaded: function(result) {
this._super.apply(this, arguments);
this.$("form [name=db]").change(this.do_oauth_load);
},
do_oauth_load: function() {
var db = this.$("form [name=db]").val();
@ -21,6 +28,7 @@ openerp.auth_oauth = function(instance) {
},
on_oauth_loaded: function(result) {
this.oauth_providers = result;
this.$('.oe_oauth_provider_login_button').remove();
var buttons = QWeb.render("auth_oauth.Login.button",{"widget":this});
this.$(".oe_login_pane form ul").after(buttons);
},
@ -33,7 +41,7 @@ openerp.auth_oauth = function(instance) {
var state_object = {
d: dbname,
p: p.id
}
};
var state = JSON.stringify(state_object);
var params = {
response_type: 'token',

View File

@ -2,8 +2,7 @@
<templates id="template" xml:space="preserve">
<t t-name="auth_oauth.Login.button">
<t t-foreach="widget.oauth_providers" t-as="p">
<a href="#" t-att-class="p.css_class" t-att-data-index="p_index"><t t-esc="p.body"/></a>
<br/>
<a href="#" t-attf-class="oe_oauth_provider_login_button #{p.css_class}" t-att-data-index="p_index"><t t-esc="p.body"/></a>
</t>
</t>
</templates>

View File

@ -971,8 +971,8 @@ class calendar_event(osv.osv):
event = datas['id']
if datas.get('interval', 0) < 0:
raise osv.except_osv(_('Warning!'), _('Interval cannot be negative.'))
if datas.get('count', 0) < 0:
raise osv.except_osv(_('Warning!'), _('Count cannot be negative.'))
if datas.get('count', 0) <= 0:
raise osv.except_osv(_('Warning!'), _('Count cannot be negative or 0.'))
if datas['recurrency']:
result[event] = self.compute_rule_string(datas)
else:
@ -1113,6 +1113,16 @@ rule or repeating pattern of time to exclude from the recurring rule."),
'user_id': lambda self, cr, uid, ctx: uid,
'organizer': default_organizer,
}
def _check_closing_date(self, cr, uid, ids, context=None):
for event in self.browse(cr, uid, ids, context=context):
if event.date_deadline < event.date:
return False
return True
_constraints = [
(_check_closing_date, 'Error ! End date cannot be set before start date.', ['date_deadline']),
]
def get_recurrent_ids(self, cr, uid, select, domain, limit=100, context=None):
"""Gives virtual event ids for recurring events based on value of Recurrence Rule

View File

@ -182,13 +182,14 @@
<button name="do_tentative"
states="needs-action,declined,accepted"
string="Uncertain" type="object"
icon="terp-crm"
/>
<button name="do_accept" string="Accept"
states="needs-action,tentative,declined"
type="object" />
type="object" icon="gtk-apply"/>
<button name="do_decline" string="Decline"
states="needs-action,tentative,accepted"
type="object" />
type="object" icon="gtk-cancel"/>
</tree>
<form string="Invitation details" version="7.0">
<header>

View File

@ -47,7 +47,9 @@ import logging
magic_md5 = '$1$'
_logger = logging.getLogger(__name__)
def gen_salt( length=8, symbols=ascii_letters + digits ):
def gen_salt( length=8, symbols=None):
if symbols is None:
symbols = ascii_letters + digits
seed()
return ''.join( sample( symbols, length ) )

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2009-04-20 10:04+0000\n"
"Last-Translator: <>\n"
"PO-Revision-Date: 2012-10-01 11:08+0000\n"
"Last-Translator: Els Van Vossel (Agaplan) <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: 2012-08-28 05:58+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-10-02 05:20+0000\n"
"X-Generator: Launchpad (build 16061)\n"
#. module: base_iban
#: constraint:res.partner.bank:0
@ -23,22 +23,27 @@ msgid ""
"Please define BIC/Swift code on bank for bank type IBAN Account to make "
"valid payments"
msgstr ""
"\n"
"Definieer een BIC/Swift-code voor IBAN-rekeningen om geldige betalingen te "
"maken."
#. module: base_iban
#: code:addons/base_iban/base_iban.py:139
#, python-format
msgid "This IBAN does not pass the validation check, please verify it"
msgstr ""
"Dit IBAN-nummer voldoet niet aan de controle. Gelieve het nummer na te "
"kijken."
#. module: base_iban
#: model:res.partner.bank.type,format_layout:base_iban.bank_iban
msgid "%(bank_name)s: IBAN %(acc_number)s - BIC %(bank_bic)s"
msgstr ""
msgstr "%(bank_name)s: IBAN %(acc_number)s - BIC %(bank_bic)s"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_swift_field
msgid "bank_bic"
msgstr ""
msgstr "bank_bic"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_zip_field
@ -67,6 +72,8 @@ msgid ""
"The IBAN does not seem to be correct. You should have entered something like "
"this %s"
msgstr ""
"Dit IBAN-nummer lijkt niet juist te zijn. U dient een nummer in te geven in "
"dit formaat %s."
#. module: base_iban
#: field:res.partner.bank,iban:0
@ -77,7 +84,7 @@ msgstr "IBAN"
#: code:addons/base_iban/base_iban.py:140
#, python-format
msgid "The IBAN is invalid, it should begin with the country code"
msgstr ""
msgstr "Dit IBAN-nummer is ongeldig; het moet beginnen met de landcode."
#. module: base_iban
#: model:res.partner.bank.type,name:base_iban.bank_iban
@ -87,7 +94,7 @@ msgstr "IBAN-rekening"
#. module: base_iban
#: constraint:res.partner.bank:0
msgid "The RIB and/or IBAN is not valid"
msgstr ""
msgstr "RIB en/of IBAN is niet geldig."
#, python-format
#~ msgid "The IBAN is invalid, It should begin with the country code"

View File

@ -1,25 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import base_module_doc_rst
import wizard
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,49 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Generate Docs of Modules',
'version': '1.0',
'category': 'Tools',
'description': """
This module generates the Technical Guides of selected modules in Restructured Text format (RST).
=================================================================================================
* It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST
* It creates a tarball (.tgz file suffix) containing an index file and one file per module
* Generates Relationship Graph
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base'],
'data': [
'base_module_doc_rst_view.xml',
'wizard/generate_relation_graph_view.xml',
'wizard/tech_guide_rst_view.xml',
'module_report.xml',
],
'demo': [],
'installable': True,
'images': ['images/base_module_doc_rst1.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,125 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import os
import pydot
import base64
import report
from osv import fields, osv
import addons
class module(osv.osv):
_inherit = 'ir.module.module'
_description = 'Module With Relationship Graph'
_columns = {
'file_graph': fields.binary('Relationship Graph'),
}
def _get_graphical_representation(self, cr, uid, model_ids, level=1, context=None):
obj_model = self.pool.get('ir.model')
if level == 0:
return tuple()
relation = []
for id in model_ids:
model_data = obj_model.browse(cr, uid, id, context=context)
for field in (f for f in model_data.field_id if f.ttype in ('many2many', 'many2one', 'one2many')):
relation.append((model_data.model, field.name, field.ttype, field.relation, field.field_description))
new_model_ids = obj_model.search(cr, uid, [('model', '=', field.relation)], context=context)
if new_model_ids:
model = obj_model.read(cr, uid, new_model_ids, ['id', 'name'], context=context)[0]
relation.extend(self._get_graphical_representation(cr, uid, model['id'], level - 1))
return tuple(relation)
def _get_structure(self, relations, main_element):
res = {}
for rel in relations:
# if we have to display the string along with field name then uncomment the first line n comment the second line
res.setdefault(rel[0], set()).add(rel[1])
res.setdefault(rel[3], set())
val = []
for obj, fields in res.items():
val.append('"%s" [%s label="{<id>%s|%s}"];' % (obj,
obj in main_element and 'fillcolor=yellow, style="filled,rounded"' or "",
obj,
"|".join(["<%s> %s" % (fn, fn) for fn in fields])))
return "\n".join(val)
def _get_arrow(self, field_type='many2one'):
return {
'many2one': 'arrowtail="none" arrowhead="normal" color="red" label="m2o"',
'many2many': 'arrowtail="crow" arrowhead="crow" color="green" label="m2m"',
'one2many': 'arrowtail="none" arrowhead="crow" color="blue" label="o2m"',
}[field_type]
def get_graphical_representation(self, cr, uid, model_ids, context=None):
obj_model = self.pool.get('ir.model')
if context is None:
context = {}
res = {}
models = []
for obj in obj_model.browse(cr, uid, model_ids, context=context):
models.append(obj.model)
relations = set(self._get_graphical_representation(cr, uid, model_ids, context.get('level', 1)))
res[obj.model] = "digraph G {\nnode [style=rounded, shape=record];\n%s\n%s }" % (
self._get_structure(relations, models),
''.join('"%s":%s -> "%s":id:n [%s]; // %s\n' % (m, fn, fr, self._get_arrow(ft),ft) for m, fn, ft, fr, fl in relations),
)
return res
def _get_module_objects(self, cr, uid, module, context=None):
obj_model = self.pool.get('ir.model')
obj_mod_data = self.pool.get('ir.model.data')
obj_ids = []
model_data_ids = obj_mod_data.search(cr, uid, [('module', '=', module), ('model', '=', 'ir.model')], context=context)
model_ids = []
for mod in obj_mod_data.browse(cr, uid, model_data_ids, context=context):
model_ids.append(mod.res_id)
models = obj_model.browse(cr, uid, model_ids, context=context)
map(lambda x: obj_ids.append(x.id),models)
return obj_ids
def get_relation_graph(self, cr, uid, module_name, context=None):
if context is None: context = {}
object_ids = self._get_module_objects(cr, uid, module_name, context=context)
if not object_ids:
return {'module_file': False}
context.update({'level': 1})
dots = self.get_graphical_representation(cr, uid, object_ids, context=context)
# todo: use os.realpath
file_path = addons.get_module_resource('base_module_doc_rst')
path_png = file_path + "/module.png"
for key, val in dots.items():
path_dotfile = file_path + "/%s.dot" % (key,)
fp = file(path_dotfile, "w")
fp.write(val)
fp.close()
os.popen('dot -Tpng' +' '+ path_dotfile + ' '+ '-o' +' ' + path_png)
fp = file(path_png, "r")
x = fp.read()
fp.close()
os.popen('rm ' + path_dotfile + ' ' + path_png)
return {'module_file': base64.encodestring(x)}
module()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,24 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<!--
Relationship Graph on Module object
-->
<record model="ir.ui.view" id="view_module_module_graph">
<field name="name">ir.module.module.form.graph</field>
<field name="model">ir.module.module</field>
<field name="inherit_id" ref="base.module_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Relationship Graph">
<separator colspan="4" string="You can save this image as .png file"/>
<field name="file_graph" widget="image" nolabel="1" />
</page>
</notebook>
</field>
</record>
</data>
</openerp>

View File

@ -1,57 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-01-28 00:58+0000\n"
"PO-Revision-Date: 2010-01-26 10:55+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-24 04:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst Format"
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr ""
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
msgid "Module Technical Guide in Restructured Text "
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst Format"
msgstr ""

View File

@ -1,57 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-01-28 00:39:09+0000\n"
"PO-Revision-Date: 2009-01-28 00:39:09+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst Format"
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr ""
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
msgid "Module Technical Guide in Restructured Text "
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst Format"
msgstr ""

View File

@ -1,89 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1rc1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-02-08 00:36+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_module_doc_rst
#: view:ir.module.module:0
msgid "You can save this image as .png file"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst Format"
msgstr ""
#. module: base_module_doc_rst
#: wizard_button:create.relation.graph,init,end:0
msgid "Ok"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:create.relation.graph,init:0
msgid "(Relationship Graphs generated)"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr ""
#. module: base_module_doc_rst
#: model:ir.model,name:base_module_doc_rst.model_ir_module_module
msgid "Module"
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph
msgid "Generate Relationship Graph"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:create.relation.graph,init:0
#: view:ir.module.module:0
#: field:ir.module.module,file_graph:0
msgid "Relationship Graph"
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr ""
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph
msgid "Proximity graph"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst Format"
msgstr ""

View File

@ -1,115 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
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-04-03 13:20+0000\n"
"Last-Translator: Vasil Bojilov Bovilov <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-04-04 05:53+0000\n"
"X-Generator: Launchpad (build 12559)\n"
#. module: base_module_doc_rst
#: view:ir.module.module:0
msgid "You can save this image as .png file"
msgstr "Можете да запишете това изображение като .png файл"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst Format"
msgstr "Техническо ръководство във формат rst"
#. module: base_module_doc_rst
#: wizard_button:create.relation.graph,init,end:0
msgid "Ok"
msgstr "Ok"
#. module: base_module_doc_rst
#: wizard_view:create.relation.graph,init:0
msgid "(Relationship Graphs generated)"
msgstr "(Генерирана е графика с релациите)"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr "Изберете фйл в който Техническото ръководство ще бъде написано."
#. module: base_module_doc_rst
#: model:ir.module.module,description:base_module_doc_rst.module_meta_information
msgid ""
"\n"
" * This module generates the Technical Guides of selected modules in "
"Restructured Text format (RST)\n"
" * It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST\n"
" * It creates a tarball (.tgz file suffix) containing an index file and "
"one file per module\n"
" * Generates Relationship Graph\n"
" "
msgstr ""
"\n"
" * В този модул се генерират технически ръководства на избрани модули в "
"преструктуриран текстов формат(RST)\n"
"* При него се използва сфинкс (http://sphinx.pocoo.org) прилагане на RST\n"
"* Това създава tarball (. наставка tgz файл), съдържащ индекс файл и файл на "
"модул\n"
"* Генерира Връзка Graph\n"
" "
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr "Име на файла"
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr "Създай ръководство във формат rst"
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph
msgid "Generate Relationship Graph"
msgstr "Генериране на графика за релациите"
#. module: base_module_doc_rst
#: wizard_view:create.relation.graph,init:0
#: view:ir.module.module:0
#: field:ir.module.module,file_graph:0
msgid "Relationship Graph"
msgstr "Диаграма на връзките"
#. module: base_module_doc_rst
#: model:ir.model,name:base_module_doc_rst.model_ir_module_module
msgid "Module"
msgstr "Модул"
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr "файл"
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr "Затвори"
#. module: base_module_doc_rst
#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
msgid "Module Technical Guide in Restructured Text "
msgstr "Модул Техническо ръководство като преструктуриран текст "
#. module: base_module_doc_rst
#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph
msgid "Proximity graph"
msgstr "Графика на сближаване"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst Format"
msgstr "Създай Техническо ръководство във формат rst"

View File

@ -1,57 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-01-28 00:40:23+0000\n"
"PO-Revision-Date: 2009-01-28 00:40:23+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst Format"
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr ""
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
msgid "Module Technical Guide in Restructured Text "
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst Format"
msgstr ""

View File

@ -1,57 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-01-28 00:58+0000\n"
"PO-Revision-Date: 2010-01-26 10:55+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-24 04:03+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst Format"
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr ""
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
msgid "Module Technical Guide in Restructured Text "
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst Format"
msgstr ""

View File

@ -1,57 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-01-28 00:39:46+0000\n"
"PO-Revision-Date: 2009-01-28 00:39:46+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst Format"
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr ""
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
msgid "Module Technical Guide in Restructured Text "
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst Format"
msgstr ""

View File

@ -1,116 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
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-03-26 18:22+0000\n"
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
"<jesteve@zikzakmedia.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-03-27 06:28+0000\n"
"X-Generator: Launchpad (build 12559)\n"
#. module: base_module_doc_rst
#: view:ir.module.module:0
msgid "You can save this image as .png file"
msgstr "Podeu desar aquesta imatge com un fitxer. png"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst Format"
msgstr "Guia tècnica en format RST"
#. module: base_module_doc_rst
#: wizard_button:create.relation.graph,init,end:0
msgid "Ok"
msgstr "D'acord"
#. module: base_module_doc_rst
#: wizard_view:create.relation.graph,init:0
msgid "(Relationship Graphs generated)"
msgstr "(Gràfics de relacions generats)"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr "Seleccioneu un fitxer on la guia tècnica serà escrita."
#. module: base_module_doc_rst
#: model:ir.module.module,description:base_module_doc_rst.module_meta_information
msgid ""
"\n"
" * This module generates the Technical Guides of selected modules in "
"Restructured Text format (RST)\n"
" * It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST\n"
" * It creates a tarball (.tgz file suffix) containing an index file and "
"one file per module\n"
" * Generates Relationship Graph\n"
" "
msgstr ""
"\n"
" * Aquest mòdul genera les guies tècniques dels mòduls seleccionats en "
"RST (Restructured Text format).\n"
" * Utilitza la implementació Sphinx d'RST (http://sphinx.pocoo.org).\n"
" * Crea un arxiu comprimit (amb extensió .tgz) que conté un fitxer índex "
"i un fitxer per mòdul.\n"
" * Genera un gràfic de relacions.\n"
" "
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr "Nom fitxer"
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr "Crea guia tècnica RST"
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_gen_graph
msgid "Generate Relationship Graph"
msgstr "Genera gràfic de relacions"
#. module: base_module_doc_rst
#: wizard_view:create.relation.graph,init:0
#: view:ir.module.module:0
#: field:ir.module.module,file_graph:0
msgid "Relationship Graph"
msgstr "Gràfic de relacions"
#. module: base_module_doc_rst
#: model:ir.model,name:base_module_doc_rst.model_ir_module_module
msgid "Module"
msgstr "Mòdul"
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr "Fitxer"
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr "Tanca"
#. module: base_module_doc_rst
#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
msgid "Module Technical Guide in Restructured Text "
msgstr "Guia tècnica d'un mòdul en text reestructurat (RST) "
#. module: base_module_doc_rst
#: model:ir.actions.report.xml,name:base_module_doc_rst.report_proximity_graph
msgid "Proximity graph"
msgstr "Gràfic de proximitat"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst Format"
msgstr "Crea guia tècnica en format RST"

View File

@ -1,57 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_module_doc_rst
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-01-28 00:41:01+0000\n"
"PO-Revision-Date: 2009-01-28 00:41:01+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Technical Guide in rst Format"
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,name:0
msgid "filename"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.actions.wizard,name:base_module_doc_rst.wiz_tech_guide_rst
msgid "Create RST Technical Guide"
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Please choose a file where the Technical Guide will be written."
msgstr ""
#. module: base_module_doc_rst
#: wizard_field:tech.guide.rst,init,rst_file:0
msgid "file"
msgstr ""
#. module: base_module_doc_rst
#: wizard_button:tech.guide.rst,init,end:0
msgid "Close"
msgstr ""
#. module: base_module_doc_rst
#: model:ir.module.module,shortdesc:base_module_doc_rst.module_meta_information
msgid "Module Technical Guide in Restructured Text "
msgstr ""
#. module: base_module_doc_rst
#: wizard_view:tech.guide.rst,init:0
msgid "Create Technical Guide in rst Format"
msgstr ""

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