diff --git a/addons/account/account.py b/addons/account/account.py
index 0f8c9575931..6cead2cddd3 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -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
diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py
index 0b03f52a1e9..173f0651a90 100644
--- a/addons/account/account_bank_statement.py
+++ b/addons/account/account_bank_statement.py
@@ -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:
\ No newline at end of file
diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py
index ffcc979169d..0f14fb77bb6 100644
--- a/addons/account/account_cash_statement.py
+++ b/addons/account/account_cash_statement.py
@@ -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
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index 3926e4fd9fb..213b80c3a44 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index cdb692f454a..93d5c37bd08 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -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 !'))
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index ca9d72640dc..a031aafd9e8 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -79,7 +79,7 @@
tree,form,searchDefine 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.
-
+
@@ -863,7 +863,7 @@
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.
-
+
30 Days End of Month
+ 30 Days End of Month30 Days End of Month
diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml
index e4048f69a9c..10f2df28605 100644
--- a/addons/account/demo/account_minimal.xml
+++ b/addons/account/demo/account_minimal.xml
@@ -201,7 +201,7 @@
X1113Reserve and Profit/Loss - (test)
- payable
+ other
diff --git a/addons/account/installer.py b/addons/account/installer.py
index aa9a022d0c1..b1be04f7c70 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -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
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index e03e0035022..4eae61d90d7 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -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):
diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py
index b99070330f7..20c1fe7cc55 100644
--- a/addons/account/report/account_aged_partner_balance.py
+++ b/addons/account/report/account_aged_partner_balance.py
@@ -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 = {}
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index d901f211ba0..b925c115a54 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -95,7 +95,7 @@
-
+
diff --git a/addons/account/wizard/account_invoice_state_view.xml b/addons/account/wizard/account_invoice_state_view.xml
index 8e9c04b788d..a1fd5dc3673 100644
--- a/addons/account/wizard/account_invoice_state_view.xml
+++ b/addons/account/wizard/account_invoice_state_view.xml
@@ -16,14 +16,11 @@
-
- Confirm Draft Invoices
- account.invoice.confirm
- form
- form
-
- new
-
+ account.invoice.cancel.form
diff --git a/addons/account/wizard/account_open_closed_fiscalyear_view.xml b/addons/account/wizard/account_open_closed_fiscalyear_view.xml
index 625be2db246..a7e35390c46 100644
--- a/addons/account/wizard/account_open_closed_fiscalyear_view.xml
+++ b/addons/account/wizard/account_open_closed_fiscalyear_view.xml
@@ -29,5 +29,10 @@
new
+
+
diff --git a/addons/account_followup/report/account_followup_print.rml b/addons/account_followup/report/account_followup_print.rml
index fb0f93b4a38..08dae5a82bc 100644
--- a/addons/account_followup/report/account_followup_print.rml
+++ b/addons/account_followup/report/account_followup_print.rml
@@ -117,7 +117,7 @@
Document : Customer account statement
- Date : [[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]
+ Date : [[ formatLang(data['form']['date'],date=True) ]]Customer Ref : [[ o.ref or '' ]]
diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py
index 18c455ac07a..174061438f8 100644
--- a/addons/account_followup/wizard/account_followup_print.py
+++ b/addons/account_followup/wizard/account_followup_print.py
@@ -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',
diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py
index ef603a48f62..662ed495d31 100644
--- a/addons/account_payment/wizard/account_payment_order.py
+++ b/addons/account_payment/wizard/account_payment_order.py
@@ -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)]
diff --git a/addons/account_sequence/__openerp__.py b/addons/account_sequence/__openerp__.py
index e6580c4088c..28c7ac44e7f 100644
--- a/addons/account_sequence/__openerp__.py
+++ b/addons/account_sequence/__openerp__.py
@@ -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': '',
diff --git a/addons/account_sequence/account_sequence.py b/addons/account_sequence/account_sequence.py
index 496fb08bc05..c61720f857b 100644
--- a/addons/account_sequence/account_sequence.py
+++ b/addons/account_sequence/account_sequence.py
@@ -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:
\ No newline at end of file
diff --git a/addons/account_sequence/account_sequence.xml b/addons/account_sequence/account_sequence.xml
index 92c145a9b2e..26a458fc8d1 100644
--- a/addons/account_sequence/account_sequence.xml
+++ b/addons/account_sequence/account_sequence.xml
@@ -20,7 +20,7 @@
form
-
+
diff --git a/addons/account_sequence/account_sequence_data.xml b/addons/account_sequence/account_sequence_data.xml
index 5429d93b522..f5d1117f51d 100644
--- a/addons/account_sequence/account_sequence_data.xml
+++ b/addons/account_sequence/account_sequence_data.xml
@@ -8,5 +8,8 @@
account.journal1
+
+
+
\ No newline at end of file
diff --git a/addons/account_sequence/account_sequence_minimal.xml b/addons/account_sequence/account_sequence_minimal.xml
deleted file mode 100644
index d634c2aa3af..00000000000
--- a/addons/account_sequence/account_sequence_minimal.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/addons/account_sequence/i18n/fr.po b/addons/account_sequence/i18n/fr.po
new file mode 100644
index 00000000000..3c6132dfaa6
--- /dev/null
+++ b/addons/account_sequence/i18n/fr.po
@@ -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 ""
+
diff --git a/addons/event/event.py b/addons/event/event.py
index 64f93e6db55..ab90fe64803 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -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
diff --git a/addons/event_project/__init__.py b/addons/event_project/__init__.py
index c629a522a8b..fe2b9771046 100644
--- a/addons/event_project/__init__.py
+++ b/addons/event_project/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -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 .
+# along with this program. If not, see .
#
##############################################################################
-import event
+import event_project
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_holidays/hr_holidays_demo.xml b/addons/hr_holidays/hr_holidays_demo.xml
index dca01d06b1a..b4a971dc328 100644
--- a/addons/hr_holidays/hr_holidays_demo.xml
+++ b/addons/hr_holidays/hr_holidays_demo.xml
@@ -6,7 +6,7 @@
Casual Leave for Fabien Pinckaersadd
- 12
+ 20
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index e3011f7c0eb..be2be2dd54f 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -166,12 +166,8 @@
-
-
-
-
@@ -253,12 +249,8 @@
-
-
-
-
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
index 87e8b8b0feb..6a06a1814d6 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
@@ -174,7 +174,7 @@
+ parent="account.menu_configuration_misc" sequence="25"/>
diff --git a/addons/l10n_be/wizard/l10_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10_be_partner_vat_listing.py
index bb9874cb387..6776f9c42e1 100644
--- a/addons/l10n_be/wizard/l10_be_partner_vat_listing.py
+++ b/addons/l10n_be/wizard/l10_be_partner_vat_listing.py
@@ -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')
diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
index b915b3ed854..36a9cd50ea0 100644
--- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
+++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
@@ -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')
diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py
index a95e9dfbf81..da1a21d87ac 100644
--- a/addons/l10n_be/wizard/l10n_be_vat_intra.py
+++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py
@@ -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:
diff --git a/addons/l10n_br/__openerp__.py b/addons/l10n_br/__openerp__.py
index 9eb52a40fab..f173b749cd6 100644
--- a/addons/l10n_br/__openerp__.py
+++ b/addons/l10n_br/__openerp__.py
@@ -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 . #
+#
+# 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 .
+#
#################################################################################
{
- '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:
\ No newline at end of file
diff --git a/addons/l10n_ch/demo/dta_demo.xml b/addons/l10n_ch/demo/dta_demo.xml
index f8df60e08f5..d396c574750 100644
--- a/addons/l10n_ch/demo/dta_demo.xml
+++ b/addons/l10n_ch/demo/dta_demo.xml
@@ -46,15 +46,16 @@
-
+
+
DTA
diff --git a/addons/l10n_ch/test/l10n_ch_report.yml b/addons/l10n_ch/test/l10n_ch_report.yml
index a8a976bc424..5b2a636813e 100644
--- a/addons/l10n_ch/test/l10n_ch_report.yml
+++ b/addons/l10n_ch/test/l10n_ch_report.yml
@@ -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)
diff --git a/addons/l10n_ch/vaudtax_data.xml b/addons/l10n_ch/vaudtax_data.xml
index a10693b0ec2..205ff0c4540 100644
--- a/addons/l10n_ch/vaudtax_data.xml
+++ b/addons/l10n_ch/vaudtax_data.xml
@@ -57,8 +57,9 @@
Mme,m
+
diff --git a/addons/l10n_cr/__openerp__.py b/addons/l10n_cr/__openerp__.py
index 57d088cfcc4..9e1468ea798 100644
--- a/addons/l10n_cr/__openerp__.py
+++ b/addons/l10n_cr/__openerp__.py
@@ -1,35 +1,35 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
-# __openerp__.py
-# l10n_cr_account
-# First author: Carlos Vásquez (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 (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 ``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 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 ``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 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:
\ No newline at end of file
diff --git a/addons/l10n_cr/data/account_account_type.xml b/addons/l10n_cr/data/account_account_type.xml
index ab4370761d5..d613b04d2cc 100644
--- a/addons/l10n_cr/data/account_account_type.xml
+++ b/addons/l10n_cr/data/account_account_type.xml
@@ -8,89 +8,67 @@
AAsset
- 10
- balanceAVAsset valuation
- 13
- balanceCCash
- 11
- balanceEqEquity
- 30
- detailExExpense
- 50
- noneIIncome
- 40
- nonePasPassive
- 20
- balancePayPayable
- 21
- unreconciledRReceivable
- 12
- unreconciledTTax
- 22
- unreconciledVView
- 0
- none
diff --git a/addons/l10n_cr/data/account_tax_template.xml b/addons/l10n_cr/data/account_tax_template.xml
index 8ac4288efa8..cd9fdaab111 100644
--- a/addons/l10n_cr/data/account_tax_template.xml
+++ b/addons/l10n_cr/data/account_tax_template.xml
@@ -11,7 +11,7 @@
1013percent
- vat
+
alltrue
@@ -34,7 +34,7 @@
1013percent
- vat
+
alltrue
diff --git a/addons/l10n_cr/l10n_cr_base_data.xml b/addons/l10n_cr/l10n_cr_base_data.xml
index 908e5ee31d4..641c21ee56e 100644
--- a/addons/l10n_cr/l10n_cr_base_data.xml
+++ b/addons/l10n_cr/l10n_cr_base_data.xml
@@ -1,7 +1,7 @@
-
+
-
-
-
-
-
-
- Πίνακες φόρου
-
-
-
- Υπόλοιπο ΦΠΑ
-
- 501-511
-
-
-
- ΦΠΑ Εισροών
-
-
-
-
- Λοιπή Ελλάδα εκτός Αιγαίου
-
-
-
- ΦΠΑ Εισροών 9%
- 371
-
-
-
-
- ΦΠΑ Εισροών 4,5%
- 372
-
-
-
-
- ΦΠΑ Εισροών 19%
- 373
-
-
+
-
- Νησιά Αιγαίου
-
-
+
-
- ΦΠΑ Εισροών 6%
- 374
-
-
-
-
- ΦΠΑ Εισροών 3%
- 375
-
-
-
-
- ΦΠΑ Εισροών 13%
- 376
-
-
-
-
- ΦΠΑ Εκροών
-
-
-
-
- Λοιπή Ελλάδα εκτός Αιγαίου
-
-
+
-
- ΦΠΑ Εκροών 9%
- 331
-
-
-
-
- ΦΠΑ Εκροών 4,5%
- 332
-
-
-
-
- ΦΠΑ Εκροών 19%
- 333
-
-
+
+ Πίνακες φόρου
+
-
- Νησιά Αιγαίου
-
-
+
+ Υπόλοιπο ΦΠΑ
+
+ 501-511
+
-
- ΦΠΑ Εκροών 6%
- 334
-
-
-
-
- ΦΠΑ Εκροών 3%
- 335
-
-
-
-
- ΦΠΑ Εκροών 13%
- 336
-
-
+
+ ΦΠΑ Εισροών
+
+
-
- Σύνολο Εκροών
- 311
-
-
+
+ Λοιπή Ελλάδα εκτός Αιγαίου
+
+
-
- Σύνολο Φορολ/τέων Εκροών
- 307
-
-
+
+ ΦΠΑ Εισροών 9%
+ 371
+
+
-
- Εκροές 9%
- 301
-
-
-
- Εκροές 4.5%
- 302
-
-
-
- Εκροές 19%
- 303
-
-
+
+ ΦΠΑ Εισροών 4,5%
+ 372
+
+
-
-
- Σύνολο Φορολ/τέων εισροών
-
-
+
+ ΦΠΑ Εισροών 19%
+ 373
+
+
-
- Σύνολο Φορολ/τέων εισροών
- 358
-
-
+
+ Νησιά Αιγαίου
+
+
-
- Εισροές 9%
- 351
-
-
-
- Εισροές 4.5%
- 352
-
-
+
+ ΦΠΑ Εισροών 6%
+ 374
+
+
-
- Εισροές 19%
- 353
-
-
+
+ ΦΠΑ Εισροών 3%
+ 375
+
+
+
+ ΦΠΑ Εισροών 13%
+ 376
+
+
-
-
-
- Πρότυπο Ελληνικού Λογιστικού Σχεδίου
-
-
-
-
-
-
-
-
+
+ ΦΠΑ Εκροών
+
+
-
-
-
-
-
- Εισροές 19
-
- percent
- sale
-
-
-
-
-
-
-
-
-
-
-
- Εκροές 19
-
- percent
- purchase
-
-
-
-
-
-
-
-
-
+
+ Λοιπή Ελλάδα εκτός Αιγαίου
+
+
+
+
+ ΦΠΑ Εκροών 9%
+ 331
+
+
+
+
+ ΦΠΑ Εκροών 4,5%
+ 332
+
+
+
+
+ ΦΠΑ Εκροών 19%
+ 333
+
+
+
+
+ Νησιά Αιγαίου
+
+
+
+
+ ΦΠΑ Εκροών 6%
+ 334
+
+
+
+
+ ΦΠΑ Εκροών 3%
+ 335
+
+
+
+
+ ΦΠΑ Εκροών 13%
+ 336
+
+
+
+
+ Σύνολο Εκροών
+ 311
+
+
+
+
+ Σύνολο Φορολ/τέων Εκροών
+ 307
+
+
+
+
+ Εκροές 9%
+ 301
+
+
+
+
+ Εκροές 4.5%
+ 302
+
+
+
+
+ Εκροές 19%
+ 303
+
+
+
+
+
+
+ Σύνολο Φορολ/τέων εισροών
+
+
+
+
+ Σύνολο Φορολ/τέων εισροών
+ 358
+
+
+
+
+ Εισροές 9%
+ 351
+
+
+
+
+ Εισροές 4.5%
+ 352
+
+
+
+
+ Εισροές 19%
+ 353
+
+
+
+
+
+
+ Πρότυπο Ελληνικού Λογιστικού Σχεδίου
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Εισροές 19
+
+ percent
+ sale
+
+
+
+
+
+
+
+
+
+
+
+
+ Εκροές 19
+
+ percent
+ purchase
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/addons/l10n_in/l10n_in_chart.xml b/addons/l10n_in/l10n_in_chart.xml
index 9272fe4e18d..9c12be2134c 100644
--- a/addons/l10n_in/l10n_in_chart.xml
+++ b/addons/l10n_in/l10n_in_chart.xml
@@ -466,7 +466,7 @@
Base of Taxed Purchases
-
+
OPJOpening Journal
diff --git a/addons/l10n_it/__init__.py b/addons/l10n_it/__init__.py
index 6a6278762b2..adfc1887c32 100755
--- a/addons/l10n_it/__init__.py
+++ b/addons/l10n_it/__init__.py
@@ -1,12 +1,12 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
-# Italian OpenERP accounting module
+# Italian OpenERP accounting module
# Copyright (C) 2010 Servabit srl () and the
# Italian OpenERP Community ()
#
# ########################################################################
-# OpenERP, Open Source Management Solution
+# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (). 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:
\ No newline at end of file
diff --git a/addons/l10n_it/__openerp__.py b/addons/l10n_it/__openerp__.py
index f7275688715..a059b7a64e0 100755
--- a/addons/l10n_it/__openerp__.py
+++ b/addons/l10n_it/__openerp__.py
@@ -1,11 +1,11 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
-# Italian OpenERP accounting module
-# Copyright (C) 2010 Servabit srl ()
+# Italian OpenERP accounting module
+# Copyright (C) 2010 Servabit srl ()
#
# Developed by the servabit OpenERP team: openerp@servabit.it
-#
+#
# Some parts have been taken from modules by the:
# Italian OpenERP Community ()
# 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 (). All Rights Reserved
# $Id$
#
@@ -31,29 +31,30 @@
# along with this program. If not, see .
#
##############################################################################
+
{
- "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:
\ No newline at end of file
diff --git a/addons/l10n_it/journals.xml b/addons/l10n_it/journals.xml
index 88fe8cc8038..8d0790a0b9f 100755
--- a/addons/l10n_it/journals.xml
+++ b/addons/l10n_it/journals.xml
@@ -3,25 +3,25 @@
-
+ Qui vengono definiti i journals, sezioni del "libro giornale"
+ cui sono associate le diverse scritture contabili
+ ( from account/demo/account_minimal.xml, modified )
+
+-->
-
-
+
+
-
+
+-->
+
+ i conti dal template di piano dei conti -->
-
+
-
+
diff --git a/addons/l10n_it/libroIVA.py b/addons/l10n_it/libroIVA.py
index 7485c6cf2b3..92e3b7ccc15 100755
--- a/addons/l10n_it/libroIVA.py
+++ b/addons/l10n_it/libroIVA.py
@@ -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:
\ No newline at end of file
diff --git a/addons/l10n_it/productcateg.xml b/addons/l10n_it/productcateg.xml
deleted file mode 100755
index e69de29bb2d..00000000000
diff --git a/addons/l10n_it/report/__init__.py b/addons/l10n_it/report/__init__.py
index be32155c675..ad438e9351f 100755
--- a/addons/l10n_it/report/__init__.py
+++ b/addons/l10n_it/report/__init__.py
@@ -1,2 +1,4 @@
import libroIVA_credito
-import libroIVA_debito
\ No newline at end of file
+import libroIVA_debito
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/l10n_it/report/libroIVA_credito.py b/addons/l10n_it/report/libroIVA_credito.py
index 5a7c5245da1..d44573f03c1 100755
--- a/addons/l10n_it/report/libroIVA_credito.py
+++ b/addons/l10n_it/report/libroIVA_credito.py
@@ -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:
\ No newline at end of file
diff --git a/addons/l10n_it/report/libroIVA_debito.py b/addons/l10n_it/report/libroIVA_debito.py
index 4fe14db714d..071a909ebfe 100755
--- a/addons/l10n_it/report/libroIVA_debito.py
+++ b/addons/l10n_it/report/libroIVA_debito.py
@@ -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:
\ No newline at end of file
diff --git a/addons/l10n_ma/l10n_ma.py b/addons/l10n_ma/l10n_ma.py
index be027f75f13..a8e0dd42687 100644
--- a/addons/l10n_ma/l10n_ma.py
+++ b/addons/l10n_ma/l10n_ma.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
-# OpenERP, Open Source Management Solution
+# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (). 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'
diff --git a/addons/l10n_ma/l10n_ma_journal.xml b/addons/l10n_ma/l10n_ma_journal.xml
index acbeac9b424..b235b8b3fe3 100644
--- a/addons/l10n_ma/l10n_ma_journal.xml
+++ b/addons/l10n_ma/l10n_ma_journal.xml
@@ -5,22 +5,24 @@
+
-
-
+-->
+
+
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index 4d277d216c8..1cf7ab1de69 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -48,8 +48,9 @@
-
+
+
diff --git a/addons/point_of_sale/wizard/pos_add_product.py b/addons/point_of_sale/wizard/pos_add_product.py
index 601c3d3f305..a44ab52f1c9 100644
--- a/addons/point_of_sale/wizard/pos_add_product.py
+++ b/addons/point_of_sale/wizard/pos_add_product.py
@@ -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()
diff --git a/addons/point_of_sale/wizard/pos_return.py b/addons/point_of_sale/wizard/pos_return.py
index abeadfc9931..c0e37d84ef3 100644
--- a/addons/point_of_sale/wizard/pos_return.py
+++ b/addons/point_of_sale/wizard/pos_return.py
@@ -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)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index b65e640d6dc..29826e1c293 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -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'),
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index ec3c390f521..82ec4d68bac 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -84,6 +84,7 @@
+