[MERGE] merged the dev3 branch
bzr revid: qdp-launchpad@tinyerp.com-20101119115147-sr8y9paf8jpx0024
This commit is contained in:
@@ -344,7 +344,7 @@ class account_account(osv.osv):
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=128, required=True, select=True),
|
||||
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
|
||||
'code': fields.char('Code', size=64, required=True),
|
||||
'code': fields.char('Code', size=64, required=True, select=1),
|
||||
'type': fields.selection([
|
||||
('view', 'View'),
|
||||
('other', 'Regular'),
|
||||
@@ -1726,7 +1726,12 @@ class account_tax(osv.osv):
|
||||
if not context:
|
||||
context = {}
|
||||
ids = []
|
||||
ids = self.search(cr, user, args, limit=limit, context=context)
|
||||
if name:
|
||||
ids = self.search(cr, user, [('description', '=', name)] + args, limit=limit, context=context)
|
||||
if not ids:
|
||||
ids = self.search(cr, user, [('name', operator, name)] + args, limit=limit, context=context)
|
||||
else:
|
||||
ids = self.search(cr, user, args, limit=limit, context=context or {})
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
@@ -2254,7 +2259,7 @@ class account_account_template(osv.osv):
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=128, required=True, select=True),
|
||||
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
|
||||
'code': fields.char('Code', size=64),
|
||||
'code': fields.char('Code', size=64, select=1),
|
||||
'type': fields.selection([
|
||||
('receivable','Receivable'),
|
||||
('payable','Payable'),
|
||||
@@ -2454,7 +2459,8 @@ class account_tax_template(osv.osv):
|
||||
'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),
|
||||
'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Use In', required=True,)
|
||||
'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."),
|
||||
}
|
||||
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
@@ -2485,6 +2491,7 @@ class account_tax_template(osv.osv):
|
||||
'base_sign': 1,
|
||||
'include_base_amount': False,
|
||||
'type_tax_use': 'all',
|
||||
'price_include': 0,
|
||||
}
|
||||
_order = 'sequence'
|
||||
|
||||
@@ -2658,7 +2665,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
'include_base_amount': tax.include_base_amount,
|
||||
'description':tax.description,
|
||||
'company_id': company_id,
|
||||
'type_tax_use': tax.type_tax_use
|
||||
'type_tax_use': tax.type_tax_use,
|
||||
'price_include': tax.price_include
|
||||
}
|
||||
new_tax = obj_acc_tax.create(cr, uid, vals_tax)
|
||||
tax_template_to_tax[tax.id] = new_tax
|
||||
|
||||
@@ -454,4 +454,4 @@ class account_bank_statement_line(osv.osv):
|
||||
|
||||
account_bank_statement_line()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -95,7 +95,7 @@ class account_cash_statement(osv.osv):
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res ={}
|
||||
res = {}
|
||||
for statement in self.browse(cr, uid, ids):
|
||||
amount_total = 0.0
|
||||
for line in statement.ending_details_ids:
|
||||
@@ -110,7 +110,7 @@ class account_cash_statement(osv.osv):
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res2={}
|
||||
res2 = {}
|
||||
for statement in self.browse(cr, uid, ids):
|
||||
encoding_total=0.0
|
||||
for line in statement.line_ids:
|
||||
@@ -297,7 +297,6 @@ class account_cash_statement(osv.osv):
|
||||
"""
|
||||
res = {}
|
||||
balance_start = 0.0
|
||||
|
||||
if not journal_id:
|
||||
res.update({
|
||||
'balance_start': balance_start
|
||||
@@ -311,8 +310,7 @@ class account_cash_statement(osv.osv):
|
||||
statement.balance_end_real = statement.balance_end
|
||||
if statement.balance_end != statement.balance_end_cash:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
return True
|
||||
|
||||
def _user_allow(self, cr, uid, statement_id, context=None):
|
||||
return True
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration" groups="analytic.group_analytic_accounting"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts" groups="analytic.group_analytic_accounting"/>
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting" groups="base.group_extended,group_account_manager"/>
|
||||
<menuitem id="menu_journals" sequence="9" name="Journals" parent="menu_finance_accounting" groups="base.group_extended,group_account_manager"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscellaneous" parent="menu_finance_configuration" sequence="30" groups="group_account_manager"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/>
|
||||
|
||||
@@ -433,7 +433,7 @@ class account_move_line(osv.osv):
|
||||
'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1),
|
||||
'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner'),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner', select=1),
|
||||
'date_maturity': fields.date('Due date', help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."),
|
||||
'date': fields.related('move_id','date', string='Effective date', type='date', required=True,
|
||||
store = {
|
||||
@@ -489,6 +489,7 @@ class account_move_line(osv.osv):
|
||||
'state': 'draft',
|
||||
'currency_id': _get_currency,
|
||||
'journal_id': lambda self, cr, uid, c: c.get('journal_id', False),
|
||||
'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)
|
||||
}
|
||||
@@ -1091,7 +1092,7 @@ class account_move_line(osv.osv):
|
||||
def _update_check(self, cr, uid, ids, context={}):
|
||||
done = {}
|
||||
for line in self.browse(cr, uid, ids, context):
|
||||
if line.move_id.state <> 'draft':
|
||||
if line.move_id.state <> 'draft' and (not line.journal_id.entry_posted):
|
||||
raise osv.except_osv(_('Error !'), _('You can not do this modification on a confirmed entry ! Please note that you can just change some non important fields !'))
|
||||
if line.reconcile_id:
|
||||
raise osv.except_osv(_('Error !'), _('You can not do this modification on a reconciled entry ! Please note that you can just change some non important fields !'))
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="help">Define your company's fiscal year depending on the period you have chosen to follow. A fiscal year is a 1 year period over which a company budgets its spending. It may run over any period of 12 months. The fiscal year is referred to by the date in which it ends. For example, if a company's fiscal year ends November 30, 2011, then everything between December 1, 2010 and November 30, 2011 would be referred to as FY 2011. Not using the actual calendar year gives many companies an advantage, allowing them to close their books at a time which is most convenient for them.</field>
|
||||
</record>
|
||||
<menuitem id="next_id_23" name="Periods" parent="account.menu_finance_accounting"/>
|
||||
<menuitem id="next_id_23" name="Periods" parent="account.menu_finance_accounting" sequence="8" />
|
||||
<menuitem action="action_account_fiscalyear_form" id="menu_action_account_fiscalyear_form" parent="next_id_23"/>
|
||||
|
||||
<!--
|
||||
@@ -357,7 +357,7 @@
|
||||
<field name="help">Here you can personalize and create each view of your financial journals by selecting the fields you want to appear and the sequence they will appear.</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_journal_view" id="menu_action_account_journal_view" parent="account.menu_low_level"/>
|
||||
<menuitem action="action_account_journal_view" id="menu_action_account_journal_view" parent="account.menu_journals"/>
|
||||
|
||||
<!--
|
||||
# Account Journal
|
||||
@@ -469,7 +469,7 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help">Create and manage your company's financial journals from this menu. A journal is a business diary in which all financial data related to the day to day business transactions of your company is recorded using double-entry book keeping system. Depending on the nature of its activities and number of daily transactions, a company may keep several types of specialized journals such as a cash journal, purchases journal, and sales journal.</field>
|
||||
</record>
|
||||
<menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="account_account_menu"/>
|
||||
<menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="menu_journals"/>
|
||||
|
||||
<record id="view_account_bank_statement_filter" model="ir.ui.view">
|
||||
<field name="name">account.cash.statement.select</field>
|
||||
@@ -749,7 +749,7 @@
|
||||
<field name="search_view_id" ref="view_account_type_search"/>
|
||||
<field name="help">An account type is a name or code given to an account that indicates its purpose. For example, the account type could be linked to an asset account, expense account or payable account. From this view, you can create and manage the account types you need to be used for your company management.</field>
|
||||
</record>
|
||||
<menuitem action="action_account_type_form" groups="base.group_extended,group_account_manager" id="menu_action_account_type_form" parent="menu_low_level"/>
|
||||
<menuitem action="action_account_type_form" groups="base.group_extended,group_account_manager" sequence="6" id="menu_action_account_type_form" parent="account_account_menu"/>
|
||||
<!--
|
||||
Entries
|
||||
-->
|
||||
@@ -863,7 +863,7 @@
|
||||
<field name="help">A tax code is a reference of a tax that will be taken out of a gross income depending on the country and sometimes industry sector. OpenERP allows you to define and manage them from this menu.</field>
|
||||
</record>
|
||||
<menuitem id="next_id_27" name="Taxes" parent="account.menu_finance_accounting"/>
|
||||
<menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="menu_low_level" sequence="12"/>
|
||||
<menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="next_id_27" sequence="12"/>
|
||||
|
||||
|
||||
<!--
|
||||
@@ -1236,6 +1236,7 @@
|
||||
<field name="view_id" ref="view_move_line_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_line_filter"/>
|
||||
<field name="domain">[('account_id', 'child_of', active_id)]</field>
|
||||
<field name="context">{'account_id':active_id}</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_account_move_line_select" model="ir.values">
|
||||
@@ -2257,6 +2258,7 @@
|
||||
<field name="chart_template_id"/>
|
||||
<field name="type"/>
|
||||
<field name="type_tax_use"/>
|
||||
<field name="price_include"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Tax Definition">
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
<field name="code">1113</field>
|
||||
<field name="name">Reserve and Profit/Loss Account</field>
|
||||
<field ref="conf_cli" name="parent_id"/>
|
||||
<field name="type">payable</field>
|
||||
<field name="type">other</field>
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="conf_account_type_liability"/>
|
||||
</record>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
-->
|
||||
<record id="account_payment_term" model="account.payment.term">
|
||||
<field name="name">30 Days End of Month</field>
|
||||
<field name="note">30 Days End of Month</field>
|
||||
</record>
|
||||
<record id="account_payment_term_line" model="account.payment.term.line">
|
||||
<field name="name">30 Days End of Month</field>
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
<field name="code">X1113</field>
|
||||
<field name="name">Reserve and Profit/Loss - (test)</field>
|
||||
<field ref="cli" name="parent_id"/>
|
||||
<field name="type">payable</field>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_liability"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -188,7 +188,8 @@ class account_installer(osv.osv_memory):
|
||||
'include_base_amount': tax.include_base_amount,
|
||||
'description': tax.description,
|
||||
'company_id': company_id.id,
|
||||
'type_tax_use': tax.type_tax_use
|
||||
'type_tax_use': tax.type_tax_use,
|
||||
'price_include': tax.price_include
|
||||
}
|
||||
new_tax = obj_acc_tax.create(cr, uid, vals_tax, context=context)
|
||||
#as the accounts have not been created yet, we have to wait before filling these fields
|
||||
|
||||
+13
-10
@@ -263,7 +263,7 @@ class account_invoice(osv.osv):
|
||||
'invoice_line': fields.one2many('account.invoice.line', 'invoice_id', 'Invoice Lines', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'tax_line': fields.one2many('account.invoice.tax', 'invoice_id', 'Tax Lines', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
||||
'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, help="Link to the automatically generated Journal Items."),
|
||||
'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, select=1, help="Link to the automatically generated Journal Items."),
|
||||
'amount_untaxed': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Untaxed',
|
||||
store={
|
||||
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
|
||||
@@ -326,16 +326,18 @@ class account_invoice(osv.osv):
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
if context.get('active_model','') in ['res.partner']:
|
||||
partner = self.pool.get(context['active_model']).read(cr,uid,context['active_ids'],['supplier','customer'])[0]
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('active_model', '') in ['res.partner'] and context.get('active_ids', False) and context['active_ids']:
|
||||
partner = self.pool.get(context['active_model']).read(cr, uid, context['active_ids'], ['supplier','customer'])[0]
|
||||
if not view_type:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.tree')])[0]
|
||||
view_id = self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'account.invoice.tree')])[0]
|
||||
view_type = 'tree'
|
||||
if view_type == 'form':
|
||||
if partner['supplier'] and not partner['customer']:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.supplier.form')])[0]
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name', '=', 'account.invoice.supplier.form')])[0]
|
||||
else:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.form')])[0]
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name', '=', 'account.invoice.form')])[0]
|
||||
res = super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
type = context.get('journal_type', 'sale')
|
||||
for field in res['fields']:
|
||||
@@ -596,6 +598,7 @@ class account_invoice(osv.osv):
|
||||
self.write(cr, uid, ids, {'state':'draft'})
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for inv_id in ids:
|
||||
wf_service.trg_delete(uid, 'account.invoice', inv_id, cr)
|
||||
wf_service.trg_create(uid, 'account.invoice', inv_id, cr)
|
||||
return True
|
||||
|
||||
@@ -657,7 +660,7 @@ class account_invoice(osv.osv):
|
||||
ctx = context.copy()
|
||||
ait_obj = self.pool.get('account.invoice.tax')
|
||||
for id in ids:
|
||||
cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s", (id,))
|
||||
cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s AND manual is False", (id,))
|
||||
partner = self.browse(cr, uid, id, context=ctx).partner_id
|
||||
if partner.lang:
|
||||
ctx.update({'lang': partner.lang})
|
||||
@@ -1063,7 +1066,7 @@ class account_invoice(osv.osv):
|
||||
'out_refund': 'OR: ',
|
||||
'in_refund': 'SR: ',
|
||||
}
|
||||
return [(r['id'], types[r['type']]+(r['number'] or '')+' '+(r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
|
||||
return [(r['id'], (r['number']) or types[r['type']] + (r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
@@ -1072,9 +1075,9 @@ class account_invoice(osv.osv):
|
||||
context = {}
|
||||
ids = []
|
||||
if name:
|
||||
ids = self.search(cr, user, [('number','=',name)]+ args, limit=limit, context=context)
|
||||
ids = self.search(cr, user, [('number','=',name)] + args, limit=limit, context=context)
|
||||
if not ids:
|
||||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
|
||||
ids = self.search(cr, user, [('name',operator,name)] + args, limit=limit, context=context)
|
||||
return self.name_get(cr, user, ids, context)
|
||||
|
||||
def _refund_cleanup_lines(self, cr, uid, lines):
|
||||
|
||||
@@ -59,15 +59,23 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
|
||||
def _get_lines(self, form):
|
||||
res = []
|
||||
move_state = ['draft','posted']
|
||||
if self.target_move == 'posted':
|
||||
move_state = ['posted']
|
||||
self.cr.execute('SELECT DISTINCT res_partner.id AS id,\
|
||||
res_partner.name AS name \
|
||||
FROM res_partner,account_move_line AS l, account_account\
|
||||
FROM res_partner,account_move_line AS l, account_account, account_move am\
|
||||
WHERE (l.account_id=account_account.id) \
|
||||
AND (l.move_id=am.id) \
|
||||
AND (am.state IN %s)\
|
||||
AND (account_account.type IN %s)\
|
||||
AND account_account.active\
|
||||
AND ((reconcile_id IS NULL)\
|
||||
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
|
||||
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
|
||||
AND (l.partner_id=res_partner.id)\
|
||||
AND (l.date <= %s)\
|
||||
AND ' + self.query + ' \
|
||||
ORDER BY res_partner.name', (self.date_from,))
|
||||
ORDER BY res_partner.name', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from,))
|
||||
partners = self.cr.dictfetchall()
|
||||
## mise a 0 du total
|
||||
for i in range(7):
|
||||
@@ -78,9 +86,6 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
if not partner_ids:
|
||||
return []
|
||||
# This dictionary will store the debit-credit for all partners, using partner_id as key.
|
||||
move_state = ['draft','posted']
|
||||
if self.target_move == 'posted':
|
||||
move_state = ['posted']
|
||||
|
||||
totals = {}
|
||||
self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit) \
|
||||
@@ -93,7 +98,8 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
|
||||
AND ' + self.query + '\
|
||||
AND account_account.active\
|
||||
GROUP BY l.partner_id ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from))
|
||||
AND (l.date <= %s)\
|
||||
GROUP BY l.partner_id ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from, self.date_from,))
|
||||
t = self.cr.fetchall()
|
||||
for i in t:
|
||||
totals[i[0]] = i[1]
|
||||
@@ -112,7 +118,8 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
|
||||
AND '+ self.query + '\
|
||||
AND account_account.active\
|
||||
GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids),self.date_from))
|
||||
AND (l.date <= %s)\
|
||||
GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids),self.date_from, self.date_from,))
|
||||
t = self.cr.fetchall()
|
||||
for i in t:
|
||||
future_past[i[0]] = i[1]
|
||||
@@ -128,7 +135,8 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
|
||||
AND '+ self.query + '\
|
||||
AND account_account.active\
|
||||
GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from))
|
||||
AND (l.date <= %s)\
|
||||
GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from, self.date_from,))
|
||||
t = self.cr.fetchall()
|
||||
for i in t:
|
||||
future_past[i[0]] = i[1]
|
||||
@@ -148,19 +156,20 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
else:
|
||||
dates_query += ' < %s)'
|
||||
args_list += (form[str(i)]['stop'],)
|
||||
|
||||
self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit)\
|
||||
FROM account_move_line AS l, account_account, account_move am \
|
||||
WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\
|
||||
AND (am.state IN %s)\
|
||||
AND (account_account.type IN %s)\
|
||||
AND (l.partner_id IN %s)\
|
||||
AND ((l.reconcile_id IS NULL)\
|
||||
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
|
||||
AND '+ self.query + '\
|
||||
AND account_account.active\
|
||||
AND ' + dates_query + '\
|
||||
GROUP BY l.partner_id', args_list)
|
||||
args_list += (self.date_from,)
|
||||
self.cr.execute('''SELECT l.partner_id, SUM(l.debit-l.credit)
|
||||
FROM account_move_line AS l, account_account, account_move am
|
||||
WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)
|
||||
AND (am.state IN %s)
|
||||
AND (account_account.type IN %s)
|
||||
AND (l.partner_id IN %s)
|
||||
AND ((l.reconcile_id IS NULL)
|
||||
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))
|
||||
AND ''' + self.query + '''
|
||||
AND account_account.active
|
||||
AND ''' + dates_query + '''
|
||||
AND (l.date <= %s)
|
||||
GROUP BY l.partner_id''', args_list)
|
||||
t = self.cr.fetchall()
|
||||
d = {}
|
||||
for i in t:
|
||||
@@ -201,8 +210,7 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
self.total_account[(i+1)] = self.total_account[(i+1)] + (total and total[0] or 0.0)
|
||||
values['name'] = partner['name']
|
||||
|
||||
if values['total']:
|
||||
res.append(values)
|
||||
res.append(values)
|
||||
|
||||
total = 0.0
|
||||
totals = {}
|
||||
@@ -232,7 +240,8 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
AND ((l.reconcile_id IS NULL) \
|
||||
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
|
||||
AND ' + self.query + '\
|
||||
AND account_account.active ',(tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from))
|
||||
AND (l.date <= %s)\
|
||||
AND account_account.active ',(tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from,))
|
||||
t = self.cr.fetchall()
|
||||
for i in t:
|
||||
totals['Unknown Partner'] = i[0]
|
||||
@@ -281,7 +290,7 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
else:
|
||||
dates_query += ' < %s)'
|
||||
args_list += (form[str(i)]['stop'],)
|
||||
|
||||
args_list += (self.date_from,)
|
||||
self.cr.execute('SELECT SUM(l.debit-l.credit)\
|
||||
FROM account_move_line AS l, account_account, account_move am \
|
||||
WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\
|
||||
@@ -293,6 +302,7 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
|
||||
AND '+ self.query + '\
|
||||
AND account_account.active\
|
||||
AND ' + dates_query + '\
|
||||
AND (l.date <= %s)\
|
||||
GROUP BY l.partner_id', args_list)
|
||||
t = self.cr.fetchall()
|
||||
d = {}
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" />
|
||||
<field name="date" string="Invoice Date"/>
|
||||
<field name="categ_id" />
|
||||
<field name="categ_id" filter_domain="[('categ_id', 'child_of', self)]"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
|
||||
@@ -16,14 +16,11 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_invoice_confirm" model="ir.actions.act_window">
|
||||
<field name="name">Confirm Draft Invoices</field>
|
||||
<field name="res_model">account.invoice.confirm</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_invoice_confirm_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<act_window id="action_account_invoice_confirm"
|
||||
multi="True"
|
||||
key2="client_action_multi" name="Confirm Draft Invoices"
|
||||
res_model="account.invoice.confirm" src_model="account.invoice"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
|
||||
<record id="account_invoice_cancel_view" model="ir.ui.view">
|
||||
<field name="name">account.invoice.cancel.form</field>
|
||||
|
||||
@@ -29,5 +29,10 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_open_closed_fiscalyear"
|
||||
id="menu_wizard_account_open_closed_fiscalyear"
|
||||
sequence="18"
|
||||
parent="menu_account_end_year_treatments" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">Document : Customer account statement</para>
|
||||
<para style="terp_default_9">Date : [[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para>
|
||||
<para style="terp_default_9">Date : [[ formatLang(data['form']['date'],date=True) ]]</para>
|
||||
<para style="terp_default_9">Customer Ref : [[ o.ref or '' ]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
|
||||
@@ -319,13 +319,12 @@ class account_followup_print_all(osv.osv_memory):
|
||||
"WHERE id=%s",
|
||||
(to_update[id]['level'],
|
||||
date, int(id),))
|
||||
|
||||
data.update({'date': context['date']})
|
||||
datas = {
|
||||
'ids': [],
|
||||
'model': 'account_followup.followup',
|
||||
'form': data
|
||||
}
|
||||
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account_followup.followup.print',
|
||||
|
||||
@@ -99,7 +99,7 @@ class payment_order_create(osv.osv_memory):
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [], context=context)[0]
|
||||
search_due_date = data['duedate']
|
||||
# payment = order_obj.browse(cr, uid, context['active_id'], context=context)
|
||||
# payment = self.pool.get('payment.order').browse(cr, uid, context['active_id'], context=context)
|
||||
|
||||
# Search for move line to pay:
|
||||
domain = [('reconcile_id', '=', False), ('account_id.type', '=', 'payable'), ('amount_to_pay', '>', 0)]
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
'depends': ['account'],
|
||||
'init_xml': [],
|
||||
'update_xml': ['account_sequence_data.xml','account_sequence.xml'],
|
||||
'demo_xml': ['account_sequence_minimal.xml'],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
|
||||
@@ -34,6 +34,7 @@ class account_move(osv.osv):
|
||||
res = super(account_move, self).post(cr, uid, ids, context=context)
|
||||
seq_no = False
|
||||
for line in self.browse(cr, uid, ids):
|
||||
# Todo: if there is not internal seq defined on journal raise error ?
|
||||
if line.journal_id.internal_sequence:
|
||||
seq_no = obj_sequence.get_id(cr, uid, line.journal_id.internal_sequence.id, context=context)
|
||||
if seq_no:
|
||||
@@ -48,6 +49,7 @@ class account_journal(osv.osv):
|
||||
_columns = {
|
||||
'internal_sequence': fields.many2one('ir.sequence', 'Internal Sequence'),
|
||||
}
|
||||
|
||||
account_journal()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -20,7 +20,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="code" position="after">
|
||||
<field name="sequence_id" position="after">
|
||||
<field name="internal_sequence"/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
@@ -8,5 +8,8 @@
|
||||
<field name="code">account.journal</field>
|
||||
<field name="number_next">1</field>
|
||||
</record>
|
||||
|
||||
<function eval="('default', False, 'internal_sequence', [('account.journal', False)], internal_sequence_journal, True, False, False, False, True)" id="internal_seq_default_set" model="ir.values" name="set"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="account.sales_journal" model="account.journal">
|
||||
<field name="internal_sequence" ref="internal_sequence_journal"/>
|
||||
</record>
|
||||
|
||||
<record id="account.refund_sales_journal" model="account.journal">
|
||||
<field name="internal_sequence" ref="internal_sequence_journal"/>
|
||||
</record>
|
||||
|
||||
<record id="account.expenses_journal" model="account.journal">
|
||||
<field name="internal_sequence" ref="internal_sequence_journal"/>
|
||||
</record>
|
||||
|
||||
<record id="account.refund_expenses_journal" model="account.journal">
|
||||
<field name="internal_sequence" ref="internal_sequence_journal"/>
|
||||
</record>
|
||||
|
||||
<record id="account.bank_journal" model="account.journal">
|
||||
<field name="internal_sequence" ref="internal_sequence_journal"/>
|
||||
</record>
|
||||
|
||||
<record id="account.check_journal" model="account.journal">
|
||||
<field name="internal_sequence" ref="internal_sequence_journal"/>
|
||||
</record>
|
||||
|
||||
<record id="account.cash_journal" model="account.journal">
|
||||
<field name="internal_sequence" ref="internal_sequence_journal"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,67 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_sequence
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0.0-rc1\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2010-11-18 16:11:21+0000\n"
|
||||
"PO-Revision-Date: 2010-11-18 16:11:21+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_sequence
|
||||
#: sql_constraint:ir.module.module:0
|
||||
msgid "The certificate ID of the module must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_sequence
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_sequence
|
||||
#: model:ir.model,name:account_sequence.model_account_move
|
||||
msgid "Account Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_sequence
|
||||
#: field:account.move,internal_sequence_number:0
|
||||
msgid "Internal Sequence Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_sequence
|
||||
#: model:ir.model,name:account_sequence.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_sequence
|
||||
#: sql_constraint:ir.module.module:0
|
||||
msgid "The name of the module must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_sequence
|
||||
#: model:ir.module.module,shortdesc:account_sequence.module_meta_information
|
||||
msgid "Entries Sequence Numbering"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_sequence
|
||||
#: field:account.journal,internal_sequence:0
|
||||
msgid "Internal Sequence"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_sequence
|
||||
#: constraint:ir.model:0
|
||||
msgid "The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_sequence
|
||||
#: sql_constraint:ir.model.fields:0
|
||||
msgid "Size of the field can never be less than 1 !"
|
||||
msgstr ""
|
||||
|
||||
+16
-4
@@ -370,6 +370,18 @@ class event_registration(osv.osv):
|
||||
self.history(cr, uid, [reg], _('Invoiced'))
|
||||
return inv_id
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
""" Copy record of Given id
|
||||
@param id: Id of Registration record.
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({
|
||||
'invoice_id': False,
|
||||
})
|
||||
return super(event_registration, self).copy(cr, uid, id, default=default, context=context)
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, grouped=False, date_inv = False, context=None):
|
||||
""" Action of Create Invoice """
|
||||
res = False
|
||||
@@ -550,11 +562,11 @@ class event_registration(osv.osv):
|
||||
subject = _('Auto Confirmation: [%s] %s') %(regestration.id, regestration.name)
|
||||
body = regestration.event_id.mail_confirm
|
||||
if subject or body:
|
||||
tools.email_send(src, email_to, subject, body, email_cc = email_cc, openobject_id = regestration.id)
|
||||
tools.email_send(src, email_to, subject, body, email_cc=email_cc, openobject_id=regestration.id)
|
||||
self.history(cr, uid, [regestration], subject, history = True, \
|
||||
email = email_to, details = body, \
|
||||
subject = subject, email_from = src, \
|
||||
email_cc = ', '.join(email_cc))
|
||||
email=email_to, details=body, \
|
||||
subjec=subject, email_from=src, \
|
||||
email_cc=', '.join(email_cc))
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,10 +15,10 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import event
|
||||
import event_project
|
||||
import wizard
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="name">Casual Leave for Fabien Pinckaers</field>
|
||||
<field name="holiday_status_id" ref="holiday_status_cl"/>
|
||||
<field name="type">add</field>
|
||||
<field name="number_of_days_temp">12</field>
|
||||
<field name="number_of_days_temp">20</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -166,12 +166,8 @@
|
||||
<field name="user_id" invisible="1"/>
|
||||
<!--field name="type"/-->
|
||||
<field name="state"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -253,12 +249,8 @@
|
||||
<field name="user_id" invisible="1"/>
|
||||
<!--field name="type"/-->
|
||||
<field name="state"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse,validate1" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
|
||||
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
<menuitem
|
||||
action="action_hr_timesheet_invoice_factor_form"
|
||||
id="hr_timesheet_invoice_factor_view"
|
||||
parent="account.menu_low_level"/>
|
||||
parent="account.menu_configuration_misc" sequence="25"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -146,7 +146,6 @@ class partner_vat_list(osv.osv_memory):
|
||||
obj_fyear = self.pool.get('account.fiscalyear')
|
||||
obj_addr = self.pool.get('res.partner.address')
|
||||
obj_vat_lclient = self.pool.get('vat.listing.clients')
|
||||
obj_model_data = self.pool.get('ir.model.data')
|
||||
|
||||
seq_controlref = obj_sequence.get(cursor, user, 'controlref')
|
||||
seq_declarantnum = obj_sequence.get(cursor, user, 'declarantnum')
|
||||
|
||||
@@ -50,7 +50,6 @@ class l10n_be_vat_declaration(osv.osv_memory):
|
||||
}
|
||||
|
||||
def create_xml(self, cr, uid, ids, context=None):
|
||||
obj_fyear = self.pool.get('account.fiscalyear')
|
||||
obj_tax_code = self.pool.get('account.tax.code')
|
||||
obj_acc_period = self.pool.get('account.period')
|
||||
obj_user = self.pool.get('res.users')
|
||||
|
||||
@@ -68,13 +68,11 @@ class partner_vat_intra(osv.osv_memory):
|
||||
|
||||
def create_xml(self, cursor, user, ids, context=None):
|
||||
obj_user = self.pool.get('res.users')
|
||||
obj_fyear = self.pool.get('account.fiscalyear')
|
||||
obj_sequence = self.pool.get('ir.sequence')
|
||||
obj_partner = self.pool.get('res.partner')
|
||||
obj_partner_add = self.pool.get('res.partner.address')
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
street = zip_city = country = p_list = data_clientinfo = ''
|
||||
error_message = list_partner = []
|
||||
seq = amount_sum = 0
|
||||
|
||||
if context is None:
|
||||
|
||||
@@ -1,43 +1,40 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
#################################################################################
|
||||
# #
|
||||
# Copyright (C) 2009 Renato Lima - Akretion #
|
||||
# #
|
||||
#This program is free software: you can redistribute it and/or modify #
|
||||
#it under the terms of the GNU 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 General Public License for more details. #
|
||||
# #
|
||||
#You should have received a copy of the GNU General Public License #
|
||||
#along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
#
|
||||
# Copyright (C) 2009 Renato Lima - Akretion
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#################################################################################
|
||||
|
||||
{
|
||||
'name' : 'Brazilian Localization',
|
||||
'description' : 'Brazilian Localization',
|
||||
'category' : 'Localisation/Account Charts',
|
||||
'author' : 'OpenERP Brasil',
|
||||
'website' : 'http://openerpbrasil.org',
|
||||
'version' : '0.6',
|
||||
'depends' : [
|
||||
'account',
|
||||
'account_chart',
|
||||
],
|
||||
'init_xml': [
|
||||
],
|
||||
'update_xml' : [
|
||||
'name': 'Brazilian Localization',
|
||||
'description': 'Brazilian Localization',
|
||||
'category': 'Localisation/Account Charts',
|
||||
'author': 'OpenERP Brasil',
|
||||
'website': 'http://openerpbrasil.org',
|
||||
'version': '0.6',
|
||||
'depends': ['account','account_chart'],
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'data/account.account.type.csv',
|
||||
'data/account.tax.code.template.csv',
|
||||
'data/account.account.template.csv',
|
||||
'data/l10n_br_account_chart_template.xml',
|
||||
'data/account_tax_template.xml',
|
||||
'data/account_tax_template.xml'
|
||||
],
|
||||
'installable': True
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -46,15 +46,16 @@
|
||||
<field name="invoice_id" ref="v11_invoice"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
<record model="account.journal" id="account.sales_journal">
|
||||
<field name="default_debit_account_id" ref="account.a_recv"/>
|
||||
</record>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<!-- Define a payment mode -->
|
||||
|
||||
<record model="payment.mode" id="payment_mode_dta">
|
||||
<field name="name">DTA</field>
|
||||
<field name="bank_id" ref="main_bank"/>
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
-
|
||||
In order to test the PDF reports defined on a l10n_ch, we will create a Invoice Record
|
||||
-
|
||||
!record {model: account.invoice, id: test_invoice_1}:
|
||||
currency_id: base.EUR
|
||||
company_id: base.main_company
|
||||
address_invoice_id: base.res_partner_address_tang
|
||||
partner_id: base.res_partner_asus
|
||||
state: draft
|
||||
type: out_invoice
|
||||
account_id: account.a_recv
|
||||
name: Test invoice 1
|
||||
address_contact_id: base.res_partner_address_tang
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a l10n_ch, we will print BVR Report
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
import netsvc, tools, os
|
||||
run_str = 'cp ' + tools.config['addons_path'] + '/l10n_ch/report/ocrbb.ttf' + ' ' + '/tmp/ocrbb.ttf'
|
||||
run_str = 'cp ' + tools.config['addons_path'] + '/l10n_ch/report/ocrbb.ttf' + ' ' + '/tmp/ocrbb.ttf'
|
||||
os.system(run_str)
|
||||
(data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
|
||||
(data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_report.'+format), 'wb+').write(data)
|
||||
|
||||
@@ -14,6 +28,6 @@
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
|
||||
(data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_invoice_report.'+format), 'wb+').write(data)
|
||||
|
||||
@@ -57,8 +57,9 @@
|
||||
<field name="shortcut">Mme,m</field>
|
||||
</record>
|
||||
<!--
|
||||
Account Journal we define the swiss base journal
|
||||
Account Journal we define the swiss base journal
|
||||
-->
|
||||
<!--
|
||||
<record id="account.sales_journal" model="account.journal">
|
||||
<field name="name">Journal de vente</field>
|
||||
<field name="code">JV</field>
|
||||
@@ -99,5 +100,6 @@
|
||||
<field name="view_id" ref="account.account_journal_view"/>
|
||||
<field name="sequence_id" ref="account.sequence_journal"/>
|
||||
</record>
|
||||
-->
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# __openerp__.py
|
||||
# l10n_cr_account
|
||||
# First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.)
|
||||
# Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# __openerp__.py
|
||||
# l10n_cr_account
|
||||
# First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.)
|
||||
# Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other materials
|
||||
# provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# The views and conclusions contained in the software and documentation are those of the
|
||||
# authors and should not be interpreted as representing official policies, either expressed
|
||||
# or implied, of ClearCorp S.A..
|
||||
#
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# The views and conclusions contained in the software and documentation are those of the
|
||||
# authors and should not be interpreted as representing official policies, either expressed
|
||||
# or implied, of ClearCorp S.A..
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
@@ -40,17 +40,17 @@
|
||||
'website': 'http://clearcorp.co.cr',
|
||||
'category': 'Localisation/Account Charts',
|
||||
'description': """Chart of accounts for Costa Rica
|
||||
Includes:
|
||||
* account.type
|
||||
* account.account.template
|
||||
* account.tax.template
|
||||
* account.tax.code.template
|
||||
* account.chart.template
|
||||
|
||||
Everything is in English with Spanish translation. Further translations are welcome, please go to
|
||||
http://translations.launchpad.net/openerp-costa-rica
|
||||
Includes:
|
||||
* account.type
|
||||
* account.account.template
|
||||
* account.tax.template
|
||||
* account.tax.code.template
|
||||
* account.chart.template
|
||||
|
||||
Everything is in English with Spanish translation. Further translations are welcome, please go to
|
||||
http://translations.launchpad.net/openerp-costa-rica
|
||||
""",
|
||||
'depends': ['account','account_chart', 'base'],
|
||||
'depends': ['account', 'account_chart', 'base'],
|
||||
'init_xml': [],
|
||||
'demo_xml': [],
|
||||
'update_xml': [
|
||||
@@ -60,9 +60,11 @@
|
||||
'data/account_tax_code_template.xml',
|
||||
'data/account_chart_template.xml',
|
||||
'data/account_tax_template.xml',
|
||||
'l10n_wizard.xml'
|
||||
],
|
||||
'l10n_wizard.xml',
|
||||
],
|
||||
'license': 'Other OSI approved licence',
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -8,89 +8,67 @@
|
||||
<record id="account_account_type_asset" model="account.account.type">
|
||||
<field name="code">A</field>
|
||||
<field name="name">Asset</field>
|
||||
<field name="sequence">10</field>
|
||||
<field name="sign" eval="1"/>
|
||||
<field name="partner_account" eval="False"/>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="account_account_type_asset_valuation" model="account.account.type">
|
||||
<field name="code">AV</field>
|
||||
<field name="name">Asset valuation</field>
|
||||
<field name="sequence">13</field>
|
||||
<field name="sign" eval="-1"/>
|
||||
<field name="partner_account" eval="False"/>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="account_account_type_cash" model="account.account.type">
|
||||
<field name="code">C</field>
|
||||
<field name="name">Cash</field>
|
||||
<field name="sequence">11</field>
|
||||
<field name="sign" eval="1"/>
|
||||
<field name="partner_account" eval="False"/>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="account_account_type_equity" model="account.account.type">
|
||||
<field name="code">Eq</field>
|
||||
<field name="name">Equity</field>
|
||||
<field name="sequence">30</field>
|
||||
<field name="sign" eval="-1"/>
|
||||
<field name="partner_account" eval="False"/>
|
||||
<field name="close_method">detail</field>
|
||||
</record>
|
||||
<record id="account_account_type_expense" model="account.account.type">
|
||||
<field name="code">Ex</field>
|
||||
<field name="name">Expense</field>
|
||||
<field name="sequence">50</field>
|
||||
<field name="sign" eval="-1"/>
|
||||
<field name="partner_account" eval="False"/>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record id="account_account_type_income" model="account.account.type">
|
||||
<field name="code">I</field>
|
||||
<field name="name">Income</field>
|
||||
<field name="sequence">40</field>
|
||||
<field name="sign" eval="1"/>
|
||||
<field name="partner_account" eval="False"/>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record id="account_account_type_passive" model="account.account.type">
|
||||
<field name="code">Pas</field>
|
||||
<field name="name">Passive</field>
|
||||
<field name="sequence">20</field>
|
||||
<field name="sign" eval="-1"/>
|
||||
<field name="partner_account" eval="False"/>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="account_account_type_payable" model="account.account.type">
|
||||
<field name="code">Pay</field>
|
||||
<field name="name">Payable</field>
|
||||
<field name="sequence">21</field>
|
||||
<field name="sign" eval="-1"/>
|
||||
<field name="partner_account" eval="True"/>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record id="account_account_type_receivable" model="account.account.type">
|
||||
<field name="code">R</field>
|
||||
<field name="name">Receivable</field>
|
||||
<field name="sequence">12</field>
|
||||
<field name="sign" eval="1"/>
|
||||
<field name="partner_account" eval="True"/>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record id="account_account_type_tax" model="account.account.type">
|
||||
<field name="code">T</field>
|
||||
<field name="name">Tax</field>
|
||||
<field name="sequence">22</field>
|
||||
<field name="sign" eval="-1"/>
|
||||
<field name="partner_account" eval="True"/>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record id="account_account_type_view" model="account.account.type">
|
||||
<field name="code">V</field>
|
||||
<field name="name">View</field>
|
||||
<field name="sequence">0</field>
|
||||
<field name="sign" eval="1"/>
|
||||
<field name="partner_account" eval="False"/>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<field name="sequence">10</field>
|
||||
<field name="amount">13</field>
|
||||
<field name="type">percent</field>
|
||||
<field name="tax_group">vat</field>
|
||||
<!-- <field name="tax_group">vat</field> -->
|
||||
<field name="type_tax_use">all</field>
|
||||
<field name="applicable_type">true</field>
|
||||
<field name="child_depend" eval="False"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
<field name="sequence">10</field>
|
||||
<field name="amount">13</field>
|
||||
<field name="type">percent</field>
|
||||
<field name="tax_group">vat</field>
|
||||
<!-- <field name="tax_group">vat</field> -->
|
||||
<field name="type_tax_use">all</field>
|
||||
<field name="applicable_type">true</field>
|
||||
<field name="child_depend" eval="False"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<!--
|
||||
Resource: res.country.state
|
||||
Update states
|
||||
@@ -41,8 +41,6 @@
|
||||
<field name="name">Limón</field>
|
||||
<field model="res.country" name="country_id" ref="base.cr"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
Resource: res.partner.title
|
||||
Update partner titles
|
||||
|
||||
+212
-211
@@ -1,232 +1,233 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
|
||||
|
||||
<data noupdate="False">
|
||||
|
||||
<!-- VAT Code Definitions -->
|
||||
|
||||
<!-- Invoiced VAT -->
|
||||
|
||||
<!-- Input VAT -->
|
||||
|
||||
<record id="vat_code_chart_root" model="account.tax.code.template">
|
||||
<field name="name">Πίνακες φόρου</field>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_balance_net" model="account.tax.code.template">
|
||||
<field name="name">Υπόλοιπο ΦΠΑ </field>
|
||||
<field name="parent_id" ref="vat_code_chart_root"/>
|
||||
<field name="code">501-511</field>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_input" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών</field>
|
||||
<field name="parent_id" ref="vat_code_balance_net"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_input_restgr" model="account.tax.code.template">
|
||||
<field name="name">Λοιπή Ελλάδα εκτός Αιγαίου</field>
|
||||
<field name="parent_id" ref="vat_code_input"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_input_9" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 9%</field>
|
||||
<field name="code">371</field>
|
||||
<field name="parent_id" ref="vat_code_input_restgr"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_input_4" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 4,5%</field>
|
||||
<field name="code">372</field>
|
||||
<field name="parent_id" ref="vat_code_input_restgr"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_input_19" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 19%</field>
|
||||
<field name="code">373</field>
|
||||
<field name="parent_id" ref="vat_code_input_restgr"/>
|
||||
</record>
|
||||
<!-- VAT Code Definitions -->
|
||||
|
||||
<record id="vat_code_input_aeg" model="account.tax.code.template">
|
||||
<field name="name">Νησιά Αιγαίου</field>
|
||||
<field name="parent_id" ref="vat_code_input"/>
|
||||
</record>
|
||||
<!-- Invoiced VAT -->
|
||||
|
||||
<record id="vat_code_input_6" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 6%</field>
|
||||
<field name="code">374</field>
|
||||
<field name="parent_id" ref="vat_code_input_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_input_3" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 3%</field>
|
||||
<field name="code">375</field>
|
||||
<field name="parent_id" ref="vat_code_input_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_input_13" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 13%</field>
|
||||
<field name="code">376</field>
|
||||
<field name="parent_id" ref="vat_code_input_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών</field>
|
||||
<field name="parent_id" ref="vat_code_balance_net"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_restgr" model="account.tax.code.template">
|
||||
<field name="name">Λοιπή Ελλάδα εκτός Αιγαίου</field>
|
||||
<field name="parent_id" ref="vat_code_output"/>
|
||||
</record>
|
||||
<!-- Input VAT -->
|
||||
|
||||
<record id="vat_code_output_9" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 9%</field>
|
||||
<field name="code">331</field>
|
||||
<field name="parent_id" ref="vat_code_output_restgr"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_4" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 4,5%</field>
|
||||
<field name="code">332</field>
|
||||
<field name="parent_id" ref="vat_code_output_restgr"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_19" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 19%</field>
|
||||
<field name="code">333</field>
|
||||
<field name="parent_id" ref="vat_code_output_restgr"/>
|
||||
</record>
|
||||
<record id="vat_code_chart_root" model="account.tax.code.template">
|
||||
<field name="name">Πίνακες φόρου</field>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_aeg" model="account.tax.code.template">
|
||||
<field name="name">Νησιά Αιγαίου</field>
|
||||
<field name="parent_id" ref="vat_code_output"/>
|
||||
</record>
|
||||
<record id="vat_code_balance_net" model="account.tax.code.template">
|
||||
<field name="name">Υπόλοιπο ΦΠΑ </field>
|
||||
<field name="parent_id" ref="vat_code_chart_root"/>
|
||||
<field name="code">501-511</field>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_6" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 6%</field>
|
||||
<field name="code">334</field>
|
||||
<field name="parent_id" ref="vat_code_output_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_3" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 3%</field>
|
||||
<field name="code">335</field>
|
||||
<field name="parent_id" ref="vat_code_output_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_13" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 13%</field>
|
||||
<field name="code">336</field>
|
||||
<field name="parent_id" ref="vat_code_output_aeg"/>
|
||||
</record>
|
||||
<record id="vat_code_input" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών</field>
|
||||
<field name="parent_id" ref="vat_code_balance_net"/>
|
||||
</record>
|
||||
|
||||
<record id="sum_output" model="account.tax.code.template">
|
||||
<field name="name">Σύνολο Εκροών</field>
|
||||
<field name="code">311</field>
|
||||
<field name="parent_id" ref="vat_code_chart_root"/>
|
||||
</record>
|
||||
<record id="vat_code_input_restgr" model="account.tax.code.template">
|
||||
<field name="name">Λοιπή Ελλάδα εκτός Αιγαίου</field>
|
||||
<field name="parent_id" ref="vat_code_input"/>
|
||||
</record>
|
||||
|
||||
<record id="sum_output_307" model="account.tax.code.template">
|
||||
<field name="name">Σύνολο Φορολ/τέων Εκροών</field>
|
||||
<field name="code">307</field>
|
||||
<field name="parent_id" ref="sum_output"/>
|
||||
</record>
|
||||
<record id="vat_code_input_9" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 9%</field>
|
||||
<field name="code">371</field>
|
||||
<field name="parent_id" ref="vat_code_input_restgr"/>
|
||||
</record>
|
||||
|
||||
<record id="output_301" model="account.tax.code.template">
|
||||
<field name="name">Εκροές 9%</field>
|
||||
<field name="code">301</field>
|
||||
<field name="parent_id" ref="sum_output_307"/>
|
||||
</record>
|
||||
<record id="output_302" model="account.tax.code.template">
|
||||
<field name="name">Εκροές 4.5%</field>
|
||||
<field name="code">302</field>
|
||||
<field name="parent_id" ref="sum_output_307"/>
|
||||
</record>
|
||||
<record id="output_303" model="account.tax.code.template">
|
||||
<field name="name">Εκροές 19%</field>
|
||||
<field name="code">303</field>
|
||||
<field name="parent_id" ref="sum_output_307"/>
|
||||
</record>
|
||||
<record id="vat_code_input_4" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 4,5%</field>
|
||||
<field name="code">372</field>
|
||||
<field name="parent_id" ref="vat_code_input_restgr"/>
|
||||
</record>
|
||||
|
||||
<!-- Other tax columns -->
|
||||
<record id="sum_input" model="account.tax.code.template">
|
||||
<field name="name">Σύνολο Φορολ/τέων εισροών</field>
|
||||
<field name="parent_id" ref="vat_code_chart_root"/>
|
||||
</record>
|
||||
<record id="vat_code_input_19" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 19%</field>
|
||||
<field name="code">373</field>
|
||||
<field name="parent_id" ref="vat_code_input_restgr"/>
|
||||
</record>
|
||||
|
||||
<record id="sum_input_358" model="account.tax.code.template">
|
||||
<field name="name">Σύνολο Φορολ/τέων εισροών</field>
|
||||
<field name="code">358</field>
|
||||
<field name="parent_id" ref="vat_code_chart_root"/>
|
||||
</record>
|
||||
<record id="vat_code_input_aeg" model="account.tax.code.template">
|
||||
<field name="name">Νησιά Αιγαίου</field>
|
||||
<field name="parent_id" ref="vat_code_input"/>
|
||||
</record>
|
||||
|
||||
<record id="input_351" model="account.tax.code.template">
|
||||
<field name="name">Εισροές 9%</field>
|
||||
<field name="code">351</field>
|
||||
<field name="parent_id" ref="sum_input_358"/>
|
||||
</record>
|
||||
<record id="input_352" model="account.tax.code.template">
|
||||
<field name="name">Εισροές 4.5%</field>
|
||||
<field name="code">352</field>
|
||||
<field name="parent_id" ref="sum_input_358"/>
|
||||
</record>
|
||||
<record id="vat_code_input_6" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 6%</field>
|
||||
<field name="code">374</field>
|
||||
<field name="parent_id" ref="vat_code_input_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="input_353" model="account.tax.code.template">
|
||||
<field name="name">Εισροές 19%</field>
|
||||
<field name="code">353</field>
|
||||
<field name="parent_id" ref="sum_input_358"/>
|
||||
</record>
|
||||
<record id="vat_code_input_3" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 3%</field>
|
||||
<field name="code">375</field>
|
||||
<field name="parent_id" ref="vat_code_input_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_input_13" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εισροών 13%</field>
|
||||
<field name="code">376</field>
|
||||
<field name="parent_id" ref="vat_code_input_aeg"/>
|
||||
</record>
|
||||
|
||||
<!-- Chart Template -->
|
||||
|
||||
<record id="l10n_gr_chart_template" model="account.chart.template">
|
||||
<field name="name">Πρότυπο Ελληνικού Λογιστικού Σχεδίου</field>
|
||||
<field name="account_root_id" ref="chartgr_0"/>
|
||||
<field name="tax_code_root_id" ref="vat_code_chart_root"/>
|
||||
<field name="bank_account_view_id" ref="chartgr_38_03"/>
|
||||
<field name="property_account_receivable" ref="chartgr_31"/>
|
||||
<field name="property_account_payable" ref="chartgr_50"/>
|
||||
<field name="property_account_expense_categ" ref="chartgr_64"/>
|
||||
<field name="property_account_income_categ" ref="chartgr_72"/>
|
||||
</record>
|
||||
<record id="vat_code_output" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών</field>
|
||||
<field name="parent_id" ref="vat_code_balance_net"/>
|
||||
</record>
|
||||
|
||||
<!-- VAT Codes -->
|
||||
<!-- Purchases + Input VAT -->
|
||||
|
||||
<record id="ivat19" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10n_gr_chart_template"/>
|
||||
<field name="name">Εισροές 19</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="account_collected_id" ref="chartgr_54_00"/>
|
||||
<field name="account_paid_id" ref="chartgr_54_00"/>
|
||||
<field name="base_code_id" ref="input_353"/>
|
||||
<field name="tax_code_id" ref="vat_code_input_19"/>
|
||||
|
||||
<!-- refunds: <field name="ref_base_code_id" ref="vat_code_purch_S"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_input_S"/> -->
|
||||
</record>
|
||||
|
||||
<!-- *-* revise the ΦΠΑ.. -->
|
||||
<record id="ovat19" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10n_gr_chart_template"/>
|
||||
<field name="name">Εκροές 19</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="account_collected_id" ref="chartgr_54_00"/>
|
||||
<field name="account_paid_id" ref="chartgr_54_00"/>
|
||||
<field name="base_code_id" ref="output_303"/>
|
||||
<field name="tax_code_id" ref="vat_code_output_19"/>
|
||||
|
||||
<!-- refunds: <field name="ref_base_code_id" ref="vat_code_purch_S"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_input_S"/> -->
|
||||
</record>
|
||||
|
||||
|
||||
<record id="vat_code_output_restgr" model="account.tax.code.template">
|
||||
<field name="name">Λοιπή Ελλάδα εκτός Αιγαίου</field>
|
||||
<field name="parent_id" ref="vat_code_output"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_9" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 9%</field>
|
||||
<field name="code">331</field>
|
||||
<field name="parent_id" ref="vat_code_output_restgr"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_4" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 4,5%</field>
|
||||
<field name="code">332</field>
|
||||
<field name="parent_id" ref="vat_code_output_restgr"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_19" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 19%</field>
|
||||
<field name="code">333</field>
|
||||
<field name="parent_id" ref="vat_code_output_restgr"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_aeg" model="account.tax.code.template">
|
||||
<field name="name">Νησιά Αιγαίου</field>
|
||||
<field name="parent_id" ref="vat_code_output"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_6" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 6%</field>
|
||||
<field name="code">334</field>
|
||||
<field name="parent_id" ref="vat_code_output_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_3" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 3%</field>
|
||||
<field name="code">335</field>
|
||||
<field name="parent_id" ref="vat_code_output_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_output_13" model="account.tax.code.template">
|
||||
<field name="name">ΦΠΑ Εκροών 13%</field>
|
||||
<field name="code">336</field>
|
||||
<field name="parent_id" ref="vat_code_output_aeg"/>
|
||||
</record>
|
||||
|
||||
<record id="sum_output" model="account.tax.code.template">
|
||||
<field name="name">Σύνολο Εκροών</field>
|
||||
<field name="code">311</field>
|
||||
<field name="parent_id" ref="vat_code_chart_root"/>
|
||||
</record>
|
||||
|
||||
<record id="sum_output_307" model="account.tax.code.template">
|
||||
<field name="name">Σύνολο Φορολ/τέων Εκροών</field>
|
||||
<field name="code">307</field>
|
||||
<field name="parent_id" ref="sum_output"/>
|
||||
</record>
|
||||
|
||||
<record id="output_301" model="account.tax.code.template">
|
||||
<field name="name">Εκροές 9%</field>
|
||||
<field name="code">301</field>
|
||||
<field name="parent_id" ref="sum_output_307"/>
|
||||
</record>
|
||||
|
||||
<record id="output_302" model="account.tax.code.template">
|
||||
<field name="name">Εκροές 4.5%</field>
|
||||
<field name="code">302</field>
|
||||
<field name="parent_id" ref="sum_output_307"/>
|
||||
</record>
|
||||
|
||||
<record id="output_303" model="account.tax.code.template">
|
||||
<field name="name">Εκροές 19%</field>
|
||||
<field name="code">303</field>
|
||||
<field name="parent_id" ref="sum_output_307"/>
|
||||
</record>
|
||||
|
||||
<!-- Other tax columns -->
|
||||
|
||||
<record id="sum_input" model="account.tax.code.template">
|
||||
<field name="name">Σύνολο Φορολ/τέων εισροών</field>
|
||||
<field name="parent_id" ref="vat_code_chart_root"/>
|
||||
</record>
|
||||
|
||||
<record id="sum_input_358" model="account.tax.code.template">
|
||||
<field name="name">Σύνολο Φορολ/τέων εισροών</field>
|
||||
<field name="code">358</field>
|
||||
<field name="parent_id" ref="vat_code_chart_root"/>
|
||||
</record>
|
||||
|
||||
<record id="input_351" model="account.tax.code.template">
|
||||
<field name="name">Εισροές 9%</field>
|
||||
<field name="code">351</field>
|
||||
<field name="parent_id" ref="sum_input_358"/>
|
||||
</record>
|
||||
|
||||
<record id="input_352" model="account.tax.code.template">
|
||||
<field name="name">Εισροές 4.5%</field>
|
||||
<field name="code">352</field>
|
||||
<field name="parent_id" ref="sum_input_358"/>
|
||||
</record>
|
||||
|
||||
<record id="input_353" model="account.tax.code.template">
|
||||
<field name="name">Εισροές 19%</field>
|
||||
<field name="code">353</field>
|
||||
<field name="parent_id" ref="sum_input_358"/>
|
||||
</record>
|
||||
|
||||
<!-- Chart Template -->
|
||||
|
||||
<record id="l10n_gr_chart_template" model="account.chart.template">
|
||||
<field name="name">Πρότυπο Ελληνικού Λογιστικού Σχεδίου</field>
|
||||
<field name="account_root_id" ref="chartgr_0"/>
|
||||
<field name="tax_code_root_id" ref="vat_code_chart_root"/>
|
||||
<field name="bank_account_view_id" ref="chartgr_38_03"/>
|
||||
<field name="property_account_receivable" ref="chartgr_31"/>
|
||||
<field name="property_account_payable" ref="chartgr_50"/>
|
||||
<field name="property_account_expense_categ" ref="chartgr_64"/>
|
||||
<field name="property_account_income_categ" ref="chartgr_72"/>
|
||||
</record>
|
||||
|
||||
<!-- VAT Codes -->
|
||||
<!-- Purchases + Input VAT -->
|
||||
|
||||
<record id="ivat19" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10n_gr_chart_template"/>
|
||||
<field name="name">Εισροές 19</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="account_collected_id" ref="chartgr_54_00"/>
|
||||
<field name="account_paid_id" ref="chartgr_54_00"/>
|
||||
<field name="base_code_id" ref="input_353"/>
|
||||
<field name="tax_code_id" ref="vat_code_input_19"/>
|
||||
|
||||
<!-- refunds: <field name="ref_base_code_id" ref="vat_code_purch_S"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_input_S"/> -->
|
||||
</record>
|
||||
|
||||
<!-- *-* revise the ΦΠΑ.. -->
|
||||
|
||||
<record id="ovat19" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10n_gr_chart_template"/>
|
||||
<field name="name">Εκροές 19</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="account_collected_id" ref="chartgr_54_00"/>
|
||||
<field name="account_paid_id" ref="chartgr_54_00"/>
|
||||
<field name="base_code_id" ref="output_303"/>
|
||||
<field name="tax_code_id" ref="vat_code_output_19"/>
|
||||
<!-- refunds: <field name="ref_base_code_id" ref="vat_code_purch_S"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_input_S"/> -->
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
<field name="name">Base of Taxed Purchases</field>
|
||||
<field name="parent_id" ref="vat_code_base_net"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
<record id="opening_journal" model="account.journal">
|
||||
<field name="name">Opening Journal</field>
|
||||
<field name="code">OPJ</field>
|
||||
@@ -475,7 +475,7 @@
|
||||
<field name="sequence_id" ref="account.sequence_journal"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
||||
-->
|
||||
<record id="cose_journal_opening" model="account.analytic.journal">
|
||||
<field name="code">OPJ</field>
|
||||
<field name="name">Opening Journal</field>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Italian OpenERP accounting module
|
||||
# Italian OpenERP accounting module
|
||||
# Copyright (C) 2010 Servabit srl (<http://www.servabit.it>) and the
|
||||
# Italian OpenERP Community (<http://www.openerp-italia.com>)
|
||||
#
|
||||
# ########################################################################
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -29,5 +29,4 @@ import libroIVA
|
||||
import report
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,11 +1,11 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Italian OpenERP accounting module
|
||||
# Copyright (C) 2010 Servabit srl (<http://www.servabit.it>)
|
||||
# Italian OpenERP accounting module
|
||||
# Copyright (C) 2010 Servabit srl (<http://www.servabit.it>)
|
||||
#
|
||||
# Developed by the servabit OpenERP team: openerp@servabit.it
|
||||
#
|
||||
#
|
||||
# Some parts have been taken from modules by the:
|
||||
# Italian OpenERP Community (<http://www.openerp-italia.com>)
|
||||
# Some files follows the ideas in the l10n_fr module,
|
||||
@@ -13,7 +13,7 @@
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -31,29 +31,30 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"name" : "Italy - Chart of Accounts By Servabit",
|
||||
"version" : "0.4",
|
||||
"author" : "Servabit srl",
|
||||
"name": "Italy - Chart of Accounts By Servabit",
|
||||
"version": "0.4",
|
||||
"author": "Servabit srl",
|
||||
"website": "http://www.servabit.it",
|
||||
"category" : "Localisation/Account Charts",
|
||||
"description": "This is a module to manage the accounting chart for Italy (CC2424 Profile) for a service company.",
|
||||
"depends" : ["account", "base_iban", "base_vat", "account_chart"],
|
||||
"demo_xml" : [],
|
||||
"update_xml" : ['tipoconti_servabit.xml',
|
||||
'pianoconti_servabit.xml',
|
||||
'account_tax_template.xml',
|
||||
'journals.xml',
|
||||
'default_accounts.xml',
|
||||
'anno_fiscale.xml',
|
||||
'l10n_chart_it_servabit_wizard.xml',
|
||||
'report.xml',
|
||||
'libroIVA_view.xml',
|
||||
'libroIVA_menu.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
"category": "Localisation/Account Charts",
|
||||
"description": """This is a module to manage the accounting chart for Italy (CC2424 Profile) for a service company.""",
|
||||
"depends": ["account", "base_iban", "base_vat", "account_chart"],
|
||||
"demo_xml": [],
|
||||
"update_xml": [
|
||||
'tipoconti_servabit.xml',
|
||||
'pianoconti_servabit.xml',
|
||||
'account_tax_template.xml',
|
||||
'journals.xml',
|
||||
'default_accounts.xml',
|
||||
'anno_fiscale.xml',
|
||||
'l10n_chart_it_servabit_wizard.xml',
|
||||
'report.xml',
|
||||
'libroIVA_view.xml',
|
||||
'libroIVA_menu.xml',
|
||||
'security/ir.model.access.csv'
|
||||
],
|
||||
"active": False,
|
||||
"installable": True,
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
+18
-17
@@ -3,25 +3,25 @@
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
|
||||
<!--
|
||||
Piano dei conti per una ditta di servizi, by Servabit.srl
|
||||
<!--
|
||||
Piano dei conti per una ditta di servizi, by Servabit.srl
|
||||
(http://www.servabit.it)
|
||||
|
||||
Qui vengono definiti i journals, sezioni del "libro giornale"
|
||||
cui sono associate le diverse scritture contabili
|
||||
( from account/demo/account_minimal.xml, modified )
|
||||
|
||||
-->
|
||||
Qui vengono definiti i journals, sezioni del "libro giornale"
|
||||
cui sono associate le diverse scritture contabili
|
||||
( from account/demo/account_minimal.xml, modified )
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Account Journal
|
||||
-->
|
||||
|
||||
|
||||
<!-- inserisco giornali vendite, acquisti , banca, contanti -->
|
||||
|
||||
<!-- inserisco giornali vendite, acquisti , banca, contanti -->
|
||||
<!-- i default dei conti sono presi dai prodotti -->
|
||||
|
||||
<!-- vendite ed acquisti sono gia' creati da OpenERP -->
|
||||
<!-- vendite ed acquisti sono gia' creati da OpenERP -->
|
||||
|
||||
<!-- <record id="sales_journal" model="account.journal">
|
||||
<field name="name">Giornale vendite</field>
|
||||
@@ -41,18 +41,19 @@
|
||||
<field name="sequence_id" ref="account.sequence_purchase_journal"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
-->
|
||||
-->
|
||||
<!--
|
||||
<record id="bank_journal" model="account.journal">
|
||||
<field name="name">Conto bancario</field>
|
||||
<field name="code">BNK</field>
|
||||
<field name="type">cash</field>
|
||||
<field name="view_id" ref="account.account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="account.sequence_journal"/>
|
||||
<field name="sequence_id" ref="account.sequence_journal"/>-->
|
||||
<!-- non si possono definire i default fino a che non si sono fatti
|
||||
i conti dal template di piano dei conti -->
|
||||
i conti dal template di piano dei conti -->
|
||||
<!-- <field name="default_debit_account_id" ref="chartS_C09_001"/> -->
|
||||
<!-- <field name="default_credit_account_id" ref="chartS_C09_001"/> -->
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<!-- <field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
||||
<record id="cash_journal" model="account.journal">
|
||||
@@ -60,13 +61,13 @@
|
||||
<field name="code">CHK</field>
|
||||
<field name="type">cash</field>
|
||||
<field name="view_id" ref="account.account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="account.sequence_journal"/>
|
||||
<field name="sequence_id" ref="account.sequence_journal"/>-->
|
||||
<!-- <field name="default_debit_account_id" ref="chartS_C09_031"/> -->
|
||||
<!-- <field name="default_credit_account_id" ref="chartS_C09_031"/> -->
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<!-- <field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
##############################################################################
|
||||
|
||||
|
||||
# ##################################################################################
|
||||
# Questa vista SQL viene usata solo per far scegliere l'anno di pianificazione all'utente
|
||||
# Viene infatti costruita una vista XML di tipo tree che contiene solo i diversi anni per i quali stata fatta almeno una pianificazione
|
||||
# ##################################################################################
|
||||
###################################################################################
|
||||
# Questa vista SQL viene usata solo per far scegliere l'anno di pianificazione all'utente
|
||||
# Viene infatti costruita una vista XML di tipo tree che contiene solo i diversi anni per i quali stata fatta almeno una pianificazione
|
||||
###################################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
|
||||
@@ -37,15 +37,12 @@ class l10n_chart_it_servabit_report_libroIVA (osv.osv):
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Fiscal year',size=64),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
|
||||
def init (self, cr) :
|
||||
cr.execute("""DROP VIEW IF EXISTS account_report_libroiva""")
|
||||
cr.execute("""
|
||||
CREATE VIEW account_report_libroiva AS (
|
||||
SELECT id, name, company_id FROM account_fiscalyear
|
||||
)""")
|
||||
cr.execute("""CREATE VIEW account_report_libroiva AS (SELECT id, name, company_id FROM account_fiscalyear)""")
|
||||
l10n_chart_it_servabit_report_libroIVA()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,2 +1,4 @@
|
||||
import libroIVA_credito
|
||||
import libroIVA_debito
|
||||
import libroIVA_debito
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,79 +1,72 @@
|
||||
import datetime
|
||||
import time
|
||||
from report import report_sxw
|
||||
from osv import osv
|
||||
import pooler
|
||||
|
||||
|
||||
|
||||
class l10n_chart_it_servabit_report_libroIVA_credito(report_sxw.rml_parse):
|
||||
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(l10n_chart_it_servabit_report_libroIVA_credito,self).__init__(cr,uid,name,context)
|
||||
self.localcontext.update({
|
||||
'time' : time,
|
||||
'get_company' : self.get_company,
|
||||
'get_periods' : self.get_periods,
|
||||
'get_lines' : self.get_lines,
|
||||
'time': time,
|
||||
'get_company': self.get_company,
|
||||
'get_periods': self.get_periods,
|
||||
'get_lines': self.get_lines,
|
||||
})
|
||||
|
||||
|
||||
|
||||
def get_company(self,fiscal_year):
|
||||
#print 'COMP = ',fiscal_year
|
||||
#print 'COMP = ',fiscal_year
|
||||
return ""
|
||||
|
||||
|
||||
def get_periods(self,fiscal_year):
|
||||
#print 'Fiscal year id:',fiscal_year.id
|
||||
obj=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
|
||||
fy=obj.browse(self.cr,self.uid,fiscal_year.id)
|
||||
#print 'Periods = ',fy.period_ids
|
||||
res=[rec for rec in fy.period_ids]
|
||||
#return fy.periods => non funziona?!? bool object !?!?
|
||||
return res
|
||||
|
||||
#print 'Fiscal year id:',fiscal_year.id
|
||||
obj=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
|
||||
fy=obj.browse(self.cr,self.uid,fiscal_year.id)
|
||||
#print 'Periods = ',fy.period_ids
|
||||
res=[rec for rec in fy.period_ids]
|
||||
#return fy.periods => non funziona?!? bool object !?!?
|
||||
return res
|
||||
|
||||
def get_invoices(self,period):
|
||||
#print 'PERIOD = ',period.name
|
||||
obj=pooler.get_pool(self.cr.dbname).get('account.invoice')
|
||||
# Selezione tutte le fatture emesse nel periodo
|
||||
self.cr.execute( """
|
||||
SELECT id FROM account_invoice
|
||||
WHERE (state='open' OR state='paid') AND
|
||||
period_id="""+str(period.id)+"""
|
||||
AND (type='out_invoice' OR type='out_refund')
|
||||
""")
|
||||
ids=self.cr.fetchall()
|
||||
#print 'IDS = ',
|
||||
if ids:
|
||||
ids=[id[0] for id in ids ]
|
||||
invoices=obj.browse(self.cr,self.uid,ids)
|
||||
#print 'INVOICES = ',invoices
|
||||
return invoices
|
||||
|
||||
#print 'PERIOD = ',period.name
|
||||
obj=pooler.get_pool(self.cr.dbname).get('account.invoice')
|
||||
# Selezione tutte le fatture emesse nel periodo
|
||||
self.cr.execute("""
|
||||
SELECT id FROM account_invoice
|
||||
WHERE (state='open' OR state='paid') AND period_id="""+str(period.id)+""" AND (type='out_invoice' OR type='out_refund')
|
||||
""")
|
||||
ids=self.cr.fetchall()
|
||||
#print 'IDS = ',
|
||||
if ids:
|
||||
ids=[id[0] for id in ids ]
|
||||
invoices=obj.browse(self.cr,self.uid,ids)
|
||||
#print 'INVOICES = ',invoices
|
||||
return invoices
|
||||
|
||||
def get_lines(self,fiscal_year):
|
||||
res=[]
|
||||
obj_fy=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
|
||||
fy=obj_fy.browse(self.cr,self.uid,fiscal_year.id)
|
||||
for period in fy.period_ids:
|
||||
invoices=self.get_invoices(period)
|
||||
for invoice in invoices:
|
||||
d={'periodo': period.name}
|
||||
d['protocollo']=invoice.number
|
||||
#print 'PARTNER ',invoice.partner_id.name
|
||||
causale=invoice.partner_id.name
|
||||
#print 'CAUSALE = ',causale
|
||||
d['causale']=causale
|
||||
d['numero']=invoice.reference
|
||||
d['data_doc']=invoice.date_invoice
|
||||
for tax in invoice.tax_line:
|
||||
#print '\tTAX: ',tax
|
||||
d['aliquota']=tax.tax_code_id.name
|
||||
d['imponibile']=tax.base
|
||||
d['imposta']=tax.amount
|
||||
res.append(d)
|
||||
d={'periodo':'', 'protocollo':'', 'causale':'', 'numero':'', 'data_doc':'', }
|
||||
return res
|
||||
res=[]
|
||||
obj_fy=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
|
||||
fy=obj_fy.browse(self.cr,self.uid,fiscal_year.id)
|
||||
for period in fy.period_ids:
|
||||
invoices=self.get_invoices(period)
|
||||
for invoice in invoices:
|
||||
d={'periodo': period.name}
|
||||
d['protocollo']=invoice.number
|
||||
#print 'PARTNER ',invoice.partner_id.name
|
||||
causale=invoice.partner_id.name
|
||||
#print 'CAUSALE = ',causale
|
||||
d['causale']=causale
|
||||
d['numero']=invoice.reference
|
||||
d['data_doc']=invoice.date_invoice
|
||||
for tax in invoice.tax_line:
|
||||
#print '\tTAX: ',tax
|
||||
d['aliquota']=tax.tax_code_id.name
|
||||
d['imponibile']=tax.base
|
||||
d['imposta']=tax.amount
|
||||
res.append(d)
|
||||
d={'periodo':'', 'protocollo':'', 'causale':'', 'numero':'', 'data_doc':'', }
|
||||
return res
|
||||
|
||||
report_sxw.report_sxw('report.l10n_it.report.libroIVA_credito','account.report_libroiva', 'l10n_it/report/libroIVA_credito.rml', parser=l10n_chart_it_servabit_report_libroIVA_credito,header=False)
|
||||
|
||||
|
||||
report_sxw.report_sxw('report.l10n_it.report.libroIVA_credito','account.report_libroiva',
|
||||
'l10n_it/report/libroIVA_credito.rml',
|
||||
parser=l10n_chart_it_servabit_report_libroIVA_credito,header=False)
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,80 +1,73 @@
|
||||
import datetime
|
||||
import time
|
||||
from report import report_sxw
|
||||
from osv import osv
|
||||
import pooler
|
||||
|
||||
|
||||
class l10n_chart_it_servabit_report_libroIVA_debito(report_sxw.rml_parse):
|
||||
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(l10n_chart_it_servabit_report_libroIVA_debito,self).__init__(cr,uid,name,context)
|
||||
self.localcontext.update({
|
||||
'time' : time,
|
||||
'get_company' : self.get_company,
|
||||
'get_periods' : self.get_periods,
|
||||
'get_lines' : self.get_lines,
|
||||
'time': time,
|
||||
'get_company': self.get_company,
|
||||
'get_periods': self.get_periods,
|
||||
'get_lines': self.get_lines,
|
||||
})
|
||||
|
||||
|
||||
|
||||
def get_company(self,fiscal_year):
|
||||
#print 'COMP = ',fiscal_year
|
||||
#print 'COMP = ',fiscal_year
|
||||
return ""
|
||||
|
||||
|
||||
|
||||
def get_periods(self,fiscal_year):
|
||||
#print 'Fiscal year id:',fiscal_year.id
|
||||
obj=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
|
||||
fy=obj.browse(self.cr,self.uid,fiscal_year.id)
|
||||
#print 'Periods = ',fy.period_ids
|
||||
res=[rec for rec in fy.period_ids]
|
||||
#return fy.periods => non funziona?!? bool object !?!?
|
||||
return res
|
||||
|
||||
#print 'Fiscal year id:',fiscal_year.id
|
||||
obj=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
|
||||
fy=obj.browse(self.cr,self.uid,fiscal_year.id)
|
||||
#print 'Periods = ',fy.period_ids
|
||||
res=[rec for rec in fy.period_ids]
|
||||
#return fy.periods => non funziona?!? bool object !?!?
|
||||
return res
|
||||
|
||||
def get_invoices(self,period):
|
||||
#print 'PERIOD = ',period.name
|
||||
obj=pooler.get_pool(self.cr.dbname).get('account.invoice')
|
||||
# Selezione tutte le fatture emesse nel periodo
|
||||
self.cr.execute( """
|
||||
SELECT id FROM account_invoice
|
||||
WHERE (state='open' OR state='paid') AND
|
||||
period_id="""+str(period.id)+"""
|
||||
AND (type='in_invoice' OR type='in_refund')
|
||||
""")
|
||||
ids=self.cr.fetchall()
|
||||
#print 'IDS = ',
|
||||
if ids:
|
||||
ids=[id[0] for id in ids ]
|
||||
invoices=obj.browse(self.cr,self.uid,ids)
|
||||
#print 'INVOICES = ',invoices
|
||||
return invoices
|
||||
|
||||
#print 'PERIOD = ',period.name
|
||||
obj=pooler.get_pool(self.cr.dbname).get('account.invoice')
|
||||
# Selezione tutte le fatture emesse nel periodo
|
||||
self.cr.execute("""
|
||||
SELECT id FROM account_invoice
|
||||
WHERE (state='open' OR state='paid') AND
|
||||
period_id="""+str(period.id)+"""
|
||||
AND (type='in_invoice' OR type='in_refund')
|
||||
""")
|
||||
ids=self.cr.fetchall()
|
||||
#print 'IDS = ',
|
||||
if ids:
|
||||
ids=[id[0] for id in ids ]
|
||||
invoices=obj.browse(self.cr,self.uid,ids)
|
||||
#print 'INVOICES = ',invoices
|
||||
return invoices
|
||||
|
||||
def get_lines(self,fiscal_year):
|
||||
res=[]
|
||||
obj_fy=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
|
||||
fy=obj_fy.browse(self.cr,self.uid,fiscal_year.id)
|
||||
for period in fy.period_ids:
|
||||
invoices=self.get_invoices(period)
|
||||
for invoice in invoices:
|
||||
d={'periodo': period.name}
|
||||
d['protocollo']=invoice.number
|
||||
#print 'PARTNER ',invoice.partner_id.name
|
||||
causale=invoice.partner_id.name
|
||||
#print 'CAUSALE = ',causale
|
||||
d['causale']=causale
|
||||
d['numero']=invoice.reference
|
||||
d['data_doc']=invoice.date_invoice
|
||||
for tax in invoice.tax_line:
|
||||
#print '\tTAX: ',tax
|
||||
d['aliquota']=tax.tax_code_id.name
|
||||
d['imponibile']=tax.base
|
||||
d['imposta']=tax.amount
|
||||
res.append(d)
|
||||
d={'periodo':'', 'protocollo':'', 'causale':'', 'numero':'', 'data_doc':'', }
|
||||
return res
|
||||
res=[]
|
||||
obj_fy=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
|
||||
fy=obj_fy.browse(self.cr,self.uid,fiscal_year.id)
|
||||
for period in fy.period_ids:
|
||||
invoices=self.get_invoices(period)
|
||||
for invoice in invoices:
|
||||
d={'periodo': period.name}
|
||||
d['protocollo']=invoice.number
|
||||
#print 'PARTNER ',invoice.partner_id.name
|
||||
causale=invoice.partner_id.name
|
||||
#print 'CAUSALE = ',causale
|
||||
d['causale']=causale
|
||||
d['numero']=invoice.reference
|
||||
d['data_doc']=invoice.date_invoice
|
||||
for tax in invoice.tax_line:
|
||||
#print '\tTAX: ',tax
|
||||
d['aliquota']=tax.tax_code_id.name
|
||||
d['imponibile']=tax.base
|
||||
d['imposta']=tax.amount
|
||||
res.append(d)
|
||||
d={'periodo':'', 'protocollo':'', 'causale':'', 'numero':'', 'data_doc':'', }
|
||||
return res
|
||||
|
||||
report_sxw.report_sxw('report.l10n_it.report.libroIVA_debito','account.report_libroiva', 'l10n_it/report/libroIVA_debito.rml', parser=l10n_chart_it_servabit_report_libroIVA_debito,header=False)
|
||||
|
||||
|
||||
report_sxw.report_sxw('report.l10n_it.report.libroIVA_debito','account.report_libroiva',
|
||||
'l10n_it/report/libroIVA_debito.rml',
|
||||
parser=l10n_chart_it_servabit_report_libroIVA_debito,header=False)
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -20,12 +20,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from mx import DateTime
|
||||
import time
|
||||
|
||||
from osv import fields, osv
|
||||
import pooler
|
||||
|
||||
|
||||
class l10n_ma_report(osv.osv):
|
||||
_name = 'l10n.ma.report'
|
||||
|
||||
@@ -5,22 +5,24 @@
|
||||
<!--
|
||||
journaux standards
|
||||
-->
|
||||
<!--
|
||||
<record id="journal_vente" model="account.journal">
|
||||
<field name="name">Journal des Ventes</field>
|
||||
<field name="code">JVT</field>
|
||||
<field name="type">sale</field>
|
||||
<field name="view_id" ref="account.account_journal_view"/>
|
||||
<field name="sequence_id" ref="account.sequence_journal"/>
|
||||
<!--
|
||||
comptes par défaul
|
||||
|
||||
<field name="default_debit_account_id" ref="pcg_34211" />
|
||||
<field name="default_credit_account_id" ref="pcg_7111" />
|
||||
-->
|
||||
</record>
|
||||
|
||||
-->
|
||||
<!--
|
||||
comptes par défaul
|
||||
|
||||
<field name="default_debit_account_id" ref="pcg_34211" />
|
||||
<field name="default_credit_account_id" ref="pcg_7111" />
|
||||
-->
|
||||
<!-- </record>
|
||||
|
||||
|
||||
|
||||
|
||||
<record id="journal_achat" model="account.journal">
|
||||
<field name="name">Journal des Achats</field>
|
||||
<field name="code">JAC</field>
|
||||
@@ -53,7 +55,7 @@
|
||||
<field name="view_id" ref="account.account_journal_view"/>
|
||||
<field name="sequence_id" ref="account.sequence_journal"/>
|
||||
</record>
|
||||
|
||||
-->
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -48,8 +48,9 @@
|
||||
</group>
|
||||
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<group colspan="4" col="8">
|
||||
<field name="state" />
|
||||
<button name="%(action_add_product)d" string="Add product" type="action" icon="gtk-ok" states="draft"/>
|
||||
<button name="%(action_pos_payment)d" string="Make Payment" icon="terp-dolar" type="action" states="draft,advance" />
|
||||
<button name="%(action_report_pos_receipt)d" string="Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/>
|
||||
<button name="set_to_draft" string="Set to draft" states="paid" icon="gtk-execute" type="object" />
|
||||
|
||||
@@ -76,21 +76,22 @@ class add_product(osv.osv_memory):
|
||||
context = {}
|
||||
record_id = context and context.get('active_id', False)
|
||||
order_obj= self.pool.get('pos.order')
|
||||
this = self.browse(cr, uid, ids[0], context)
|
||||
order_obj.add_product(cr, uid, record_id, this.product_id.id, this.quantity, context=context)
|
||||
|
||||
obj = order_obj.browse(cr, uid, record_id, context=context)
|
||||
order_obj.write(cr, uid, [record_id], {'state': 'done'}, context=context)
|
||||
if obj.amount_total != obj.amount_paid:
|
||||
return {
|
||||
'name': _('Make Payment'),
|
||||
'context': context and context.get('active_id', False),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'pos.make.payment',
|
||||
'view_id': False,
|
||||
'target': 'new',
|
||||
'views': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
}
|
||||
return {}
|
||||
return {
|
||||
'name': _('Make Payment'),
|
||||
'context': context and context.get('active_id', False),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'pos.make.payment',
|
||||
'view_id': False,
|
||||
'target': 'new',
|
||||
'views': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
}
|
||||
|
||||
add_product()
|
||||
|
||||
|
||||
@@ -340,8 +340,11 @@ class add_product(osv.osv_memory):
|
||||
date_cur=time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
return_boj=self.pool.get('pos.return')
|
||||
return_id=return_boj.search(cr,uid,[])
|
||||
data=return_boj.read(cr,uid,return_id,[])[0]
|
||||
return_id = return_boj.search(cr,uid,[])
|
||||
data = {}
|
||||
if return_id:
|
||||
data = return_boj.read(cr,uid,return_id,[])[0]
|
||||
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
self_data = self.read(cr, uid, ids)[0]
|
||||
order_obj.add_product(cr, uid, active_ids[0], self_data['product_id'], self_data['quantity'], context=context)
|
||||
|
||||
+1
-1
@@ -245,7 +245,7 @@ class sale_order(osv.osv):
|
||||
'project_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, states={'draft': [('readonly', False)]}, help="The analytic account related to a sale order"),
|
||||
|
||||
'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoices', help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."),
|
||||
'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoices', readonly=True, help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."),
|
||||
'picking_ids': fields.one2many('stock.picking', 'sale_id', 'Related Picking', readonly=True, help="This is the list of picking list that have been generated for this invoice"),
|
||||
'shipped': fields.boolean('Delivered', readonly=True, help="It indicates that the sale order has been delivered. This field is updated only after the scheduler have been launched !"),
|
||||
'picked_rate': fields.function(_picked_rate, method=True, string='Picked', type='float'),
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
<tree string="Sales Orders" colors="grey:state=='done'">
|
||||
<field name="name"/>
|
||||
<field name="date_order"/>
|
||||
<field name="client_order_ref" groups="base.group_extended"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" />
|
||||
<field name="picked_rate" widget="progressbar"/>
|
||||
|
||||
Reference in New Issue
Block a user