diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 5bcd3b36815..298b60d3964 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -62,7 +62,7 @@
-
+
@@ -154,7 +154,7 @@
-
+
@@ -178,7 +178,7 @@
-
+
@@ -263,7 +263,7 @@
-
+
@@ -302,7 +302,7 @@
-
+
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index f07eebd4b41..dcf97c91c95 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -7,7 +7,7 @@
-
+
@@ -20,8 +20,8 @@
-
-
+
+
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index b7bc7cb426f..94dd4e8eb86 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -455,7 +455,7 @@ class account_move_line(osv.osv):
'invoice': fields.function(_invoice, method=True, string='Invoice',
type='many2one', relation='account.invoice', fnct_search=_invoice_search),
'account_tax_id':fields.many2one('account.tax', 'Tax'),
- 'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account'),
+ 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
#TODO: remove this
'amount_taxed':fields.float("Taxed Amount", digits_compute=dp.get_precision('Account')),
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 12ac88cfa62..3e126d9d4d5 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -113,7 +113,7 @@
account.period
tree
-
+
@@ -895,7 +895,7 @@
-
+
@@ -970,15 +970,15 @@
-
+
-
+
-
-
+
+
@@ -1017,15 +1017,15 @@
-
+
-
-
+
+
@@ -1243,15 +1243,15 @@
-
+
-
+
-
-
+
+
@@ -1264,7 +1264,7 @@
-
+
@@ -1356,6 +1356,10 @@
res_model="account.move.line"
src_model="account.move"/>
+
+
+
+
@@ -1906,7 +1910,7 @@
-
+
diff --git a/addons/account/board_account_view.xml b/addons/account/board_account_view.xml
index 8e370fd20fe..e8aecb2033c 100644
--- a/addons/account/board_account_view.xml
+++ b/addons/account/board_account_view.xml
@@ -49,7 +49,7 @@
-
+
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml
index 9ebb86c719d..4bdab312ad2 100644
--- a/addons/account/project/project_view.xml
+++ b/addons/account/project/project_view.xml
@@ -78,7 +78,7 @@
-
+
@@ -113,7 +113,7 @@
-
+
Accounts to Renew
@@ -144,7 +144,7 @@
-
+
@@ -157,7 +157,7 @@
-
+
@@ -183,7 +183,7 @@
-
+
@@ -203,7 +203,7 @@
-
+
@@ -215,7 +215,7 @@
-
+
@@ -263,7 +263,7 @@
-
+
#
# Open journal entries
@@ -390,7 +390,7 @@
tree
To print an analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount.
-
+
diff --git a/addons/account/project/wizard/account_analytic_chart_view.xml b/addons/account/project/wizard/account_analytic_chart_view.xml
index ebfdb1a1194..9cc7a32633b 100644
--- a/addons/account/project/wizard/account_analytic_chart_view.xml
+++ b/addons/account/project/wizard/account_analytic_chart_view.xml
@@ -38,7 +38,8 @@
parent="account.menu_finance_charts"
action="action_account_analytic_chart"
id="menu_action_analytic_account_tree2"
- icon="STOCK_INDENT"/>
+ icon="STOCK_INDENT"
+ groups="base.group_extended"/>
diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml
index 4e9049b853f..bc40e6235d7 100644
--- a/addons/account/report/account_analytic_entries_report_view.xml
+++ b/addons/account/report/account_analytic_entries_report_view.xml
@@ -107,7 +107,7 @@
A tool search lets you know statistics on your analytics records that match your needs.
-
+
diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv
index 71d295eb565..8dbcf4ecf5b 100644
--- a/addons/account/security/ir.model.access.csv
+++ b/addons/account/security/ir.model.access.csv
@@ -157,50 +157,56 @@
"access_report_account_receivable_user","report.account.receivable.user","model_report_account_receivable","account.group_account_user",1,1,1,1
"access_account_sequence_fiscal_year_invoice","account.sequence.fiscalyear invoice","model_account_sequence_fiscalyear","account.group_account_invoice",1,1,1,1
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_invoice",1,0,0,0
-"access_account_invoice","account.invoice","model_account_invoice","account.group_accounting_accountant",1,1,1,1
-"access_account_invoice_line","account.invoice.line","model_account_invoice_line","account.group_accounting_accountant",1,1,1,1
-"access_res_partner","res.partner","base.model_res_partner","account.group_accounting_accountant",1,1,1,1
-"access_account_account","account.account","model_account_account","account.group_accounting_accountant",1,0,0,0
-"access_account_account_type","account.type","model_account_account_type","account.group_accounting_accountant",1,0,0,0
-"access_account_tax","account.tax","model_account_tax","account.group_accounting_accountant",1,0,0,0
-"access_account_tax_code","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
-"access_account_invoice_tax","account.invoice.tax","model_account_invoice_tax","account.group_accounting_accountant",1,0,0,0
-"access_res_partner_address","res.partner.address","base.model_res_partner_address","account.group_accounting_accountant",1,1,1,1
-"access_account_move","account.move","model_account_move","account.group_accounting_accountant",1,1,1,1
-"access_account_move_line","account.move.line","model_account_move_line","account.group_accounting_accountant",1,1,1,1
-"access_res_partner_bank","res.partner.bank","base.model_res_partner_bank","account.group_accounting_accountant",1,0,0,0
-"access_res_partner_event","res.partner.event","base.model_res_partner_event","account.group_accounting_accountant",1,0,0,0
-"access_res_currency_rate","res.currency.rate","base.model_res_currency_rate","account.group_accounting_accountant",1,1,0,0
-"access_res_currency","res.currency","base.model_res_currency","account.group_accounting_accountant",1,1,0,0
-"access_product_template","product.template","product.model_product_template","account.group_accounting_accountant",1,0,0,0
-"access_product_product","product.product","product.model_product_product","account.group_accounting_accountant",1,0,0,0
-"access_product_category","product.category","product.model_product_category","account.group_accounting_accountant",1,0,0,0
-"access_product_pricelist","product.pricelist","product.model_product_pricelist","account.group_accounting_accountant",1,0,0,0
-"access_product_pricelist_version","product.pricelist.version","product.model_product_pricelist_version","account.group_accounting_accountant",1,0,0,0
-"access_product_pricelist_item","product.pricelist.item","product.model_product_pricelist_item","account.group_accounting_accountant",1,0,0,0
-"access_account_payment_term","account.payment.term","model_account_payment_term","account.group_accounting_accountant",1,0,0,0
-"access_res_payterm","res.payterm","base.model_res_payterm","account.group_accounting_accountant",1,0,0,0
-"access_account_payment_term_line","account.payment.term.line","model_account_payment_term_line","account.group_accounting_accountant",1,0,0,0
-"access_account_journal","account.journal","model_account_journal","account.group_accounting_accountant",1,0,0,0
-"access_account_fiscalyear","account.fiscalyear","model_account_fiscalyear","account.group_accounting_accountant",1,0,0,0
-"access_account_period","account.period","model_account_period","account.group_accounting_accountant",1,0,0,0
-"access_account_move_reconcile","account.move.reconcile","model_account_move_reconcile","account.group_accounting_accountant",1,1,1,1
-"access_account_tax_code","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
-"access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_accounting_accountant",1,1,1,1
-"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_accounting_accountant",1,1,1,1
+"access_account_invoice_accounting_accountant","account.invoice","model_account_invoice","account.group_accounting_accountant",1,1,1,1
+"access_account_invoice_line_accounting_accountant","account.invoice.line","model_account_invoice_line","account.group_accounting_accountant",1,1,1,1
+"access_res_partner_accounting_accountant","res.partner","base.model_res_partner","account.group_accounting_accountant",1,1,1,1
+"access_account_account_accounting_accountant","account.account","model_account_account","account.group_accounting_accountant",1,0,0,0
+"access_account_account_type_accounting_accountant","account.type","model_account_account_type","account.group_accounting_accountant",1,0,0,0
+"access_account_tax_accounting_accountant","account.tax","model_account_tax","account.group_accounting_accountant",1,0,0,0
+"access_account_tax_code_accounting_accountant","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
+"access_account_invoice_tax_accounting_accountant","account.invoice.tax","model_account_invoice_tax","account.group_accounting_accountant",1,0,0,0
+"access_res_partner_address_accounting_accountant","res.partner.address","base.model_res_partner_address","account.group_accounting_accountant",1,1,1,1
+"access_account_move_accounting_accountant","account.move","model_account_move","account.group_accounting_accountant",1,1,1,1
+"access_account_move_line_accounting_accountant","account.move.line","model_account_move_line","account.group_accounting_accountant",1,1,1,1
+"access_res_partner_bank_accounting_accountant","res.partner.bank","base.model_res_partner_bank","account.group_accounting_accountant",1,0,0,0
+"access_res_partner_event_accounting_accountant","res.partner.event","base.model_res_partner_event","account.group_accounting_accountant",1,0,0,0
+"access_res_currency_rate_accounting_accountant","res.currency.rate","base.model_res_currency_rate","account.group_accounting_accountant",1,1,0,0
+"access_res_currency_accounting_accountant","res.currency","base.model_res_currency","account.group_accounting_accountant",1,1,0,0
+"access_product_template_accounting_accountant","product.template","product.model_product_template","account.group_accounting_accountant",1,0,0,0
+"access_product_product_accounting_accountant","product.product","product.model_product_product","account.group_accounting_accountant",1,0,0,0
+"access_product_category_accounting_accountant","product.category","product.model_product_category","account.group_accounting_accountant",1,0,0,0
+"access_product_pricelist_accounting_accountant","product.pricelist","product.model_product_pricelist","account.group_accounting_accountant",1,0,0,0
+"access_product_pricelist_version_accounting_accountant","product.pricelist.version","product.model_product_pricelist_version","account.group_accounting_accountant",1,0,0,0
+"access_product_pricelist_item_accounting_accountant","product.pricelist.item","product.model_product_pricelist_item","account.group_accounting_accountant",1,0,0,0
+"access_account_payment_term_accounting_accountant","account.payment.term","model_account_payment_term","account.group_accounting_accountant",1,0,0,0
+"access_res_payterm_accounting_accountant","res.payterm","base.model_res_payterm","account.group_accounting_accountant",1,0,0,0
+"access_account_payment_term_line_accounting_accountant","account.payment.term.line","model_account_payment_term_line","account.group_accounting_accountant",1,0,0,0
+"access_account_journal_accounting_accountant","account.journal","model_account_journal","account.group_accounting_accountant",1,0,0,0
+"access_account_fiscalyear_accounting_accountant","account.fiscalyear","model_account_fiscalyear","account.group_accounting_accountant",1,0,0,0
+"access_account_period_accounting_accountant","account.period","model_account_period","account.group_accounting_accountant",1,0,0,0
+"access_account_move_reconcile_accounting_accountant","account.move.reconcile","model_account_move_reconcile","account.group_accounting_accountant",1,1,1,1
+"access_account_tax_code_accounting_accountant","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
+"access_account_bank_statement_accounting_accountant","account.bank.statement","model_account_bank_statement","account.group_accounting_accountant",1,1,1,1
+"access_account_cashbox_line_accounting_accountant","account.cashbox.line","model_account_cashbox_line","account.group_accounting_accountant",1,1,1,1
"access_account_bank_statement_reconcile_line","account.bank.statement.reconcile.line","model_account_bank_statement_reconcile_line","account.group_accounting_accountant",1,1,1,1
-"access_account_bank_statement_line","account.bank.statement.line","model_account_bank_statement_line","account.group_accounting_accountant",1,1,1,1
-"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
-"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_accounting_accountant",1,0,0,0
-"access_temp_range","temp.range","model_temp_range","account.group_accounting_accountant",1,0,0,0
-"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_accounting_accountant",1,0,0,0
-"access_report_invoice_created","report.invoice.created","model_report_invoice_created","account.group_accounting_accountant",1,0,0,0
-"access_account_entries_report","account.entries.report","model_account_entries_report","account.group_accounting_accountant",1,0,0,0
-"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
-"access_account_journal_view","account.journal.view","model_account_journal_view","account.group_accounting_accountant",1,0,0,0
-"access_account_journal_period","account.journal.period","model_account_journal_period","account.group_accounting_accountant",1,1,1,1
-"access_account_journal_column","account.journal.column","model_account_journal_column","account.group_accounting_accountant",1,1,1,1
-"access_account_analytic_account","account.analytic.account","analytic.model_account_analytic_account","account.group_accounting_accountant",1,0,0,0
-"access_account_analytic_line","account.analytic.line","analytic.model_account_analytic_line","account.group_accounting_accountant",1,0,0,0
-"access_account_analytic_journal","account.analytic.journal","model_account_analytic_journal","account.group_accounting_accountant",1,0,0,0
-"access_account_bank_statement_reconcile","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_accounting_accountant",1,1,1,1
+"access_account_bank_statement_line_accounting_accountant","account.bank.statement.line","model_account_bank_statement_line","account.group_accounting_accountant",1,1,1,1
+"access_account_invoice_report_accounting_accountant","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
+"access_report_account_receivable_accounting_accountant","report.account.receivable","model_report_account_receivable","account.group_accounting_accountant",1,0,0,0
+"access_temp_range_accounting_accountant","temp.range","model_temp_range","account.group_accounting_accountant",1,0,0,0
+"access_report_aged_receivable_accounting_accountant","report.aged.receivable","model_report_aged_receivable","account.group_accounting_accountant",1,0,0,0
+"access_report_invoice_created_accounting_accountant","report.invoice.created","model_report_invoice_created","account.group_accounting_accountant",1,0,0,0
+"access_account_entries_report_accounting_accountant","account.entries.report","model_account_entries_report","account.group_accounting_accountant",1,0,0,0
+"access_account_invoice_report_accounting_accountant","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
+"access_account_journal_view_accounting_accountant","account.journal.view","model_account_journal_view","account.group_accounting_accountant",1,0,0,0
+"access_account_journal_period_accounting_accountant","account.journal.period","model_account_journal_period","account.group_accounting_accountant",1,1,1,1
+"access_account_journal_column_accounting_accountant","account.journal.column","model_account_journal_column","account.group_accounting_accountant",1,1,1,1
+"access_account_analytic_account_accounting_accountant","account.analytic.account","analytic.model_account_analytic_account","account.group_accounting_accountant",1,0,0,0
+"access_account_analytic_line_accounting_accountant","account.analytic.line","analytic.model_account_analytic_line","account.group_accounting_accountant",1,0,0,0
+"access_account_analytic_journal_accounting_accountant","account.analytic.journal","model_account_analytic_journal","account.group_accounting_accountant",1,0,0,0
+"access_account_bank_statement_reconcile_accounting_accountant","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_accounting_accountant",1,1,1,1
+"access_account_move_account_user","account.move","model_account_move","account.group_account_user",1,1,1,1
+"access_account_move_line_account_user","account.move.line","model_account_move_line","account.group_account_user",1,1,1,1
+"access_account_journal_account_user","account.journal","model_account_journal","account.group_account_user",1,0,0,0
+"access_account_journal_view_account_user","account.journal.view","model_account_journal_view","account.group_account_user",1,0,0,0
+"access_account_journal_period_account_user","account.journal.period","model_account_journal_period","account.group_account_user",1,0,0,0
+"access_account_journal_column_account_user","account.journal.column","model_account_journal_column","account.group_account_user",1,0,0,0
diff --git a/addons/account/wizard/account_move_journal_view.xml b/addons/account/wizard/account_move_journal_view.xml
index 14087d1ff40..2520b76a129 100644
--- a/addons/account/wizard/account_move_journal_view.xml
+++ b/addons/account/wizard/account_move_journal_view.xml
@@ -8,7 +8,7 @@
form
@@ -21,7 +21,7 @@
{'journal_type':'sale','view_mode':False}
new
-
+
@@ -42,7 +42,10 @@
new
+ id="menu_eaction_account_moves_purchase"
+ parent="menu_finance_payables"
+ icon="STOCK_JUSTIFY_FILL"
+ groups="group_account_user,group_account_manager,base.group_system"/>
@@ -69,6 +72,7 @@
id="menu_eaction_account_moves_all"
parent="account.menu_finance_entries"
sequence="4"
+ groups="group_account_user,group_account_manager,base.group_system"
/>
diff --git a/addons/account/wizard/account_pay_invoice.py b/addons/account/wizard/account_pay_invoice.py
index 2d59c556ba0..49a905836b2 100644
--- a/addons/account/wizard/account_pay_invoice.py
+++ b/addons/account/wizard/account_pay_invoice.py
@@ -18,6 +18,7 @@
# along with this program. If not, see .
#
##############################################################################
+
import time
from osv import fields, osv
@@ -34,15 +35,15 @@ class account_invoice_pay_writeoff(osv.osv_memory):
'writeoff_acc_id': fields.many2one('account.account', 'Write-Off account', required=True),
'writeoff_journal_id': fields.many2one('account.journal', 'Write-Off journal', required=True),
'comment': fields.char('Comment', size=64, required=True),
- 'analytic_id': fields.many2one('account.analytic.account','Analytic Account'),
+ 'analytic_id': fields.many2one('account.analytic.account','Analytic Account')
}
_defaults = {
'comment': 'Write-Off',
- }
+ }
def pay_and_reconcile_writeoff(self, cr, uid, ids, context=None):
- data = self.read(cr, uid, ids,context=context)[0]
- context.update({'write_off':data})
+ data = self.read(cr, uid, ids, context=context)[0]
+ context.update({'write_off': data})
self.pool.get('account.invoice.pay').pay_and_reconcile(cr, uid, ids, context=context)
return {}
@@ -60,26 +61,33 @@ class account_invoice_pay(osv.osv_memory):
'date': fields.date('Date payment', required=True),
'journal_id': fields.many2one('account.journal', 'Journal/Payment Mode', required=True, domain=[('type','=','cash')]),
'period_id': fields.many2one('account.period', 'Period', required=True),
- }
+ }
def view_init(self, cr, uid, ids, context=None):
- invoice = self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context=context)
- if invoice.state in ['draft', 'proforma2', 'cancel']:
- raise osv.except_osv(_('Error !'), _('Can not pay draft/proforma/cancel invoice.'))
+ if context is None:
+ context = {}
+ if context.get('active_id', False):
+ invoice = self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context=context)
+ if invoice.state in ['draft', 'proforma2', 'cancel']:
+ raise osv.except_osv(_('Error !'), _('Can not pay draft/proforma/cancel invoice.'))
pass
def _get_period(self, cr, uid, context=None):
- ids = self.pool.get('account.period').find(cr, uid, context=context)
period_id = False
+ ids = self.pool.get('account.period').find(cr, uid, context=context)
if len(ids):
period_id = ids[0]
return period_id
def _get_amount(self, cr, uid, context=None):
- return self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context=context).residual
+ if context is None:
+ context = {}
+ if context.get('active_id', False):
+ return self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context=context).residual
+ return 0.0
_defaults = {
- 'date': lambda *a: time.strftime('%Y-%m-%d'),
+ 'date': time.strftime('%Y-%m-%d'),
'period_id': _get_period,
'amount': _get_amount,
}
@@ -87,10 +95,11 @@ class account_invoice_pay(osv.osv_memory):
def wo_check(self, cr, uid, ids, context=None):
cur_obj = self.pool.get('res.currency')
mod_obj = self.pool.get('ir.model.data')
+ inv_obj = self.pool.get('account.invoice')
if context is None:
context = {}
data = self.read(cr, uid, ids,context=context)[0]
- invoice = self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context)
+ invoice = inv_obj.browse(cr, uid, context['active_id'], context)
journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context)
# Here we need that:
@@ -114,11 +123,11 @@ class account_invoice_pay(osv.osv_memory):
amount_paid = data['amount']
# Get the old payment if there are some
if invoice.payment_ids:
- debit=credit=0.0
+ debit = credit = 0.0
for payment in invoice.payment_ids:
- debit+=payment.debit
- credit+=payment.credit
- amount_paid+=abs(debit-credit)
+ debit += payment.debit
+ credit += payment.credit
+ amount_paid += abs(debit-credit)
# Test if there is a difference according to currency rouding setting
if self.pool.get('res.currency').is_zero(cr, uid, invoice.company_id.currency_id,
@@ -136,10 +145,11 @@ class account_invoice_pay(osv.osv_memory):
'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new',
- }
+ }
def pay_and_reconcile(self, cr, uid, ids, context=None):
cur_obj = self.pool.get('res.currency')
+ inv_obj = self.pool.get('account.invoice')
if context is None:
context = {}
data = self.read(cr, uid, ids, context=context)[0]
@@ -154,8 +164,8 @@ class account_invoice_pay(osv.osv_memory):
amount = data['amount']
- invoice = self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context)
- journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context)
+ invoice = inv_obj.browse(cr, uid, context['active_id'], context=context)
+ journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context=context)
# Compute the amount in company's currency, with the journal currency (which is equal to payment currency)
# when it is needed : If payment currency (according to selected journal.currency) is <> from company currency
if journal.currency and invoice.company_id.currency_id.id<>journal.currency.id:
@@ -181,7 +191,7 @@ class account_invoice_pay(osv.osv_memory):
acc_id = journal.default_credit_account_id and journal.default_credit_account_id.id
if not acc_id:
raise osv.except_osv(_('Error !'), _('Your journal must have a default credit and debit account.'))
- self.pool.get('account.invoice').pay_and_reconcile(cr, uid, [context['active_id']],
+ inv_obj.pay_and_reconcile(cr, uid, [context['active_id']],
amount, acc_id, data['period_id'], data['journal_id'], writeoff_account_id,
data['period_id'], writeoff_journal_id, context, data['name'])
return {}
diff --git a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml
index 7a7dbff602b..badd7e1816a 100644
--- a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml
+++ b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml
@@ -1,7 +1,7 @@
-
+
All Uninvoiced Entries
@@ -11,7 +11,7 @@
[('invoice_id','=',False),('to_invoice','!=',False)]
-
+
Overpassed Accounts
@@ -20,6 +20,6 @@
tree,form,graph
[('date','<=',time.strftime('%Y-%m-%d')),('state','=','open')]
-
+
diff --git a/addons/account_analytic_default/account_analytic_default_view.xml b/addons/account_analytic_default/account_analytic_default_view.xml
index d49fa04dffb..21ca2d0e4aa 100644
--- a/addons/account_analytic_default/account_analytic_default_view.xml
+++ b/addons/account_analytic_default/account_analytic_default_view.xml
@@ -52,7 +52,7 @@
-
+
Analytic Defaults
account.analytic.default
@@ -81,7 +81,8 @@
id="analytic_rule_action_user"
res_model="account.analytic.default"
src_model="res.users"
- domain="[('user_id','=',active_id)]"/>
+ domain="[('user_id','=',active_id)]"
+ groups="base.group_extended"/>
-
+
"""%(i,tools.to_xml(line.name),tools.to_xml(line.name),line.root_analytic_id and line.root_analytic_id.id or 0)
@@ -189,7 +189,7 @@ class account_analytic_plan_instance(osv.osv):
pids = self.pool.get('account.analytic.plan.instance').search(cr, uid, [('name','=',vals['name']),('code','=',vals['code']),('plan_id','<>',False)])
if pids:
raise osv.except_osv(_('Error'), _('A model having this name and code already exists !'))
-
+
acct_anal_acct = self.pool.get('account.analytic.account')
acct_anal_plan_line_obj = self.pool.get('account.analytic.plan.line')
res = acct_anal_plan_line_obj.search(cr, uid, [('plan_id','=',journal.plan_id.id)])
@@ -256,7 +256,7 @@ class account_journal(osv.osv):
_columns = {
'plan_id':fields.many2one('account.analytic.plan', 'Analytic Plans'),
}
-
+
account_journal()
class account_invoice_line(osv.osv):
@@ -282,7 +282,7 @@ class account_invoice_line(osv.osv):
if rec and rec.analytics_id:
res_prod['value'].update({'analytics_id':rec.analytics_id.id})
return res_prod
-
+
account_invoice_line()
class account_move_line(osv.osv):
@@ -396,7 +396,7 @@ class analytic_default(osv.osv):
_columns = {
'analytics_id': fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'),
}
-
+
analytic_default()
class sale_order_line(osv.osv):
@@ -409,7 +409,7 @@ class sale_order_line(osv.osv):
sale_line = self.browse(cr, uid, ids[0], context)
inv_line_obj = self.pool.get('account.invoice.line')
acct_anal_def_obj = self.pool.get('account.analytic.default')
-
+
for line in inv_line_obj.browse(cr, uid, create_ids, context):
rec = acct_anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context)
diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml
index 722d007373b..3e8fa82d3ff 100644
--- a/addons/account_analytic_plans/account_analytic_plans_view.xml
+++ b/addons/account_analytic_plans/account_analytic_plans_view.xml
@@ -24,7 +24,7 @@
-
+
@@ -60,7 +60,7 @@
form
-
+
@@ -73,7 +73,7 @@
2
-
+
@@ -90,13 +90,13 @@
-
-
+
@@ -140,7 +140,7 @@
@@ -153,7 +153,7 @@
-
+
diff --git a/addons/account_budget/crossovered_budget_view.xml b/addons/account_budget/crossovered_budget_view.xml
index 963644a21e1..30ae45003be 100644
--- a/addons/account_budget/crossovered_budget_view.xml
+++ b/addons/account_budget/crossovered_budget_view.xml
@@ -78,14 +78,14 @@
-
+
-
+
@@ -96,7 +96,7 @@
-
+
Auction dates
auction.dates
@@ -122,8 +122,8 @@
-
-
+
+
@@ -194,7 +194,7 @@
Auctions
auction.dates
form
- tree,form,calendar
+ tree,form,calendar
{"search_default_draft": "1"}
@@ -208,8 +208,8 @@
-
-
+
+
Auction lots
auction.lots
@@ -246,13 +246,13 @@
-
-
+
+
-
+
@@ -295,7 +295,7 @@
-
+
@@ -306,7 +306,7 @@
-
+
@@ -314,8 +314,8 @@
-
-
+
+
@@ -358,7 +358,7 @@
-
+
@@ -373,7 +373,7 @@
-
+
Auction Lots search
auction.lots
@@ -416,9 +416,9 @@
-
-
-
+
+
+
Auction lots
auction.lots
@@ -440,9 +440,9 @@
{"search_default_draft": "1"}
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -543,7 +543,7 @@
-
+
Deposit border
auction.deposit
@@ -569,7 +569,7 @@
+ context="{'group_by':'date_dep'}"/>
@@ -603,7 +603,7 @@
-
+
auction.bid_line.tree1
auction.bid_line
@@ -617,7 +617,7 @@
-
+
auction.bid_line.form1
auction.bid_line
@@ -708,7 +708,7 @@
-
+
-
-
+
+
diff --git a/addons/base_calendar/security/ir.model.access.csv b/addons/base_calendar/security/ir.model.access.csv
index f54b3f0470b..aa269e9ff18 100644
--- a/addons/base_calendar/security/ir.model.access.csv
+++ b/addons/base_calendar/security/ir.model.access.csv
@@ -1,6 +1,6 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_calendar_attendee","calendar.attendee","model_calendar_attendee","base.group_system",1,1,1,1
-"access_calendar_alarm","calendar.alarm","model_calendar_alarm","base.group_system",1,1,1,1
-"access_res_alarm","res.alarm","model_res_alarm","base.group_system",1,1,1,1
-"access_calendar_todo","calendar.todo","model_calendar_todo","base.group_system",1,1,1,1
-"access_calendar_event","calendar.event.user","model_calendar_event","base.group_system",1,1,1,1
+"access_calendar_attendee","calendar.attendee","model_calendar_attendee","base.group_user",1,1,1,1
+"access_calendar_alarm","calendar.alarm","model_calendar_alarm","base.group_user",1,1,1,1
+"access_res_alarm","res.alarm","model_res_alarm","base.group_user",1,1,1,1
+"access_calendar_todo","calendar.todo","model_calendar_todo","base.group_user",1,1,1,1
+"access_calendar_event","calendar.event","model_calendar_event","base.group_user",1,1,1,1
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml
index af843666435..1e36e7f43cd 100644
--- a/addons/crm/crm_meeting_view.xml
+++ b/addons/crm/crm_meeting_view.xml
@@ -32,6 +32,7 @@
groups="base.group_extended"
domain="[('object_id.model', '=', 'crm.meeting')]" />
+
-
+
@@ -67,6 +67,7 @@
+
@@ -104,13 +105,17 @@
-
+
+
-
+
+
+
+
-
+
diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml
index c9d9dbc2d5e..11923176333 100644
--- a/addons/hr_payroll/hr_payroll_view.xml
+++ b/addons/hr_payroll/hr_payroll_view.xml
@@ -193,7 +193,7 @@
-
+
@@ -298,7 +298,7 @@
-
+
@@ -335,7 +335,7 @@
-
+
@@ -363,7 +363,7 @@
-
+
@@ -391,7 +391,7 @@
-
+
@@ -463,7 +463,7 @@
-
+
@@ -956,7 +956,7 @@
-
+
diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml
index 87d183f2fdc..fbdb94b092f 100644
--- a/addons/hr_timesheet/hr_timesheet_view.xml
+++ b/addons/hr_timesheet/hr_timesheet_view.xml
@@ -34,7 +34,7 @@
-
+
diff --git a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
index cabf51546c2..d4e25e07a20 100644
--- a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
+++ b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
@@ -47,26 +47,26 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -417,7 +417,7 @@
tree
-
+
@@ -435,7 +435,7 @@
-
+
random.timesheet.lines.search
random.timesheet.lines
search
@@ -444,8 +444,8 @@
-
-
+
+
@@ -453,7 +453,7 @@
-
+
@@ -470,7 +470,7 @@
-
+
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index 486c701fe52..377e1dfafdb 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -39,7 +39,7 @@
-
+
@@ -53,7 +53,7 @@
-
+
diff --git a/addons/lunch/lunch.py b/addons/lunch/lunch.py
index caa77b63c01..06034df1688 100644
--- a/addons/lunch/lunch.py
+++ b/addons/lunch/lunch.py
@@ -141,6 +141,7 @@ class lunch_order(osv.osv):
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ], \
'State', readonly=True, select=True),
'price': fields.function(_price_get, method=True, string="Price"),
+ 'category': fields.many2one('lunch.category','Category'),
}
_defaults = {
@@ -198,7 +199,8 @@ class lunch_order(osv.osv):
if not product:
return {'value': {'price': 0.0}}
price = self.pool.get('lunch.product').read(cr, uid, product, ['price'])['price']
- return {'value': {'price': price}}
+ categ_id = self.pool.get('lunch.product').browse(cr, uid, product).category_id.id
+ return {'value': {'price': price,'category':categ_id}}
lunch_order()
diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml
index 71a89124101..b0804cbb9b0 100644
--- a/addons/lunch/lunch_view.xml
+++ b/addons/lunch/lunch_view.xml
@@ -29,8 +29,9 @@
-
+
+
@@ -48,6 +49,7 @@
+
@@ -85,7 +87,9 @@
-
+
+
+
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 215c6970405..e479b835bbf 100644
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -575,14 +575,17 @@ class marketing_campaign_workitem(osv.osv):
if result:
# process _chain
+ workitem = workitem.browse(context)[0] # reload
+ date = datetime.strptime(workitem.date, DT_FMT)
+
for transition in activity.to_ids:
if transition.trigger == 'cosmetic':
continue
launch_date = False
if transition.trigger == 'auto':
- launch_date = datetime.now()
+ launch_date = date
elif transition.trigger == 'time':
- launch_date = datetime.now() + transition._delta()
+ launch_date = date + transition._delta()
if launch_date:
launch_date = launch_date.strftime(DT_FMT)
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml
index 13aed4eb129..ffc3332ab8c 100644
--- a/addons/project_issue_sheet/project_issue_sheet_view.xml
+++ b/addons/project_issue_sheet/project_issue_sheet_view.xml
@@ -9,12 +9,12 @@
-
+
-
-
-
+
+
+
diff --git a/addons/project_planning/project_planning_view.xml b/addons/project_planning/project_planning_view.xml
index 534b8e13b69..38c65315ef5 100644
--- a/addons/project_planning/project_planning_view.xml
+++ b/addons/project_planning/project_planning_view.xml
@@ -54,7 +54,7 @@
-
+
@@ -68,7 +68,7 @@
-
+
@@ -78,7 +78,7 @@
-
+
@@ -181,7 +181,7 @@
-
+
@@ -198,7 +198,7 @@
-
+
@@ -234,7 +234,7 @@
-
+
@@ -249,7 +249,7 @@
-
+
@@ -263,7 +263,7 @@
graph
-
+
@@ -283,7 +283,7 @@
-
+
@@ -325,7 +325,7 @@
-
+
diff --git a/addons/purchase_analytic_plans/purchase_analytic_plans_view.xml b/addons/purchase_analytic_plans/purchase_analytic_plans_view.xml
index 498ceb2bd0a..849c0260470 100644
--- a/addons/purchase_analytic_plans/purchase_analytic_plans_view.xml
+++ b/addons/purchase_analytic_plans/purchase_analytic_plans_view.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml
index ed11f80e3a0..36b1afee891 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 898ab01135f..244d9574f95 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1391,7 +1391,7 @@ class stock_move(osv.osv):
if context.get('move_line', []):
if context['move_line'][0]:
if isinstance(context['move_line'][0], (tuple, list)):
- return context['move_line'][0][2] and context['move_line'][0][2]['location_dest_id'] or False
+ return context['move_line'][0][2] and context['move_line'][0][2].get('location_dest_id',False)
else:
move_list = self.pool.get('stock.move').read(cr, uid, context['move_line'][0], ['location_dest_id'])
return move_list and move_list['location_dest_id'][0] or False
diff --git a/addons/thunderbird/partner/partner.py b/addons/thunderbird/partner/partner.py
index 63dff16bcbc..a7795d1a602 100644
--- a/addons/thunderbird/partner/partner.py
+++ b/addons/thunderbird/partner/partner.py
@@ -148,13 +148,16 @@ class thunderbird_partner(osv.osv_memory):
create_id = self.pool.get('res.partner.address').create(cr, user, dictcreate)
return create_id
- def history_message(self,cr,uid,vals):
+ def history_message(self, cr, uid, vals):
dictcreate = dict(vals)
+ ref_ids = str(dictcreate.get('ref_ids')).split(';')
+ msg = dictcreate.get('message')
server_tools_pool = self.pool.get('email.server.tools')
- res_ids = map(lambda x: int(x), dictcreate.get('res_id').split(','))
- models = dictcreate.get('model').split(',')
- for i in range(len(res_ids)):
- server_tools_pool.history_message(cr, uid, models[i], res_ids[i], dictcreate.get('message'))
+ for ref_id in ref_ids:
+ ref = ref_id.split(',')
+ model = ref[0]
+ res_id = int(ref[1])
+ server_tools_pool.history_message(cr, uid, model, res_id, msg)
return True
def process_email(self,cr,uid,vals):
diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi
index 142e2839c6e..d32efb63511 100644
Binary files a/addons/thunderbird/plugin/openerp_plugin.xpi and b/addons/thunderbird/plugin/openerp_plugin.xpi differ
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar
index 8dd02dae92c..7bfca54ed48 100644
Binary files a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar and b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar differ
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
index 2d3178d626b..6938aba95c3 100755
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
@@ -1,6 +1,20 @@
-/**
-* Global instance stored here
-*/
+/************************************************************
+* OpenERP, Open Source Management Solution
+* Copyright (C) 2004-2010 Tiny SPRL ().
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as
+* published by the Free Software Foundation, either version 3 of the
+* License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program. If not, see .
+***************************************************************/
var xmlRpcClient;
@@ -1387,37 +1401,38 @@ function upload_archivemail()
list_documents = document.getElementById('listSearchBox')
var context = []
var cnt = list_documents.selectedCount
- var res_id = [];
- var model = [];
+ var ref_ids = "";
+ var branchobj = getPref();
+ setServerService('xmlrpc/object');
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
+ var xmlRpcClient = getXmlRpc();
+ var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+ strDbName.data = branchobj.getCharPref("serverdbname");
+ var struids = xmlRpcClient.createType(xmlRpcClient.INT,{});
+ struids.data = branchobj.getIntPref('userid');
+ var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+ strpass.data = branchobj.getCharPref("password");
+ var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+ strmethod.data = 'history_message';
+ var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+ strobj.data = 'thunderbird.partner';
+ var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+
for(i=0;i
{d57f315a-9f5d-4366-a530-a769a4a8c949}
chrome://openerp_plugin/skin/tinyerp-icon.ico
- OpenERP Plugin for Thunderbird 2.0
+ OpenERP Plugin
1.0
OpenERP Thunderbird Integration
OpenERP SA
@@ -15,7 +15,7 @@
{3550f703-e582-4d05-9a08-453d09bdfdc6}
2.0
- 3.0.*
+ 3.1.*