diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 84dd2c90e7c..c599c7c4447 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -577,13 +577,16 @@ class account_move_line(osv.osv): # writeoff; entry generated for the difference between the lines # - def reconcile_partial(self, cr, uid, ids, type='auto', context={}): + def reconcile_partial(self, cr, uid, ids, type='auto', context=None): merges = [] unmerge = [] total = 0.0 merges_rec = [] company_list = [] + if context is None: + context = {} + for line in self.browse(cr, uid, ids, context=context): if company_list and not line.company_id.id in company_list: raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries')) @@ -613,13 +616,15 @@ class account_move_line(osv.osv): self.pool.get('account.move.reconcile').reconcile_partial_check(cr, uid, [r_id] + merges_rec, context=context) return True - def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context={}): + def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context=None): lines = self.browse(cr, uid, ids, context=context) unrec_lines = filter(lambda x: not x['reconcile_id'], lines) credit = debit = 0.0 currency = 0.0 account_id = False partner_id = False + if context is None: + context = {} company_list = [] for line in self.browse(cr, uid, ids, context=context): diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 03037963ded..067fbd38ab1 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -312,23 +312,23 @@ [('journal_id','=',active_id)] - + - + - + diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv index 7458594d240..329135d29a7 100644 --- a/addons/account/security/ir.model.access.csv +++ b/addons/account/security/ir.model.access.csv @@ -1,4 +1,5 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_product_product_account_user","product.product.account.user","product.model_product_product","group_account_user",1,0,0,0 "access_account_payment_term","account.payment.term","model_account_payment_term","account.group_account_user",1,0,0,0 "access_account_payment_term_line","account.payment.term.line","model_account_payment_term_line","account.group_account_user",1,0,0,0 "access_account_account_type","account.account.type","model_account_account_type","account.group_account_user",1,0,0,0 diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py index be0ebc40677..e12ff69dc0a 100644 --- a/addons/account/wizard/account_reconcile.py +++ b/addons/account/wizard/account_reconcile.py @@ -56,11 +56,11 @@ class account_move_line_reconcile(osv.osv_memory): if 'trans_nbr' in fields: res.update({'trans_nbr':data['trans_nbr']}) if 'credit' in fields: - res.update({'trans_nbr':data['credit']}) + res.update({'credit':data['credit']}) if 'debit' in fields: - res.update({'trans_nbr':data['debit']}) + res.update({'debit':data['debit']}) if 'writeoff' in fields: - res.update({'trans_nbr':data['writeoff']}) + res.update({'writeoff':data['writeoff']}) return res def partial_check(self, cr, uid, ids, context=None): diff --git a/addons/account_payment/__init__.py b/addons/account_payment/__init__.py index 3724590e5f5..82a05aa73e9 100644 --- a/addons/account_payment/__init__.py +++ b/addons/account_payment/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . # ############################################################################## @@ -23,11 +23,10 @@ # Init Sales #---------------------------------------------------------- -import payment +import account_payment import wizard import account_move_line import account_invoice import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index 98b76d05088..cd0e162df17 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -41,11 +41,11 @@ 'wizard/account_payment_pay_view.xml', 'wizard/account_payment_populate_statement_view.xml', 'wizard/account_payment_create_order_view.xml', - 'payment_view.xml', - 'payment_workflow.xml', - 'payment_sequence.xml', + 'account_payment_view.xml', + 'account_payment_workflow.xml', + 'account_payment_sequence.xml', 'account_invoice_view.xml', - 'payment_report.xml', + 'account_payment_report.xml', ], 'demo_xml': [], 'test': ['test/account_payment.yml'], diff --git a/addons/account_payment/payment.py b/addons/account_payment/account_payment.py similarity index 98% rename from addons/account_payment/payment.py rename to addons/account_payment/account_payment.py index 8e300f7072a..20d8ff1afd7 100644 --- a/addons/account_payment/payment.py +++ b/addons/account_payment/account_payment.py @@ -18,29 +18,25 @@ # along with this program. If not, see . # ############################################################################## - -from osv import fields -from osv import osv import time -import netsvc -import pooler +from osv import osv, fields +import netsvc class payment_type(osv.osv): _name= 'payment.type' _description= 'Payment Type' _columns= { - 'name': fields.char('Name', size=64, required=True,help='Payment Type'), - 'code': fields.char('Code', size=64, required=True,help='Specifies the Code for Payment Type'), + 'name': fields.char('Name', size=64, required=True, help='Payment Type'), + 'code': fields.char('Code', size=64, required=True, help='Specifies the Code for Payment Type'), 'suitable_bank_types': fields.many2many('res.partner.bank.type', 'bank_type_payment_type_rel', 'pay_type_id','bank_type_id', 'Suitable bank types') - } + } payment_type() - class payment_mode(osv.osv): _name= 'payment.mode' _description= 'Payment Mode' @@ -66,16 +62,14 @@ class payment_mode(osv.osv): where pm.id = %s """, [payment_code]) return [x[0] for x in cr.fetchall()] - payment_mode() - class payment_order(osv.osv): _name = 'payment.order' _description = 'Payment Order' _rec_name = 'reference' - def get_wizard(self,type): + def get_wizard(self, type): logger = netsvc.Logger() logger.notifyChannel("warning", netsvc.LOG_WARNING, "No wizard found for the payment type '%s'." % type) @@ -146,7 +140,6 @@ class payment_order(osv.osv): payment_order() - class payment_line(osv.osv): _name = 'payment.line' _description = 'Payment Line' diff --git a/addons/account_payment/payment_report.xml b/addons/account_payment/account_payment_report.xml similarity index 100% rename from addons/account_payment/payment_report.xml rename to addons/account_payment/account_payment_report.xml diff --git a/addons/account_payment/payment_sequence.xml b/addons/account_payment/account_payment_sequence.xml similarity index 100% rename from addons/account_payment/payment_sequence.xml rename to addons/account_payment/account_payment_sequence.xml diff --git a/addons/account_payment/payment_view.xml b/addons/account_payment/account_payment_view.xml similarity index 100% rename from addons/account_payment/payment_view.xml rename to addons/account_payment/account_payment_view.xml diff --git a/addons/account_payment/payment_workflow.xml b/addons/account_payment/account_payment_workflow.xml similarity index 100% rename from addons/account_payment/payment_workflow.xml rename to addons/account_payment/account_payment_workflow.xml diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index 5e37bd79488..81f5e4a570f 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -110,8 +110,7 @@ class payment_order_create(osv.osv_memory): context.update({'line_ids': line_ids}) model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_create_payment_order_lines')], context=context) resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] - return { - 'name': ('Entrie Lines'), + return {'name': ('Entrie Lines'), 'context': context, 'view_type': 'form', 'view_mode': 'form', diff --git a/addons/account_payment/wizard/account_payment_pay.py b/addons/account_payment/wizard/account_payment_pay.py index 74e1566520c..20e1e10f882 100644 --- a/addons/account_payment/wizard/account_payment_pay.py +++ b/addons/account_payment/wizard/account_payment_pay.py @@ -18,16 +18,13 @@ # along with this program. If not, see . # ############################################################################## -import time from osv import fields, osv class account_payment_make_payment(osv.osv_memory): _name = 'account.payment.make.payment' _description = 'Account make payment' - _columns = { - } - def launch_wizard(self, cr, uid, ids, context): + def launch_wizard(self, cr, uid, ids, context=None): """ Search for a wizard to launch according to the type. If type is manual. just confirm the order. @@ -35,8 +32,8 @@ class account_payment_make_payment(osv.osv_memory): obj_payment_order = self.pool.get('payment.order') obj_model = self.pool.get('ir.model.data') obj_act = self.pool.get('ir.actions.act_window') - order= obj_payment_order.browse(cr,uid,context['active_id'],context) - t= order.mode and order.mode.type.code or 'manual' + order= obj_payment_order.browse(cr, uid, context['active_id'], context) + t = order.mode and order.mode.type.code or 'manual' if t == 'manual' : obj_payment_order.set_done(cr,uid,context['active_id'],context) return {} @@ -49,12 +46,10 @@ class account_payment_make_payment(osv.osv_memory): module, wizard= gw result = mod_obj._get_id(cr, uid, module, wizard) id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id'] - result = act_obj.read(cr, uid, [id])[0] + return act_obj.read(cr, uid, [id])[0] #result['context'] = str({'fiscalyear': data['form']['fiscalyear']}) - return result account_payment_make_payment() -# 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_payment/wizard/account_payment_pay_view.xml b/addons/account_payment/wizard/account_payment_pay_view.xml index 322c0a72e48..566359d8b32 100644 --- a/addons/account_payment/wizard/account_payment_pay_view.xml +++ b/addons/account_payment/wizard/account_payment_pay_view.xml @@ -8,7 +8,7 @@ form
- + diff --git a/addons/base_action_rule/security/ir.model.access.csv b/addons/base_action_rule/security/ir.model.access.csv index 99e4fc07c4b..a8e43372e23 100644 --- a/addons/base_action_rule/security/ir.model.access.csv +++ b/addons/base_action_rule/security/ir.model.access.csv @@ -1,2 +1,3 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_base_action_rule","base.action.rule","model_base_action_rule",,1,1,1,1 +"access_base_action_rule","base.action.rule","model_base_action_rule",,1,0,0,0 +"access_base_action_rule_config","base.action.rule config","model_base_action_rule",base.group_system,1,0,0,0 diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 79c8a0207a3..a86a3e662d1 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -2,7 +2,7 @@ - + calendar.attendee.form @@ -10,12 +10,12 @@ form - - - + + + - + @@ -68,7 +68,7 @@ - + calendar.attendee.tree @@ -87,7 +87,7 @@ - + calendar.attendee.search @@ -108,47 +108,47 @@ - - - - - - - - + + + + + + + - + - - Event Invitations - ir.actions.act_window - calendar.attendee - form - tree,form - - {'default_sent_by_uid': uid} - + + Event Invitations + ir.actions.act_window + calendar.attendee + form + tree,form + + {'default_sent_by_uid': uid} + - + + parent="base.menu_base_config" sequence="15" /> - + - - + - + res.alarm.form res.alarm form @@ -165,7 +165,7 @@ - + res.alarm.tree @@ -189,198 +189,199 @@ tree,form - + + - - Event Form - calendar.event - form - - - - - - - - - - - - - -