Merge lp:~numerigraphe/openobject-addons/trunk-unmutable-defaults into lp:openobject-addons
- trunk-unmutable-defaults
- Merge into trunk
Proposed by
Numérigraphe
Status: | Merged |
---|---|
Merge reported by: | Numérigraphe |
Merged at revision: | not available |
Proposed branch: | lp:~numerigraphe/openobject-addons/trunk-unmutable-defaults |
Merge into: | lp:openobject-addons |
Diff against target: |
4844 lines (+556/-493) 241 files modified
account/account.py (+39/-13) account/account_bank.py (+3/-3) account/account_move_line.py (+1/-1) account/project/wizard/account_analytic_chart.py (+1/-1) account/project/wizard/account_analytic_inverted_balance_report.py (+1/-1) account/project/wizard/project_account_analytic_line.py (+1/-1) account/report/account_balance.py (+1/-1) account/report/account_central_journal.py (+1/-1) account/report/account_general_journal.py (+1/-1) account/report/account_report.py (+1/-1) account/report/account_tax_report.py (+6/-2) account/res_currency.py (+1/-1) account/wizard/account_invoice_state.py (+1/-1) account/wizard/account_journal_select.py (+1/-1) account/wizard/account_move_bank_reconcile.py (+1/-1) account/wizard/account_move_journal.py (+1/-1) account/wizard/account_move_line_reconcile_select.py (+1/-1) account/wizard/account_move_line_select.py (+1/-1) account/wizard/account_move_line_unreconcile_select.py (+1/-1) account/wizard/account_period_close.py (+1/-1) account/wizard/account_reconcile.py (+1/-1) account/wizard/account_reconcile_partner_process.py (+1/-1) account/wizard/account_state_open.py (+1/-1) account/wizard/account_subscription_generate.py (+1/-1) account/wizard/account_unreconcile.py (+1/-1) account_analytic_plans/report/crossovered_analytic.py (+6/-4) account_analytic_plans/wizard/analytic_plan_create_model.py (+1/-1) account_anglo_saxon/__init__.py (+1/-1) account_anglo_saxon/sale.py (+0/-43) account_asset/account_asset.py (+5/-3) account_budget/report/analytic_account_budget_report.py (+5/-3) account_budget/report/budget_report.py (+3/-1) account_budget/report/crossovered_budget_report.py (+3/-1) account_budget/wizard/account_budget_analytic.py (+1/-1) account_budget/wizard/account_budget_crossovered_report.py (+1/-1) account_budget/wizard/account_budget_report.py (+1/-1) account_coda/account_coda.py (+4/-2) account_followup/__init__.py (+1/-1) account_followup/wizard/__init__.py (+1/-1) account_followup/wizard/account_followup_print.py (+1/-1) account_invoice_layout/wizard/account_invoice_special_message.py (+1/-1) account_payment/__init__.py (+1/-1) account_payment/account_invoice.py (+1/-1) account_payment/account_move_line.py (+2/-2) account_payment/account_payment.py (+3/-1) account_payment/report/__init__.py (+1/-1) account_payment/report/payment_order.py (+2/-2) account_payment/wizard/__init__.py (+1/-1) account_payment/wizard/account_payment_order.py (+1/-1) account_payment/wizard/account_payment_pay.py (+1/-1) account_payment/wizard/account_payment_populate_statement.py (+1/-1) account_sequence/__init__.py (+1/-1) account_voucher/__init__.py (+1/-1) account_voucher/account_voucher.py (+4/-2) account_voucher/report/__init__.py (+1/-1) account_voucher/report/account_voucher.py (+1/-1) account_voucher/report/account_voucher_print.py (+1/-1) account_voucher/wizard/__init__.py (+1/-1) account_voucher/wizard/account_voucher_unreconcile.py (+1/-1) analytic/analytic.py (+1/-1) anonymization/anonymization.py (+2/-2) auction/auction.py (+1/-1) auction/barcode/code39.py (+1/-1) auction/barcode/common.py (+1/-1) auction/report/auction_invoice.py (+1/-1) auction/report/auction_total_rml.py (+4/-4) auction/report/buyer_form_report.py (+1/-1) auction/report/buyer_list.py (+1/-1) auction/report/huissier.py (+1/-1) auction/report/photo_shadow.py (+1/-1) auction/report/seller_form_report.py (+1/-1) audittrail/audittrail.py (+7/-3) base_contact/base_contact.py (+3/-3) base_crypt/crypt.py (+3/-1) base_module_doc_rst/report/ir_module_reference_print_graph.py (+1/-1) base_module_quality/__init__.py (+1/-1) base_module_quality/base_module_quality.py (+15/-3) base_module_quality/method_test/method_test.py (+1/-1) base_module_quality/object_test/object_test.py (+1/-1) base_module_quality/pep8_test/pep8_test.py (+1/-1) base_module_quality/structure_test/structure_test.py (+1/-1) base_module_quality/unit_test/unit_test.py (+1/-1) base_module_quality/wizard/module_quality_check.py (+1/-1) base_module_quality/wizard/quality_save_report.py (+1/-1) base_module_quality/workflow_test/workflow_test.py (+1/-1) base_module_record/wizard/base_module_record_objects.py (+1/-1) base_module_record/wizard/base_module_save.py (+1/-1) base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py (+17/-15) base_report_designer/plugin/openerp_report_designer/bin/script/About.py (+1/-1) base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py (+8/-8) base_report_designer/plugin/openerp_report_designer/bin/script/Change.py (+2/-2) base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py (+3/-3) base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py (+1/-1) base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py (+1/-1) base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py (+3/-3) base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py (+6/-6) base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py (+3/-3) base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py (+3/-3) base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py (+4/-4) base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py (+4/-4) base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py (+4/-4) base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py (+6/-6) base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py (+1/-1) base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py (+14/-8) base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py (+1/-1) base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py (+2/-2) base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py (+3/-3) base_report_designer/plugin/openerp_report_designer/bin/script/modify.py (+1/-1) base_report_designer/plugin/openerp_report_designer/test/test_fields.py (+5/-1) base_setup/base_setup.py (+1/-1) base_synchro/base_synchro_obj.py (+5/-3) base_vat/__init__.py (+1/-1) base_vat/res_company.py (+1/-1) caldav/caldav_node.py (+11/-11) crm/crm.py (+3/-1) crm/crm_lead.py (+1/-1) crm_claim/crm_claim.py (+1/-1) crm_helpdesk/crm_helpdesk.py (+1/-1) crm_profiling/crm_profiling.py (+1/-1) delivery/wizard/delivery_sale_order.py (+1/-1) document/content_index.py (+4/-4) document/document.py (+1/-1) document/document_directory.py (+3/-3) document/nodes.py (+26/-24) document/odt2txt.py (+3/-3) document/std_index.py (+8/-8) document_webdav/document_webdav.py (+1/-1) document_webdav/redirect.py (+1/-1) document_webdav/test_davclient.py (+1/-1) document_webdav/webdav.py (+1/-1) document_webdav/webdav_server.py (+6/-6) email_template/html2text.py (+4/-3) email_template/wizard/mail_compose_message.py (+1/-1) event/event.py (+1/-1) event/report/__init__.py (+1/-1) event/res_partner.py (+1/-1) event/wizard/event_confirm.py (+1/-1) event_moodle/event_moodle.py (+1/-1) event_project/event_project.py (+1/-1) event_project/wizard/event_project_retro.py (+1/-1) hr_attendance/wizard/__init__.py (+1/-1) hr_attendance/wizard/hr_attendance_bymonth.py (+1/-1) hr_attendance/wizard/hr_attendance_byweek.py (+1/-1) hr_attendance/wizard/hr_attendance_error.py (+1/-1) hr_evaluation/hr_evaluation.py (+1/-1) hr_payroll/report/report_contribution_register.py (+1/-1) hr_payroll/report/report_payslip.py (+1/-1) hr_payroll/report/report_payslip_details.py (+1/-1) hr_payroll_account/__init__.py (+1/-1) hr_payroll_account/wizard/__init__.py (+1/-1) hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py (+1/-1) hr_recruitment/hr_recruitment.py (+1/-1) hr_recruitment/wizard/hr_recruitment_create_partner_job.py (+2/-2) hr_recruitment/wizard/hr_recruitment_employee_hired.py (+2/-2) hr_timesheet_invoice/hr_timesheet_invoice.py (+1/-1) hr_timesheet_invoice/report/account_analytic_profit.py (+1/-1) hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py (+1/-1) hr_timesheet_sheet/hr_timesheet_sheet.py (+2/-2) hr_timesheet_sheet/wizard/hr_timesheet_current.py (+1/-1) idea/idea.py (+1/-1) import_base/import_framework.py (+1/-1) import_sugarcrm/import_sugarcrm.py (+3/-3) l10n_be/__init__.py (+1/-1) l10n_be_invoice_bba/invoice.py (+6/-6) l10n_br/l10n_br.py (+1/-1) l10n_ch/partner.py (+1/-1) l10n_ch/payment.py (+1/-1) l10n_ch/report/report_webkit_html.py (+1/-1) l10n_ch/wizard/create_dta.py (+1/-1) l10n_fr/l10n_fr.py (+1/-1) l10n_fr/report/base_report.py (+1/-1) l10n_fr/wizard/fr_report_bilan.py (+1/-1) l10n_fr/wizard/fr_report_compute_resultant.py (+1/-1) l10n_lu/wizard/pdf_ext.py (+1/-1) lunch/report/order.py (+2/-2) mail/mail_thread.py (+1/-1) membership/report/__init__.py (+1/-1) membership/report/report_membership.py (+1/-1) membership/wizard/__init__.py (+1/-1) mrp/mrp.py (+5/-3) mrp/procurement.py (+1/-1) mrp/report/bom_structure.py (+2/-2) mrp/stock.py (+1/-1) mrp_operations/mrp_operations.py (+1/-1) plugin/plugin_handler.py (+1/-1) point_of_sale/report/account_statement.py (+1/-1) point_of_sale/report/all_closed_cashbox_of_the_day.py (+9/-9) point_of_sale/report/pos_details.py (+3/-3) point_of_sale/report/pos_details_summary.py (+2/-2) point_of_sale/report/pos_lines.py (+2/-2) point_of_sale/report/pos_payment_report.py (+3/-3) point_of_sale/report/pos_payment_report_user.py (+2/-2) point_of_sale/report/pos_receipt.py (+1/-1) point_of_sale/report/pos_sales_user.py (+2/-2) point_of_sale/report/pos_sales_user_today.py (+2/-2) point_of_sale/report/pos_users_product.py (+2/-2) point_of_sale/report/report_cash_register.py (+1/-1) procurement/company.py (+1/-1) product/product.py (+2/-2) product/report/product_pricelist.py (+4/-4) product_manufacturer/product_manufacturer.py (+1/-1) product_visible_discount/__init__.py (+1/-1) project/project.py (+14/-10) project/wizard/project_task_reevaluate.py (+1/-1) project_gtd/project_gtd.py (+1/-1) project_gtd/wizard/project_gtd_empty.py (+1/-1) project_mailgate/project_mailgate.py (+3/-1) project_mrp/project_procurement.py (+1/-1) project_timesheet/project_timesheet.py (+1/-1) project_timesheet/report/task_report.py (+2/-2) purchase/purchase.py (+2/-2) purchase/wizard/purchase_order_group.py (+1/-1) purchase_requisition/purchase_requisition.py (+1/-1) report_webkit/ir_report.py (+1/-1) report_webkit/report_helper.py (+1/-1) resource/faces/task.py (+2/-1) resource/resource.py (+1/-1) sale/edi/sale_order.py (+1/-1) sale/report/__init__.py (+1/-1) sale/sale.py (+5/-3) sale/wizard/__init__.py (+1/-1) sale/wizard/sale_make_invoice.py (+1/-1) sale_crm/__init__.py (+1/-1) sale_layout/sale_layout.py (+1/-1) sale_order_dates/sale_order_dates.py (+1/-1) stock/report/lot_overview.py (+1/-1) stock/report/lot_overview_all.py (+1/-1) stock/report/product_stock.py (+3/-1) stock/report/report_stock.py (+2/-2) stock/report/stock_by_location.py (+1/-1) stock/report/stock_inventory_move_report.py (+1/-1) stock/stock.py (+10/-4) stock_invoice_directly/wizard/stock_invoice.py (+1/-1) stock_location/procurement_pull.py (+1/-1) stock_planning/stock_planning.py (+1/-1) stock_planning/wizard/stock_planning_createlines.py (+1/-1) survey/survey.py (+2/-2) survey/wizard/__init__.py (+1/-1) survey/wizard/survey_answer.py (+5/-5) wiki/web/widgets/rss/feedparser.py (+3/-1) wiki/web/widgets/wikimarkup/__init__.py (+4/-2) |
To merge this branch: | bzr merge lp:~numerigraphe/openobject-addons/trunk-unmutable-defaults |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+95967@code.launchpad.net |
Commit message
Description of the change
This branch should fix the last few methods that still have mutable defaults.
Lionel Sausin
To post a comment you must log in.
Revision history for this message
Anto (abourguignon) wrote : | # |
Revision history for this message
Anto (abourguignon) wrote : | # |
Not necessary anymore, I did it in this branch: https:/
Revision history for this message
Numérigraphe (numerigraphe) wrote : | # |
OK I'm marking this as merged then. Thanks!
Revision history for this message
Anto (abourguignon) wrote : | # |
Thanks to you, keep up the good work !
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account/account.py' |
2 | --- account/account.py 2012-02-28 14:08:16 +0000 |
3 | +++ account/account.py 2012-03-05 18:43:21 +0000 |
4 | @@ -591,12 +591,15 @@ |
5 | res.append((record['id'], name)) |
6 | return res |
7 | |
8 | - def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False): |
9 | + def copy(self, cr, uid, id, None, context=None, done_list=None, local=False): |
10 | + if default is None: |
11 | + default = {} |
12 | + else: |
13 | + default = default.copy() |
14 | + if done_list is None: |
15 | + done_list = [] |
16 | account = self.browse(cr, uid, id, context=context) |
17 | new_child_ids = [] |
18 | - if not default: |
19 | - default = {} |
20 | - default = default.copy() |
21 | default['code'] = (account['code'] or '') + '(copy)' |
22 | if not local: |
23 | done_list = [] |
24 | @@ -765,11 +768,14 @@ |
25 | (_check_currency, 'Configuration error! The currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']), |
26 | ] |
27 | |
28 | - def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False): |
29 | + def copy(self, cr, uid, id, default=None, context=None, done_list=None, local=False): |
30 | + if default is None: |
31 | + default = {} |
32 | + else: |
33 | + default = default.copy() |
34 | + if done_list is None: |
35 | + done_list = [] |
36 | journal = self.browse(cr, uid, id, context=context) |
37 | - if not default: |
38 | - default = {} |
39 | - default = default.copy() |
40 | default['code'] = (journal['code'] or '') + '(copy)' |
41 | default['name'] = (journal['name'] or '') + '(copy)' |
42 | default['sequence_id'] = False |
43 | @@ -1161,7 +1167,7 @@ |
44 | 'end_journal_period_id':fields.many2one('account.journal.period','End of Year Entries Journal', readonly=True), |
45 | } |
46 | |
47 | - def copy(self, cr, uid, id, default={}, context=None): |
48 | + def copy(self, cr, uid, id, default=None, context=None): |
49 | default.update({ |
50 | 'period_ids': [], |
51 | 'end_journal_period_id': False |
52 | @@ -1420,9 +1426,15 @@ |
53 | result = super(account_move, self).create(cr, uid, vals, context) |
54 | return result |
55 | |
56 | - def copy(self, cr, uid, id, default={}, context=None): |
57 | + def copy(self, cr, uid, id, default=None, context=None): |
58 | + if context is None: |
59 | + default = {} |
60 | + else: |
61 | + default = default.copy() |
62 | if context is None: |
63 | context = {} |
64 | + else: |
65 | + context = context.copy() |
66 | default.update({ |
67 | 'state':'draft', |
68 | 'name':'/', |
69 | @@ -2239,7 +2251,9 @@ |
70 | _defaults = { |
71 | 'legend': lambda self, cr, uid, context:_('You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s: To Specify Year \n%(month)s: To Specify Month \n%(date)s: Current Date\n\ne.g. My model on %(date)s'), |
72 | } |
73 | - def generate(self, cr, uid, ids, datas={}, context=None): |
74 | + def generate(self, cr, uid, ids, datas=None, context=None): |
75 | + if datas is None: |
76 | + datas = {} |
77 | move_ids = [] |
78 | entry = {} |
79 | account_move_obj = self.pool.get('account.move') |
80 | @@ -3193,7 +3207,7 @@ |
81 | property_obj.create(cr, uid, vals, context=context) |
82 | return True |
83 | |
84 | - def _install_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, acc_ref={}, taxes_ref={}, tax_code_ref={}, context=None): |
85 | + def _install_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, acc_ref=None, taxes_ref=None, tax_code_ref=None, context=None): |
86 | ''' |
87 | This function recursively loads the template objects and create the real objects from them. |
88 | |
89 | @@ -3211,6 +3225,12 @@ |
90 | * a last identical containing the mapping of tax code templates and tax codes |
91 | :rtype: tuple(dict, dict, dict) |
92 | ''' |
93 | + if acc_ref is None: |
94 | + acc_ref = {} |
95 | + if taxes_ref is None: |
96 | + taxes_ref = {} |
97 | + if tax_code_ref is None: |
98 | + tax_code_ref = {} |
99 | template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context) |
100 | if template.parent_id: |
101 | tmp1, tmp2, tmp3 = self._install_template(cr, uid, template.parent_id.id, company_id, code_digits=code_digits, acc_ref=acc_ref, taxes_ref=taxes_ref, tax_code_ref=tax_code_ref, context=context) |
102 | @@ -3223,7 +3243,7 @@ |
103 | tax_code_ref.update(tmp3) |
104 | return acc_ref, taxes_ref, tax_code_ref |
105 | |
106 | - def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref={}, taxes_ref={}, tax_code_ref={}, context=None): |
107 | + def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref=None, taxes_ref=None, tax_code_ref=None, context=None): |
108 | ''' |
109 | This function generates all the objects from the templates |
110 | |
111 | @@ -3241,6 +3261,12 @@ |
112 | * a last identical containing the mapping of tax code templates and tax codes |
113 | :rtype: tuple(dict, dict, dict) |
114 | ''' |
115 | + if account_ref is None: |
116 | + account_ref = {} |
117 | + if taxes_ref is None: |
118 | + taxes_ref = {} |
119 | + if tax_code_ref is None: |
120 | + tax_code_ref = {} |
121 | template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context) |
122 | obj_tax_code_template = self.pool.get('account.tax.code.template') |
123 | obj_acc_tax = self.pool.get('account.tax') |
124 | |
125 | === modified file 'account/account_bank.py' |
126 | --- account/account_bank.py 2012-02-01 12:50:42 +0000 |
127 | +++ account/account_bank.py 2012-03-05 18:43:21 +0000 |
128 | @@ -29,12 +29,12 @@ |
129 | 'currency_id': fields.related('journal_id', 'currency', type="many2one", relation='res.currency', readonly=True, |
130 | string="Currency", help="Currency of the related account journal."), |
131 | } |
132 | - def create(self, cr, uid, data, context={}): |
133 | + def create(self, cr, uid, data, context=None): |
134 | result = super(bank, self).create(cr, uid, data, context=context) |
135 | self.post_write(cr, uid, [result], context=context) |
136 | return result |
137 | |
138 | - def write(self, cr, uid, ids, data, context={}): |
139 | + def write(self, cr, uid, ids, data, context=None): |
140 | result = super(bank, self).write(cr, uid, ids, data, context=context) |
141 | self.post_write(cr, uid, ids, context=context) |
142 | return result |
143 | @@ -43,7 +43,7 @@ |
144 | "Return the name to use when creating a bank journal" |
145 | return (bank.bank_name or '') + ' ' + bank.acc_number |
146 | |
147 | - def post_write(self, cr, uid, ids, context={}): |
148 | + def post_write(self, cr, uid, ids, context=None): |
149 | if isinstance(ids, (int, long)): |
150 | ids = [ids] |
151 | |
152 | |
153 | === modified file 'account/account_move_line.py' |
154 | --- account/account_move_line.py 2012-02-13 18:07:41 +0000 |
155 | +++ account/account_move_line.py 2012-03-05 18:43:21 +0000 |
156 | @@ -1097,7 +1097,7 @@ |
157 | 'has been confirmed!') % res[2]) |
158 | return res |
159 | |
160 | - def _remove_move_reconcile(self, cr, uid, move_ids=[], context=None): |
161 | + def _remove_move_reconcile(self, cr, uid, move_ids=None, context=None): |
162 | # Function remove move rencocile ids related with moves |
163 | obj_move_line = self.pool.get('account.move.line') |
164 | obj_move_rec = self.pool.get('account.move.reconcile') |
165 | |
166 | === modified file 'account/project/wizard/account_analytic_chart.py' |
167 | --- account/project/wizard/account_analytic_chart.py 2011-01-14 00:11:01 +0000 |
168 | +++ account/project/wizard/account_analytic_chart.py 2012-03-05 18:43:21 +0000 |
169 | @@ -47,4 +47,4 @@ |
170 | return result |
171 | |
172 | account_analytic_chart() |
173 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
174 | \ No newline at end of file |
175 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
176 | |
177 | === modified file 'account/project/wizard/account_analytic_inverted_balance_report.py' |
178 | --- account/project/wizard/account_analytic_inverted_balance_report.py 2011-04-29 08:49:48 +0000 |
179 | +++ account/project/wizard/account_analytic_inverted_balance_report.py 2012-03-05 18:43:21 +0000 |
180 | @@ -52,4 +52,4 @@ |
181 | } |
182 | |
183 | account_analytic_inverted_balance() |
184 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
185 | \ No newline at end of file |
186 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
187 | |
188 | === modified file 'account/project/wizard/project_account_analytic_line.py' |
189 | --- account/project/wizard/project_account_analytic_line.py 2011-05-02 12:16:02 +0000 |
190 | +++ account/project/wizard/project_account_analytic_line.py 2012-03-05 18:43:21 +0000 |
191 | @@ -55,4 +55,4 @@ |
192 | |
193 | project_account_analytic_line() |
194 | |
195 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
196 | \ No newline at end of file |
197 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
198 | |
199 | === modified file 'account/report/account_balance.py' |
200 | --- account/report/account_balance.py 2011-06-08 10:04:27 +0000 |
201 | +++ account/report/account_balance.py 2012-03-05 18:43:21 +0000 |
202 | @@ -68,7 +68,7 @@ |
203 | return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name |
204 | return super(account_balance ,self)._get_account(data) |
205 | |
206 | - def lines(self, form, ids=[], done=None):#, level=1): |
207 | + def lines(self, form, ids=None, done=None): |
208 | def _process_child(accounts, disp_acc, parent): |
209 | account_rec = [acct for acct in accounts if acct['id']==parent][0] |
210 | currency_obj = self.pool.get('res.currency') |
211 | |
212 | === modified file 'account/report/account_central_journal.py' |
213 | --- account/report/account_central_journal.py 2011-01-14 00:11:01 +0000 |
214 | +++ account/report/account_central_journal.py 2012-03-05 18:43:21 +0000 |
215 | @@ -105,4 +105,4 @@ |
216 | |
217 | report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/account_central_journal.rml', parser=journal_print, header='internal') |
218 | |
219 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
220 | \ No newline at end of file |
221 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
222 | |
223 | === modified file 'account/report/account_general_journal.py' |
224 | --- account/report/account_general_journal.py 2011-01-14 00:11:01 +0000 |
225 | +++ account/report/account_general_journal.py 2012-03-05 18:43:21 +0000 |
226 | @@ -158,4 +158,4 @@ |
227 | |
228 | report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header='internal') |
229 | |
230 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
231 | \ No newline at end of file |
232 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
233 | |
234 | === modified file 'account/report/account_report.py' |
235 | --- account/report/account_report.py 2011-12-21 22:15:04 +0000 |
236 | +++ account/report/account_report.py 2012-03-05 18:43:21 +0000 |
237 | @@ -283,4 +283,4 @@ |
238 | )""") |
239 | report_account_sales() |
240 | |
241 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
242 | \ No newline at end of file |
243 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
244 | |
245 | === modified file 'account/report/account_tax_report.py' |
246 | --- account/report/account_tax_report.py 2012-02-03 16:26:19 +0000 |
247 | +++ account/report/account_tax_report.py 2012-03-05 18:43:21 +0000 |
248 | @@ -160,7 +160,7 @@ |
249 | i+=1 |
250 | return res |
251 | |
252 | - def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=[], context=None): |
253 | + def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=None, context=None): |
254 | obj_tc = self.pool.get('account.tax.code') |
255 | ids = obj_tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)], order='sequence', context=context) |
256 | |
257 | @@ -171,7 +171,11 @@ |
258 | res += self._get_codes(based_on, company_id, code.id, level+1, context=context) |
259 | return res |
260 | |
261 | - def _add_codes(self, based_on, account_list=[], period_list=[], context=None): |
262 | + def _add_codes(self, based_on, account_list=None, period_list=None, context=None): |
263 | + if account_list is None: |
264 | + account_list = [] |
265 | + if period_list is None: |
266 | + period_list = [] |
267 | res = [] |
268 | obj_tc = self.pool.get('account.tax.code') |
269 | for account in account_list: |
270 | |
271 | === modified file 'account/res_currency.py' |
272 | --- account/res_currency.py 2011-01-14 00:11:01 +0000 |
273 | +++ account/res_currency.py 2012-03-05 18:43:21 +0000 |
274 | @@ -44,4 +44,4 @@ |
275 | |
276 | res_currency_account() |
277 | |
278 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
279 | \ No newline at end of file |
280 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
281 | |
282 | === modified file 'account/wizard/account_invoice_state.py' |
283 | --- account/wizard/account_invoice_state.py 2011-01-14 00:11:01 +0000 |
284 | +++ account/wizard/account_invoice_state.py 2012-03-05 18:43:21 +0000 |
285 | @@ -71,4 +71,4 @@ |
286 | |
287 | account_invoice_cancel() |
288 | |
289 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
290 | \ No newline at end of file |
291 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
292 | |
293 | === modified file 'account/wizard/account_journal_select.py' |
294 | --- account/wizard/account_journal_select.py 2011-01-14 00:11:01 +0000 |
295 | +++ account/wizard/account_journal_select.py 2012-03-05 18:43:21 +0000 |
296 | @@ -47,4 +47,4 @@ |
297 | |
298 | account_journal_select() |
299 | |
300 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
301 | \ No newline at end of file |
302 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
303 | |
304 | === modified file 'account/wizard/account_move_bank_reconcile.py' |
305 | --- account/wizard/account_move_bank_reconcile.py 2011-02-15 12:13:39 +0000 |
306 | +++ account/wizard/account_move_bank_reconcile.py 2012-03-05 18:43:21 +0000 |
307 | @@ -61,4 +61,4 @@ |
308 | |
309 | account_move_bank_reconcile() |
310 | |
311 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
312 | \ No newline at end of file |
313 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
314 | |
315 | === modified file 'account/wizard/account_move_journal.py' |
316 | --- account/wizard/account_move_journal.py 2011-11-14 11:34:05 +0000 |
317 | +++ account/wizard/account_move_journal.py 2012-03-05 18:43:21 +0000 |
318 | @@ -38,7 +38,7 @@ |
319 | _defaults = { |
320 | 'target_move': 'all' |
321 | } |
322 | - def _get_period(self, cr, uid, context={}): |
323 | + def _get_period(self, cr, uid, context=None): |
324 | """ |
325 | Return default account period value |
326 | """ |
327 | |
328 | === modified file 'account/wizard/account_move_line_reconcile_select.py' |
329 | --- account/wizard/account_move_line_reconcile_select.py 2011-02-15 12:13:39 +0000 |
330 | +++ account/wizard/account_move_line_reconcile_select.py 2012-03-05 18:43:21 +0000 |
331 | @@ -52,4 +52,4 @@ |
332 | |
333 | account_move_line_reconcile_select() |
334 | |
335 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
336 | \ No newline at end of file |
337 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
338 | |
339 | === modified file 'account/wizard/account_move_line_select.py' |
340 | --- account/wizard/account_move_line_select.py 2011-01-14 00:11:01 +0000 |
341 | +++ account/wizard/account_move_line_select.py 2012-03-05 18:43:21 +0000 |
342 | @@ -69,4 +69,4 @@ |
343 | |
344 | account_move_line_select() |
345 | |
346 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
347 | \ No newline at end of file |
348 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
349 | |
350 | === modified file 'account/wizard/account_move_line_unreconcile_select.py' |
351 | --- account/wizard/account_move_line_unreconcile_select.py 2011-02-15 12:13:39 +0000 |
352 | +++ account/wizard/account_move_line_unreconcile_select.py 2012-03-05 18:43:21 +0000 |
353 | @@ -41,4 +41,4 @@ |
354 | |
355 | account_move_line_unreconcile_select() |
356 | |
357 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
358 | \ No newline at end of file |
359 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
360 | |
361 | === modified file 'account/wizard/account_period_close.py' |
362 | --- account/wizard/account_period_close.py 2011-12-13 04:41:48 +0000 |
363 | +++ account/wizard/account_period_close.py 2012-03-05 18:43:21 +0000 |
364 | @@ -60,4 +60,4 @@ |
365 | |
366 | account_period_close() |
367 | |
368 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
369 | \ No newline at end of file |
370 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
371 | |
372 | === modified file 'account/wizard/account_reconcile.py' |
373 | --- account/wizard/account_reconcile.py 2011-11-03 09:56:12 +0000 |
374 | +++ account/wizard/account_reconcile.py 2012-03-05 18:43:21 +0000 |
375 | @@ -173,4 +173,4 @@ |
376 | |
377 | account_move_line_reconcile_writeoff() |
378 | |
379 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
380 | \ No newline at end of file |
381 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
382 | |
383 | === modified file 'account/wizard/account_reconcile_partner_process.py' |
384 | --- account/wizard/account_reconcile_partner_process.py 2011-01-14 00:11:01 +0000 |
385 | +++ account/wizard/account_reconcile_partner_process.py 2012-03-05 18:43:21 +0000 |
386 | @@ -100,4 +100,4 @@ |
387 | |
388 | account_partner_reconcile_process() |
389 | |
390 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
391 | \ No newline at end of file |
392 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
393 | |
394 | === modified file 'account/wizard/account_state_open.py' |
395 | --- account/wizard/account_state_open.py 2011-01-27 06:32:26 +0000 |
396 | +++ account/wizard/account_state_open.py 2012-03-05 18:43:21 +0000 |
397 | @@ -41,4 +41,4 @@ |
398 | |
399 | account_state_open() |
400 | |
401 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
402 | \ No newline at end of file |
403 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
404 | |
405 | === modified file 'account/wizard/account_subscription_generate.py' |
406 | --- account/wizard/account_subscription_generate.py 2011-04-29 08:49:48 +0000 |
407 | +++ account/wizard/account_subscription_generate.py 2012-03-05 18:43:21 +0000 |
408 | @@ -50,4 +50,4 @@ |
409 | |
410 | account_subscription_generate() |
411 | |
412 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
413 | \ No newline at end of file |
414 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
415 | |
416 | === modified file 'account/wizard/account_unreconcile.py' |
417 | --- account/wizard/account_unreconcile.py 2011-01-14 00:11:01 +0000 |
418 | +++ account/wizard/account_unreconcile.py 2012-03-05 18:43:21 +0000 |
419 | @@ -50,4 +50,4 @@ |
420 | |
421 | account_unreconcile_reconcile() |
422 | |
423 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
424 | \ No newline at end of file |
425 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
426 | |
427 | === modified file 'account_analytic_plans/report/crossovered_analytic.py' |
428 | --- account_analytic_plans/report/crossovered_analytic.py 2011-01-14 00:11:01 +0000 |
429 | +++ account_analytic_plans/report/crossovered_analytic.py 2012-03-05 18:43:21 +0000 |
430 | @@ -34,7 +34,7 @@ |
431 | }) |
432 | self.base_amount = 0.00 |
433 | |
434 | - def find_children(self,ref_ids): |
435 | + def find_children(self, ref_ids): |
436 | to_return_ids = [] |
437 | final_list = [] |
438 | parent_list = [] |
439 | @@ -53,7 +53,7 @@ |
440 | final_list.extend(set_list) |
441 | return final_list #to_return_ids[0] |
442 | |
443 | - def set_account(self,cats): |
444 | + def set_account(self, cats): |
445 | lst = [] |
446 | category = self.pool.get('account.analytic.account').read(self.cr, self.uid, cats) |
447 | for cat in category: |
448 | @@ -62,7 +62,7 @@ |
449 | lst.extend(self.set_account(cat['child_ids'])) |
450 | return lst |
451 | |
452 | - def _ref_lines(self,form): |
453 | + def _ref_lines(self, form): |
454 | result = [] |
455 | res = {} |
456 | acc_pool = self.pool.get('account.analytic.account') |
457 | @@ -113,7 +113,9 @@ |
458 | result.append(res) |
459 | return result |
460 | |
461 | - def _lines(self, form, ids={}): |
462 | + def _lines(self, form, ids=None): |
463 | + if ids is None: |
464 | + ids = {} |
465 | if not ids: |
466 | ids = self.ids |
467 | |
468 | |
469 | === modified file 'account_analytic_plans/wizard/analytic_plan_create_model.py' |
470 | --- account_analytic_plans/wizard/analytic_plan_create_model.py 2011-01-14 00:11:01 +0000 |
471 | +++ account_analytic_plans/wizard/analytic_plan_create_model.py 2012-03-05 18:43:21 +0000 |
472 | @@ -57,4 +57,4 @@ |
473 | |
474 | analytic_plan_create_model() |
475 | |
476 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
477 | \ No newline at end of file |
478 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
479 | |
480 | === modified file 'account_anglo_saxon/__init__.py' |
481 | --- account_anglo_saxon/__init__.py 2011-01-14 00:11:01 +0000 |
482 | +++ account_anglo_saxon/__init__.py 2012-03-05 18:43:21 +0000 |
483 | @@ -23,4 +23,4 @@ |
484 | import purchase |
485 | import invoice |
486 | |
487 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
488 | \ No newline at end of file |
489 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
490 | |
491 | === removed file 'account_anglo_saxon/sale.py' |
492 | --- account_anglo_saxon/sale.py 2011-01-14 00:11:01 +0000 |
493 | +++ account_anglo_saxon/sale.py 1970-01-01 00:00:00 +0000 |
494 | @@ -1,43 +0,0 @@ |
495 | -# -*- encoding: utf-8 -*- |
496 | -############################################################################## |
497 | -# |
498 | -# OpenERP, Open Source Management Solution |
499 | -# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). |
500 | -# |
501 | -# This program is free software: you can redistribute it and/or modify |
502 | -# it under the terms of the GNU Affero General Public License as |
503 | -# published by the Free Software Foundation, either version 3 of the |
504 | -# License, or (at your option) any later version. |
505 | -# |
506 | -# This program is distributed in the hope that it will be useful, |
507 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
508 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
509 | -# GNU Affero General Public License for more details. |
510 | -# |
511 | -# You should have received a copy of the GNU Affero General Public License |
512 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
513 | -# |
514 | -############################################################################## |
515 | - |
516 | -from osv import fields, osv |
517 | - |
518 | -#class sale_order_line(osv.osv): |
519 | -# _name = 'sale.order.line' |
520 | -# _description = 'Sale Order line' |
521 | -# _inherit = 'sale.order.line' |
522 | -# |
523 | -# def invoice_line_create(self, cr, uid, ids, context={}): |
524 | -# line_ids = super('sale_order_line',self).invoice_line_create(cr, uid, ids, context) |
525 | -# invoice_line_obj = self.pool.get('account.invoice.line') |
526 | -# for line in invoice_line_obj.browse(cr, uid, line_ids): |
527 | -# if line.product_id: |
528 | -# a = line.product_id.product_tmpl_id.property_stock_account_output and line.product_id.product_tmpl_id.property_stock_account_output.id |
529 | -# if not a: |
530 | -# a = line.product_id.categ_id.property_stock_account_output_categ and line.product_id.categ_id.property_stock_account_output_categ.id |
531 | -# if a: |
532 | -# a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, a) |
533 | -# invoice_line_obj.write(cr, uid, line.id, {'account_id':a}) |
534 | -# |
535 | -#sale_order_line() |
536 | - |
537 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
538 | |
539 | === modified file 'account_asset/account_asset.py' |
540 | --- account_asset/account_asset.py 2012-01-31 13:36:57 +0000 |
541 | +++ account_asset/account_asset.py 2012-03-05 18:43:21 +0000 |
542 | @@ -75,7 +75,7 @@ |
543 | _name = 'account.asset.asset' |
544 | _description = 'Asset' |
545 | |
546 | - def _get_period(self, cr, uid, context={}): |
547 | + def _get_period(self, cr, uid, context=None): |
548 | periods = self.pool.get('account.period').find(cr, uid) |
549 | if periods: |
550 | return periods[0] |
551 | @@ -176,7 +176,9 @@ |
552 | year = depreciation_date.year |
553 | return True |
554 | |
555 | - def validate(self, cr, uid, ids, context={}): |
556 | + def validate(self, cr, uid, ids, context=None): |
557 | + if context is None: |
558 | + context = {} |
559 | return self.write(cr, uid, ids, { |
560 | 'state':'open' |
561 | }, context) |
562 | @@ -304,7 +306,7 @@ |
563 | default.update({'depreciation_line_ids': [], 'state': 'draft'}) |
564 | return super(account_asset_asset, self).copy(cr, uid, id, default, context=context) |
565 | |
566 | - def _compute_entries(self, cr, uid, ids, period_id, context={}): |
567 | + def _compute_entries(self, cr, uid, ids, period_id, context=None): |
568 | result = [] |
569 | period_obj = self.pool.get('account.period') |
570 | depreciation_obj = self.pool.get('account.asset.depreciation.line') |
571 | |
572 | === modified file 'account_budget/report/analytic_account_budget_report.py' |
573 | --- account_budget/report/analytic_account_budget_report.py 2011-01-14 00:11:01 +0000 |
574 | +++ account_budget/report/analytic_account_budget_report.py 2012-03-05 18:43:21 +0000 |
575 | @@ -35,7 +35,9 @@ |
576 | }) |
577 | self.context = context |
578 | |
579 | - def funct(self, object, form, ids={}, done=None, level=1): |
580 | + def funct(self, object, form, ids=None, done=None, level=1): |
581 | + if ids is None: |
582 | + ids = {} |
583 | if not ids: |
584 | ids = self.ids |
585 | if not done: |
586 | @@ -153,7 +155,7 @@ |
587 | tot['perc'] = float(tot['prac'] / tot['theo']) * 100 |
588 | return result |
589 | |
590 | - def funct_total(self,form): |
591 | + def funct_total(self, form): |
592 | result = [] |
593 | res = {} |
594 | res = { |
595 | @@ -167,4 +169,4 @@ |
596 | |
597 | report_sxw.report_sxw('report.account.analytic.account.budget', 'account.analytic.account', 'addons/account_budget/report/analytic_account_budget_report.rml',parser=analytic_account_budget_report,header='internal') |
598 | |
599 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
600 | \ No newline at end of file |
601 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
602 | |
603 | === modified file 'account_budget/report/budget_report.py' |
604 | --- account_budget/report/budget_report.py 2011-04-15 06:09:42 +0000 |
605 | +++ account_budget/report/budget_report.py 2012-03-05 18:43:21 +0000 |
606 | @@ -34,7 +34,9 @@ |
607 | }) |
608 | self.context = context |
609 | |
610 | - def funct(self, object, form, ids={}, done=None, level=1): |
611 | + def funct(self, object, form, ids=None, done=None, level=1): |
612 | + if ids is None: |
613 | + ids = {} |
614 | if not ids: |
615 | ids = self.ids |
616 | if not done: |
617 | |
618 | === modified file 'account_budget/report/crossovered_budget_report.py' |
619 | --- account_budget/report/crossovered_budget_report.py 2011-04-15 06:09:42 +0000 |
620 | +++ account_budget/report/crossovered_budget_report.py 2012-03-05 18:43:21 +0000 |
621 | @@ -37,7 +37,9 @@ |
622 | }) |
623 | self.context = context |
624 | |
625 | - def funct(self, object, form, ids={}, done=None, level=1): |
626 | + def funct(self, object, form, ids=None, done=None, level=1): |
627 | + if ids is None: |
628 | + ids = {} |
629 | if not ids: |
630 | ids = self.ids |
631 | if not done: |
632 | |
633 | === modified file 'account_budget/wizard/account_budget_analytic.py' |
634 | --- account_budget/wizard/account_budget_analytic.py 2011-04-29 08:49:48 +0000 |
635 | +++ account_budget/wizard/account_budget_analytic.py 2012-03-05 18:43:21 +0000 |
636 | @@ -52,4 +52,4 @@ |
637 | |
638 | account_budget_analytic() |
639 | |
640 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
641 | \ No newline at end of file |
642 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
643 | |
644 | === modified file 'account_budget/wizard/account_budget_crossovered_report.py' |
645 | --- account_budget/wizard/account_budget_crossovered_report.py 2011-04-29 08:49:48 +0000 |
646 | +++ account_budget/wizard/account_budget_crossovered_report.py 2012-03-05 18:43:21 +0000 |
647 | @@ -53,4 +53,4 @@ |
648 | |
649 | account_budget_crossvered_report() |
650 | |
651 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
652 | \ No newline at end of file |
653 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
654 | |
655 | === modified file 'account_budget/wizard/account_budget_report.py' |
656 | --- account_budget/wizard/account_budget_report.py 2011-04-29 08:49:48 +0000 |
657 | +++ account_budget/wizard/account_budget_report.py 2012-03-05 18:43:21 +0000 |
658 | @@ -54,4 +54,4 @@ |
659 | |
660 | account_budget_report() |
661 | |
662 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
663 | \ No newline at end of file |
664 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
665 | |
666 | === modified file 'account_coda/account_coda.py' |
667 | --- account_coda/account_coda.py 2012-02-13 18:07:41 +0000 |
668 | +++ account_coda/account_coda.py 2012-03-05 18:43:21 +0000 |
669 | @@ -217,7 +217,9 @@ |
670 | _name = 'coda.bank.statement' |
671 | _description = 'CODA Bank Statement' |
672 | |
673 | - def _default_journal_id(self, cr, uid, context={}): |
674 | + def _default_journal_id(self, cr, uid, context=None): |
675 | + if context is None: |
676 | + context = {} |
677 | if context.get('journal_id', False): |
678 | return context['journal_id'] |
679 | return False |
680 | @@ -233,7 +235,7 @@ |
681 | res[r] = round(res[r], 2) |
682 | return res |
683 | |
684 | - def _get_period(self, cr, uid, context={}): |
685 | + def _get_period(self, cr, uid, context=None): |
686 | periods = self.pool.get('account.period').find(cr, uid) |
687 | if periods: |
688 | return periods[0] |
689 | |
690 | === modified file 'account_followup/__init__.py' |
691 | --- account_followup/__init__.py 2011-01-14 00:11:01 +0000 |
692 | +++ account_followup/__init__.py 2012-03-05 18:43:21 +0000 |
693 | @@ -23,4 +23,4 @@ |
694 | import wizard |
695 | import report |
696 | |
697 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
698 | \ No newline at end of file |
699 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
700 | |
701 | === modified file 'account_followup/wizard/__init__.py' |
702 | --- account_followup/wizard/__init__.py 2011-01-14 00:11:01 +0000 |
703 | +++ account_followup/wizard/__init__.py 2012-03-05 18:43:21 +0000 |
704 | @@ -21,4 +21,4 @@ |
705 | |
706 | import account_followup_print |
707 | |
708 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
709 | \ No newline at end of file |
710 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
711 | |
712 | === modified file 'account_followup/wizard/account_followup_print.py' |
713 | --- account_followup/wizard/account_followup_print.py 2012-02-13 16:03:19 +0000 |
714 | +++ account_followup/wizard/account_followup_print.py 2012-03-05 18:43:21 +0000 |
715 | @@ -209,7 +209,7 @@ |
716 | to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id} |
717 | return {'partner_ids': partner_list, 'to_update': to_update} |
718 | |
719 | - def do_mail(self ,cr, uid, ids, context=None): |
720 | + def do_mail(self, cr, uid, ids, context=None): |
721 | mod_obj = self.pool.get('ir.model.data') |
722 | move_obj = self.pool.get('account.move.line') |
723 | user_obj = self.pool.get('res.users') |
724 | |
725 | === modified file 'account_invoice_layout/wizard/account_invoice_special_message.py' |
726 | --- account_invoice_layout/wizard/account_invoice_special_message.py 2011-04-29 08:49:48 +0000 |
727 | +++ account_invoice_layout/wizard/account_invoice_special_message.py 2012-03-05 18:43:21 +0000 |
728 | @@ -47,4 +47,4 @@ |
729 | |
730 | account_invoice_special_msg() |
731 | |
732 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
733 | \ No newline at end of file |
734 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
735 | |
736 | === modified file 'account_payment/__init__.py' |
737 | --- account_payment/__init__.py 2011-01-14 00:11:01 +0000 |
738 | +++ account_payment/__init__.py 2012-03-05 18:43:21 +0000 |
739 | @@ -29,4 +29,4 @@ |
740 | import account_invoice |
741 | import report |
742 | |
743 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
744 | \ No newline at end of file |
745 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
746 | |
747 | === modified file 'account_payment/account_invoice.py' |
748 | --- account_payment/account_invoice.py 2011-07-01 23:41:24 +0000 |
749 | +++ account_payment/account_invoice.py 2012-03-05 18:43:21 +0000 |
750 | @@ -50,4 +50,4 @@ |
751 | |
752 | Invoice() |
753 | |
754 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
755 | \ No newline at end of file |
756 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
757 | |
758 | === modified file 'account_payment/account_move_line.py' |
759 | --- account_payment/account_move_line.py 2011-07-01 23:41:24 +0000 |
760 | +++ account_payment/account_move_line.py 2012-03-05 18:43:21 +0000 |
761 | @@ -26,7 +26,7 @@ |
762 | class account_move_line(osv.osv): |
763 | _inherit = "account.move.line" |
764 | |
765 | - def amount_to_pay(self, cr, uid, ids, name, arg={}, context=None): |
766 | + def amount_to_pay(self, cr, uid, ids, name, arg=None, context=None): |
767 | """ Return the amount still to pay regarding all the payemnt orders |
768 | (excepting cancelled orders)""" |
769 | if not ids: |
770 | @@ -117,4 +117,4 @@ |
771 | |
772 | account_move_line() |
773 | |
774 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
775 | \ No newline at end of file |
776 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
777 | |
778 | === modified file 'account_payment/account_payment.py' |
779 | --- account_payment/account_payment.py 2012-01-31 13:36:57 +0000 |
780 | +++ account_payment/account_payment.py 2012-03-05 18:43:21 +0000 |
781 | @@ -139,7 +139,9 @@ |
782 | wf_service.trg_validate(uid, 'payment.order', ids[0], 'done', cr) |
783 | return True |
784 | |
785 | - def copy(self, cr, uid, id, default={}, context=None): |
786 | + def copy(self, cr, uid, id, default=None, context=None): |
787 | + if default is None: |
788 | + default = {} |
789 | default.update({ |
790 | 'state': 'draft', |
791 | 'line_ids': [], |
792 | |
793 | === modified file 'account_payment/report/__init__.py' |
794 | --- account_payment/report/__init__.py 2011-01-14 00:11:01 +0000 |
795 | +++ account_payment/report/__init__.py 2012-03-05 18:43:21 +0000 |
796 | @@ -20,4 +20,4 @@ |
797 | ############################################################################## |
798 | |
799 | import payment_order |
800 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
801 | \ No newline at end of file |
802 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
803 | |
804 | === modified file 'account_payment/report/payment_order.py' |
805 | --- account_payment/report/payment_order.py 2011-01-14 00:11:01 +0000 |
806 | +++ account_payment/report/payment_order.py 2012-03-05 18:43:21 +0000 |
807 | @@ -77,7 +77,7 @@ |
808 | user = pool.get('res.users').browse(self.cr, self.uid, self.uid) |
809 | return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False |
810 | |
811 | - def _get_account_name(self,bank_id): |
812 | + def _get_account_name(self, bank_id): |
813 | if bank_id: |
814 | pool = pooler.get_pool(self.cr.dbname) |
815 | value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id]) |
816 | @@ -87,4 +87,4 @@ |
817 | |
818 | report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="external") |
819 | |
820 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
821 | \ No newline at end of file |
822 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
823 | |
824 | === modified file 'account_payment/wizard/__init__.py' |
825 | --- account_payment/wizard/__init__.py 2011-01-14 00:11:01 +0000 |
826 | +++ account_payment/wizard/__init__.py 2012-03-05 18:43:21 +0000 |
827 | @@ -23,4 +23,4 @@ |
828 | import account_payment_populate_statement |
829 | import account_payment_pay |
830 | |
831 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
832 | \ No newline at end of file |
833 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
834 | |
835 | === modified file 'account_payment/wizard/account_payment_order.py' |
836 | --- account_payment/wizard/account_payment_order.py 2011-10-16 01:28:00 +0000 |
837 | +++ account_payment/wizard/account_payment_order.py 2012-03-05 18:43:21 +0000 |
838 | @@ -119,4 +119,4 @@ |
839 | |
840 | payment_order_create() |
841 | |
842 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
843 | \ No newline at end of file |
844 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
845 | |
846 | === modified file 'account_payment/wizard/account_payment_pay.py' |
847 | --- account_payment/wizard/account_payment_pay.py 2012-01-31 13:36:57 +0000 |
848 | +++ account_payment/wizard/account_payment_pay.py 2012-03-05 18:43:21 +0000 |
849 | @@ -56,4 +56,4 @@ |
850 | |
851 | account_payment_make_payment() |
852 | |
853 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
854 | \ No newline at end of file |
855 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
856 | |
857 | === modified file 'account_payment/wizard/account_payment_populate_statement.py' |
858 | --- account_payment/wizard/account_payment_populate_statement.py 2012-01-31 13:36:57 +0000 |
859 | +++ account_payment/wizard/account_payment_populate_statement.py 2012-03-05 18:43:21 +0000 |
860 | @@ -120,4 +120,4 @@ |
861 | |
862 | account_payment_populate_statement() |
863 | |
864 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
865 | \ No newline at end of file |
866 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
867 | |
868 | === modified file 'account_sequence/__init__.py' |
869 | --- account_sequence/__init__.py 2011-01-14 00:11:01 +0000 |
870 | +++ account_sequence/__init__.py 2012-03-05 18:43:21 +0000 |
871 | @@ -22,4 +22,4 @@ |
872 | import account_sequence |
873 | import account_sequence_installer |
874 | |
875 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
876 | \ No newline at end of file |
877 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
878 | |
879 | === modified file 'account_voucher/__init__.py' |
880 | --- account_voucher/__init__.py 2011-10-16 01:28:00 +0000 |
881 | +++ account_voucher/__init__.py 2012-03-05 18:43:21 +0000 |
882 | @@ -24,4 +24,4 @@ |
883 | import report |
884 | import wizard |
885 | |
886 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
887 | \ No newline at end of file |
888 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
889 | |
890 | === modified file 'account_voucher/account_voucher.py' |
891 | --- account_voucher/account_voucher.py 2012-02-24 10:23:05 +0000 |
892 | +++ account_voucher/account_voucher.py 2012-03-05 18:43:21 +0000 |
893 | @@ -830,7 +830,7 @@ |
894 | res['account_id'] = account_id |
895 | return {'value':res} |
896 | |
897 | - def _sel_context(self, cr, uid, voucher_id,context=None): |
898 | + def _sel_context(self, cr, uid, voucher_id, context=None): |
899 | """ |
900 | Select the context to use accordingly if it needs to be multicurrency or not. |
901 | |
902 | @@ -1251,7 +1251,9 @@ |
903 | move_line_pool.reconcile_partial(cr, uid, rec_ids, writeoff_acc_id=voucher.writeoff_acc_id.id, writeoff_period_id=voucher.period_id.id, writeoff_journal_id=voucher.journal_id.id) |
904 | return True |
905 | |
906 | - def copy(self, cr, uid, id, default={}, context=None): |
907 | + def copy(self, cr, uid, id, default=None, context=None): |
908 | + if default is None: |
909 | + default = {} |
910 | default.update({ |
911 | 'state': 'draft', |
912 | 'number': False, |
913 | |
914 | === modified file 'account_voucher/report/__init__.py' |
915 | --- account_voucher/report/__init__.py 2011-01-14 00:11:01 +0000 |
916 | +++ account_voucher/report/__init__.py 2012-03-05 18:43:21 +0000 |
917 | @@ -23,4 +23,4 @@ |
918 | import account_voucher_print |
919 | import account_voucher_sales_receipt |
920 | |
921 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
922 | \ No newline at end of file |
923 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
924 | |
925 | === modified file 'account_voucher/report/account_voucher.py' |
926 | --- account_voucher/report/account_voucher.py 2011-01-14 00:11:01 +0000 |
927 | +++ account_voucher/report/account_voucher.py 2012-03-05 18:43:21 +0000 |
928 | @@ -72,4 +72,4 @@ |
929 | parser=report_voucher,header="external" |
930 | ) |
931 | |
932 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
933 | \ No newline at end of file |
934 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
935 | |
936 | === modified file 'account_voucher/report/account_voucher_print.py' |
937 | --- account_voucher/report/account_voucher_print.py 2011-01-14 00:11:01 +0000 |
938 | +++ account_voucher/report/account_voucher_print.py 2012-03-05 18:43:21 +0000 |
939 | @@ -93,4 +93,4 @@ |
940 | parser=report_voucher_print,header="external" |
941 | ) |
942 | |
943 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
944 | \ No newline at end of file |
945 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
946 | |
947 | === modified file 'account_voucher/wizard/__init__.py' |
948 | --- account_voucher/wizard/__init__.py 2011-01-14 00:11:01 +0000 |
949 | +++ account_voucher/wizard/__init__.py 2012-03-05 18:43:21 +0000 |
950 | @@ -22,4 +22,4 @@ |
951 | import account_voucher_unreconcile |
952 | import account_statement_from_invoice |
953 | |
954 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
955 | \ No newline at end of file |
956 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
957 | |
958 | === modified file 'account_voucher/wizard/account_voucher_unreconcile.py' |
959 | --- account_voucher/wizard/account_voucher_unreconcile.py 2011-01-14 00:11:01 +0000 |
960 | +++ account_voucher/wizard/account_voucher_unreconcile.py 2012-03-05 18:43:21 +0000 |
961 | @@ -59,4 +59,4 @@ |
962 | |
963 | account_voucher_unreconcile() |
964 | |
965 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
966 | \ No newline at end of file |
967 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
968 | |
969 | === modified file 'analytic/analytic.py' |
970 | --- analytic/analytic.py 2012-02-16 18:01:11 +0000 |
971 | +++ analytic/analytic.py 2012-03-05 18:43:21 +0000 |
972 | @@ -219,7 +219,7 @@ |
973 | default['line_ids'] = [] |
974 | return super(account_analytic_account, self).copy(cr, uid, id, default, context=context) |
975 | |
976 | - def on_change_partner_id(self, cr, uid, id, partner_id, context={}): |
977 | + def on_change_partner_id(self, cr, uid, id, partner_id, context=None): |
978 | if not partner_id: |
979 | return {'value': {'contact_id': False}} |
980 | addr = self.pool.get('res.partner').address_get(cr, uid, [partner_id], ['invoice']) |
981 | |
982 | === modified file 'anonymization/anonymization.py' |
983 | --- anonymization/anonymization.py 2011-12-19 16:54:40 +0000 |
984 | +++ anonymization/anonymization.py 2012-03-05 18:43:21 +0000 |
985 | @@ -350,7 +350,7 @@ |
986 | }) |
987 | raise osv.except_osv(error_type, error_msg) |
988 | |
989 | - def anonymize_database(self,cr, uid, ids, context=None): |
990 | + def anonymize_database(self, cr, uid, ids, context=None): |
991 | """Sets the 'anonymized' state to defined fields""" |
992 | |
993 | # create a new history record: |
994 | @@ -485,7 +485,7 @@ |
995 | 'target':'new', |
996 | } |
997 | |
998 | - def reverse_anonymize_database(self,cr, uid, ids, context=None): |
999 | + def reverse_anonymize_database(self, cr, uid, ids, context=None): |
1000 | """Set the 'clear' state to defined fields""" |
1001 | |
1002 | ir_model_fields_anonymization_model = self.pool.get('ir.model.fields.anonymization') |
1003 | |
1004 | === modified file 'auction/auction.py' |
1005 | --- auction/auction.py 2011-12-09 06:03:08 +0000 |
1006 | +++ auction/auction.py 2012-03-05 18:43:21 +0000 |
1007 | @@ -533,7 +533,7 @@ |
1008 | return self._sum_taxes_by_type_and_id(costs) |
1009 | |
1010 | # sum remise limite net and ristourne |
1011 | - def compute_seller_costs_summed(self, cr, uid, ids): #ach_pay_id |
1012 | + def compute_seller_costs_summed(self, cr, uid, ids): |
1013 | |
1014 | """This Fuction sum Net remittance limit and refund""" |
1015 | |
1016 | |
1017 | === modified file 'auction/barcode/code39.py' |
1018 | --- auction/barcode/code39.py 2011-01-14 00:11:01 +0000 |
1019 | +++ auction/barcode/code39.py 2012-03-05 18:43:21 +0000 |
1020 | @@ -114,7 +114,7 @@ |
1021 | |
1022 | |
1023 | class _Code39Base(Barcode): |
1024 | - def __init__(self, value = "", **args): |
1025 | + def __init__(self, value="", **args): |
1026 | self.xdim = inch * 0.0075 |
1027 | self.lquiet = None |
1028 | self.rquiet = None |
1029 | |
1030 | === modified file 'auction/barcode/common.py' |
1031 | --- auction/barcode/common.py 2011-01-14 00:11:01 +0000 |
1032 | +++ auction/barcode/common.py 2012-03-05 18:43:21 +0000 |
1033 | @@ -39,7 +39,7 @@ |
1034 | """Abstract Base for barcodes. Includes implementations of |
1035 | some methods suitable for the more primitive barcode types""" |
1036 | |
1037 | - def __init__(self, value = ''): |
1038 | + def __init__(self, value=''): |
1039 | self.value = value |
1040 | |
1041 | if not hasattr(self, 'gap'): |
1042 | |
1043 | === modified file 'auction/report/auction_invoice.py' |
1044 | --- auction/report/auction_invoice.py 2011-01-14 00:11:01 +0000 |
1045 | +++ auction/report/auction_invoice.py 2012-03-05 18:43:21 +0000 |
1046 | @@ -26,7 +26,7 @@ |
1047 | def __init__(self, name): |
1048 | report_int.__init__(self, name) |
1049 | |
1050 | - def create(self,cr, uid, ids, datas, context): |
1051 | + def create(self, cr, uid, ids, datas, context): |
1052 | lots = self.pool.get('auction.lots').read(cr, uid, ids, ['ach_inv_id'], context=context) |
1053 | |
1054 | invoices = {} |
1055 | |
1056 | === modified file 'auction/report/auction_total_rml.py' |
1057 | --- auction/report/auction_total_rml.py 2011-04-29 08:49:48 +0000 |
1058 | +++ auction/report/auction_total_rml.py 2012-03-05 18:43:21 +0000 |
1059 | @@ -65,7 +65,7 @@ |
1060 | return auct_dat |
1061 | |
1062 | |
1063 | - def sum_taxes(self,auction_id): |
1064 | + def sum_taxes(self, auction_id): |
1065 | self.cr.execute("select count(1) from auction_lots where id IN %s and auction_id=%s group by auction_id ", (tuple(self.total_obj),auction_id,)) |
1066 | res = self.cr.fetchone() |
1067 | return res[0] |
1068 | @@ -105,17 +105,17 @@ |
1069 | res = self.cr.fetchone() |
1070 | return str(res[0]) or 0.0 |
1071 | |
1072 | - def sum_credit(self,auction_id): |
1073 | + def sum_credit(self, auction_id): |
1074 | self.cr.execute("select sum(buyer_price) from auction_lots where id IN %s and auction_id=%s", (tuple(self.total_obj),auction_id,)) |
1075 | res = self.cr.fetchone() |
1076 | return str(res[0]) |
1077 | |
1078 | - def sum_debit_buyer(self,auction_id): |
1079 | + def sum_debit_buyer(self, auction_id): |
1080 | self.cr.execute("select sum(buyer_price) from auction_lots where id IN %s and auction_id=%s", (tuple(self.total_obj),auction_id,)) |
1081 | res = self.cr.fetchone() |
1082 | return str(res[0] or 0) |
1083 | |
1084 | - def sum_debit(self,object_id): |
1085 | + def sum_debit(self, object_id): |
1086 | self.cr.execute("select sum(seller_price) from auction_lots where auction_id=%s", (object_id,)) |
1087 | res = self.cr.fetchone() |
1088 | return str(res[0] or 0) |
1089 | |
1090 | === modified file 'auction/report/buyer_form_report.py' |
1091 | --- auction/report/buyer_form_report.py 2011-04-29 08:49:48 +0000 |
1092 | +++ auction/report/buyer_form_report.py 2012-03-05 18:43:21 +0000 |
1093 | @@ -58,7 +58,7 @@ |
1094 | lots.append(object) |
1095 | return ret_dict.values() |
1096 | |
1097 | - def grand_buyer_total(self,o): |
1098 | + def grand_buyer_total(self, o): |
1099 | grand_total = 0 |
1100 | for oo in o: |
1101 | grand_total =grand_total + oo['obj_price'] +self.sum_taxes(oo) |
1102 | |
1103 | === modified file 'auction/report/buyer_list.py' |
1104 | --- auction/report/buyer_list.py 2011-04-29 08:49:48 +0000 |
1105 | +++ auction/report/buyer_list.py 2012-03-05 18:43:21 +0000 |
1106 | @@ -62,7 +62,7 @@ |
1107 | auct_dat.append(auc_dates_fields) |
1108 | return auct_dat |
1109 | |
1110 | - def lines_lots_auct_lot(self,obj): |
1111 | + def lines_lots_auct_lot(self, obj): |
1112 | |
1113 | auc_date_ids = self.pool.get('auction.dates').search(self.cr, self.uid, ([('name','like',obj['name'])])) |
1114 | |
1115 | |
1116 | === modified file 'auction/report/huissier.py' |
1117 | --- auction/report/huissier.py 2011-04-29 08:49:48 +0000 |
1118 | +++ auction/report/huissier.py 2012-03-05 18:43:21 +0000 |
1119 | @@ -30,7 +30,7 @@ |
1120 | def __init__(self, name, table, tmpl, xsl): |
1121 | report_rml.__init__(self, name, table, tmpl, xsl) |
1122 | |
1123 | - def create_xml(self,cr, uid, ids, datas, context=None): |
1124 | + def create_xml(self, cr, uid, ids, datas, context=None): |
1125 | pool= pooler.get_pool(cr.dbname) |
1126 | lots = pool.get('auction.lots').browse(cr, uid, ids, context=context) |
1127 | auction = lots[0].auction_id |
1128 | |
1129 | === modified file 'auction/report/photo_shadow.py' |
1130 | --- auction/report/photo_shadow.py 2011-11-14 06:51:05 +0000 |
1131 | +++ auction/report/photo_shadow.py 2012-03-05 18:43:21 +0000 |
1132 | @@ -19,7 +19,7 @@ |
1133 | # |
1134 | ############################################################################## |
1135 | |
1136 | -def convert_catalog(from_file, to_file, size=220) : |
1137 | +def convert_catalog(from_file, to_file, size=220): |
1138 | return __convert(from_file, to_file, size) |
1139 | |
1140 | def convert(from_file, to_file): |
1141 | |
1142 | === modified file 'auction/report/seller_form_report.py' |
1143 | --- auction/report/seller_form_report.py 2011-04-29 08:49:48 +0000 |
1144 | +++ auction/report/seller_form_report.py 2012-03-05 18:43:21 +0000 |
1145 | @@ -58,7 +58,7 @@ |
1146 | lots = partner.get('lots') |
1147 | lots.append(object) |
1148 | return ret_dict.values() |
1149 | - def grand_seller_total(self,o): |
1150 | + def grand_seller_total(self, o): |
1151 | grand_total = 0 |
1152 | for oo in o: |
1153 | grand_total =grand_total + oo['obj_price']+ self.sum_taxes(oo) |
1154 | |
1155 | === modified file 'audittrail/audittrail.py' |
1156 | --- audittrail/audittrail.py 2011-11-21 16:27:12 +0000 |
1157 | +++ audittrail/audittrail.py 2012-03-05 18:43:21 +0000 |
1158 | @@ -201,7 +201,7 @@ |
1159 | res = value |
1160 | return res |
1161 | |
1162 | - def create_log_line(self, cr, uid, log_id, model, lines=[]): |
1163 | + def create_log_line(self, cr, uid, log_id, model, lines=None): |
1164 | """ |
1165 | Creates lines for changed fields with its old and new values |
1166 | |
1167 | @@ -210,6 +210,8 @@ |
1168 | @param model: Object which values are being changed |
1169 | @param lines: List of values for line is to be created |
1170 | """ |
1171 | + if lines is None: |
1172 | + lines = [] |
1173 | pool = pooler.get_pool(cr.dbname) |
1174 | obj_pool = pool.get(model.model) |
1175 | model_pool = pool.get('ir.model') |
1176 | @@ -348,7 +350,7 @@ |
1177 | data[(model.id, resource_id)] = {'text':values_text, 'value': values} |
1178 | return data |
1179 | |
1180 | - def prepare_audittrail_log_line(self, cr, uid, pool, model, resource_id, method, old_values, new_values, field_list=[]): |
1181 | + def prepare_audittrail_log_line(self, cr, uid, pool, model, resource_id, method, old_values, new_values, field_list=None): |
1182 | """ |
1183 | This function compares the old data (i.e before the method was executed) and the new data |
1184 | (after the method was executed) and returns a structure with all the needed information to |
1185 | @@ -378,6 +380,8 @@ |
1186 | record (res.partner, for example), we may have to log a change done in a x2many field (on |
1187 | res.partner.address, for example) |
1188 | """ |
1189 | + if field_list is None: |
1190 | + field_list = [] |
1191 | key = (model.id, resource_id) |
1192 | lines = { |
1193 | key: [] |
1194 | @@ -416,7 +420,7 @@ |
1195 | lines[key].append(data) |
1196 | return lines |
1197 | |
1198 | - def process_data(self, cr, uid, pool, res_ids, model, method, old_values={}, new_values={}, field_list=[]): |
1199 | + def process_data(self, cr, uid, pool, res_ids, model, method, old_values=None, new_values=None, field_list=None): |
1200 | """ |
1201 | This function processes and iterates recursively to log the difference between the old |
1202 | data (i.e before the method was executed) and the new data and creates audittrail log |
1203 | |
1204 | === modified file 'base_contact/base_contact.py' |
1205 | --- base_contact/base_contact.py 2012-02-15 13:22:13 +0000 |
1206 | +++ base_contact/base_contact.py 2012-03-05 18:43:21 +0000 |
1207 | @@ -175,7 +175,7 @@ |
1208 | ids = self.pool.get('res.partner.location').search(cr, uid, [('partner_id','=',context['default_partner_id'])], context=context) |
1209 | return ids and ids[0] or False |
1210 | |
1211 | - def onchange_location_id(self,cr, uid, ids, location_id=False, context={}): |
1212 | + def onchange_location_id(self, cr, uid, ids, location_id=False, context=None): |
1213 | if not location_id: |
1214 | return {} |
1215 | location = self.pool.get('res.partner.location').browse(cr, uid, location_id, context=context) |
1216 | @@ -209,7 +209,7 @@ |
1217 | 'name' : fields.related('contact_id', 'name', type='char', size=64, string="Contact Name", store=True), |
1218 | 'title' : fields.related('contact_id', 'title', type='many2one', relation='res.partner.title', string="Title", store=True), |
1219 | } |
1220 | - def create(self, cr, uid, data, context={}): |
1221 | + def create(self, cr, uid, data, context=None): |
1222 | if not data.get('location_id', False): |
1223 | loc_id = self.pool.get('res.partner.location').create(cr, uid, { |
1224 | 'street': data.get('street',''), |
1225 | @@ -241,7 +241,7 @@ |
1226 | 'location_id': _default_location_id |
1227 | } |
1228 | |
1229 | - def default_get(self, cr, uid, fields=[], context=None): |
1230 | + def default_get(self, cr, uid, fields=None, context=None): |
1231 | if context is None: |
1232 | context = {} |
1233 | if 'default_type' in context: |
1234 | |
1235 | === modified file 'base_crypt/crypt.py' |
1236 | --- base_crypt/crypt.py 2011-10-18 09:38:13 +0000 |
1237 | +++ base_crypt/crypt.py 2012-03-05 18:43:21 +0000 |
1238 | @@ -45,7 +45,9 @@ |
1239 | |
1240 | magic_md5 = '$1$' |
1241 | |
1242 | -def gen_salt( length=8, symbols=ascii_letters + digits ): |
1243 | +def gen_salt( length=8, symbols=None): |
1244 | + if symbols is None: |
1245 | + symbols = ascii_letters + digits |
1246 | seed() |
1247 | return ''.join( sample( symbols, length ) ) |
1248 | |
1249 | |
1250 | === modified file 'base_module_doc_rst/report/ir_module_reference_print_graph.py' |
1251 | --- base_module_doc_rst/report/ir_module_reference_print_graph.py 2011-01-14 00:11:01 +0000 |
1252 | +++ base_module_doc_rst/report/ir_module_reference_print_graph.py 2012-03-05 18:43:21 +0000 |
1253 | @@ -79,4 +79,4 @@ |
1254 | 'addons/base_module_doc_rst/report/ir_module_reference_graph.rml', |
1255 | parser=ir_module_reference_print_graph, header=False) |
1256 | |
1257 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1258 | \ No newline at end of file |
1259 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1260 | |
1261 | === modified file 'base_module_quality/__init__.py' |
1262 | --- base_module_quality/__init__.py 2011-01-14 00:11:01 +0000 |
1263 | +++ base_module_quality/__init__.py 2012-03-05 18:43:21 +0000 |
1264 | @@ -22,4 +22,4 @@ |
1265 | import base_module_quality |
1266 | import wizard |
1267 | |
1268 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1269 | \ No newline at end of file |
1270 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1271 | |
1272 | === modified file 'base_module_quality/base_module_quality.py' |
1273 | --- base_module_quality/base_module_quality.py 2011-10-27 21:11:24 +0000 |
1274 | +++ base_module_quality/base_module_quality.py 2012-03-05 18:43:21 +0000 |
1275 | @@ -115,7 +115,9 @@ |
1276 | self.log.debug('get_objects() obj_list: %s', ','.join(obj_list)) |
1277 | return obj_list |
1278 | |
1279 | - def get_model_ids(self, cr, uid, models=[]): |
1280 | + def get_model_ids(self, cr, uid, models=None): |
1281 | + if models is None: |
1282 | + models = [] |
1283 | # This function returns all ids of the given objects.. |
1284 | if not models: |
1285 | return [] |
1286 | @@ -133,7 +135,12 @@ |
1287 | result_ids[obj] = ids |
1288 | return result_ids |
1289 | |
1290 | - def format_table(self, header=[], data_list={}): #This function can work forwidget="text_wiki" |
1291 | + def format_table(self, header=None, data_list=None): |
1292 | + #This function can work forwidget="text_wiki" |
1293 | + if header is None: |
1294 | + header = [] |
1295 | + if data_list is None: |
1296 | + data_list = {} |
1297 | detail = "" |
1298 | detail += (header[0]) % tuple(header[1]) |
1299 | frow = '\n|-' |
1300 | @@ -144,7 +151,12 @@ |
1301 | detail = detail + '\n|}' |
1302 | return detail |
1303 | |
1304 | - def format_html_table(self, header=[], data_list=[]): #This function can work for widget="html_tag" |
1305 | + def format_html_table(self, header=None, data_list=None): |
1306 | + #This function can work for widget="html_tag" |
1307 | + if header is None: |
1308 | + header = [] |
1309 | + if data_list is None: |
1310 | + data_list = [] |
1311 | # function create html table.... |
1312 | detail = "" |
1313 | detail += (header[0]) % tuple(header[1]) |
1314 | |
1315 | === modified file 'base_module_quality/method_test/method_test.py' |
1316 | --- base_module_quality/method_test/method_test.py 2011-01-14 00:11:01 +0000 |
1317 | +++ base_module_quality/method_test/method_test.py 2012-03-05 18:43:21 +0000 |
1318 | @@ -85,4 +85,4 @@ |
1319 | detail += self.format_table(header, dict_method) |
1320 | return detail |
1321 | |
1322 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1323 | \ No newline at end of file |
1324 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1325 | |
1326 | === modified file 'base_module_quality/object_test/object_test.py' |
1327 | --- base_module_quality/object_test/object_test.py 2011-01-14 00:11:01 +0000 |
1328 | +++ base_module_quality/object_test/object_test.py 2012-03-05 18:43:21 +0000 |
1329 | @@ -208,4 +208,4 @@ |
1330 | return res |
1331 | return "" |
1332 | |
1333 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1334 | \ No newline at end of file |
1335 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1336 | |
1337 | === modified file 'base_module_quality/pep8_test/pep8_test.py' |
1338 | --- base_module_quality/pep8_test/pep8_test.py 2011-01-14 00:11:01 +0000 |
1339 | +++ base_module_quality/pep8_test/pep8_test.py 2012-03-05 18:43:21 +0000 |
1340 | @@ -278,4 +278,4 @@ |
1341 | return res |
1342 | return "" |
1343 | |
1344 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1345 | \ No newline at end of file |
1346 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1347 | |
1348 | === modified file 'base_module_quality/structure_test/structure_test.py' |
1349 | --- base_module_quality/structure_test/structure_test.py 2011-01-14 00:11:01 +0000 |
1350 | +++ base_module_quality/structure_test/structure_test.py 2012-03-05 18:43:21 +0000 |
1351 | @@ -176,4 +176,4 @@ |
1352 | return res |
1353 | return "" |
1354 | |
1355 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1356 | \ No newline at end of file |
1357 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1358 | |
1359 | === modified file 'base_module_quality/unit_test/unit_test.py' |
1360 | --- base_module_quality/unit_test/unit_test.py 2011-01-14 00:11:01 +0000 |
1361 | +++ base_module_quality/unit_test/unit_test.py 2012-03-05 18:43:21 +0000 |
1362 | @@ -111,4 +111,4 @@ |
1363 | return detail + html +'</tr></table></body></html>' |
1364 | return '' |
1365 | |
1366 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1367 | \ No newline at end of file |
1368 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1369 | |
1370 | === modified file 'base_module_quality/wizard/module_quality_check.py' |
1371 | --- base_module_quality/wizard/module_quality_check.py 2011-10-27 21:11:24 +0000 |
1372 | +++ base_module_quality/wizard/module_quality_check.py 2012-03-05 18:43:21 +0000 |
1373 | @@ -49,4 +49,4 @@ |
1374 | |
1375 | quality_check() |
1376 | |
1377 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1378 | \ No newline at end of file |
1379 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1380 | |
1381 | === modified file 'base_module_quality/wizard/quality_save_report.py' |
1382 | --- base_module_quality/wizard/quality_save_report.py 2011-10-27 21:11:24 +0000 |
1383 | +++ base_module_quality/wizard/quality_save_report.py 2012-03-05 18:43:21 +0000 |
1384 | @@ -49,4 +49,4 @@ |
1385 | |
1386 | quality_save_report() |
1387 | |
1388 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1389 | \ No newline at end of file |
1390 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1391 | |
1392 | === modified file 'base_module_quality/workflow_test/workflow_test.py' |
1393 | --- base_module_quality/workflow_test/workflow_test.py 2011-01-14 00:11:01 +0000 |
1394 | +++ base_module_quality/workflow_test/workflow_test.py 2012-03-05 18:43:21 +0000 |
1395 | @@ -155,4 +155,4 @@ |
1396 | count = self.count_button(node, count) |
1397 | return count |
1398 | |
1399 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1400 | \ No newline at end of file |
1401 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1402 | |
1403 | === modified file 'base_module_record/wizard/base_module_record_objects.py' |
1404 | --- base_module_record/wizard/base_module_record_objects.py 2012-02-09 09:12:03 +0000 |
1405 | +++ base_module_record/wizard/base_module_record_objects.py 2012-03-05 18:43:21 +0000 |
1406 | @@ -127,7 +127,7 @@ |
1407 | _name = 'base.module.record.objects' |
1408 | _description = "Base Module Record Objects" |
1409 | |
1410 | - def inter_call(self,cr,uid,data,context=None): |
1411 | + def inter_call(self, cr, uid, data, context=None): |
1412 | res=base_module_save._create_module(self, cr, uid, data, context) |
1413 | mod_obj = self.pool.get('ir.model.data') |
1414 | model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'module_create_form_view')], context=context) |
1415 | |
1416 | === modified file 'base_module_record/wizard/base_module_save.py' |
1417 | --- base_module_record/wizard/base_module_save.py 2011-09-08 07:06:49 +0000 |
1418 | +++ base_module_record/wizard/base_module_save.py 2012-03-05 18:43:21 +0000 |
1419 | @@ -167,4 +167,4 @@ |
1420 | |
1421 | base_module_save() |
1422 | |
1423 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1424 | \ No newline at end of file |
1425 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1426 | |
1427 | === modified file 'base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py' |
1428 | --- base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py 2011-01-14 00:11:01 +0000 |
1429 | +++ base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py 2012-03-05 18:43:21 +0000 |
1430 | @@ -42,11 +42,11 @@ |
1431 | |
1432 | class DomApiGeneral: |
1433 | """General DOM API utilities.""" |
1434 | - def __init__(self,content_string="",file=""): |
1435 | + def __init__(self, content_string="", file=""): |
1436 | self.content_string = content_string |
1437 | self.re_digits = re.compile(r"(.*?\d)(pt|cm|mm|inch|in)") |
1438 | |
1439 | - def _unitTuple(self,string): |
1440 | + def _unitTuple(self, string): |
1441 | """Split values and units to a tuple.""" |
1442 | temp = self.re_digits.findall(string) |
1443 | if not temp: |
1444 | @@ -54,13 +54,15 @@ |
1445 | else: |
1446 | return (temp[0]) |
1447 | |
1448 | - def stringPercentToFloat(self,string): |
1449 | + def stringPercentToFloat(self, string): |
1450 | temp = string.replace("""%""","") |
1451 | return float(temp)/100 |
1452 | |
1453 | - def findChildrenByName(self,parent,name,attr_dict={}): |
1454 | + def findChildrenByName(self, parent, name, attr_dict=None): |
1455 | """Helper functions. Does not work recursively. |
1456 | Optional: also test for certain attribute/value pairs.""" |
1457 | + if attr_dict is None: |
1458 | + attr_dict = {} |
1459 | children = [] |
1460 | for c in parent.childNodes: |
1461 | if c.nodeType == c.ELEMENT_NODE and c.nodeName == name: |
1462 | @@ -70,7 +72,7 @@ |
1463 | else: |
1464 | return self._selectForAttributes(nodelist=children,attr_dict=attr_dict) |
1465 | |
1466 | - def _selectForAttributes(self,nodelist,attr_dict): |
1467 | + def _selectForAttributes(self, nodelist, attr_dict): |
1468 | "Helper function.""" |
1469 | selected_nodes = [] |
1470 | for n in nodelist: |
1471 | @@ -83,7 +85,7 @@ |
1472 | selected_nodes.append(n) |
1473 | return selected_nodes |
1474 | |
1475 | - def _stringToTuple(self,s): |
1476 | + def _stringToTuple(self, s): |
1477 | """Helper function.""" |
1478 | try: |
1479 | temp = string.split(s,",") |
1480 | @@ -91,13 +93,13 @@ |
1481 | except: |
1482 | return None |
1483 | |
1484 | - def _tupleToString(self,t): |
1485 | + def _tupleToString(self, t): |
1486 | try: |
1487 | return self.openOfficeStringUtf8("%s,%s" % (t[0],t[1])) |
1488 | except: |
1489 | return None |
1490 | |
1491 | - def _lengthToFloat(self,value): |
1492 | + def _lengthToFloat(self, value): |
1493 | v = value |
1494 | if not self.re_digits.search(v): |
1495 | return v |
1496 | @@ -113,7 +115,7 @@ |
1497 | except: |
1498 | return v |
1499 | |
1500 | - def openOfficeStringUtf8(self,string): |
1501 | + def openOfficeStringUtf8(self, string): |
1502 | if type(string) == unicode: |
1503 | return string.encode("utf-8") |
1504 | tempstring = unicode(string,"cp1252").encode("utf-8") |
1505 | @@ -121,7 +123,7 @@ |
1506 | |
1507 | class DomApi(DomApiGeneral): |
1508 | """This class provides a DOM-API for XML-Files from an SXW-Archive.""" |
1509 | - def __init__(self,xml_content,xml_styles): |
1510 | + def __init__(self, xml_content, xml_styles): |
1511 | DomApiGeneral.__init__(self) |
1512 | self.content_dom = xml.dom.minidom.parseString(xml_content) |
1513 | self.styles_dom = xml.dom.minidom.parseString(xml_styles) |
1514 | @@ -145,7 +147,7 @@ |
1515 | for s in self.style_dict.keys(): |
1516 | self.style_properties_dict[s] = self.getStylePropertiesDict(s) |
1517 | |
1518 | - def updateWithPercents(self,dict,updatedict): |
1519 | + def updateWithPercents(self, dict, updatedict): |
1520 | """Sometimes you find values like "115%" in the style hierarchy.""" |
1521 | if not updatedict: |
1522 | # no style hierarchies for this style? => |
1523 | @@ -244,7 +246,7 @@ |
1524 | def toxml(self): |
1525 | return self.content_dom.toxml(encoding="utf-8") |
1526 | |
1527 | - def getStylePropertiesDict(self,style_name): |
1528 | + def getStylePropertiesDict(self, style_name): |
1529 | res = {} |
1530 | |
1531 | if self.style_dict[style_name].hasAttribute("style:parent-style-name"): |
1532 | @@ -265,7 +267,7 @@ |
1533 | self.save_pict = save_pict |
1534 | self.images = {} |
1535 | |
1536 | - def oo_read(self,fname): |
1537 | + def oo_read(self, fname): |
1538 | z = zipfile.ZipFile(fname,"r") |
1539 | content = z.read('content.xml') |
1540 | style = z.read('styles.xml') |
1541 | @@ -281,7 +283,7 @@ |
1542 | z.close() |
1543 | return content,style |
1544 | |
1545 | - def oo_replace(self,content): |
1546 | + def oo_replace(self, content): |
1547 | regex = [ |
1548 | (r"<para[^>]*/>", ""), |
1549 | (r"<para(.*)>(.*?)<text:line-break[^>]*/>", "<para$1>$2</para><para$1>"), |
1550 | @@ -290,7 +292,7 @@ |
1551 | content = re.sub(key, val, content) |
1552 | return content |
1553 | |
1554 | - def unpackNormalize(self,sourcefile): |
1555 | + def unpackNormalize(self, sourcefile): |
1556 | c,s = self.oo_read(sourcefile) |
1557 | c = self.oo_replace(c) |
1558 | dom = DomApi(c,s) |
1559 | |
1560 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/About.py' |
1561 | --- base_report_designer/plugin/openerp_report_designer/bin/script/About.py 2011-12-19 16:54:40 +0000 |
1562 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/About.py 2012-03-05 18:43:21 +0000 |
1563 | @@ -52,7 +52,7 @@ |
1564 | from lib.gui import * |
1565 | |
1566 | class About(unohelper.Base, XJobExecutor): |
1567 | - def __init__(self,ctx): |
1568 | + def __init__(self, ctx): |
1569 | self.ctx = ctx |
1570 | self.module = "openerp_report" |
1571 | self.version = "0.1" |
1572 | |
1573 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py' |
1574 | --- base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py 2011-12-19 16:54:40 +0000 |
1575 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py 2012-03-05 18:43:21 +0000 |
1576 | @@ -64,7 +64,7 @@ |
1577 | 'PDF' : 'pdf', |
1578 | 'OpenOffice': 'sxw', |
1579 | } |
1580 | - def __init__(self,ctx): |
1581 | + def __init__(self, ctx): |
1582 | self.ctx = ctx |
1583 | self.module = "openerp_report" |
1584 | self.version = "0.1" |
1585 | @@ -132,7 +132,7 @@ |
1586 | self.win.addButton('btnCancel', -2 - 27 , -5 , 30 , 15, 'Cancel' ,actionListenerProc = self.btnCancel_clicked ) |
1587 | self.win.doModalDialog("lstResourceType", self.Kind.keys()[0]) |
1588 | |
1589 | - def btnSearch_clicked( self, oActionEvent ): |
1590 | + def btnSearch_clicked(self, oActionEvent): |
1591 | modelSelectedItem = self.win.getListBoxSelectedItem("lstmodel") |
1592 | if modelSelectedItem == "": |
1593 | return |
1594 | @@ -151,7 +151,7 @@ |
1595 | for result in self.aSearchResult: |
1596 | self.lstResource.addItem(result[1],result[0]) |
1597 | |
1598 | - def _send_attachment( self, name, data, res_model, res_id ): |
1599 | + def _send_attachment(self, name, data, res_model, res_id): |
1600 | desktop = getDesktop() |
1601 | oDoc2 = desktop.getCurrentComponent() |
1602 | docinfo = oDoc2.getDocumentInfo() |
1603 | @@ -166,7 +166,7 @@ |
1604 | |
1605 | return self.sock.execute( database, uid, self.password, 'ir.attachment', 'create', params ) |
1606 | |
1607 | - def send_attachment( self, model, resource_id ): |
1608 | + def send_attachment(self, model, resource_id): |
1609 | desktop = getDesktop() |
1610 | oDoc2 = desktop.getCurrentComponent() |
1611 | docinfo = oDoc2.getDocumentInfo() |
1612 | @@ -187,7 +187,7 @@ |
1613 | data = read_data_from_file( get_absolute_file_path( url ) ) |
1614 | return self._send_attachment( os.path.basename( url ), data, model, resource_id ) |
1615 | |
1616 | - def btnOkWithoutInformation_clicked( self, oActionEvent ): |
1617 | + def btnOkWithoutInformation_clicked(self, oActionEvent): |
1618 | desktop = getDesktop() |
1619 | oDoc2 = desktop.getCurrentComponent() |
1620 | docinfo = oDoc2.getDocumentInfo() |
1621 | @@ -199,7 +199,7 @@ |
1622 | res = self.send_attachment( docinfo.getUserFieldValue(3), docinfo.getUserFieldValue(2) ) |
1623 | self.win.endExecute() |
1624 | |
1625 | - def btnOkWithInformation_clicked(self,oActionEvent): |
1626 | + def btnOkWithInformation_clicked(self, oActionEvent): |
1627 | if self.win.getListBoxSelectedItem("lstResourceType") == "": |
1628 | ErrorDialog( "Please select resource type", "", "Selection ERROR" ) |
1629 | return |
1630 | @@ -221,7 +221,7 @@ |
1631 | res = self.send_attachment( self.dModel[self.win.getListBoxSelectedItem('lstmodel')], resourceid ) |
1632 | self.win.endExecute() |
1633 | |
1634 | - def btnCancel_clicked( self, oActionEvent ): |
1635 | + def btnCancel_clicked(self, oActionEvent): |
1636 | self.win.endExecute() |
1637 | |
1638 | def doc2pdf(self, strFile): |
1639 | @@ -262,7 +262,7 @@ |
1640 | # Can be None if len(strFilterSubName) <= 0 |
1641 | return filename |
1642 | |
1643 | - def _MakePropertyValue(self, cName = "", uValue = u"" ): |
1644 | + def _MakePropertyValue(self, cName="", uValue=u"" ): |
1645 | oPropertyValue = createUnoStruct( "com.sun.star.beans.PropertyValue" ) |
1646 | if cName: |
1647 | oPropertyValue.Name = cName |
1648 | |
1649 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Change.py' |
1650 | --- base_report_designer/plugin/openerp_report_designer/bin/script/Change.py 2011-12-19 16:54:40 +0000 |
1651 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/Change.py 2012-03-05 18:43:21 +0000 |
1652 | @@ -59,7 +59,7 @@ |
1653 | database="test" |
1654 | |
1655 | class Change( unohelper.Base, XJobExecutor ): |
1656 | - def __init__(self,ctx): |
1657 | + def __init__(self, ctx): |
1658 | self.ctx = ctx |
1659 | self.module = "openerp_report" |
1660 | self.version = "0.1" |
1661 | @@ -107,7 +107,7 @@ |
1662 | self.lstProtocol.addItem(i,self.lstProtocol.getItemCount() ) |
1663 | self.win.doModalDialog( "lstProtocol", protocol) |
1664 | |
1665 | - def btnNext_clicked(self,oActionEvent): |
1666 | + def btnNext_clicked(self, oActionEvent): |
1667 | global url |
1668 | aVal='' |
1669 | #aVal= Fetature used |
1670 | |
1671 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py' |
1672 | --- base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py 2011-12-19 16:54:40 +0000 |
1673 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py 2012-03-05 18:43:21 +0000 |
1674 | @@ -63,7 +63,7 @@ |
1675 | |
1676 | class ConvertBracesToField( unohelper.Base, XJobExecutor ): |
1677 | |
1678 | - def __init__(self,ctx): |
1679 | + def __init__(self, ctx): |
1680 | |
1681 | self.ctx = ctx |
1682 | self.module = "openerp_report" |
1683 | @@ -198,7 +198,7 @@ |
1684 | info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) |
1685 | self.logobj.log_write('ConvertBraceToField', LOG_ERROR, info) |
1686 | |
1687 | - def getRes(self,sock,sObject,sVar): |
1688 | + def getRes(self, sock, sObject, sVar): |
1689 | desktop=getDesktop() |
1690 | doc =desktop.getCurrentComponent() |
1691 | docinfo=doc.getDocumentInfo() |
1692 | @@ -215,7 +215,7 @@ |
1693 | sObject = self.getRes(sock,res[myval]['relation'], sVar[sVar.find("/")+1:]) |
1694 | return sObject |
1695 | |
1696 | - def getBraces(self,aReportSyntex=[]): |
1697 | + def getBraces(self, aReportSyntex=None): |
1698 | desktop=getDesktop() |
1699 | doc = desktop.getCurrentComponent() |
1700 | aSearchString=[] |
1701 | |
1702 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py' |
1703 | --- base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py 2011-12-19 16:54:40 +0000 |
1704 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py 2012-03-05 18:43:21 +0000 |
1705 | @@ -57,7 +57,7 @@ |
1706 | uid = 3 |
1707 | |
1708 | class ConvertFieldsToBraces( unohelper.Base, XJobExecutor ): |
1709 | - def __init__(self,ctx): |
1710 | + def __init__(self, ctx): |
1711 | self.ctx = ctx |
1712 | self.module = "openerp_report" |
1713 | self.version = "0.1" |
1714 | |
1715 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py' |
1716 | --- base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py 2011-12-19 16:54:40 +0000 |
1717 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py 2012-03-05 18:43:21 +0000 |
1718 | @@ -67,7 +67,7 @@ |
1719 | |
1720 | |
1721 | class ExportToRML( unohelper.Base, XJobExecutor ): |
1722 | - def __init__(self,ctx): |
1723 | + def __init__(self, ctx): |
1724 | self.ctx = ctx |
1725 | self.module = "openerp_report" |
1726 | self.version = "0.1" |
1727 | |
1728 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py' |
1729 | --- base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py 2011-12-19 16:54:40 +0000 |
1730 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py 2012-03-05 18:43:21 +0000 |
1731 | @@ -57,7 +57,7 @@ |
1732 | uid = 3 |
1733 | |
1734 | class Expression(unohelper.Base, XJobExecutor ): |
1735 | - def __init__(self,sExpression="",sName="", bFromModify=False): |
1736 | + def __init__(self, sExpression="", sName="", bFromModify=False): |
1737 | LoginTest() |
1738 | if not loginstatus and __name__=="package": |
1739 | exit(1) |
1740 | @@ -75,7 +75,7 @@ |
1741 | self.win.doModalDialog("",None) |
1742 | |
1743 | |
1744 | - def btnOk_clicked( self, oActionEvent ): |
1745 | + def btnOk_clicked(self, oActionEvent): |
1746 | desktop=getDesktop() |
1747 | doc = desktop.getCurrentComponent() |
1748 | text = doc.Text |
1749 | @@ -105,7 +105,7 @@ |
1750 | else: |
1751 | ErrorDialog("Please Fill appropriate data in Name field or \nExpression field") |
1752 | |
1753 | - def btnCancel_clicked( self, oActionEvent ): |
1754 | + def btnCancel_clicked(self, oActionEvent): |
1755 | self.win.endExecute() |
1756 | |
1757 | if __name__<>"package" and __name__=="__main__": |
1758 | |
1759 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py' |
1760 | --- base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py 2011-12-19 16:54:40 +0000 |
1761 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py 2012-03-05 18:43:21 +0000 |
1762 | @@ -64,7 +64,7 @@ |
1763 | |
1764 | |
1765 | class Fields(unohelper.Base, XJobExecutor ): |
1766 | - def __init__(self,sVariable="",sFields="",sDisplayName="",bFromModify=False): |
1767 | + def __init__(self, sVariable="", sFields="", sDisplayName="", bFromModify=False): |
1768 | LoginTest() |
1769 | if not loginstatus and __name__=="package": |
1770 | exit(1) |
1771 | @@ -177,7 +177,7 @@ |
1772 | ErrorDialog("Please insert user define field Field-1 or Field-4","Just go to File->Properties->User Define \nField-1 Eg. http://localhost:8069 \nOR \nField-4 Eg. account.invoice") |
1773 | self.win.endExecute() |
1774 | |
1775 | - def lstbox_selected(self,oItemEvent): |
1776 | + def lstbox_selected(self, oItemEvent): |
1777 | try: |
1778 | |
1779 | desktop=getDesktop() |
1780 | @@ -200,7 +200,7 @@ |
1781 | if self.bModify: |
1782 | self.win.setEditText("txtUName",self.sGDisplayName) |
1783 | |
1784 | - def getRes(self,sock ,sObject,sVar): |
1785 | + def getRes(self, sock, sObject, sVar): |
1786 | desktop=getDesktop() |
1787 | doc =desktop.getCurrentComponent() |
1788 | docinfo=doc.getDocumentInfo() |
1789 | @@ -219,7 +219,7 @@ |
1790 | else: |
1791 | return sObject |
1792 | |
1793 | - def cmbVariable_selected(self,oItemEvent): |
1794 | + def cmbVariable_selected(self, oItemEvent): |
1795 | if self.count > 0 : |
1796 | try: |
1797 | desktop=getDesktop() |
1798 | @@ -246,7 +246,7 @@ |
1799 | info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) |
1800 | self.logobj.log_write('Fields', LOG_ERROR, info) |
1801 | |
1802 | - def btnOk_clicked( self, oActionEvent ): |
1803 | + def btnOk_clicked(self, oActionEvent): |
1804 | desktop=getDesktop() |
1805 | doc = desktop.getCurrentComponent() |
1806 | cursor = doc.getCurrentController().getViewCursor() |
1807 | @@ -281,7 +281,7 @@ |
1808 | else: |
1809 | ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields") |
1810 | |
1811 | - def btnCancel_clicked( self, oActionEvent ): |
1812 | + def btnCancel_clicked(self, oActionEvent): |
1813 | self.win.endExecute() |
1814 | |
1815 | if __name__<>"package" and __name__=="__main__": |
1816 | |
1817 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py' |
1818 | --- base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py 2011-12-19 16:54:40 +0000 |
1819 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py 2012-03-05 18:43:21 +0000 |
1820 | @@ -66,7 +66,7 @@ |
1821 | |
1822 | # |
1823 | class ModifyExistingReport(unohelper.Base, XJobExecutor): |
1824 | - def __init__(self,ctx): |
1825 | + def __init__(self, ctx): |
1826 | self.ctx = ctx |
1827 | self.module = "openerp_report" |
1828 | self.version = "0.1" |
1829 | @@ -178,10 +178,10 @@ |
1830 | |
1831 | self.win.endExecute() |
1832 | |
1833 | - def btnCancel_clicked( self, oActionEvent ): |
1834 | + def btnCancel_clicked(self, oActionEvent): |
1835 | self.win.endExecute() |
1836 | |
1837 | - def btnDelete_clicked( self, oActionEvent ): |
1838 | + def btnDelete_clicked(self, oActionEvent): |
1839 | desktop=getDesktop() |
1840 | doc = desktop.getCurrentComponent() |
1841 | docinfo=doc.getDocumentInfo() |
1842 | |
1843 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py' |
1844 | --- base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py 2011-12-19 16:54:40 +0000 |
1845 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py 2012-03-05 18:43:21 +0000 |
1846 | @@ -66,7 +66,7 @@ |
1847 | # |
1848 | # |
1849 | class NewReport(unohelper.Base, XJobExecutor): |
1850 | - def __init__(self,ctx): |
1851 | + def __init__(self, ctx): |
1852 | self.ctx = ctx |
1853 | self.module = "openerp_report" |
1854 | self.version = "0.1" |
1855 | @@ -99,7 +99,7 @@ |
1856 | self.win.addButton('btnCancel',-2 - 70 - 5 ,-5, 35,15,'Cancel' ,actionListenerProc = self.btnCancel_clicked ) |
1857 | self.win.doModalDialog("",None) |
1858 | |
1859 | - def btnOk_clicked(self,oActionEvent): |
1860 | + def btnOk_clicked(self, oActionEvent): |
1861 | desktop=getDesktop() |
1862 | doc = desktop.getCurrentComponent() |
1863 | docinfo=doc.getDocumentInfo() |
1864 | @@ -107,7 +107,7 @@ |
1865 | self.logobj.log_write('Module Name',LOG_INFO, ':Module use in creating a report %s using database %s' % (self.aModuleName[self.lstModule.getSelectedItemPos()], database)) |
1866 | self.win.endExecute() |
1867 | |
1868 | - def btnCancel_clicked( self, oActionEvent ): |
1869 | + def btnCancel_clicked(self, oActionEvent): |
1870 | self.win.endExecute() |
1871 | |
1872 | if __name__<>"package" and __name__=="__main__": |
1873 | |
1874 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py' |
1875 | --- base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py 2011-12-19 16:54:40 +0000 |
1876 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py 2012-03-05 18:43:21 +0000 |
1877 | @@ -64,7 +64,7 @@ |
1878 | |
1879 | #class RepeatIn: |
1880 | class RepeatIn( unohelper.Base, XJobExecutor ): |
1881 | - def __init__(self,sObject="",sVariable="",sFields="",sDisplayName="",bFromModify=False): |
1882 | + def __init__(self, sObject="", sVariable="", sFields="", sDisplayName="", bFromModify=False): |
1883 | # Interface Design |
1884 | LoginTest() |
1885 | self.logobj=Logger() |
1886 | @@ -204,7 +204,7 @@ |
1887 | ErrorDialog("Please Select Appropriate module" ,"Create new report from: \nOpenERP -> Open a New Report") |
1888 | self.win.endExecute() |
1889 | |
1890 | - def lstbox_selected(self,oItemEvent): |
1891 | + def lstbox_selected(self, oItemEvent): |
1892 | sItem=self.win.getListBoxSelectedItem("lstFields") |
1893 | sMain=self.aListRepeatIn[self.win.getListBoxSelectedItemPos("lstFields")] |
1894 | |
1895 | @@ -215,7 +215,7 @@ |
1896 | self.win.setEditText("txtName",sMain[sMain.rfind("/")+1:]) |
1897 | self.win.setEditText("txtUName","|-."+sItem[sItem.rfind("/")+1:]+".-|") |
1898 | |
1899 | - def cmbVariable_selected(self,oItemEvent): |
1900 | + def cmbVariable_selected(self, oItemEvent): |
1901 | |
1902 | if self.count > 0 : |
1903 | |
1904 | @@ -290,7 +290,7 @@ |
1905 | else: |
1906 | ErrorDialog("Please Fill appropriate data in Object Field or Name field \nor select perticular value from the list of fields") |
1907 | |
1908 | - def btnCancel_clicked( self, oActionEvent ): |
1909 | + def btnCancel_clicked(self, oActionEvent): |
1910 | self.win.endExecute() |
1911 | |
1912 | if __name__<>"package" and __name__=="__main__": |
1913 | |
1914 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py' |
1915 | --- base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py 2011-12-19 16:54:40 +0000 |
1916 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py 2012-03-05 18:43:21 +0000 |
1917 | @@ -74,7 +74,7 @@ |
1918 | 'HTML' : 'html' |
1919 | } |
1920 | |
1921 | - def __init__(self,ctx): |
1922 | + def __init__(self, ctx): |
1923 | self.ctx = ctx |
1924 | self.module = "openerp_report" |
1925 | self.version = "0.1" |
1926 | @@ -138,10 +138,10 @@ |
1927 | |
1928 | self.win.doModalDialog("lstResourceType", self.Kind.keys()[0]) |
1929 | |
1930 | - def lstbox_selected(self,oItemEvent): |
1931 | + def lstbox_selected(self, oItemEvent): |
1932 | pass |
1933 | |
1934 | - def btnCancel_clicked( self, oActionEvent ): |
1935 | + def btnCancel_clicked(self, oActionEvent): |
1936 | self.win.endExecute() |
1937 | |
1938 | def btnOk_clicked(self, oActionEvent): |
1939 | @@ -223,7 +223,7 @@ |
1940 | id=self.sock.execute(database, uid, self.password, 'ir.actions.report.xml' ,'create', params) |
1941 | return id |
1942 | |
1943 | - def getInverseFieldsRecord(self,nVal): |
1944 | + def getInverseFieldsRecord(self, nVal): |
1945 | desktop=getDesktop() |
1946 | doc = desktop.getCurrentComponent() |
1947 | count=0 |
1948 | |
1949 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py' |
1950 | --- base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py 2011-12-19 16:54:40 +0000 |
1951 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py 2012-03-05 18:43:21 +0000 |
1952 | @@ -59,7 +59,7 @@ |
1953 | database="test" |
1954 | |
1955 | class ServerParameter( unohelper.Base, XJobExecutor ): |
1956 | - def __init__(self, aVal= None, sURL=""): |
1957 | + def __init__(self, aVal=None, sURL=""): |
1958 | self.module = "openerp_report" |
1959 | self.version = "0.1" |
1960 | desktop=getDesktop() |
1961 | @@ -116,7 +116,7 @@ |
1962 | |
1963 | #self.win.doModalDialog("lstDatabase",docinfo.getUserFieldValue(2)) |
1964 | |
1965 | - def btnOk_clicked(self,oActionEvent): |
1966 | + def btnOk_clicked(self, oActionEvent): |
1967 | |
1968 | sLogin=self.win.getEditText("txtLoginName") |
1969 | sPassword=self.win.getEditText("txtPassword") |
1970 | @@ -158,10 +158,10 @@ |
1971 | self.win.endExecute() |
1972 | |
1973 | |
1974 | - def btnCancel_clicked( self, oActionEvent ): |
1975 | + def btnCancel_clicked(self, oActionEvent): |
1976 | self.win.endExecute() |
1977 | |
1978 | - def btnPrevious_clicked(self,oActionEvent): |
1979 | + def btnPrevious_clicked(self, oActionEvent): |
1980 | self.win.endExecute() |
1981 | Change(None) |
1982 | self.win.endExecute() |
1983 | |
1984 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py' |
1985 | --- base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py 2011-12-19 16:54:40 +0000 |
1986 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py 2012-03-05 18:43:21 +0000 |
1987 | @@ -61,7 +61,7 @@ |
1988 | |
1989 | |
1990 | class AddLang(unohelper.Base, XJobExecutor ): |
1991 | - def __init__(self,sVariable="",sFields="",sDisplayName="",bFromModify=False): |
1992 | + def __init__(self, sVariable="", sFields="", sDisplayName="", bFromModify=False): |
1993 | LoginTest() |
1994 | if not loginstatus and __name__=="package": |
1995 | exit(1) |
1996 | @@ -157,7 +157,7 @@ |
1997 | ErrorDialog("Please insert user define field Field-1 or Field-4","Just go to File->Properties->User Define \nField-1 Eg. http://localhost:8069 \nOR \nField-4 Eg. account.invoice") |
1998 | self.win.endExecute() |
1999 | |
2000 | - def lstbox_selected(self,oItemEvent): |
2001 | + def lstbox_selected(self, oItemEvent): |
2002 | try: |
2003 | |
2004 | desktop=getDesktop() |
2005 | @@ -183,7 +183,7 @@ |
2006 | if self.bModify: |
2007 | self.win.setEditText("txtUName",self.sGDisplayName) |
2008 | |
2009 | - def getRes(self,sock ,sObject,sVar): |
2010 | + def getRes(self, sock, sObject, sVar): |
2011 | desktop=getDesktop() |
2012 | doc =desktop.getCurrentComponent() |
2013 | docinfo=doc.getDocumentInfo() |
2014 | @@ -203,7 +203,7 @@ |
2015 | return sObject |
2016 | |
2017 | |
2018 | - def cmbVariable_selected(self,oItemEvent): |
2019 | + def cmbVariable_selected(self, oItemEvent): |
2020 | if self.count > 0 : |
2021 | try: |
2022 | desktop=getDesktop() |
2023 | @@ -229,7 +229,7 @@ |
2024 | except: |
2025 | import traceback;traceback.print_exc() |
2026 | |
2027 | - def btnOk_clicked( self, oActionEvent ): |
2028 | + def btnOk_clicked(self, oActionEvent): |
2029 | self.bOkay = True |
2030 | desktop=getDesktop() |
2031 | doc = desktop.getCurrentComponent() |
2032 | @@ -263,7 +263,7 @@ |
2033 | else: |
2034 | ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields") |
2035 | |
2036 | - def btnCancel_clicked( self, oActionEvent ): |
2037 | + def btnCancel_clicked(self, oActionEvent): |
2038 | self.win.endExecute() |
2039 | |
2040 | |
2041 | |
2042 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py' |
2043 | --- base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py 2011-12-19 16:54:40 +0000 |
2044 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py 2012-03-05 18:43:21 +0000 |
2045 | @@ -48,7 +48,7 @@ |
2046 | if __name__<>"package": |
2047 | from gui import * |
2048 | class ErrorDialog: |
2049 | - def __init__(self,sErrorMsg, sErrorHelpMsg="",sTitle="Error Message"): |
2050 | + def __init__(self, sErrorMsg, sErrorHelpMsg="", sTitle="Error Message"): |
2051 | self.win = DBModalDialog(50, 50, 150, 90, sTitle) |
2052 | self.win.addFixedText("lblErrMsg", 5, 5, 190, 25, sErrorMsg) |
2053 | self.win.addFixedText("lblErrHelpMsg", 5, 30, 190, 25, sErrorHelpMsg) |
2054 | |
2055 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py' |
2056 | --- base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py 2011-12-19 16:54:40 +0000 |
2057 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py 2012-03-05 18:43:21 +0000 |
2058 | @@ -59,7 +59,13 @@ |
2059 | database="test" |
2060 | uid = 1 |
2061 | |
2062 | -def genTree(object,aList,insField,host,level=3, ending=[], ending_excl=[], recur=[], root='', actualroot=""): |
2063 | +def genTree(object, aList, insField, host, level=3, ending=None, ending_excl=None, recur=None, root='', actualroot=""): |
2064 | + if ending is None: |
2065 | + ending = [] |
2066 | + if ending_excl is None: |
2067 | + ending_excl = [] |
2068 | + if recur is None: |
2069 | + recur = [] |
2070 | try: |
2071 | global url |
2072 | sock=RPCSession(url) |
2073 | @@ -79,7 +85,7 @@ |
2074 | info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) |
2075 | obj.log_write('Function', LOG_ERROR, info) |
2076 | |
2077 | -def VariableScope(oTcur,insVariable,aObjectList,aComponentAdd,aItemList,sTableName=""): |
2078 | +def VariableScope(oTcur, insVariable, aObjectList, aComponentAdd, aItemList, sTableName=""): |
2079 | if sTableName.find(".") != -1: |
2080 | for i in range(len(aItemList)): |
2081 | if aComponentAdd[i]==sTableName: |
2082 | @@ -96,7 +102,7 @@ |
2083 | if aObjectList[j][:aObjectList[j].find("(")] == sLVal and sLVal!="": |
2084 | insVariable.append(aObjectList[j]) |
2085 | |
2086 | -def getList(aObjectList,host,count): |
2087 | +def getList(aObjectList, host, count): |
2088 | desktop=getDesktop() |
2089 | doc =desktop.getCurrentComponent() |
2090 | docinfo=doc.getDocumentInfo() |
2091 | @@ -128,7 +134,7 @@ |
2092 | else: |
2093 | aObjectList.append("List of " + docinfo.getUserFieldValue(3)) |
2094 | |
2095 | -def getRelation(sRelName, sItem, sObjName, aObjectList, host ): |
2096 | +def getRelation(sRelName, sItem, sObjName, aObjectList, host): |
2097 | global url |
2098 | sock=RPCSession(url) |
2099 | global passwd |
2100 | @@ -143,7 +149,7 @@ |
2101 | getRelation(res[k]['relation'], sItem[sItem.find(".")+1:], sObjName,aObjectList,host) |
2102 | |
2103 | |
2104 | -def getPath(sPath,sMain): |
2105 | +def getPath(sPath, sMain): |
2106 | desktop=getDesktop() |
2107 | doc =desktop.getCurrentComponent() |
2108 | oParEnum = doc.getTextFields().createEnumeration() |
2109 | @@ -161,7 +167,7 @@ |
2110 | getPath(sPath, sMain) |
2111 | return sPath |
2112 | |
2113 | -def EnumDocument(aItemList,aComponentAdd): |
2114 | +def EnumDocument(aItemList, aComponentAdd): |
2115 | desktop = getDesktop() |
2116 | parent="" |
2117 | bFlag = False |
2118 | @@ -183,7 +189,7 @@ |
2119 | aItemList.append( templist ) |
2120 | aComponentAdd.append( parent ) |
2121 | |
2122 | -def getChildTable(oPar,aItemList,aComponentAdd,sTableName=""): |
2123 | +def getChildTable(oPar, aItemList, aComponentAdd, sTableName=""): |
2124 | sNames = oPar.getCellNames() |
2125 | bEmptyTableFlag=True |
2126 | for val in sNames: |
2127 | @@ -229,7 +235,7 @@ |
2128 | aComponentAdd.append(sTableName+"."+oPar.Name) |
2129 | return 0 |
2130 | |
2131 | -def getRecersiveSection(oCurrentSection,aSectionList): |
2132 | +def getRecersiveSection(oCurrentSection, aSectionList): |
2133 | desktop=getDesktop() |
2134 | doc =desktop.getCurrentComponent() |
2135 | oParEnum=doc.getText().createEnumeration() |
2136 | |
2137 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py' |
2138 | --- base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py 2011-12-19 16:54:40 +0000 |
2139 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py 2012-03-05 18:43:21 +0000 |
2140 | @@ -39,7 +39,7 @@ |
2141 | logger.setLevel(logging.INFO) |
2142 | |
2143 | class Logger(object): |
2144 | - def log_write(self,name,level,msg): |
2145 | + def log_write(self, name, level, msg): |
2146 | log = logging.getLogger(name) |
2147 | getattr(log,level)(msg) |
2148 | |
2149 | |
2150 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py' |
2151 | --- base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py 2011-12-19 16:54:40 +0000 |
2152 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py 2012-03-05 18:43:21 +0000 |
2153 | @@ -52,7 +52,7 @@ |
2154 | |
2155 | |
2156 | class RPCSession(object): |
2157 | - def __init__(self,url): |
2158 | + def __init__(self, url): |
2159 | |
2160 | m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '') |
2161 | |
2162 | @@ -152,7 +152,7 @@ |
2163 | |
2164 | return res |
2165 | |
2166 | - def execute(self, sDatabase,UID,sPassword,obj, method, *args): |
2167 | + def execute(self, sDatabase, UID, sPassword, obj, method, *args): |
2168 | global rpc_url |
2169 | |
2170 | sock = xmlrpclib.ServerProxy(rpc_url + 'object') |
2171 | |
2172 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py' |
2173 | --- base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py 2011-12-19 16:54:40 +0000 |
2174 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py 2012-03-05 18:43:21 +0000 |
2175 | @@ -21,19 +21,19 @@ |
2176 | ############################################################################## |
2177 | import urllib |
2178 | |
2179 | -def get_absolute_file_path( url ): |
2180 | +def get_absolute_file_path(url): |
2181 | url_unquoted = urllib.unquote(url) |
2182 | return os.name == 'nt' and url_unquoted[1:] or url_unquoted |
2183 | |
2184 | # This function reads the content of a file and return it to the caller |
2185 | -def read_data_from_file( filename ): |
2186 | +def read_data_from_file(filename): |
2187 | fp = file( filename, "rb" ) |
2188 | data = fp.read() |
2189 | fp.close() |
2190 | return data |
2191 | |
2192 | # This function writes the content to a file |
2193 | -def write_data_to_file( filename, data ): |
2194 | +def write_data_to_file(filename, data): |
2195 | fp = file( filename, 'wb' ) |
2196 | fp.write( data ) |
2197 | fp.close() |
2198 | |
2199 | === modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/modify.py' |
2200 | --- base_report_designer/plugin/openerp_report_designer/bin/script/modify.py 2011-12-19 16:54:40 +0000 |
2201 | +++ base_report_designer/plugin/openerp_report_designer/bin/script/modify.py 2012-03-05 18:43:21 +0000 |
2202 | @@ -61,7 +61,7 @@ |
2203 | uid = 3 |
2204 | |
2205 | class modify(unohelper.Base, XJobExecutor ): |
2206 | - def __init__( self, ctx ): |
2207 | + def __init__(self, ctx): |
2208 | self.ctx = ctx |
2209 | self.module = "openerp_report" |
2210 | self.version = "0.1" |
2211 | |
2212 | === modified file 'base_report_designer/plugin/openerp_report_designer/test/test_fields.py' |
2213 | --- base_report_designer/plugin/openerp_report_designer/test/test_fields.py 2011-12-19 16:54:40 +0000 |
2214 | +++ base_report_designer/plugin/openerp_report_designer/test/test_fields.py 2012-03-05 18:43:21 +0000 |
2215 | @@ -10,7 +10,11 @@ |
2216 | |
2217 | sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object') |
2218 | |
2219 | -def get(object, level=3, ending=[], ending_excl=[], recur=[], root=''): |
2220 | +def get(object, level=3, ending=None, ending_excl=None, recur=None, root=''): |
2221 | + if ending is None: |
2222 | + ending = [] |
2223 | + if ending_excl is None: |
2224 | + ending_excl = [] |
2225 | res = sock.execute('terp', 3, 'admin', 'account.invoice', 'fields_get') |
2226 | key = res.keys() |
2227 | key.sort() |
2228 | |
2229 | === modified file 'base_setup/base_setup.py' |
2230 | --- base_setup/base_setup.py 2011-12-19 16:54:40 +0000 |
2231 | +++ base_setup/base_setup.py 2012-03-05 18:43:21 +0000 |
2232 | @@ -84,7 +84,7 @@ |
2233 | res = [(r['code'], r['name']) for r in res] |
2234 | return res |
2235 | |
2236 | -def _tz_get(self,cr,uid, context=None): |
2237 | +def _tz_get(self, cr, uid, context=None): |
2238 | return [(x, x) for x in pytz.all_timezones] |
2239 | |
2240 | class user_preferences_config(osv.osv_memory): |
2241 | |
2242 | === modified file 'base_synchro/base_synchro_obj.py' |
2243 | --- base_synchro/base_synchro_obj.py 2012-02-28 11:16:26 +0000 |
2244 | +++ base_synchro/base_synchro_obj.py 2012-03-05 18:43:21 +0000 |
2245 | @@ -65,10 +65,12 @@ |
2246 | # Return a list of changes: [ (date, id) ] |
2247 | # |
2248 | |
2249 | - def get_ids(self, cr, uid, object, dt, domain=[], context=None): |
2250 | - return self._get_ids(cr, uid, object, dt, domain, context=context) |
2251 | + def get_ids(self, cr, uid, object, dt, domain=None, context=None): |
2252 | + return self._get_ids(cr, uid, object, dt, domain=domain, context=context) |
2253 | |
2254 | - def _get_ids(self, cr, uid, object, dt, domain=[], context=None): |
2255 | + def _get_ids(self, cr, uid, object, dt, domain=None, context=None): |
2256 | + if domain is None: |
2257 | + domain = [] |
2258 | result = [] |
2259 | if dt: |
2260 | domain2 = domain+[('write_date','>=',dt)] |
2261 | |
2262 | === modified file 'base_vat/__init__.py' |
2263 | --- base_vat/__init__.py 2011-12-19 16:54:40 +0000 |
2264 | +++ base_vat/__init__.py 2012-03-05 18:43:21 +0000 |
2265 | @@ -22,4 +22,4 @@ |
2266 | import res_company |
2267 | import base_vat |
2268 | |
2269 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2270 | \ No newline at end of file |
2271 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2272 | |
2273 | === modified file 'base_vat/res_company.py' |
2274 | --- base_vat/res_company.py 2011-11-28 16:40:14 +0000 |
2275 | +++ base_vat/res_company.py 2012-03-05 18:43:21 +0000 |
2276 | @@ -29,4 +29,4 @@ |
2277 | "rather than via a simple format validation (checksum)."), |
2278 | } |
2279 | |
2280 | - |
2281 | \ No newline at end of file |
2282 | + |
2283 | |
2284 | === modified file 'caldav/caldav_node.py' |
2285 | --- caldav/caldav_node.py 2011-10-27 21:11:24 +0000 |
2286 | +++ caldav/caldav_node.py 2012-03-05 18:43:21 +0000 |
2287 | @@ -42,7 +42,7 @@ |
2288 | DAV_M_NS = dict_merge2(nodes.node_dir.DAV_M_NS, |
2289 | { "http://calendarserver.org/ns/" : '_get_dav', } ) |
2290 | |
2291 | - def _file_get(self,cr, nodename=False): |
2292 | + def _file_get(self, cr, nodename=False): |
2293 | return [] |
2294 | |
2295 | def _child_get(self, cr, name=False, parent_id=False, domain=None): |
2296 | @@ -99,7 +99,7 @@ |
2297 | DAV_M_NS = dict_merge2(nodes.node_res_obj.DAV_M_NS, |
2298 | { "http://calendarserver.org/ns/" : '_get_dav', } ) |
2299 | |
2300 | - def _file_get(self,cr, nodename=False): |
2301 | + def _file_get(self, cr, nodename=False): |
2302 | return [] |
2303 | |
2304 | def _child_get(self, cr, name=False, parent_id=False, domain=None): |
2305 | @@ -180,7 +180,7 @@ |
2306 | |
2307 | http_options = { 'DAV': ['calendar-access'] } |
2308 | |
2309 | - def __init__(self,path, parent, context, calendar): |
2310 | + def __init__(self, path, parent, context, calendar): |
2311 | super(node_calendar,self).__init__(path, parent,context) |
2312 | self.calendar_id = calendar.id |
2313 | self.mimetype = 'application/x-directory' |
2314 | @@ -271,7 +271,7 @@ |
2315 | def children(self, cr, domain=None): |
2316 | return self._child_get(cr, domain=domain) |
2317 | |
2318 | - def child(self,cr, name, domain=None): |
2319 | + def child(self, cr, name, domain=None): |
2320 | res = self._child_get(cr, name, domain=domain) |
2321 | if res: |
2322 | return res[0] |
2323 | @@ -353,16 +353,16 @@ |
2324 | return None |
2325 | |
2326 | |
2327 | - def set_data(self, cr, data, fil_obj = None): |
2328 | + def set_data(self, cr, data, fil_obj=None): |
2329 | uid = self.context.uid |
2330 | calendar_obj = self.context._dirobj.pool.get('basic.calendar') |
2331 | res = calendar_obj.import_cal(cr, uid, data, self.calendar_id) |
2332 | return res |
2333 | |
2334 | - def get_data_len(self, cr, fil_obj = None): |
2335 | + def get_data_len(self, cr, fil_obj=None): |
2336 | return self.content_length |
2337 | |
2338 | - def _get_ttag(self,cr): |
2339 | + def _get_ttag(self, cr): |
2340 | return 'calendar-%d' % (self.calendar_id,) |
2341 | |
2342 | def rmcol(self, cr): |
2343 | @@ -441,7 +441,7 @@ |
2344 | |
2345 | http_options = { 'DAV': ['calendar-access'] } |
2346 | |
2347 | - def __init__(self,path, parent, context, res_obj, res_model=None, res_id=None): |
2348 | + def __init__(self, path, parent, context, res_obj, res_model=None, res_id=None): |
2349 | super(res_node_calendar,self).__init__(path, parent, context) |
2350 | self.mimetype = 'text/calendar' |
2351 | self.create_date = parent.create_date |
2352 | @@ -474,10 +474,10 @@ |
2353 | def _get_caldav_calendar_data(self, cr): |
2354 | return self.get_data(cr) |
2355 | |
2356 | - def get_data_len(self, cr, fil_obj = None): |
2357 | + def get_data_len(self, cr, fil_obj=None): |
2358 | return self.content_length |
2359 | |
2360 | - def set_data(self, cr, data, fil_obj = None): |
2361 | + def set_data(self, cr, data, fil_obj=None): |
2362 | uid = self.context.uid |
2363 | context = self.context.context.copy() |
2364 | context.update(self.dctx) |
2365 | @@ -486,7 +486,7 @@ |
2366 | res = calendar_obj.import_cal(cr, uid, data, self.calendar_id, context=context) |
2367 | return res |
2368 | |
2369 | - def _get_ttag(self,cr): |
2370 | + def _get_ttag(self, cr): |
2371 | res = False |
2372 | if self.model and self.res_id: |
2373 | res = '%s_%d' % (self.model, self.res_id) |
2374 | |
2375 | === modified file 'crm/crm.py' |
2376 | --- crm/crm.py 2011-12-31 07:57:20 +0000 |
2377 | +++ crm/crm.py 2012-03-05 18:43:21 +0000 |
2378 | @@ -331,7 +331,9 @@ |
2379 | And object that inherit (orm inheritance) from a class the overwrite copy |
2380 | """ |
2381 | |
2382 | - def stage_find(self, cr, uid, section_id, domain=[], order='sequence'): |
2383 | + def stage_find(self, cr, uid, section_id, domain=None, order='sequence'): |
2384 | + if domain is None: |
2385 | + domain = [] |
2386 | domain = list(domain) |
2387 | if section_id: |
2388 | domain.append(('section_ids', '=', section_id)) |
2389 | |
2390 | === modified file 'crm/crm_lead.py' |
2391 | --- crm/crm_lead.py 2012-01-31 13:36:57 +0000 |
2392 | +++ crm/crm_lead.py 2012-03-05 18:43:21 +0000 |
2393 | @@ -239,7 +239,7 @@ |
2394 | def on_change_optout(self, cr, uid, ids, optout): |
2395 | return {'value':{'optout':optout,'optin':False}} |
2396 | |
2397 | - def onchange_stage_id(self, cr, uid, ids, stage_id, context={}): |
2398 | + def onchange_stage_id(self, cr, uid, ids, stage_id, context=None): |
2399 | if not stage_id: |
2400 | return {'value':{}} |
2401 | stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context) |
2402 | |
2403 | === modified file 'crm_claim/crm_claim.py' |
2404 | --- crm_claim/crm_claim.py 2011-12-21 22:15:04 +0000 |
2405 | +++ crm_claim/crm_claim.py 2012-03-05 18:43:21 +0000 |
2406 | @@ -157,7 +157,7 @@ |
2407 | self.write(cr, uid, [res_id], vals, context=context) |
2408 | return res_id |
2409 | |
2410 | - def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None): |
2411 | + def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None): |
2412 | if isinstance(ids, (str, int, long)): |
2413 | ids = [ids] |
2414 | |
2415 | |
2416 | === modified file 'crm_helpdesk/crm_helpdesk.py' |
2417 | --- crm_helpdesk/crm_helpdesk.py 2011-10-16 01:28:00 +0000 |
2418 | +++ crm_helpdesk/crm_helpdesk.py 2012-03-05 18:43:21 +0000 |
2419 | @@ -112,7 +112,7 @@ |
2420 | self.write(cr, uid, [res_id], vals, context) |
2421 | return res_id |
2422 | |
2423 | - def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None): |
2424 | + def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None): |
2425 | if isinstance(ids, (str, int, long)): |
2426 | ids = [ids] |
2427 | |
2428 | |
2429 | === modified file 'crm_profiling/crm_profiling.py' |
2430 | --- crm_profiling/crm_profiling.py 2011-12-19 16:54:40 +0000 |
2431 | +++ crm_profiling/crm_profiling.py 2012-03-05 18:43:21 +0000 |
2432 | @@ -77,7 +77,7 @@ |
2433 | return ids_to_check |
2434 | |
2435 | |
2436 | -def test_prof(cr, uid, seg_id, pid, answers_ids = []): |
2437 | +def test_prof(cr, uid, seg_id, pid, answers_ids=None): |
2438 | |
2439 | """ return True if the partner pid fetch the segmentation rule seg_id |
2440 | @param cr: the current row, from the database cursor, |
2441 | |
2442 | === modified file 'delivery/wizard/delivery_sale_order.py' |
2443 | --- delivery/wizard/delivery_sale_order.py 2012-02-13 15:27:55 +0000 |
2444 | +++ delivery/wizard/delivery_sale_order.py 2012-03-05 18:43:21 +0000 |
2445 | @@ -44,7 +44,7 @@ |
2446 | |
2447 | return res |
2448 | |
2449 | - def view_init(self, cr , uid , fields, context=None): |
2450 | + def view_init(self, cr, uid, fields, context=None): |
2451 | if context is None: |
2452 | context = {} |
2453 | order_obj = self.pool.get('sale.order') |
2454 | |
2455 | === modified file 'document/content_index.py' |
2456 | --- document/content_index.py 2011-12-31 07:57:20 +0000 |
2457 | +++ document/content_index.py 2012-03-05 18:43:21 +0000 |
2458 | @@ -51,7 +51,7 @@ |
2459 | return mts[0] |
2460 | return None |
2461 | |
2462 | - def indexContent(self, content, filename=None, realfile = None): |
2463 | + def indexContent(self, content, filename=None, realfile=None): |
2464 | """ Use either content or the real file, to index. |
2465 | Some parsers will work better with the actual |
2466 | content, others parse a file easier. Try the |
2467 | @@ -95,10 +95,10 @@ |
2468 | |
2469 | raise NhException('No appropriate method to index file') |
2470 | |
2471 | - def _doIndexContent(self,content): |
2472 | + def _doIndexContent(self, content): |
2473 | raise NhException("Content not handled here") |
2474 | |
2475 | - def _doIndexFile(self,fpath): |
2476 | + def _doIndexFile(self, fpath): |
2477 | raise NhException("Content not handled here") |
2478 | |
2479 | def __repr__(self): |
2480 | @@ -136,7 +136,7 @@ |
2481 | if not f: |
2482 | raise Exception("Your indexer should at least suport a mimetype or extension") |
2483 | |
2484 | - def doIndex(self, content, filename=None, content_type=None, realfname = None, debug=False): |
2485 | + def doIndex(self, content, filename=None, content_type=None, realfname=None, debug=False): |
2486 | fobj = None |
2487 | fname = None |
2488 | mime = None |
2489 | |
2490 | === modified file 'document/document.py' |
2491 | --- document/document.py 2011-12-19 16:54:40 +0000 |
2492 | +++ document/document.py 2012-03-05 18:43:21 +0000 |
2493 | @@ -146,7 +146,7 @@ |
2494 | _sql_constraints = [ |
2495 | # filename_uniq is not possible in pure SQL |
2496 | ] |
2497 | - def _check_duplication(self, cr, uid, vals, ids=[], op='create'): |
2498 | + def _check_duplication(self, cr, uid, vals, ids=None, op='create'): |
2499 | name = vals.get('name', False) |
2500 | parent_id = vals.get('parent_id', False) |
2501 | res_model = vals.get('res_model', False) |
2502 | |
2503 | === modified file 'document/document_directory.py' |
2504 | --- document/document_directory.py 2011-12-19 16:54:40 +0000 |
2505 | +++ document/document_directory.py 2012-03-05 18:43:21 +0000 |
2506 | @@ -69,7 +69,7 @@ |
2507 | } |
2508 | |
2509 | |
2510 | - def _get_root_directory(self, cr,uid, context=None): |
2511 | + def _get_root_directory(self, cr, uid, context=None): |
2512 | objid=self.pool.get('ir.model.data') |
2513 | try: |
2514 | mid = objid._get_id(cr, uid, 'document', 'dir_root') |
2515 | @@ -224,7 +224,7 @@ |
2516 | pass |
2517 | return res |
2518 | |
2519 | - def _locate_child(self, cr, uid, root_id, uri,nparent, ncontext): |
2520 | + def _locate_child(self, cr, uid, root_id, uri, nparent, ncontext): |
2521 | """ try to locate the node in uri, |
2522 | Return a tuple (node_dir, remaining_path) |
2523 | """ |
2524 | @@ -237,7 +237,7 @@ |
2525 | default.update({'name': name+ " (copy)"}) |
2526 | return super(document_directory,self).copy(cr, uid, id, default, context=context) |
2527 | |
2528 | - def _check_duplication(self, cr, uid, vals, ids=[], op='create'): |
2529 | + def _check_duplication(self, cr, uid, vals, ids=None, op='create'): |
2530 | name=vals.get('name',False) |
2531 | parent_id=vals.get('parent_id',False) |
2532 | ressource_parent_type_id=vals.get('ressource_parent_type_id',False) |
2533 | |
2534 | === modified file 'document/nodes.py' |
2535 | --- document/nodes.py 2011-12-19 16:54:40 +0000 |
2536 | +++ document/nodes.py 2012-03-05 18:43:21 +0000 |
2537 | @@ -104,7 +104,7 @@ |
2538 | def get(self, name, default=None): |
2539 | return self.context.get(name, default) |
2540 | |
2541 | - def get_uri(self, cr, uri): |
2542 | + def get_uri(self, cr, uri): |
2543 | """ Although this fn passes back to doc.dir, it is needed since |
2544 | it is a potential caching point. |
2545 | """ |
2546 | @@ -253,7 +253,7 @@ |
2547 | print "node_class.children()" |
2548 | return [] #stub |
2549 | |
2550 | - def child(self,cr, name, domain=None): |
2551 | + def child(self, cr, name, domain=None): |
2552 | print "node_class.child()" |
2553 | return None |
2554 | |
2555 | @@ -271,7 +271,7 @@ |
2556 | print "node_class.path_get()" |
2557 | return False |
2558 | |
2559 | - def get_data(self,cr): |
2560 | + def get_data(self, cr): |
2561 | raise TypeError('no data for %s'% self.type) |
2562 | |
2563 | def open_data(self, cr, mode): |
2564 | @@ -288,10 +288,10 @@ |
2565 | """ |
2566 | raise TypeError('no data for %s' % self.type) |
2567 | |
2568 | - def _get_storage(self,cr): |
2569 | + def _get_storage(self, cr): |
2570 | raise RuntimeError("no storage for base class") |
2571 | |
2572 | - def get_etag(self,cr): |
2573 | + def get_etag(self, cr): |
2574 | """ Get a tag, unique per object + modification. |
2575 | |
2576 | see. http://tools.ietf.org/html/rfc2616#section-13.3.3 """ |
2577 | @@ -435,7 +435,9 @@ |
2578 | |
2579 | """ |
2580 | our_type = 'database' |
2581 | - def __init__(self, path=[], parent=False, context=None): |
2582 | + def __init__(self, path=None, parent=False, context=None): |
2583 | + if path is None: |
2584 | + path = [] |
2585 | super(node_database,self).__init__(path, parent, context) |
2586 | self.unixperms = 040750 |
2587 | self.uidperms = 5 |
2588 | @@ -478,11 +480,11 @@ |
2589 | |
2590 | return res |
2591 | |
2592 | - def _file_get(self,cr, nodename=False): |
2593 | + def _file_get(self, cr, nodename=False): |
2594 | res = [] |
2595 | return res |
2596 | |
2597 | - def _get_ttag(self,cr): |
2598 | + def _get_ttag(self, cr): |
2599 | return 'db-%s' % cr.dbname |
2600 | |
2601 | def mkdosname(company_name, default='noname'): |
2602 | @@ -694,7 +696,7 @@ |
2603 | fnode.set_data(cr, data, fil) |
2604 | return fnode |
2605 | |
2606 | - def _get_ttag(self,cr): |
2607 | + def _get_ttag(self, cr): |
2608 | return 'dir-%d' % self.dir_id |
2609 | |
2610 | def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): |
2611 | @@ -803,7 +805,7 @@ |
2612 | def children(self, cr, domain=None): |
2613 | return self._child_get(cr, domain=domain) |
2614 | |
2615 | - def child(self,cr, name, domain=None): |
2616 | + def child(self, cr, name, domain=None): |
2617 | res = self._child_get(cr, name, domain=domain) |
2618 | if res: |
2619 | return res[0] |
2620 | @@ -879,7 +881,7 @@ |
2621 | res.append(self.res_obj_class(res_name, self.dir_id, self, self.context, self.res_model, bo)) |
2622 | return res |
2623 | |
2624 | - def _get_ttag(self,cr): |
2625 | + def _get_ttag(self, cr): |
2626 | return 'rdir-%d' % self.dir_id |
2627 | |
2628 | class node_res_obj(node_class): |
2629 | @@ -890,7 +892,7 @@ |
2630 | node_dirs (with limited domain). |
2631 | """ |
2632 | our_type = 'collection' |
2633 | - def __init__(self, path, dir_id, parent, context, res_model, res_bo, res_id = None): |
2634 | + def __init__(self, path, dir_id, parent, context, res_model, res_bo, res_id=None): |
2635 | super(node_res_obj,self).__init__(path, parent,context) |
2636 | assert parent |
2637 | #todo: more info from dirr |
2638 | @@ -959,7 +961,7 @@ |
2639 | return res[0] |
2640 | return None |
2641 | |
2642 | - def _file_get(self,cr, nodename=False): |
2643 | + def _file_get(self, cr, nodename=False): |
2644 | res = [] |
2645 | is_allowed = self.check_perms((nodename and 1) or 5) |
2646 | if not is_allowed: |
2647 | @@ -1161,7 +1163,7 @@ |
2648 | fnode.set_data(cr, data, fil) |
2649 | return fnode |
2650 | |
2651 | - def _get_ttag(self,cr): |
2652 | + def _get_ttag(self, cr): |
2653 | return 'rodir-%d-%d' % (self.dir_id, self.res_id) |
2654 | |
2655 | node_res_dir.res_obj_class = node_res_obj |
2656 | @@ -1263,7 +1265,7 @@ |
2657 | else: |
2658 | self.path = dirpath[0] |
2659 | |
2660 | - def get_data(self, cr, fil_obj = None): |
2661 | + def get_data(self, cr, fil_obj=None): |
2662 | """ Retrieve the data for some file. |
2663 | fil_obj may optionally be specified, and should be a browse object |
2664 | for the file. This is useful when the caller has already initiated |
2665 | @@ -1279,14 +1281,14 @@ |
2666 | stobj = self.context._dirobj.pool.get('document.storage') |
2667 | return stobj.get_data(cr, self.context.uid,stor, self,self.context.context, fil_obj) |
2668 | |
2669 | - def get_data_len(self, cr, fil_obj = None): |
2670 | + def get_data_len(self, cr, fil_obj=None): |
2671 | # TODO: verify with the storage object! |
2672 | bin_size = self.context.context.get('bin_size', False) |
2673 | if bin_size and not self.content_length: |
2674 | self.content_length = fil_obj.db_datas |
2675 | return self.content_length |
2676 | |
2677 | - def set_data(self, cr, data, fil_obj = None): |
2678 | + def set_data(self, cr, data, fil_obj=None): |
2679 | """ Store data at some file. |
2680 | fil_obj may optionally be specified, and should be a browse object |
2681 | for the file. This is useful when the caller has already initiated |
2682 | @@ -1300,7 +1302,7 @@ |
2683 | stobj = self.context._dirobj.pool.get('document.storage') |
2684 | return stobj.set_data(cr, self.context.uid,stor, self, data, self.context.context, fil_obj) |
2685 | |
2686 | - def _get_ttag(self,cr): |
2687 | + def _get_ttag(self, cr): |
2688 | return 'file-%d' % self.file_id |
2689 | |
2690 | def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): |
2691 | @@ -1363,7 +1365,7 @@ |
2692 | |
2693 | class node_content(node_class): |
2694 | our_type = 'content' |
2695 | - def __init__(self, path, parent, context, cnt, dctx = None, act_id=None): |
2696 | + def __init__(self, path, parent, context, cnt, dctx=None, act_id=None): |
2697 | super(node_content,self).__init__(path, parent,context) |
2698 | self.cnt_id = cnt.id |
2699 | self.create_date = False |
2700 | @@ -1383,7 +1385,7 @@ |
2701 | self.dctx.update(dctx) |
2702 | self.act_id = act_id |
2703 | |
2704 | - def fill_fields(self, cr, dctx = None): |
2705 | + def fill_fields(self, cr, dctx=None): |
2706 | """ Try to read the object and fill missing fields, like mimetype, |
2707 | dates etc. |
2708 | This function must be different from the constructor, because |
2709 | @@ -1397,7 +1399,7 @@ |
2710 | self.mimetype = str(res[0][0]) |
2711 | |
2712 | |
2713 | - def get_data(self, cr, fil_obj = None): |
2714 | + def get_data(self, cr, fil_obj=None): |
2715 | cntobj = self.context._dirobj.pool.get('document.directory.content') |
2716 | if not self.check_perms(4): |
2717 | raise IOError(errno.EPERM, "Permission denied") |
2718 | @@ -1427,7 +1429,7 @@ |
2719 | |
2720 | return nodefd_content(self, cr, mode, ctx) |
2721 | |
2722 | - def get_data_len(self, cr, fil_obj = None): |
2723 | + def get_data_len(self, cr, fil_obj=None): |
2724 | # FIXME : here, we actually generate the content twice!! |
2725 | # we should have cached the generated content, but it is |
2726 | # not advisable to do keep it in memory, until we have a cache |
2727 | @@ -1436,7 +1438,7 @@ |
2728 | self.get_data(cr,fil_obj) |
2729 | return self.content_length |
2730 | |
2731 | - def set_data(self, cr, data, fil_obj = None): |
2732 | + def set_data(self, cr, data, fil_obj=None): |
2733 | cntobj = self.context._dirobj.pool.get('document.directory.content') |
2734 | if not self.check_perms(2): |
2735 | raise IOError(errno.EPERM, "Permission denied") |
2736 | @@ -1445,7 +1447,7 @@ |
2737 | ctx.update(self.dctx) |
2738 | return cntobj.process_write(cr, self.context.uid, self, data, ctx) |
2739 | |
2740 | - def _get_ttag(self,cr): |
2741 | + def _get_ttag(self, cr): |
2742 | return 'cnt-%d%s' % (self.cnt_id,(self.act_id and ('-' + str(self.act_id))) or '') |
2743 | |
2744 | def get_dav_resourcetype(self, cr): |
2745 | |
2746 | === modified file 'document/odt2txt.py' (properties changed: +x to -x) |
2747 | --- document/odt2txt.py 2011-09-22 09:55:31 +0000 |
2748 | +++ document/odt2txt.py 2012-03-05 18:43:21 +0000 |
2749 | @@ -24,11 +24,11 @@ |
2750 | import StringIO |
2751 | |
2752 | class OpenDocumentTextFile : |
2753 | - def __init__ (self, filepath) : |
2754 | + def __init__ (self, filepath): |
2755 | zip = zipfile.ZipFile(filepath) |
2756 | self.content = xml.dom.minidom.parseString(zip.read("content.xml")) |
2757 | |
2758 | - def toString (self) : |
2759 | + def toString (self): |
2760 | """ Converts the document to a string. """ |
2761 | buffer = u"" |
2762 | for val in ["text:p", "text:h", "text:list"]: |
2763 | @@ -36,7 +36,7 @@ |
2764 | buffer += self.textToString(paragraph) + "\n" |
2765 | return buffer |
2766 | |
2767 | - def textToString(self, element) : |
2768 | + def textToString(self, element): |
2769 | buffer = u"" |
2770 | for node in element.childNodes : |
2771 | if node.nodeType == xml.dom.Node.TEXT_NODE : |
2772 | |
2773 | === modified file 'document/std_index.py' |
2774 | --- document/std_index.py 2011-12-19 16:54:40 +0000 |
2775 | +++ document/std_index.py 2012-03-05 18:43:21 +0000 |
2776 | @@ -38,7 +38,7 @@ |
2777 | except UnicodeError: |
2778 | return s |
2779 | |
2780 | -def textToString(element) : |
2781 | +def textToString(element): |
2782 | buffer = u"" |
2783 | for node in element.childNodes : |
2784 | if node.nodeType == xml.dom.Node.TEXT_NODE : |
2785 | @@ -55,7 +55,7 @@ |
2786 | def _getExtensions(self): |
2787 | return ['.txt', '.py'] |
2788 | |
2789 | - def _doIndexContent(self,content): |
2790 | + def _doIndexContent(self, content): |
2791 | return content |
2792 | |
2793 | cntIndex.register(TxtIndex()) |
2794 | @@ -67,7 +67,7 @@ |
2795 | def _getExtensions(self): |
2796 | return ['.pptx'] |
2797 | |
2798 | - def _doIndexFile(self,fname): |
2799 | + def _doIndexFile(self, fname): |
2800 | def toString () : |
2801 | """ Converts the document to a string. """ |
2802 | buffer = u"" |
2803 | @@ -95,7 +95,7 @@ |
2804 | def _getExtensions(self): |
2805 | return ['.doc'] |
2806 | |
2807 | - def _doIndexFile(self,fname): |
2808 | + def _doIndexFile(self, fname): |
2809 | try: |
2810 | pop = Popen(['antiword', fname], shell=False, stdout=PIPE) |
2811 | (data, _) = pop.communicate() |
2812 | @@ -115,7 +115,7 @@ |
2813 | def _getExtensions(self): |
2814 | return ['.docx'] |
2815 | |
2816 | - def _doIndexFile(self,fname): |
2817 | + def _doIndexFile(self, fname): |
2818 | zip = zipfile.ZipFile(fname) |
2819 | content = xml.dom.minidom.parseString(zip.read("word/document.xml")) |
2820 | def toString () : |
2821 | @@ -140,7 +140,7 @@ |
2822 | def _getExtensions(self): |
2823 | return ['.xlsx'] |
2824 | |
2825 | - def _doIndexFile(self,fname): |
2826 | + def _doIndexFile(self, fname): |
2827 | zip = zipfile.ZipFile(fname) |
2828 | content = xml.dom.minidom.parseString(zip.read("xl/sharedStrings.xml")) |
2829 | def toString () : |
2830 | @@ -164,7 +164,7 @@ |
2831 | def _getExtensions(self): |
2832 | return ['.pdf'] |
2833 | |
2834 | - def _doIndexFile(self,fname): |
2835 | + def _doIndexFile(self, fname): |
2836 | pop = Popen(['pdftotext', '-enc', 'UTF-8', '-nopgbrk', fname, '-'], shell=False, stdout=PIPE) |
2837 | (data, _) = pop.communicate() |
2838 | return _to_unicode(data) |
2839 | @@ -180,7 +180,7 @@ |
2840 | return [] |
2841 | #return ['.png','.jpg','.gif','.jpeg','.bmp','.tiff'] |
2842 | |
2843 | - def _doIndexContent(self,content): |
2844 | + def _doIndexContent(self, content): |
2845 | return 'image' |
2846 | |
2847 | |
2848 | |
2849 | === modified file 'document_webdav/document_webdav.py' |
2850 | --- document_webdav/document_webdav.py 2011-12-19 16:54:40 +0000 |
2851 | +++ document_webdav/document_webdav.py 2012-03-05 18:43:21 +0000 |
2852 | @@ -57,7 +57,7 @@ |
2853 | # TODO group |
2854 | return |
2855 | |
2856 | - def _locate_child(self, cr, uid, root_id, uri,nparent, ncontext): |
2857 | + def _locate_child(self, cr, uid, root_id, uri, nparent, ncontext): |
2858 | """ try to locate the node in uri, |
2859 | Return a tuple (node_dir, remaining_path) |
2860 | """ |
2861 | |
2862 | === modified file 'document_webdav/redirect.py' |
2863 | --- document_webdav/redirect.py 2011-12-19 16:54:40 +0000 |
2864 | +++ document_webdav/redirect.py 2012-03-05 18:43:21 +0000 |
2865 | @@ -30,7 +30,7 @@ |
2866 | _HTTP_OPTIONS = { 'Allow': ['OPTIONS', 'GET', 'HEAD', 'PROPFIND'] } |
2867 | redirect_paths = {} |
2868 | |
2869 | - def __init__(self,request, client_address, server): |
2870 | + def __init__(self, request, client_address, server): |
2871 | HTTPHandler.__init__(self,request,client_address,server) |
2872 | |
2873 | def send_head(self): |
2874 | |
2875 | === modified file 'document_webdav/test_davclient.py' (properties changed: +x to -x) |
2876 | --- document_webdav/test_davclient.py 2011-12-19 16:54:40 +0000 |
2877 | +++ document_webdav/test_davclient.py 2012-03-05 18:43:21 +0000 |
2878 | @@ -682,7 +682,7 @@ |
2879 | assert d2 == d, "Data does not match" |
2880 | return ctype, rrange, d |
2881 | |
2882 | - def gd_put(self, path, body=None, srcpath=None, mime=None, noclobber=False, ): |
2883 | + def gd_put(self, path, body=None, srcpath=None, mime=None, noclobber=False): |
2884 | """ HTTP PUT |
2885 | @param noclobber will prevent overwritting a resource (If-None-Match) |
2886 | @param mime will set the content-type |
2887 | |
2888 | === modified file 'document_webdav/webdav.py' |
2889 | --- document_webdav/webdav.py 2011-12-19 16:54:40 +0000 |
2890 | +++ document_webdav/webdav.py 2012-03-05 18:43:21 +0000 |
2891 | @@ -236,7 +236,7 @@ |
2892 | return re |
2893 | |
2894 | |
2895 | -def mk_propname_response(self,uri,propnames,doc): |
2896 | +def mk_propname_response(self, uri, propnames, doc): |
2897 | """ make a new <prop> result element for a PROPNAME request |
2898 | |
2899 | This will simply format the propnames list. |
2900 | |
2901 | === modified file 'document_webdav/webdav_server.py' |
2902 | --- document_webdav/webdav_server.py 2012-02-09 09:06:22 +0000 |
2903 | +++ document_webdav/webdav_server.py 2012-03-05 18:43:21 +0000 |
2904 | @@ -81,7 +81,7 @@ |
2905 | 'DELETE', 'TRACE', 'REPORT', ] |
2906 | } |
2907 | |
2908 | - def get_userinfo(self,user,pw): |
2909 | + def get_userinfo(self, user, pw): |
2910 | return False |
2911 | |
2912 | def _log(self, message): |
2913 | @@ -167,7 +167,7 @@ |
2914 | self.close_connection = 1 |
2915 | DAVRequestHandler.send_header(self, key, value) |
2916 | |
2917 | - def send_body(self, DATA, code = None, msg = None, desc = None, ctype='application/octet-stream', headers=None): |
2918 | + def send_body(self, DATA, code=None, msg=None, desc=None, ctype='application/octet-stream', headers=None): |
2919 | if headers and 'Connection' in headers: |
2920 | pass |
2921 | elif self.request_version in ('HTTP/1.0', 'HTTP/0.9'): |
2922 | @@ -441,10 +441,10 @@ |
2923 | def __init__(self, parent): |
2924 | self.parent = parent |
2925 | |
2926 | - def get_propnames(self,uri): |
2927 | + def get_propnames(self, uri): |
2928 | return self.PROPS |
2929 | |
2930 | - def get_prop(self,uri,ns,propname): |
2931 | + def get_prop(self, uri, ns, propname): |
2932 | if self.M_NS.has_key(ns): |
2933 | prefix=self.M_NS[ns] |
2934 | else: |
2935 | @@ -460,10 +460,10 @@ |
2936 | def get_data(self, uri, range=None): |
2937 | raise DAV_NotFound |
2938 | |
2939 | - def _get_dav_creationdate(self,uri): |
2940 | + def _get_dav_creationdate(self, uri): |
2941 | return time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()) |
2942 | |
2943 | - def _get_dav_getlastmodified(self,uri): |
2944 | + def _get_dav_getlastmodified(self, uri): |
2945 | return time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()) |
2946 | |
2947 | def _get_dav_displayname(self, uri): |
2948 | |
2949 | === modified file 'email_template/html2text.py' (properties changed: +x to -x) |
2950 | --- email_template/html2text.py 2011-12-19 16:54:40 +0000 |
2951 | +++ email_template/html2text.py 2012-03-05 18:43:21 +0000 |
2952 | @@ -158,7 +158,7 @@ |
2953 | self.abbr_list = {} # stack of abbreviations to write later |
2954 | self.baseurl = baseurl |
2955 | |
2956 | - def outtextf(self, s): |
2957 | + def outtextf(self, s): |
2958 | self.outtext += s |
2959 | |
2960 | def close(self): |
2961 | @@ -338,7 +338,7 @@ |
2962 | def pbr(self): |
2963 | if self.p_p == 0: self.p_p = 1 |
2964 | |
2965 | - def p(self): self.p_p = 2 |
2966 | + def p(self): |
2967 | |
2968 | def o(self, data, puredata=0, force=0): |
2969 | if self.abbr_data is not None: self.abbr_data += data |
2970 | @@ -411,7 +411,8 @@ |
2971 | if r'\/script>' in data: self.quiet -= 1 |
2972 | self.o(data, 1) |
2973 | |
2974 | - def unknown_decl(self, data): pass |
2975 | + def unknown_decl(self, data): |
2976 | + pass |
2977 | |
2978 | def wrapwrite(text): sys.stdout.write(text.encode('utf8')) |
2979 | |
2980 | |
2981 | === modified file 'email_template/wizard/mail_compose_message.py' |
2982 | --- email_template/wizard/mail_compose_message.py 2012-01-31 13:36:57 +0000 |
2983 | +++ email_template/wizard/mail_compose_message.py 2012-03-05 18:43:21 +0000 |
2984 | @@ -27,7 +27,7 @@ |
2985 | import tools |
2986 | |
2987 | |
2988 | -def _reopen(self,res_id,model): |
2989 | +def _reopen(self, res_id, model): |
2990 | return {'type': 'ir.actions.act_window', |
2991 | 'view_mode': 'form', |
2992 | 'view_type': 'form', |
2993 | |
2994 | === modified file 'event/event.py' |
2995 | --- event/event.py 2012-03-01 11:39:44 +0000 |
2996 | +++ event/event.py 2012-03-05 18:43:21 +0000 |
2997 | @@ -66,7 +66,7 @@ |
2998 | res.append((record['id'], name)) |
2999 | return res |
3000 | |
3001 | - def _name_get_fnc(self, cr, uid, ids,prop,unknow, context=None): |
3002 | + def _name_get_fnc(self, cr, uid, ids, prop, unknow, context=None): |
3003 | res = self.name_get(cr, uid, ids, context=context) |
3004 | return dict(res) |
3005 | |
3006 | |
3007 | === modified file 'event/report/__init__.py' |
3008 | --- event/report/__init__.py 2011-01-14 00:11:01 +0000 |
3009 | +++ event/report/__init__.py 2012-03-05 18:43:21 +0000 |
3010 | @@ -21,4 +21,4 @@ |
3011 | |
3012 | import report_event_registration |
3013 | |
3014 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3015 | \ No newline at end of file |
3016 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3017 | |
3018 | === modified file 'event/res_partner.py' |
3019 | --- event/res_partner.py 2012-02-24 13:20:14 +0000 |
3020 | +++ event/res_partner.py 2012-03-05 18:43:21 +0000 |
3021 | @@ -32,4 +32,4 @@ |
3022 | |
3023 | res_partner() |
3024 | |
3025 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3026 | \ No newline at end of file |
3027 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3028 | |
3029 | === modified file 'event/wizard/event_confirm.py' |
3030 | --- event/wizard/event_confirm.py 2011-01-14 00:11:01 +0000 |
3031 | +++ event/wizard/event_confirm.py 2012-03-05 18:43:21 +0000 |
3032 | @@ -34,4 +34,4 @@ |
3033 | |
3034 | event_confirm() |
3035 | |
3036 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3037 | \ No newline at end of file |
3038 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3039 | |
3040 | === modified file 'event_moodle/event_moodle.py' |
3041 | --- event_moodle/event_moodle.py 2012-02-28 14:48:22 +0000 |
3042 | +++ event_moodle/event_moodle.py 2012-03-05 18:43:21 +0000 |
3043 | @@ -125,7 +125,7 @@ |
3044 | passwd = passwd + '+' |
3045 | return passwd |
3046 | |
3047 | - def check_email(self,email): |
3048 | + def check_email(self, email): |
3049 | |
3050 | """ |
3051 | check if email is correct |
3052 | |
3053 | === modified file 'event_project/event_project.py' |
3054 | --- event_project/event_project.py 2011-01-14 00:11:01 +0000 |
3055 | +++ event_project/event_project.py 2012-03-05 18:43:21 +0000 |
3056 | @@ -55,4 +55,4 @@ |
3057 | |
3058 | event() |
3059 | |
3060 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3061 | \ No newline at end of file |
3062 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3063 | |
3064 | === modified file 'event_project/wizard/event_project_retro.py' |
3065 | --- event_project/wizard/event_project_retro.py 2011-01-14 00:11:01 +0000 |
3066 | +++ event_project/wizard/event_project_retro.py 2012-03-05 18:43:21 +0000 |
3067 | @@ -80,4 +80,4 @@ |
3068 | |
3069 | event_project() |
3070 | |
3071 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3072 | \ No newline at end of file |
3073 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3074 | |
3075 | === modified file 'hr_attendance/wizard/__init__.py' |
3076 | --- hr_attendance/wizard/__init__.py 2011-01-14 00:11:01 +0000 |
3077 | +++ hr_attendance/wizard/__init__.py 2012-03-05 18:43:21 +0000 |
3078 | @@ -24,4 +24,4 @@ |
3079 | import hr_attendance_byweek |
3080 | import hr_attendance_bymonth |
3081 | |
3082 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3083 | \ No newline at end of file |
3084 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3085 | |
3086 | === modified file 'hr_attendance/wizard/hr_attendance_bymonth.py' |
3087 | --- hr_attendance/wizard/hr_attendance_bymonth.py 2011-12-16 05:52:38 +0000 |
3088 | +++ hr_attendance/wizard/hr_attendance_bymonth.py 2012-03-05 18:43:21 +0000 |
3089 | @@ -50,4 +50,4 @@ |
3090 | |
3091 | hr_attendance_bymonth() |
3092 | |
3093 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3094 | \ No newline at end of file |
3095 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3096 | |
3097 | === modified file 'hr_attendance/wizard/hr_attendance_byweek.py' |
3098 | --- hr_attendance/wizard/hr_attendance_byweek.py 2011-01-14 00:11:01 +0000 |
3099 | +++ hr_attendance/wizard/hr_attendance_byweek.py 2012-03-05 18:43:21 +0000 |
3100 | @@ -48,4 +48,4 @@ |
3101 | |
3102 | hr_attendance_byweek() |
3103 | |
3104 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3105 | \ No newline at end of file |
3106 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3107 | |
3108 | === modified file 'hr_attendance/wizard/hr_attendance_error.py' |
3109 | --- hr_attendance/wizard/hr_attendance_error.py 2011-01-14 00:11:01 +0000 |
3110 | +++ hr_attendance/wizard/hr_attendance_error.py 2012-03-05 18:43:21 +0000 |
3111 | @@ -66,4 +66,4 @@ |
3112 | |
3113 | hr_attendance_error() |
3114 | |
3115 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3116 | \ No newline at end of file |
3117 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3118 | |
3119 | === modified file 'hr_evaluation/hr_evaluation.py' |
3120 | --- hr_evaluation/hr_evaluation.py 2012-02-13 15:27:55 +0000 |
3121 | +++ hr_evaluation/hr_evaluation.py 2012-03-05 18:43:21 +0000 |
3122 | @@ -244,7 +244,7 @@ |
3123 | raise osv.except_osv(_('Warning !'),_("You cannot change state, because some appraisal in waiting answer or draft state")) |
3124 | return True |
3125 | |
3126 | - def button_done(self,cr, uid, ids, context=None): |
3127 | + def button_done(self, cr, uid, ids, context=None): |
3128 | self.write(cr, uid, ids,{'progress': 1 * 100}, context=context) |
3129 | self.write(cr, uid, ids,{'state':'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context) |
3130 | return True |
3131 | |
3132 | === modified file 'hr_payroll/report/report_contribution_register.py' |
3133 | --- hr_payroll/report/report_contribution_register.py 2011-06-29 09:20:32 +0000 |
3134 | +++ hr_payroll/report/report_contribution_register.py 2012-03-05 18:43:21 +0000 |
3135 | @@ -72,4 +72,4 @@ |
3136 | |
3137 | report_sxw.report_sxw('report.contribution.register.lines', 'hr.contribution.register', 'hr_payroll/report/report_contribution_register.rml', parser=contribution_register_report) |
3138 | |
3139 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3140 | \ No newline at end of file |
3141 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3142 | |
3143 | === modified file 'hr_payroll/report/report_payslip.py' |
3144 | --- hr_payroll/report/report_payslip.py 2011-12-19 16:54:40 +0000 |
3145 | +++ hr_payroll/report/report_payslip.py 2012-03-05 18:43:21 +0000 |
3146 | @@ -46,4 +46,4 @@ |
3147 | |
3148 | report_sxw.report_sxw('report.payslip', 'hr.payslip', 'hr_payroll/report/report_payslip.rml', parser=payslip_report) |
3149 | |
3150 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3151 | \ No newline at end of file |
3152 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3153 | |
3154 | === modified file 'hr_payroll/report/report_payslip_details.py' |
3155 | --- hr_payroll/report/report_payslip_details.py 2011-09-14 13:11:06 +0000 |
3156 | +++ hr_payroll/report/report_payslip_details.py 2012-03-05 18:43:21 +0000 |
3157 | @@ -116,4 +116,4 @@ |
3158 | |
3159 | report_sxw.report_sxw('report.paylip.details', 'hr.payslip', 'hr_payroll/report/report_payslip_details.rml', parser=payslip_details_report) |
3160 | |
3161 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3162 | \ No newline at end of file |
3163 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3164 | |
3165 | === modified file 'hr_payroll_account/__init__.py' |
3166 | --- hr_payroll_account/__init__.py 2011-09-15 05:45:39 +0000 |
3167 | +++ hr_payroll_account/__init__.py 2012-03-05 18:43:21 +0000 |
3168 | @@ -23,4 +23,4 @@ |
3169 | import hr_payroll_account |
3170 | import wizard |
3171 | |
3172 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3173 | \ No newline at end of file |
3174 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3175 | |
3176 | === modified file 'hr_payroll_account/wizard/__init__.py' |
3177 | --- hr_payroll_account/wizard/__init__.py 2011-09-15 05:45:39 +0000 |
3178 | +++ hr_payroll_account/wizard/__init__.py 2012-03-05 18:43:21 +0000 |
3179 | @@ -22,4 +22,4 @@ |
3180 | |
3181 | import hr_payroll_payslips_by_employees |
3182 | |
3183 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3184 | \ No newline at end of file |
3185 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3186 | |
3187 | === modified file 'hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py' |
3188 | --- hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py 2011-09-15 05:45:39 +0000 |
3189 | +++ hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py 2012-03-05 18:43:21 +0000 |
3190 | @@ -37,4 +37,4 @@ |
3191 | |
3192 | hr_payslip_employees() |
3193 | |
3194 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3195 | \ No newline at end of file |
3196 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3197 | |
3198 | === modified file 'hr_recruitment/hr_recruitment.py' |
3199 | --- hr_recruitment/hr_recruitment.py 2011-12-31 07:57:20 +0000 |
3200 | +++ hr_recruitment/hr_recruitment.py 2012-03-05 18:43:21 +0000 |
3201 | @@ -213,7 +213,7 @@ |
3202 | } |
3203 | |
3204 | |
3205 | - def onchange_job(self,cr, uid, ids, job, context=None): |
3206 | + def onchange_job(self, cr, uid, ids, job, context=None): |
3207 | result = {} |
3208 | |
3209 | if job: |
3210 | |
3211 | === modified file 'hr_recruitment/wizard/hr_recruitment_create_partner_job.py' |
3212 | --- hr_recruitment/wizard/hr_recruitment_create_partner_job.py 2011-01-14 00:11:01 +0000 |
3213 | +++ hr_recruitment/wizard/hr_recruitment_create_partner_job.py 2012-03-05 18:43:21 +0000 |
3214 | @@ -29,7 +29,7 @@ |
3215 | 'close': fields.boolean('Close job request'), |
3216 | } |
3217 | |
3218 | - def view_init(self, cr , uid , fields_list, context=None): |
3219 | + def view_init(self, cr, uid, fields_list, context=None): |
3220 | case_obj = self.pool.get('hr.applicant') |
3221 | if context is None: |
3222 | context = {} |
3223 | @@ -88,4 +88,4 @@ |
3224 | |
3225 | hr_recruitment_partner_create() |
3226 | |
3227 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3228 | \ No newline at end of file |
3229 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3230 | |
3231 | === modified file 'hr_recruitment/wizard/hr_recruitment_employee_hired.py' |
3232 | --- hr_recruitment/wizard/hr_recruitment_employee_hired.py 2011-11-17 10:53:01 +0000 |
3233 | +++ hr_recruitment/wizard/hr_recruitment_employee_hired.py 2012-03-05 18:43:21 +0000 |
3234 | @@ -26,7 +26,7 @@ |
3235 | _name = 'hired.employee' |
3236 | _description = 'Create Employee' |
3237 | |
3238 | - def case_close(self, cr, uid,ids, context=None): |
3239 | + def case_close(self, cr, uid, ids, context=None): |
3240 | """ |
3241 | @param self: The object pointer |
3242 | @param cr: the current row, from the database cursor, |
3243 | @@ -39,7 +39,7 @@ |
3244 | self.pool.get('hr.applicant').case_close(cr, uid,context.get('active_ids',[])) |
3245 | return {} |
3246 | |
3247 | - def case_close_with_emp(self, cr, uid,ids, context=None): |
3248 | + def case_close_with_emp(self, cr, uid, ids, context=None): |
3249 | """ |
3250 | @param self: The object pointer |
3251 | @param cr: the current row, from the database cursor, |
3252 | |
3253 | === modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py' |
3254 | --- hr_timesheet_invoice/hr_timesheet_invoice.py 2012-01-03 12:33:39 +0000 |
3255 | +++ hr_timesheet_invoice/hr_timesheet_invoice.py 2012-03-05 18:43:21 +0000 |
3256 | @@ -77,7 +77,7 @@ |
3257 | _defaults = { |
3258 | 'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False), |
3259 | } |
3260 | - def on_change_partner_id(self, cr, uid, id, partner_id, context={}): |
3261 | + def on_change_partner_id(self, cr, uid, id, partner_id, context=None): |
3262 | res = super(account_analytic_account, self).on_change_partner_id(cr, uid, id, partner_id, context) |
3263 | if (not res.get('value', False)) or not partner_id: |
3264 | return res |
3265 | |
3266 | === modified file 'hr_timesheet_invoice/report/account_analytic_profit.py' |
3267 | --- hr_timesheet_invoice/report/account_analytic_profit.py 2011-01-14 00:11:01 +0000 |
3268 | +++ hr_timesheet_invoice/report/account_analytic_profit.py 2012-03-05 18:43:21 +0000 |
3269 | @@ -120,4 +120,4 @@ |
3270 | |
3271 | report_sxw.report_sxw('report.account.analytic.profit', 'account.analytic.line', 'addons/hr_timesheet_invoice/report/account_analytic_profit.rml', parser=account_analytic_profit) |
3272 | |
3273 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3274 | \ No newline at end of file |
3275 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3276 | |
3277 | === modified file 'hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py' |
3278 | --- hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2011-11-16 14:59:58 +0000 |
3279 | +++ hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2012-03-05 18:43:21 +0000 |
3280 | @@ -38,7 +38,7 @@ |
3281 | # 'price': boolean |
3282 | # 'product': many2one id |
3283 | # } |
3284 | - def invoice_cost_create(self, cr, uid, ids, data={}, context=None): |
3285 | + def invoice_cost_create(self, cr, uid, ids, data=None, context=None): |
3286 | analytic_account_obj = self.pool.get('account.analytic.account') |
3287 | res_partner_obj = self.pool.get('res.partner') |
3288 | account_payment_term_obj = self.pool.get('account.payment.term') |
3289 | |
3290 | === modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py' |
3291 | --- hr_timesheet_sheet/hr_timesheet_sheet.py 2012-02-13 15:27:55 +0000 |
3292 | +++ hr_timesheet_sheet/hr_timesheet_sheet.py 2012-03-05 18:43:21 +0000 |
3293 | @@ -374,7 +374,7 @@ |
3294 | 'department_id':fields.many2one('hr.department','Department'), |
3295 | } |
3296 | |
3297 | - def _default_date_from(self,cr, uid, context=None): |
3298 | + def _default_date_from(self, cr, uid, context=None): |
3299 | user = self.pool.get('res.users').browse(cr, uid, uid, context=context) |
3300 | r = user.company_id and user.company_id.timesheet_range or 'month' |
3301 | if r=='month': |
3302 | @@ -385,7 +385,7 @@ |
3303 | return time.strftime('%Y-01-01') |
3304 | return time.strftime('%Y-%m-%d') |
3305 | |
3306 | - def _default_date_to(self,cr, uid, context=None): |
3307 | + def _default_date_to(self, cr, uid, context=None): |
3308 | user = self.pool.get('res.users').browse(cr, uid, uid, context=context) |
3309 | r = user.company_id and user.company_id.timesheet_range or 'month' |
3310 | if r=='month': |
3311 | |
3312 | === modified file 'hr_timesheet_sheet/wizard/hr_timesheet_current.py' |
3313 | --- hr_timesheet_sheet/wizard/hr_timesheet_current.py 2011-01-14 00:11:01 +0000 |
3314 | +++ hr_timesheet_sheet/wizard/hr_timesheet_current.py 2012-03-05 18:43:21 +0000 |
3315 | @@ -61,4 +61,4 @@ |
3316 | |
3317 | hr_timesheet_current_open() |
3318 | |
3319 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3320 | \ No newline at end of file |
3321 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3322 | |
3323 | === modified file 'idea/idea.py' |
3324 | --- idea/idea.py 2011-12-31 07:57:20 +0000 |
3325 | +++ idea/idea.py 2012-03-05 18:43:21 +0000 |
3326 | @@ -234,7 +234,7 @@ |
3327 | res_id = super(idea_idea, self).create(cr, user, vals, context=context) |
3328 | return res_id |
3329 | |
3330 | - def copy(self, cr, uid, id, default={}, context=None): |
3331 | + def copy(self, cr, uid, id, default=None, context=None): |
3332 | """ |
3333 | Create the new record in idea_idea model from existing one |
3334 | @param cr: A database cursor |
3335 | |
3336 | === modified file 'import_base/import_framework.py' |
3337 | --- import_base/import_framework.py 2011-12-31 07:57:20 +0000 |
3338 | +++ import_base/import_framework.py 2012-03-05 18:43:21 +0000 |
3339 | @@ -228,7 +228,7 @@ |
3340 | return map |
3341 | |
3342 | |
3343 | - def _fields_mapp(self,dict_sugar, openerp_dict, table): |
3344 | + def _fields_mapp(self, dict_sugar, openerp_dict, table): |
3345 | """ |
3346 | call all the mapper and transform data |
3347 | to be compatible with import_data |
3348 | |
3349 | === modified file 'import_sugarcrm/import_sugarcrm.py' |
3350 | --- import_sugarcrm/import_sugarcrm.py 2012-02-16 17:29:41 +0000 |
3351 | +++ import_sugarcrm/import_sugarcrm.py 2012-03-05 18:43:21 +0000 |
3352 | @@ -253,7 +253,7 @@ |
3353 | val['datas_fname'] = Filename |
3354 | return val |
3355 | |
3356 | - def get_history_mapping(self): |
3357 | + def get_history_mapping(self): |
3358 | return { |
3359 | 'model' : 'ir.attachment', |
3360 | 'dependencies' : [self.TABLE_USER, self.TABLE_ACCOUNT, self.TABLE_CONTACT, self.TABLE_LEAD, self.TABLE_OPPORTUNITY, self.TABLE_MEETING, self.TABLE_CALL, self.TABLE_EMAIL], |
3361 | @@ -301,7 +301,7 @@ |
3362 | val['email_from'] = partner_email |
3363 | return val |
3364 | |
3365 | - def get_crm_claim_mapping(self): |
3366 | + def get_crm_claim_mapping(self): |
3367 | return { |
3368 | 'model' : 'crm.claim', |
3369 | 'dependencies' : [self.TABLE_USER, self.TABLE_ACCOUNT, self.TABLE_CONTACT, self.TABLE_LEAD], |
3370 | @@ -604,7 +604,7 @@ |
3371 | partner_contact_email = address.email |
3372 | return partner_contact_id, partner_contact_email |
3373 | |
3374 | - def import_opp(self, val): |
3375 | + def import_opp(self, val): |
3376 | partner_contact_id, partner_contact_email = self.import_opportunity_contact(val) |
3377 | val['partner_address_id/id'] = partner_contact_id |
3378 | val['email_from'] = partner_contact_email |
3379 | |
3380 | === modified file 'l10n_be/__init__.py' |
3381 | --- l10n_be/__init__.py 2011-01-14 00:11:01 +0000 |
3382 | +++ l10n_be/__init__.py 2012-03-05 18:43:21 +0000 |
3383 | @@ -22,4 +22,4 @@ |
3384 | import company |
3385 | import wizard |
3386 | |
3387 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3388 | \ No newline at end of file |
3389 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3390 | |
3391 | === modified file 'l10n_be_invoice_bba/invoice.py' |
3392 | --- l10n_be_invoice_bba/invoice.py 2011-12-19 16:54:40 +0000 |
3393 | +++ l10n_be_invoice_bba/invoice.py 2012-03-05 18:43:21 +0000 |
3394 | @@ -35,7 +35,7 @@ |
3395 | class account_invoice(osv.osv): |
3396 | _inherit = 'account.invoice' |
3397 | |
3398 | - def _get_reference_type(self, cursor, user, context=None): |
3399 | + def _get_reference_type(self, cursor, user, context=None): |
3400 | """Add BBA Structured Communication Type and change labels from 'reference' into 'communication' """ |
3401 | res = super(account_invoice, self)._get_reference_type(cursor, user, |
3402 | context=context) |
3403 | @@ -44,7 +44,7 @@ |
3404 | #logger.notifyChannel('addons.'+self._name, netsvc.LOG_WARNING, 'reference_type = %s' %res ) |
3405 | return res |
3406 | |
3407 | - def check_bbacomm(self, val): |
3408 | + def check_bbacomm(self, val): |
3409 | supported_chars = '0-9+*/ ' |
3410 | pattern = re.compile('[^' + supported_chars + ']') |
3411 | if pattern.findall(val or ''): |
3412 | @@ -57,7 +57,7 @@ |
3413 | return True |
3414 | return False |
3415 | |
3416 | - def _check_communication(self, cr, uid, ids): |
3417 | + def _check_communication(self, cr, uid, ids): |
3418 | for inv in self.browse(cr, uid, ids): |
3419 | if inv.reference_type == 'bba': |
3420 | return self.check_bbacomm(inv.reference) |
3421 | @@ -86,7 +86,7 @@ |
3422 | result['value'].update(res_update) |
3423 | return result |
3424 | |
3425 | - def generate_bbacomm(self, cr, uid, ids, type, reference_type, algorithm, partner_id, reference): |
3426 | + def generate_bbacomm(self, cr, uid, ids, type, reference_type, algorithm, partner_id, reference): |
3427 | partner_obj = self.pool.get('res.partner') |
3428 | reference = reference or '' |
3429 | if (type == 'out_invoice'): |
3430 | @@ -157,7 +157,7 @@ |
3431 | "\nPlease contact your OpenERP support channel.") % algorithm) |
3432 | return {'value': {'reference': reference}} |
3433 | |
3434 | - def create(self, cr, uid, vals, context=None): |
3435 | + def create(self, cr, uid, vals, context=None): |
3436 | if vals.has_key('reference_type'): |
3437 | reference_type = vals['reference_type'] |
3438 | if reference_type == 'bba': |
3439 | @@ -179,7 +179,7 @@ |
3440 | '\nPlease create manually a unique BBA Structured Communication.')) |
3441 | return super(account_invoice, self).create(cr, uid, vals, context=context) |
3442 | |
3443 | - def write(self, cr, uid, ids, vals, context={}): |
3444 | + def write(self, cr, uid, ids, vals, context=None): |
3445 | if isinstance(ids, (int, long)): |
3446 | ids = [ids] |
3447 | for inv in self.browse(cr, uid, ids, context): |
3448 | |
3449 | === modified file 'l10n_br/l10n_br.py' |
3450 | --- l10n_br/l10n_br.py 2011-10-03 13:32:03 +0000 |
3451 | +++ l10n_br/l10n_br.py 2012-03-05 18:43:21 +0000 |
3452 | @@ -81,4 +81,4 @@ |
3453 | |
3454 | l10n_br_account_cst() |
3455 | |
3456 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3457 | \ No newline at end of file |
3458 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3459 | |
3460 | === modified file 'l10n_ch/partner.py' |
3461 | --- l10n_ch/partner.py 2011-09-16 14:32:55 +0000 |
3462 | +++ l10n_ch/partner.py 2012-03-05 18:43:21 +0000 |
3463 | @@ -30,4 +30,4 @@ |
3464 | } |
3465 | |
3466 | res_partner() |
3467 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3468 | \ No newline at end of file |
3469 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3470 | |
3471 | === modified file 'l10n_ch/payment.py' |
3472 | --- l10n_ch/payment.py 2011-01-14 12:41:54 +0000 |
3473 | +++ l10n_ch/payment.py 2012-03-05 18:43:21 +0000 |
3474 | @@ -24,7 +24,7 @@ |
3475 | class payment_order(osv.osv): |
3476 | _inherit = 'payment.order' |
3477 | |
3478 | - def get_wizard(self,mode): |
3479 | + def get_wizard(self, mode): |
3480 | if mode == 'dta': |
3481 | return 'l10n_ch', 'action_dta_create' |
3482 | |
3483 | |
3484 | === modified file 'l10n_ch/report/report_webkit_html.py' |
3485 | --- l10n_ch/report/report_webkit_html.py 2012-02-13 14:44:56 +0000 |
3486 | +++ l10n_ch/report/report_webkit_html.py 2012-03-05 18:43:21 +0000 |
3487 | @@ -67,7 +67,7 @@ |
3488 | self._check(ids) |
3489 | return super(l10n_ch_report_webkit_html, self).set_context(objects, data, ids, report_type=report_type) |
3490 | |
3491 | - def police_absolute_path(self, inner_path) : |
3492 | + def police_absolute_path(self, inner_path): |
3493 | """Will get the ocrb police absolute path""" |
3494 | path = addons.get_module_resource(os.path.join('l10n_ch', 'report', inner_path)) |
3495 | return path |
3496 | |
3497 | === modified file 'l10n_ch/wizard/create_dta.py' |
3498 | --- l10n_ch/wizard/create_dta.py 2012-01-17 17:21:53 +0000 |
3499 | +++ l10n_ch/wizard/create_dta.py 2012-03-05 18:43:21 +0000 |
3500 | @@ -41,7 +41,7 @@ |
3501 | (u'ä','a'), |
3502 | ] |
3503 | |
3504 | -def _u2a(text) : |
3505 | +def _u2a(text): |
3506 | """Tries to convert unicode charactere to asci equivalence""" |
3507 | if not text : return "" |
3508 | txt = "" |
3509 | |
3510 | === modified file 'l10n_fr/l10n_fr.py' |
3511 | --- l10n_fr/l10n_fr.py 2011-01-14 00:11:01 +0000 |
3512 | +++ l10n_fr/l10n_fr.py 2012-03-05 18:43:21 +0000 |
3513 | @@ -51,4 +51,4 @@ |
3514 | |
3515 | l10n_fr_line() |
3516 | |
3517 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3518 | \ No newline at end of file |
3519 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3520 | |
3521 | === modified file 'l10n_fr/report/base_report.py' |
3522 | --- l10n_fr/report/base_report.py 2011-01-14 00:11:01 +0000 |
3523 | +++ l10n_fr/report/base_report.py 2012-03-05 18:43:21 +0000 |
3524 | @@ -117,4 +117,4 @@ |
3525 | break |
3526 | self._set_variable(code, sum) |
3527 | |
3528 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3529 | \ No newline at end of file |
3530 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3531 | |
3532 | === modified file 'l10n_fr/wizard/fr_report_bilan.py' |
3533 | --- l10n_fr/wizard/fr_report_bilan.py 2011-01-14 00:11:01 +0000 |
3534 | +++ l10n_fr/wizard/fr_report_bilan.py 2012-03-05 18:43:21 +0000 |
3535 | @@ -54,4 +54,4 @@ |
3536 | |
3537 | account_bilan_report() |
3538 | |
3539 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3540 | \ No newline at end of file |
3541 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3542 | |
3543 | === modified file 'l10n_fr/wizard/fr_report_compute_resultant.py' |
3544 | --- l10n_fr/wizard/fr_report_compute_resultant.py 2011-01-14 00:11:01 +0000 |
3545 | +++ l10n_fr/wizard/fr_report_compute_resultant.py 2012-03-05 18:43:21 +0000 |
3546 | @@ -54,4 +54,4 @@ |
3547 | |
3548 | account_cdr_report() |
3549 | |
3550 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3551 | \ No newline at end of file |
3552 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3553 | |
3554 | === modified file 'l10n_lu/wizard/pdf_ext.py' |
3555 | --- l10n_lu/wizard/pdf_ext.py 2011-01-14 00:11:01 +0000 |
3556 | +++ l10n_lu/wizard/pdf_ext.py 2012-03-05 18:43:21 +0000 |
3557 | @@ -57,7 +57,7 @@ |
3558 | %%EOF |
3559 | """ |
3560 | |
3561 | -def output_field( f ): |
3562 | +def output_field(f): |
3563 | return "\xfe\xff" + "".join( [ "\x00"+c for c in f ] ) |
3564 | |
3565 | def extract_keys(lines): |
3566 | |
3567 | === modified file 'lunch/report/order.py' |
3568 | --- lunch/report/order.py 2011-01-14 00:11:01 +0000 |
3569 | +++ lunch/report/order.py 2012-03-05 18:43:21 +0000 |
3570 | @@ -26,14 +26,14 @@ |
3571 | |
3572 | class order(report_sxw.rml_parse): |
3573 | |
3574 | - def get_lines(self, user,objects): |
3575 | + def get_lines(self, user, objects): |
3576 | lines=[] |
3577 | for obj in objects: |
3578 | if user.id==obj.user_id.id: |
3579 | lines.append(obj) |
3580 | return lines |
3581 | |
3582 | - def get_total(self, user,objects): |
3583 | + def get_total(self, user, objects): |
3584 | lines=[] |
3585 | for obj in objects: |
3586 | if user.id==obj.user_id.id: |
3587 | |
3588 | === modified file 'mail/mail_thread.py' |
3589 | --- mail/mail_thread.py 2011-12-19 16:54:40 +0000 |
3590 | +++ mail/mail_thread.py 2012-03-05 18:43:21 +0000 |
3591 | @@ -134,7 +134,7 @@ |
3592 | self.message_append_dict(cr, uid, [res_id], msg_dict, context=context) |
3593 | return res_id |
3594 | |
3595 | - def message_update(self, cr, uid, ids, msg_dict, vals={}, default_act=None, context=None): |
3596 | + def message_update(self, cr, uid, ids, msg_dict, vals=None, default_act=None, context=None): |
3597 | """Called by ``message_process`` when a new message is received |
3598 | for an existing thread. The default behavior is to create a |
3599 | new mail.message in the given thread (by calling |
3600 | |
3601 | === modified file 'mail/static/scripts/openerp_mailgate.py' (properties changed: +x to -x) |
3602 | === modified file 'membership/report/__init__.py' |
3603 | --- membership/report/__init__.py 2011-01-14 00:11:01 +0000 |
3604 | +++ membership/report/__init__.py 2012-03-05 18:43:21 +0000 |
3605 | @@ -20,4 +20,4 @@ |
3606 | ############################################################################## |
3607 | |
3608 | import report_membership |
3609 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3610 | \ No newline at end of file |
3611 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3612 | |
3613 | === modified file 'membership/report/report_membership.py' |
3614 | --- membership/report/report_membership.py 2011-12-19 16:54:40 +0000 |
3615 | +++ membership/report/report_membership.py 2012-03-05 18:43:21 +0000 |
3616 | @@ -141,4 +141,4 @@ |
3617 | |
3618 | report_membership() |
3619 | |
3620 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3621 | \ No newline at end of file |
3622 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3623 | |
3624 | === modified file 'membership/wizard/__init__.py' |
3625 | --- membership/wizard/__init__.py 2011-01-14 00:11:01 +0000 |
3626 | +++ membership/wizard/__init__.py 2012-03-05 18:43:21 +0000 |
3627 | @@ -20,4 +20,4 @@ |
3628 | ############################################################################## |
3629 | |
3630 | import membership_invoice |
3631 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3632 | \ No newline at end of file |
3633 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3634 | |
3635 | === modified file 'mrp/mrp.py' |
3636 | --- mrp/mrp.py 2012-02-13 18:07:41 +0000 |
3637 | +++ mrp/mrp.py 2012-03-05 18:43:21 +0000 |
3638 | @@ -271,13 +271,15 @@ |
3639 | return {'value': {'name': prod.name, 'product_uom': prod.uom_id.id}} |
3640 | return {} |
3641 | |
3642 | - def _bom_find(self, cr, uid, product_id, product_uom, properties=[]): |
3643 | + def _bom_find(self, cr, uid, product_id, product_uom, properties=None): |
3644 | """ Finds BoM for particular product and product uom. |
3645 | @param product_id: Selected product. |
3646 | @param product_uom: Unit of measure of a product. |
3647 | @param properties: List of related properties. |
3648 | @return: False or BoM id. |
3649 | """ |
3650 | + if properties is None: |
3651 | + properties = [] |
3652 | cr.execute('select id from mrp_bom where product_id=%s and bom_id is null order by sequence', (product_id,)) |
3653 | ids = map(lambda x: x[0], cr.fetchall()) |
3654 | max_prop = 0 |
3655 | @@ -292,7 +294,7 @@ |
3656 | max_prop = prop |
3657 | return result |
3658 | |
3659 | - def _bom_explode(self, cr, uid, bom, factor, properties=[], addthis=False, level=0, routing_id=False): |
3660 | + def _bom_explode(self, cr, uid, bom, factor, properties=None, addthis=False, level=0, routing_id=False): |
3661 | """ Finds Products and Work Centers for related BoM for manufacturing order. |
3662 | @param bom: BoM of particular product. |
3663 | @param factor: Factor of product UoM. |
3664 | @@ -577,7 +579,7 @@ |
3665 | self.write(cr, uid, ids, {'state': 'picking_except'}) |
3666 | return True |
3667 | |
3668 | - def action_compute(self, cr, uid, ids, properties=[], context=None): |
3669 | + def action_compute(self, cr, uid, ids, properties=None, context=None): |
3670 | """ Computes bills of material of a product. |
3671 | @param properties: List containing dictionaries of properties. |
3672 | @return: No. of products. |
3673 | |
3674 | === modified file 'mrp/procurement.py' |
3675 | --- mrp/procurement.py 2011-09-17 16:41:25 +0000 |
3676 | +++ mrp/procurement.py 2012-03-05 18:43:21 +0000 |
3677 | @@ -33,7 +33,7 @@ |
3678 | 'property_ids': fields.many2many('mrp.property', 'procurement_property_rel', 'procurement_id','property_id', 'Properties'), |
3679 | } |
3680 | |
3681 | - def check_produce_product(self, cr, uid, procurement, context=[]): |
3682 | + def check_produce_product(self, cr, uid, procurement, context=None): |
3683 | """ Finds the bill of material for the product from procurement order. |
3684 | @return: True or False |
3685 | """ |
3686 | |
3687 | === modified file 'mrp/report/bom_structure.py' |
3688 | --- mrp/report/bom_structure.py 2011-01-14 00:11:01 +0000 |
3689 | +++ mrp/report/bom_structure.py 2012-03-05 18:43:21 +0000 |
3690 | @@ -35,7 +35,7 @@ |
3691 | def get_children(self, object, level=0): |
3692 | result = [] |
3693 | |
3694 | - def _get_rec(object,level): |
3695 | + def _get_rec(object, level): |
3696 | for l in object: |
3697 | res = {} |
3698 | res['name'] = l.name |
3699 | @@ -61,4 +61,4 @@ |
3700 | report_sxw.report_sxw('report.bom.structure','mrp.bom','mrp/report/bom_structure.rml',parser=bom_structure,header='internal') |
3701 | |
3702 | |
3703 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3704 | \ No newline at end of file |
3705 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3706 | |
3707 | === modified file 'mrp/stock.py' |
3708 | --- mrp/stock.py 2012-02-13 15:27:55 +0000 |
3709 | +++ mrp/stock.py 2012-03-05 18:43:21 +0000 |
3710 | @@ -102,7 +102,7 @@ |
3711 | wf_service.trg_validate(uid, 'procurement.order', m, 'button_wait_done', cr) |
3712 | return processed_ids |
3713 | |
3714 | - def action_consume(self, cr, uid, ids, product_qty, location_id=False, context=None): |
3715 | + def action_consume(self, cr, uid, ids, product_qty, location_id=False, context=None): |
3716 | """ Consumed product with specific quatity from specific source location. |
3717 | @param product_qty: Consumed product quantity |
3718 | @param location_id: Source location |
3719 | |
3720 | === modified file 'mrp_operations/mrp_operations.py' |
3721 | --- mrp_operations/mrp_operations.py 2012-01-31 13:36:57 +0000 |
3722 | +++ mrp_operations/mrp_operations.py 2012-03-05 18:43:21 +0000 |
3723 | @@ -372,7 +372,7 @@ |
3724 | pass |
3725 | return result |
3726 | |
3727 | - def action_compute(self, cr, uid, ids, properties=[], context=None): |
3728 | + def action_compute(self, cr, uid, ids, properties=None, context=None): |
3729 | """ Computes bills of material of a product and planned date of work order. |
3730 | @param properties: List containing dictionaries of properties. |
3731 | @return: No. of products. |
3732 | |
3733 | === modified file 'plugin/plugin_handler.py' |
3734 | --- plugin/plugin_handler.py 2011-12-26 17:12:29 +0000 |
3735 | +++ plugin/plugin_handler.py 2012-03-05 18:43:21 +0000 |
3736 | @@ -132,7 +132,7 @@ |
3737 | return ('res.partner', partner_id, url) |
3738 | |
3739 | # Specific to outlook rfc822 is not available so we split in arguments headerd,body,attachemnts |
3740 | - def push_message_outlook(self, cr, uid, model, headers,res_id=0 ,body_text=False, body_html=False, attachments=False): |
3741 | + def push_message_outlook(self, cr, uid, model, headers, res_id=0 , body_text=False, body_html=False, attachments=False): |
3742 | # ---------------------------------------- |
3743 | # solution 1 |
3744 | # construct a fake rfc822 from the separated arguement |
3745 | |
3746 | === modified file 'point_of_sale/report/account_statement.py' |
3747 | --- point_of_sale/report/account_statement.py 2011-01-14 00:11:01 +0000 |
3748 | +++ point_of_sale/report/account_statement.py 2012-03-05 18:43:21 +0000 |
3749 | @@ -48,4 +48,4 @@ |
3750 | |
3751 | report_sxw.report_sxw('report.account.statement', 'account.bank.statement', 'addons/statement/report/account_statement.rml', parser=account_statement,header='internal') |
3752 | |
3753 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3754 | \ No newline at end of file |
3755 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3756 | |
3757 | === modified file 'point_of_sale/report/all_closed_cashbox_of_the_day.py' |
3758 | --- point_of_sale/report/all_closed_cashbox_of_the_day.py 2011-01-14 00:11:01 +0000 |
3759 | +++ point_of_sale/report/all_closed_cashbox_of_the_day.py 2012-03-05 18:43:21 +0000 |
3760 | @@ -38,13 +38,13 @@ |
3761 | 'get_net_total_starting':self._get_net_total_starting, |
3762 | }) |
3763 | |
3764 | - def _get_user(self,line_ids): |
3765 | + def _get_user(self, line_ids): |
3766 | sql = "select name from res_users where id = %d"%(line_ids['create_uid']) |
3767 | self.cr.execute(sql) |
3768 | user = self.cr.fetchone() |
3769 | return user[0] |
3770 | |
3771 | - def _get_data(self,user): |
3772 | + def _get_data(self, user): |
3773 | data = {} |
3774 | sql = """ SELECT abs.journal_id,abs.id,abs.date,abs.closing_date,abs.name as statement,aj.name as journal,ap.name as period,ru.name as user,rc.name as company, |
3775 | abs.state,abs.balance_end_real FROM account_bank_statement as abs |
3776 | @@ -57,7 +57,7 @@ |
3777 | data = self.cr.dictfetchall() |
3778 | return data |
3779 | |
3780 | - def _get_lines(self,statement): |
3781 | + def _get_lines(self, statement): |
3782 | data = {} |
3783 | sql = """ select absl.* from account_bank_statement_line as absl, account_bank_statement as abs |
3784 | where absl.statement_id = abs.id and abs.id = %d"""%(statement['id']) |
3785 | @@ -65,7 +65,7 @@ |
3786 | data = self.cr.dictfetchall() |
3787 | return data |
3788 | |
3789 | - def _get_bal(self,data): |
3790 | + def _get_bal(self, data): |
3791 | res = {} |
3792 | sql =""" select sum(pieces*number) as bal from account_cashbox_line where starting_id = %d """%(data['id']) |
3793 | self.cr.execute(sql) |
3794 | @@ -75,7 +75,7 @@ |
3795 | else: |
3796 | return False |
3797 | |
3798 | - def _get_sub_total(self,user,data,date): |
3799 | + def _get_sub_total(self, user, data, date): |
3800 | res={} |
3801 | self.cr.execute(""" select sum(absl.amount) from account_bank_statement as abs |
3802 | LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id |
3803 | @@ -90,7 +90,7 @@ |
3804 | else: |
3805 | return False |
3806 | |
3807 | - def _get_partner(self,statement): |
3808 | + def _get_partner(self, statement): |
3809 | res = {} |
3810 | if statement['pos_statement_id']: |
3811 | sql =""" select rp.name from account_bank_statement_line as absl,res_partner as rp |
3812 | @@ -102,7 +102,7 @@ |
3813 | else: |
3814 | return 0.00 |
3815 | |
3816 | - def _get_net_total_starting(self,user): |
3817 | + def _get_net_total_starting(self, user): |
3818 | lst = [] |
3819 | res={} |
3820 | total_ending_bal = 0.0 |
3821 | @@ -124,7 +124,7 @@ |
3822 | lst.append(total_starting_bal) |
3823 | return lst |
3824 | |
3825 | - def _get_net_total(self,user): |
3826 | + def _get_net_total(self, user): |
3827 | res={} |
3828 | sql = """select sum(absl.amount) as net_total from account_bank_statement as abs |
3829 | LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id |
3830 | @@ -137,4 +137,4 @@ |
3831 | |
3832 | report_sxw.report_sxw('report.all.closed.cashbox.of.the.day', 'account.bank.statement', 'addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml', parser=all_closed_cashbox_of_the_day,header='internal') |
3833 | |
3834 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3835 | \ No newline at end of file |
3836 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3837 | |
3838 | === modified file 'point_of_sale/report/pos_details.py' |
3839 | --- point_of_sale/report/pos_details.py 2011-12-29 16:58:23 +0000 |
3840 | +++ point_of_sale/report/pos_details.py 2012-03-05 18:43:21 +0000 |
3841 | @@ -24,7 +24,7 @@ |
3842 | |
3843 | class pos_details(report_sxw.rml_parse): |
3844 | |
3845 | - def _get_invoice(self,inv_id): |
3846 | + def _get_invoice(self, inv_id): |
3847 | res={} |
3848 | if inv_id: |
3849 | self.cr.execute("select number from account_invoice as ac where id = %s", (inv_id,)) |
3850 | @@ -37,7 +37,7 @@ |
3851 | user_obj = self.pool.get('res.users') |
3852 | return user_obj.search(self.cr, self.uid, []) |
3853 | |
3854 | - def _pos_sales_details(self,form): |
3855 | + def _pos_sales_details(self, form): |
3856 | pos_obj = self.pool.get('pos.order') |
3857 | user_obj = self.pool.get('res.users') |
3858 | data = [] |
3859 | @@ -74,7 +74,7 @@ |
3860 | def _get_sales_total_2(self): |
3861 | return self.total |
3862 | |
3863 | - def _get_sum_invoice_2(self,form): |
3864 | + def _get_sum_invoice_2(self, form): |
3865 | pos_obj = self.pool.get('pos.order') |
3866 | user_obj = self.pool.get('res.users') |
3867 | user_ids = form['user_ids'] or self._get_all_users() |
3868 | |
3869 | === modified file 'point_of_sale/report/pos_details_summary.py' |
3870 | --- point_of_sale/report/pos_details_summary.py 2011-01-14 00:11:01 +0000 |
3871 | +++ point_of_sale/report/pos_details_summary.py 2012-03-05 18:43:21 +0000 |
3872 | @@ -42,7 +42,7 @@ |
3873 | 'getcompany':self.get_company |
3874 | }) |
3875 | |
3876 | - def get_company(self,objects): |
3877 | + def get_company(self, objects): |
3878 | comp=[obj.company_id.name for obj in objects] |
3879 | return '%s' % (comp[0]) |
3880 | |
3881 | @@ -136,4 +136,4 @@ |
3882 | parser=pos_details_summary, |
3883 | header='internal') |
3884 | |
3885 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3886 | \ No newline at end of file |
3887 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3888 | |
3889 | === modified file 'point_of_sale/report/pos_lines.py' |
3890 | --- point_of_sale/report/pos_lines.py 2011-01-14 00:11:01 +0000 |
3891 | +++ point_of_sale/report/pos_lines.py 2012-03-05 18:43:21 +0000 |
3892 | @@ -41,7 +41,7 @@ |
3893 | self.total = tot |
3894 | return self.total |
3895 | |
3896 | - def __taxes__(self,obj): |
3897 | + def __taxes__(self, obj): |
3898 | self.cr.execute ( " Select acct.name from pos_order as po " \ |
3899 | " LEFT JOIN pos_order_line as pol ON po.id = pol.order_id " \ |
3900 | " LEFT JOIN product_taxes_rel as ptr ON pol.product_id = ptr.prod_id " \ |
3901 | @@ -52,4 +52,4 @@ |
3902 | |
3903 | report_sxw.report_sxw('report.pos.lines', 'pos.order', 'addons/point_of_sale/report/pos_lines.rml', parser=pos_lines,header='internal') |
3904 | |
3905 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3906 | \ No newline at end of file |
3907 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3908 | |
3909 | === modified file 'point_of_sale/report/pos_payment_report.py' |
3910 | --- point_of_sale/report/pos_payment_report.py 2011-01-14 00:11:01 +0000 |
3911 | +++ point_of_sale/report/pos_payment_report.py 2012-03-05 18:43:21 +0000 |
3912 | @@ -33,7 +33,7 @@ |
3913 | 'pos_payment_total':self._pos_payment_total, |
3914 | }) |
3915 | |
3916 | - def _pos_payment(self,obj): |
3917 | + def _pos_payment(self, obj): |
3918 | data={} |
3919 | sql = """ select id from pos_order where id = %d"""%(obj.id) |
3920 | self.cr.execute(sql) |
3921 | @@ -56,9 +56,9 @@ |
3922 | self.total += d['price_unit'] * d['qty'] |
3923 | return data |
3924 | |
3925 | - def _pos_payment_total(self,o): |
3926 | + def _pos_payment_total(self, o): |
3927 | return self.total |
3928 | |
3929 | report_sxw.report_sxw('report.pos.payment.report', 'pos.order', 'addons/point_of_sale/report/pos_payment_report.rml', parser=pos_payment_report,header='internal') |
3930 | |
3931 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3932 | \ No newline at end of file |
3933 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3934 | |
3935 | === modified file 'point_of_sale/report/pos_payment_report_user.py' |
3936 | --- point_of_sale/report/pos_payment_report_user.py 2011-01-14 00:11:01 +0000 |
3937 | +++ point_of_sale/report/pos_payment_report_user.py 2012-03-05 18:43:21 +0000 |
3938 | @@ -33,7 +33,7 @@ |
3939 | 'pos_payment_user_total':self.__pos_payment_user__total__, |
3940 | }) |
3941 | |
3942 | - def __pos_payment_user__(self,form): |
3943 | + def __pos_payment_user__(self, form): |
3944 | data={} |
3945 | ids = form['user_id'] |
3946 | sql = "select pt.name,pp.default_code as code,pol.qty,pu.name as uom,pol.discount,pol.price_unit, " \ |
3947 | @@ -61,4 +61,4 @@ |
3948 | |
3949 | report_sxw.report_sxw('report.pos.payment.report.user', 'pos.order', 'addons/point_of_sale/report/pos_payment_report_user.rml', parser=pos_payment_report_user,header='internal') |
3950 | |
3951 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3952 | \ No newline at end of file |
3953 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3954 | |
3955 | === modified file 'point_of_sale/report/pos_receipt.py' |
3956 | --- point_of_sale/report/pos_receipt.py 2011-01-14 00:11:01 +0000 |
3957 | +++ point_of_sale/report/pos_receipt.py 2012-03-05 18:43:21 +0000 |
3958 | @@ -74,4 +74,4 @@ |
3959 | |
3960 | report_sxw.report_sxw('report.pos.receipt', 'pos.order', 'addons/point_of_sale/report/pos_receipt.rml', parser=order, header=False) |
3961 | |
3962 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3963 | \ No newline at end of file |
3964 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3965 | |
3966 | === modified file 'point_of_sale/report/pos_sales_user.py' |
3967 | --- point_of_sale/report/pos_sales_user.py 2011-01-14 00:11:01 +0000 |
3968 | +++ point_of_sale/report/pos_sales_user.py 2012-03-05 18:43:21 +0000 |
3969 | @@ -33,7 +33,7 @@ |
3970 | |
3971 | }) |
3972 | |
3973 | - def _get_data(self,form): |
3974 | + def _get_data(self, form): |
3975 | dt1 = form['date_start'] + ' 00:00:00' |
3976 | dt2 = form['date_end'] + ' 23:59:59' |
3977 | data={} |
3978 | @@ -47,4 +47,4 @@ |
3979 | |
3980 | report_sxw.report_sxw('report.pos.sales.user', 'pos.order', 'addons/point_of_sale/report/pos_sales_user.rml', parser=pos_sales_user,header='internal') |
3981 | |
3982 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3983 | \ No newline at end of file |
3984 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3985 | |
3986 | === modified file 'point_of_sale/report/pos_sales_user_today.py' |
3987 | --- point_of_sale/report/pos_sales_user_today.py 2011-01-14 00:11:01 +0000 |
3988 | +++ point_of_sale/report/pos_sales_user_today.py 2012-03-05 18:43:21 +0000 |
3989 | @@ -33,7 +33,7 @@ |
3990 | |
3991 | }) |
3992 | |
3993 | - def _get_data(self,form): |
3994 | + def _get_data(self, form): |
3995 | data={} |
3996 | ids = form['user_id'] |
3997 | |
3998 | @@ -47,4 +47,4 @@ |
3999 | |
4000 | report_sxw.report_sxw('report.pos.sales.user.today', 'pos.order', 'addons/point_of_sale/report/pos_sales_user_today.rml', parser=pos_sales_user_today,header='internal') |
4001 | |
4002 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4003 | \ No newline at end of file |
4004 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4005 | |
4006 | === modified file 'point_of_sale/report/pos_users_product.py' |
4007 | --- point_of_sale/report/pos_users_product.py 2011-01-14 00:11:01 +0000 |
4008 | +++ point_of_sale/report/pos_users_product.py 2012-03-05 18:43:21 +0000 |
4009 | @@ -60,9 +60,9 @@ |
4010 | data = self.cr.fetchone() |
4011 | return data[0] |
4012 | |
4013 | - def _get_total(self,o): |
4014 | + def _get_total(self, o): |
4015 | return self.total |
4016 | |
4017 | report_sxw.report_sxw('report.pos.user.product', 'account.bank.statement', 'addons/statement/report/pos_users_product.rml', parser=pos_user_product,header='internal') |
4018 | |
4019 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4020 | \ No newline at end of file |
4021 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4022 | |
4023 | === modified file 'point_of_sale/report/report_cash_register.py' |
4024 | --- point_of_sale/report/report_cash_register.py 2012-02-10 09:11:03 +0000 |
4025 | +++ point_of_sale/report/report_cash_register.py 2012-03-05 18:43:21 +0000 |
4026 | @@ -65,4 +65,4 @@ |
4027 | |
4028 | report_cash_register() |
4029 | |
4030 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4031 | \ No newline at end of file |
4032 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4033 | |
4034 | === modified file 'procurement/company.py' |
4035 | --- procurement/company.py 2011-01-14 00:11:01 +0000 |
4036 | +++ procurement/company.py 2012-03-05 18:43:21 +0000 |
4037 | @@ -35,4 +35,4 @@ |
4038 | |
4039 | company() |
4040 | |
4041 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4042 | \ No newline at end of file |
4043 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4044 | |
4045 | === modified file 'product/product.py' |
4046 | --- product/product.py 2012-02-22 11:53:32 +0000 |
4047 | +++ product/product.py 2012-03-05 18:43:21 +0000 |
4048 | @@ -349,7 +349,7 @@ |
4049 | res = False |
4050 | return res |
4051 | |
4052 | - def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id): |
4053 | + def onchange_uom(self, cursor, user, ids, uom_id, uom_po_id): |
4054 | if uom_id: |
4055 | return {'value': {'uom_po_id': uom_id}} |
4056 | return {} |
4057 | @@ -540,7 +540,7 @@ |
4058 | self.pool.get('product.template').unlink(cr, uid, unlink_product_tmpl_ids, context=context) |
4059 | return super(product_product, self).unlink(cr, uid, unlink_ids, context=context) |
4060 | |
4061 | - def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id): |
4062 | + def onchange_uom(self, cursor, user, ids, uom_id, uom_po_id): |
4063 | if uom_id and uom_po_id: |
4064 | uom_obj=self.pool.get('product.uom') |
4065 | uom=uom_obj.browse(cursor,user,[uom_id])[0] |
4066 | |
4067 | === modified file 'product/report/product_pricelist.py' |
4068 | --- product/report/product_pricelist.py 2011-01-17 08:00:48 +0000 |
4069 | +++ product/report/product_pricelist.py 2012-03-05 18:43:21 +0000 |
4070 | @@ -39,7 +39,7 @@ |
4071 | 'get_titles': self._get_titles, |
4072 | }) |
4073 | |
4074 | - def _get_titles(self,form): |
4075 | + def _get_titles(self, form): |
4076 | lst = [] |
4077 | vals = {} |
4078 | qtys = 1 |
4079 | @@ -51,7 +51,7 @@ |
4080 | lst.append(vals) |
4081 | return lst |
4082 | |
4083 | - def _set_quantity(self,form): |
4084 | + def _set_quantity(self, form): |
4085 | for i in range(1,6): |
4086 | q = 'qty%d'%i |
4087 | if form[q] >0 and form[q] not in self.quantity: |
4088 | @@ -76,7 +76,7 @@ |
4089 | symbol = pool.get('res.currency').read(self.cr, self.uid, [pricelist['currency_id'][0]], ['symbol'], context=self.localcontext)[0] |
4090 | return symbol['symbol'] or '' |
4091 | |
4092 | - def _get_categories(self, products,form): |
4093 | + def _get_categories(self, products, form): |
4094 | cat_ids=[] |
4095 | res=[] |
4096 | self.pricelist = form['price_list'] |
4097 | @@ -111,7 +111,7 @@ |
4098 | res.append({'name':cat[1],'products': products}) |
4099 | return res |
4100 | |
4101 | - def _get_price(self,pricelist_id, product_id,qty): |
4102 | + def _get_price(self, pricelist_id, product_id, qty): |
4103 | sale_price_digits = self.get_digits(dp='Sale Price') |
4104 | pool = pooler.get_pool(self.cr.dbname) |
4105 | price_dict = pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext) |
4106 | |
4107 | === modified file 'product_manufacturer/product_manufacturer.py' |
4108 | --- product_manufacturer/product_manufacturer.py 2011-01-14 00:11:01 +0000 |
4109 | +++ product_manufacturer/product_manufacturer.py 2012-03-05 18:43:21 +0000 |
4110 | @@ -40,4 +40,4 @@ |
4111 | } |
4112 | product_attribute() |
4113 | |
4114 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4115 | \ No newline at end of file |
4116 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4117 | |
4118 | === modified file 'product_visible_discount/__init__.py' |
4119 | --- product_visible_discount/__init__.py 2011-01-14 00:11:01 +0000 |
4120 | +++ product_visible_discount/__init__.py 2012-03-05 18:43:21 +0000 |
4121 | @@ -20,4 +20,4 @@ |
4122 | |
4123 | import product_visible_discount |
4124 | |
4125 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4126 | \ No newline at end of file |
4127 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4128 | |
4129 | === modified file 'project/project.py' |
4130 | --- project/project.py 2012-02-28 14:08:16 +0000 |
4131 | +++ project/project.py 2012-03-05 18:43:21 +0000 |
4132 | @@ -265,7 +265,7 @@ |
4133 | task_obj.duplicate_task(cr, uid, map_task_id, context=context) |
4134 | return True |
4135 | |
4136 | - def copy(self, cr, uid, id, default={}, context=None): |
4137 | + def copy(self, cr, uid, id, default=None, context=None): |
4138 | if context is None: |
4139 | context = {} |
4140 | |
4141 | @@ -545,12 +545,12 @@ |
4142 | return res |
4143 | |
4144 | |
4145 | - def onchange_remaining(self, cr, uid, ids, remaining=0.0, planned = 0.0): |
4146 | + def onchange_remaining(self, cr, uid, ids, remaining=0.0, planned=0.0): |
4147 | if remaining and not planned: |
4148 | return {'value':{'planned_hours': remaining}} |
4149 | return {} |
4150 | |
4151 | - def onchange_planned(self, cr, uid, ids, planned = 0.0, effective = 0.0): |
4152 | + def onchange_planned(self, cr, uid, ids, planned=0.0, effective=0.0): |
4153 | return {'value':{'remaining_hours': planned - effective}} |
4154 | |
4155 | def onchange_project(self, cr, uid, id, project_id): |
4156 | @@ -581,7 +581,9 @@ |
4157 | #FIXME why there is already the copy and the old one |
4158 | self.write(cr, uid, new, {'parent_ids':[(6,0,set(parent_ids))], 'child_ids':[(6,0, set(child_ids))]}) |
4159 | |
4160 | - def copy_data(self, cr, uid, id, default={}, context=None): |
4161 | + def copy_data(self, cr, uid, id, default=None, context=None): |
4162 | + if default is None: |
4163 | + default = {} |
4164 | default = default or {} |
4165 | default.update({'work_ids':[], 'date_start': False, 'date_end': False, 'date_deadline': False}) |
4166 | if not default.get('remaining_hours', False): |
4167 | @@ -810,7 +812,7 @@ |
4168 | } |
4169 | return res |
4170 | |
4171 | - def do_close(self, cr, uid, ids, context={}): |
4172 | + def do_close(self, cr, uid, ids, context=None): |
4173 | """ |
4174 | Close Task |
4175 | """ |
4176 | @@ -868,7 +870,7 @@ |
4177 | self.write(cr, uid, [task.id], {'state': 'open'}, context=context) |
4178 | return True |
4179 | |
4180 | - def do_cancel(self, cr, uid, ids, context={}): |
4181 | + def do_cancel(self, cr, uid, ids, context=None): |
4182 | request = self.pool.get('res.request') |
4183 | tasks = self.browse(cr, uid, ids, context=context) |
4184 | self._check_child_task(cr, uid, ids, context=context) |
4185 | @@ -889,7 +891,7 @@ |
4186 | self.write(cr, uid, [task.id], {'state': 'cancelled', 'remaining_hours':0.0}, context=context) |
4187 | return True |
4188 | |
4189 | - def do_open(self, cr, uid, ids, context={}): |
4190 | + def do_open(self, cr, uid, ids, context=None): |
4191 | if not isinstance(ids,list): ids = [ids] |
4192 | tasks= self.browse(cr, uid, ids, context=context) |
4193 | for t in tasks: |
4194 | @@ -901,7 +903,7 @@ |
4195 | self.log(cr, uid, t.id, message) |
4196 | return True |
4197 | |
4198 | - def do_draft(self, cr, uid, ids, context={}): |
4199 | + def do_draft(self, cr, uid, ids, context=None): |
4200 | self.write(cr, uid, ids, {'state': 'draft'}, context=context) |
4201 | return True |
4202 | |
4203 | @@ -915,10 +917,12 @@ |
4204 | return new_attachment_ids |
4205 | |
4206 | |
4207 | - def do_delegate(self, cr, uid, ids, delegate_data={}, context=None): |
4208 | + def do_delegate(self, cr, uid, ids, delegate_data=None, context=None): |
4209 | """ |
4210 | Delegate Task to another users. |
4211 | """ |
4212 | + if delegate_data is None: |
4213 | + delegate_data = {} |
4214 | assert delegate_data['user_id'], _("Delegated User should be specified") |
4215 | delegated_tasks = {} |
4216 | for task in self.browse(cr, uid, ids, context=context): |
4217 | @@ -950,7 +954,7 @@ |
4218 | delegated_tasks[task.id] = delegated_task_id |
4219 | return delegated_tasks |
4220 | |
4221 | - def do_pending(self, cr, uid, ids, context={}): |
4222 | + def do_pending(self, cr, uid, ids, context=None): |
4223 | self.write(cr, uid, ids, {'state': 'pending'}, context=context) |
4224 | for (id, name) in self.name_get(cr, uid, ids): |
4225 | message = _("The task '%s' is pending.") % name |
4226 | |
4227 | === modified file 'project/wizard/project_task_reevaluate.py' |
4228 | --- project/wizard/project_task_reevaluate.py 2011-12-19 16:54:40 +0000 |
4229 | +++ project/wizard/project_task_reevaluate.py 2012-03-05 18:43:21 +0000 |
4230 | @@ -26,7 +26,7 @@ |
4231 | class project_task_reevaluate(osv.osv_memory): |
4232 | _name = 'project.task.reevaluate' |
4233 | |
4234 | - def _get_remaining(self,cr, uid, context=None): |
4235 | + def _get_remaining(self, cr, uid, context=None): |
4236 | if context is None: |
4237 | context = {} |
4238 | active_id = context.get('active_id', False) |
4239 | |
4240 | === modified file 'project_gtd/project_gtd.py' |
4241 | --- project_gtd/project_gtd.py 2011-12-21 22:15:04 +0000 |
4242 | +++ project_gtd/project_gtd.py 2012-03-05 18:43:21 +0000 |
4243 | @@ -67,7 +67,7 @@ |
4244 | default['context_id'] = False |
4245 | return super(project_task,self).copy_data(cr, uid, id, default, context) |
4246 | |
4247 | - def _get_context(self,cr, uid, context=None): |
4248 | + def _get_context(self, cr, uid, context=None): |
4249 | ids = self.pool.get('project.gtd.context').search(cr, uid, [], context=context) |
4250 | return ids and ids[0] or False |
4251 | |
4252 | |
4253 | === modified file 'project_gtd/wizard/project_gtd_empty.py' |
4254 | --- project_gtd/wizard/project_gtd_empty.py 2011-01-14 00:11:01 +0000 |
4255 | +++ project_gtd/wizard/project_gtd_empty.py 2012-03-05 18:43:21 +0000 |
4256 | @@ -30,7 +30,7 @@ |
4257 | 'name': fields.char('Name', size=32) |
4258 | } |
4259 | |
4260 | - def view_init(self, cr , uid , fields_list, context=None): |
4261 | + def view_init(self, cr, uid, fields_list, context=None): |
4262 | if context is None: |
4263 | context = {} |
4264 | self._empty(cr, uid, context=context) |
4265 | |
4266 | === modified file 'project_mailgate/project_mailgate.py' |
4267 | --- project_mailgate/project_mailgate.py 2011-09-07 22:38:59 +0000 |
4268 | +++ project_mailgate/project_mailgate.py 2012-03-05 18:43:21 +0000 |
4269 | @@ -47,7 +47,9 @@ |
4270 | self.write(cr, uid, [res_id], data, context) |
4271 | return res_id |
4272 | |
4273 | - def message_update(self, cr, uid, ids, msg, data={}, default_act='pending'): |
4274 | + def message_update(self, cr, uid, ids, msg, data=None, default_act='pending'): |
4275 | + if data is None: |
4276 | + data = {} |
4277 | data.update({ |
4278 | 'description': msg['body_text'], |
4279 | }) |
4280 | |
4281 | === modified file 'project_mrp/project_procurement.py' |
4282 | --- project_mrp/project_procurement.py 2011-12-19 16:54:40 +0000 |
4283 | +++ project_mrp/project_procurement.py 2012-03-05 18:43:21 +0000 |
4284 | @@ -40,7 +40,7 @@ |
4285 | return all(proc.product_id.type != 'service' or (proc.task_id and proc.task_id.state in ('done', 'cancelled')) \ |
4286 | for proc in self.browse(cr, uid, ids, context=context)) |
4287 | |
4288 | - def check_produce_service(self, cr, uid, procurement, context=None): |
4289 | + def check_produce_service(self, cr, uid, procurement, context=None): |
4290 | return True |
4291 | |
4292 | def _convert_qty_company_hours(self, cr, uid, procurement, context=None): |
4293 | |
4294 | === modified file 'project_timesheet/project_timesheet.py' |
4295 | --- project_timesheet/project_timesheet.py 2012-01-31 13:36:57 +0000 |
4296 | +++ project_timesheet/project_timesheet.py 2012-03-05 18:43:21 +0000 |
4297 | @@ -197,7 +197,7 @@ |
4298 | |
4299 | return super(task,self).unlink(cr, uid, ids, *args, **kwargs) |
4300 | |
4301 | - def write(self, cr, uid, ids,vals,context=None): |
4302 | + def write(self, cr, uid, ids, vals, context=None): |
4303 | if context is None: |
4304 | context = {} |
4305 | if vals.get('project_id',False) or vals.get('name',False): |
4306 | |
4307 | === modified file 'project_timesheet/report/task_report.py' |
4308 | --- project_timesheet/report/task_report.py 2011-07-01 23:41:24 +0000 |
4309 | +++ project_timesheet/report/task_report.py 2012-03-05 18:43:21 +0000 |
4310 | @@ -29,7 +29,7 @@ |
4311 | _auto = False |
4312 | _order = "name" |
4313 | |
4314 | - def _get_task_hours(self, cr, uid, ids, name,args,context): |
4315 | + def _get_task_hours(self, cr, uid, ids, name, args, context): |
4316 | result = {} |
4317 | for record in self.browse(cr, uid, ids,context): |
4318 | last_date = datetime.strptime(record.name, '%Y-%m-%d') + relativedelta(months=1) - relativedelta(days=1) |
4319 | @@ -42,7 +42,7 @@ |
4320 | result[record.id] = total |
4321 | return result |
4322 | |
4323 | - def get_hrs_timesheet(self, cr, uid, ids, name,args,context): |
4324 | + def get_hrs_timesheet(self, cr, uid, ids, name, args, context): |
4325 | result = {} |
4326 | sum = 0.0 |
4327 | for record in self.browse(cr, uid, ids, context): |
4328 | |
4329 | === modified file 'purchase/purchase.py' |
4330 | --- purchase/purchase.py 2012-02-28 14:08:16 +0000 |
4331 | +++ purchase/purchase.py 2012-03-05 18:43:21 +0000 |
4332 | @@ -395,7 +395,7 @@ |
4333 | res = inv_id |
4334 | return res |
4335 | |
4336 | - def has_stockable_product(self,cr, uid, ids, *args): |
4337 | + def has_stockable_product(self, cr, uid, ids, *args): |
4338 | for order in self.browse(cr, uid, ids): |
4339 | for order_line in order.order_line: |
4340 | if order_line.product_id and order_line.product_id.product_tmpl_id.type in ('product', 'consu'): |
4341 | @@ -498,7 +498,7 @@ |
4342 | wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr) |
4343 | return [picking_id] |
4344 | |
4345 | - def action_picking_create(self,cr, uid, ids, context=None): |
4346 | + def action_picking_create(self, cr, uid, ids, context=None): |
4347 | picking_ids = [] |
4348 | for order in self.browse(cr, uid, ids): |
4349 | picking_ids.extend(self._create_pickings(cr, uid, order, order.order_line, None, context=context)) |
4350 | |
4351 | === modified file 'purchase/wizard/purchase_order_group.py' |
4352 | --- purchase/wizard/purchase_order_group.py 2011-05-19 13:12:28 +0000 |
4353 | +++ purchase/wizard/purchase_order_group.py 2012-03-05 18:43:21 +0000 |
4354 | @@ -88,4 +88,4 @@ |
4355 | |
4356 | purchase_order_group() |
4357 | |
4358 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4359 | \ No newline at end of file |
4360 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4361 | |
4362 | === modified file 'purchase_requisition/purchase_requisition.py' |
4363 | --- purchase_requisition/purchase_requisition.py 2011-12-23 11:22:41 +0000 |
4364 | +++ purchase_requisition/purchase_requisition.py 2012-03-05 18:43:21 +0000 |
4365 | @@ -183,7 +183,7 @@ |
4366 | 'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True), |
4367 | } |
4368 | |
4369 | - def onchange_product_id(self, cr, uid, ids, product_id,product_uom_id, context=None): |
4370 | + def onchange_product_id(self, cr, uid, ids, product_id, product_uom_id, context=None): |
4371 | """ Changes UoM and name if product_id changes. |
4372 | @param name: Name of the field |
4373 | @param product_id: Changed product_id |
4374 | |
4375 | === modified file 'report_webkit/ir_report.py' |
4376 | --- report_webkit/ir_report.py 2011-12-19 16:54:40 +0000 |
4377 | +++ report_webkit/ir_report.py 2012-03-05 18:43:21 +0000 |
4378 | @@ -35,7 +35,7 @@ |
4379 | from report.report_sxw import rml_parse |
4380 | |
4381 | def register_report(name, model, tmpl_path, parser=rml_parse): |
4382 | - "Register the report into the services" |
4383 | + """Register the report into the services""" |
4384 | name = 'report.%s' % name |
4385 | if netsvc.Service._services.get(name, False): |
4386 | service = netsvc.Service._services[name] |
4387 | |
4388 | === modified file 'report_webkit/report_helper.py' |
4389 | --- report_webkit/report_helper.py 2011-12-19 16:54:40 +0000 |
4390 | +++ report_webkit/report_helper.py 2012-03-05 18:43:21 +0000 |
4391 | @@ -75,7 +75,7 @@ |
4392 | head = header_obj.browse(self.cursor, self.uid, header_img_id) |
4393 | return (head.img, head.type) |
4394 | |
4395 | - def embed_logo_by_name(self, name, width=0, height=0) : |
4396 | + def embed_logo_by_name(self, name, width=0, height=0): |
4397 | """Return HTML embedded logo by name""" |
4398 | img, type = self.get_logo_by_name(name) |
4399 | return self.embed_image(type, img, width, height) |
4400 | |
4401 | === modified file 'resource/faces/task.py' |
4402 | --- resource/faces/task.py 2011-12-19 16:54:40 +0000 |
4403 | +++ resource/faces/task.py 2012-03-05 18:43:21 +0000 |
4404 | @@ -567,7 +567,8 @@ |
4405 | return result |
4406 | #@-node:_cmp |
4407 | #@+node:__getattr__ |
4408 | - def __getattr__(self, name): return getattr(self._value, name) |
4409 | + def __getattr__(self, name): |
4410 | + return getattr(self._value, name) |
4411 | #@-node:__getattr__ |
4412 | #@+node:__getitem__ |
4413 | def __getitem__(self, slice): |
4414 | |
4415 | === modified file 'resource/resource.py' |
4416 | --- resource/resource.py 2011-12-21 12:37:24 +0000 |
4417 | +++ resource/resource.py 2012-03-05 18:43:21 +0000 |
4418 | @@ -438,7 +438,7 @@ |
4419 | (check_dates, 'Error! leave start-date must be lower then leave end-date.', ['date_from', 'date_to']) |
4420 | ] |
4421 | |
4422 | - def onchange_resource(self,cr, uid, ids, resource, context=None): |
4423 | + def onchange_resource(self, cr, uid, ids, resource, context=None): |
4424 | result = {} |
4425 | if resource: |
4426 | resource_pool = self.pool.get('resource.resource') |
4427 | |
4428 | === modified file 'sale/edi/sale_order.py' |
4429 | --- sale/edi/sale_order.py 2011-11-05 01:56:31 +0000 |
4430 | +++ sale/edi/sale_order.py 2012-03-05 18:43:21 +0000 |
4431 | @@ -219,4 +219,4 @@ |
4432 | edi_doc_list.append(edi_doc) |
4433 | return edi_doc_list |
4434 | |
4435 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4436 | \ No newline at end of file |
4437 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4438 | |
4439 | === modified file 'sale/report/__init__.py' |
4440 | --- sale/report/__init__.py 2011-01-14 00:11:01 +0000 |
4441 | +++ sale/report/__init__.py 2012-03-05 18:43:21 +0000 |
4442 | @@ -22,4 +22,4 @@ |
4443 | import sale_order |
4444 | import sale_report |
4445 | |
4446 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4447 | \ No newline at end of file |
4448 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4449 | |
4450 | === modified file 'sale/sale.py' |
4451 | --- sale/sale.py 2012-02-28 14:08:16 +0000 |
4452 | +++ sale/sale.py 2012-03-05 18:43:21 +0000 |
4453 | @@ -326,7 +326,7 @@ |
4454 | self.log(cr, uid, id, message) |
4455 | return True |
4456 | |
4457 | - def onchange_pricelist_id(self, cr, uid, ids, pricelist_id, order_lines, context={}): |
4458 | + def onchange_pricelist_id(self, cr, uid, ids, pricelist_id, order_lines, context=None): |
4459 | if (not pricelist_id) or (not order_lines): |
4460 | return {} |
4461 | warning = { |
4462 | @@ -335,7 +335,7 @@ |
4463 | } |
4464 | return {'warning': warning} |
4465 | |
4466 | - def onchange_partner_order_id(self, cr, uid, ids, order_id, invoice_id=False, shipping_id=False, context={}): |
4467 | + def onchange_partner_order_id(self, cr, uid, ids, order_id, invoice_id=False, shipping_id=False, context=None): |
4468 | if not order_id: |
4469 | return {} |
4470 | val = {} |
4471 | @@ -501,7 +501,9 @@ |
4472 | 'res_id': inv_ids and inv_ids[0] or False, |
4473 | } |
4474 | |
4475 | - def action_invoice_create(self, cr, uid, ids, grouped=False, states=['confirmed', 'done', 'exception'], date_inv = False, context=None): |
4476 | + def action_invoice_create(self, cr, uid, ids, grouped=False, states=None, date_inv=False, context=None): |
4477 | + if states is None: |
4478 | + states = ['confirmed', 'done', 'exception'] |
4479 | res = False |
4480 | invoices = {} |
4481 | invoice_ids = [] |
4482 | |
4483 | === modified file 'sale/wizard/__init__.py' |
4484 | --- sale/wizard/__init__.py 2011-01-14 00:11:01 +0000 |
4485 | +++ sale/wizard/__init__.py 2012-03-05 18:43:21 +0000 |
4486 | @@ -23,4 +23,4 @@ |
4487 | import sale_line_invoice |
4488 | import sale_make_invoice_advance |
4489 | |
4490 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4491 | \ No newline at end of file |
4492 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4493 | |
4494 | === modified file 'sale/wizard/sale_make_invoice.py' |
4495 | --- sale/wizard/sale_make_invoice.py 2011-12-26 08:41:35 +0000 |
4496 | +++ sale/wizard/sale_make_invoice.py 2012-03-05 18:43:21 +0000 |
4497 | @@ -68,4 +68,4 @@ |
4498 | |
4499 | sale_make_invoice() |
4500 | |
4501 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4502 | \ No newline at end of file |
4503 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4504 | |
4505 | === modified file 'sale_crm/__init__.py' |
4506 | --- sale_crm/__init__.py 2011-01-14 00:11:01 +0000 |
4507 | +++ sale_crm/__init__.py 2012-03-05 18:43:21 +0000 |
4508 | @@ -22,4 +22,4 @@ |
4509 | import wizard |
4510 | import sale_crm |
4511 | |
4512 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4513 | \ No newline at end of file |
4514 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4515 | |
4516 | === modified file 'sale_layout/sale_layout.py' |
4517 | --- sale_layout/sale_layout.py 2012-02-14 23:24:48 +0000 |
4518 | +++ sale_layout/sale_layout.py 2012-03-05 18:43:21 +0000 |
4519 | @@ -53,7 +53,7 @@ |
4520 | seq += 1 |
4521 | return invoice_line_ids |
4522 | |
4523 | - def onchange_sale_order_line_view(self, cr, uid, id, type, context={}, *args): |
4524 | + def onchange_sale_order_line_view(self, cr, uid, id, type, context=None, *args): |
4525 | temp = {} |
4526 | temp['value'] = {} |
4527 | if (not type): |
4528 | |
4529 | === modified file 'sale_order_dates/sale_order_dates.py' |
4530 | --- sale_order_dates/sale_order_dates.py 2011-07-01 23:41:24 +0000 |
4531 | +++ sale_order_dates/sale_order_dates.py 2012-03-05 18:43:21 +0000 |
4532 | @@ -61,4 +61,4 @@ |
4533 | |
4534 | sale_order_dates() |
4535 | |
4536 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4537 | \ No newline at end of file |
4538 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4539 | |
4540 | === modified file 'stock/report/lot_overview.py' |
4541 | --- stock/report/lot_overview.py 2011-01-14 00:11:01 +0000 |
4542 | +++ stock/report/lot_overview.py 2012-03-05 18:43:21 +0000 |
4543 | @@ -34,7 +34,7 @@ |
4544 | 'grand_total_price':self._grand_total, |
4545 | }) |
4546 | |
4547 | - def process(self,location_id): |
4548 | + def process(self, location_id): |
4549 | location_obj = pooler.get_pool(self.cr.dbname).get('stock.location') |
4550 | data = location_obj._product_get_report(self.cr,self.uid, [location_id]) |
4551 | |
4552 | |
4553 | === modified file 'stock/report/lot_overview_all.py' |
4554 | --- stock/report/lot_overview_all.py 2011-01-14 00:11:01 +0000 |
4555 | +++ stock/report/lot_overview_all.py 2012-03-05 18:43:21 +0000 |
4556 | @@ -34,7 +34,7 @@ |
4557 | 'grand_total_price':self._grand_total, |
4558 | }) |
4559 | |
4560 | - def process(self,location_id): |
4561 | + def process(self, location_id): |
4562 | location_obj = pooler.get_pool(self.cr.dbname).get('stock.location') |
4563 | data = location_obj._product_get_all_report(self.cr,self.uid, [location_id]) |
4564 | data['location_name'] = location_obj.read(self.cr, self.uid, [location_id],['complete_name'])[0]['complete_name'] |
4565 | |
4566 | === modified file 'stock/report/product_stock.py' |
4567 | --- stock/report/product_stock.py 2011-01-14 00:11:01 +0000 |
4568 | +++ stock/report/product_stock.py 2012-03-05 18:43:21 +0000 |
4569 | @@ -42,7 +42,9 @@ |
4570 | |
4571 | |
4572 | class report_stock(report_int): |
4573 | - def create(self, cr, uid, ids, datas, context={}): |
4574 | + def create(self, cr, uid, ids, datas, context=None): |
4575 | + if context is None: |
4576 | + context = {} |
4577 | product_ids = ids |
4578 | if 'location_id' in context: |
4579 | location_id = context['location_id'] |
4580 | |
4581 | === modified file 'stock/report/report_stock.py' |
4582 | --- stock/report/report_stock.py 2011-12-19 16:54:40 +0000 |
4583 | +++ stock/report/report_stock.py 2012-03-05 18:43:21 +0000 |
4584 | @@ -74,7 +74,7 @@ |
4585 | group by location_id, product_id, prodlot_id |
4586 | )""") |
4587 | |
4588 | - def unlink(self, cr, uid, ids, context={}): |
4589 | + def unlink(self, cr, uid, ids, context=None): |
4590 | raise osv.except_osv(_('Error !'), _('You cannot delete any record!')) |
4591 | |
4592 | |
4593 | @@ -131,7 +131,7 @@ |
4594 | group by location_id, product_id, tracking_id |
4595 | )""") |
4596 | |
4597 | - def unlink(self, cr, uid, ids, context={}): |
4598 | + def unlink(self, cr, uid, ids, context=None): |
4599 | raise osv.except_osv(_('Error !'), _('You cannot delete any record!')) |
4600 | |
4601 | stock_report_tracklots() |
4602 | |
4603 | === modified file 'stock/report/stock_by_location.py' |
4604 | --- stock/report/stock_by_location.py 2011-01-14 00:11:01 +0000 |
4605 | +++ stock/report/stock_by_location.py 2012-03-05 18:43:21 +0000 |
4606 | @@ -26,7 +26,7 @@ |
4607 | #FIXME: we should use toxml |
4608 | |
4609 | class report_custom(report_rml): |
4610 | - def create_xml(self, cr, uid, ids, datas, context={}): |
4611 | + def create_xml(self, cr, uid, ids, datas, context=None): |
4612 | config = """ |
4613 | <config> |
4614 | <date>09/09/2005</date> |
4615 | |
4616 | === modified file 'stock/report/stock_inventory_move_report.py' |
4617 | --- stock/report/stock_inventory_move_report.py 2011-01-14 00:11:01 +0000 |
4618 | +++ stock/report/stock_inventory_move_report.py 2012-03-05 18:43:21 +0000 |
4619 | @@ -30,7 +30,7 @@ |
4620 | 'qty_total':self._qty_total |
4621 | }) |
4622 | |
4623 | - def _qty_total(self,objects): |
4624 | + def _qty_total(self, objects): |
4625 | total = 0.0 |
4626 | uom = objects[0].product_uom.name |
4627 | for obj in objects: |
4628 | |
4629 | === modified file 'stock/stock.py' |
4630 | --- stock/stock.py 2012-02-28 14:08:16 +0000 |
4631 | +++ stock/stock.py 2012-03-05 18:43:21 +0000 |
4632 | @@ -345,22 +345,28 @@ |
4633 | }) |
4634 | return product_obj.get_product_available(cr, uid, product_ids, context=context) |
4635 | |
4636 | - def _product_get(self, cr, uid, id, product_ids=False, context=None, states=['done']): |
4637 | + def _product_get(self, cr, uid, id, product_ids=False, context=None, states=None): |
4638 | """ |
4639 | @param product_ids: |
4640 | @param states: |
4641 | @return: |
4642 | """ |
4643 | + if states is None: |
4644 | + states = ['done'] |
4645 | ids = id and [id] or [] |
4646 | return self._product_get_multi_location(cr, uid, ids, product_ids, context=context, states=states) |
4647 | |
4648 | - def _product_all_get(self, cr, uid, id, product_ids=False, context=None, states=['done']): |
4649 | + def _product_all_get(self, cr, uid, id, product_ids=False, context=None, states=None): |
4650 | + if states is None: |
4651 | + states = ['done'] |
4652 | # build the list of ids of children of the location given by id |
4653 | ids = id and [id] or [] |
4654 | location_ids = self.search(cr, uid, [('location_id', 'child_of', ids)]) |
4655 | return self._product_get_multi_location(cr, uid, location_ids, product_ids, context, states) |
4656 | |
4657 | - def _product_virtual_get(self, cr, uid, id, product_ids=False, context=None, states=['done']): |
4658 | + def _product_virtual_get(self, cr, uid, id, product_ids=False, context=None, states=None): |
4659 | + if states is None: |
4660 | + states = ['done'] |
4661 | return self._product_all_get(cr, uid, id, product_ids, context, ['confirmed', 'waiting', 'assigned', 'done']) |
4662 | |
4663 | def _product_reserve(self, cr, uid, ids, product_id, product_qty, context=None, lock=False): |
4664 | @@ -518,7 +524,7 @@ |
4665 | def unlink(self, cr, uid, ids, context=None): |
4666 | raise osv.except_osv(_('Error'), _('You can not remove a lot line !')) |
4667 | |
4668 | - def action_traceability(self, cr, uid, ids, context={}): |
4669 | + def action_traceability(self, cr, uid, ids, context=None): |
4670 | """ It traces the information of a product |
4671 | @param self: The object pointer. |
4672 | @param cr: A database cursor |
4673 | |
4674 | === modified file 'stock_invoice_directly/wizard/stock_invoice.py' |
4675 | --- stock_invoice_directly/wizard/stock_invoice.py 2011-10-16 01:28:00 +0000 |
4676 | +++ stock_invoice_directly/wizard/stock_invoice.py 2012-03-05 18:43:21 +0000 |
4677 | @@ -47,4 +47,4 @@ |
4678 | |
4679 | invoice_directly() |
4680 | |
4681 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4682 | \ No newline at end of file |
4683 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4684 | |
4685 | === modified file 'stock_location/procurement_pull.py' |
4686 | --- stock_location/procurement_pull.py 2011-12-19 16:54:40 +0000 |
4687 | +++ stock_location/procurement_pull.py 2012-03-05 18:43:21 +0000 |
4688 | @@ -45,7 +45,7 @@ |
4689 | return (line.type_proc=='move') and (line.location_src_id) |
4690 | return False |
4691 | |
4692 | - def action_move_create(self, cr, uid, ids,context=None): |
4693 | + def action_move_create(self, cr, uid, ids, context=None): |
4694 | proc_obj = self.pool.get('procurement.order') |
4695 | move_obj = self.pool.get('stock.move') |
4696 | picking_obj=self.pool.get('stock.picking') |
4697 | |
4698 | === modified file 'stock_planning/stock_planning.py' |
4699 | --- stock_planning/stock_planning.py 2011-12-21 22:15:04 +0000 |
4700 | +++ stock_planning/stock_planning.py 2012-03-05 18:43:21 +0000 |
4701 | @@ -406,7 +406,7 @@ |
4702 | res[val.id] = 'Future' |
4703 | return res |
4704 | |
4705 | - def _get_op(self, cr, uid, ids, field_names, arg, context=None): # op = OrderPoint |
4706 | + def _get_op(self, cr, uid, ids, field_names, arg, context=None): |
4707 | res = {} |
4708 | for val in self.browse(cr, uid, ids, context=context): |
4709 | res[val.id]={} |
4710 | |
4711 | === modified file 'stock_planning/wizard/stock_planning_createlines.py' |
4712 | --- stock_planning/wizard/stock_planning_createlines.py 2011-09-21 07:37:15 +0000 |
4713 | +++ stock_planning/wizard/stock_planning_createlines.py 2012-03-05 18:43:21 +0000 |
4714 | @@ -49,7 +49,7 @@ |
4715 | 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.planning', context=c), |
4716 | } |
4717 | |
4718 | - def create_planning(self,cr, uid, ids, context=None): |
4719 | + def create_planning(self, cr, uid, ids, context=None): |
4720 | if context is None: |
4721 | context = {} |
4722 | product_obj = self.pool.get('product.product') |
4723 | |
4724 | === modified file 'survey/survey.py' |
4725 | --- survey/survey.py 2012-02-13 15:27:55 +0000 |
4726 | +++ survey/survey.py 2012-03-05 18:43:21 +0000 |
4727 | @@ -514,7 +514,7 @@ |
4728 | _description = 'Survey Question Column Heading' |
4729 | _rec_name = 'title' |
4730 | |
4731 | - def _get_in_visible_rating_weight(self,cr, uid, context=None): |
4732 | + def _get_in_visible_rating_weight(self, cr, uid, context=None): |
4733 | if context is None: |
4734 | context = {} |
4735 | if context.get('in_visible_rating_weight', False): |
4736 | @@ -567,7 +567,7 @@ |
4737 | } |
4738 | return val |
4739 | |
4740 | - def _get_in_visible_answer_type(self,cr, uid, context=None): |
4741 | + def _get_in_visible_answer_type(self, cr, uid, context=None): |
4742 | if context is None: |
4743 | context = {} |
4744 | return context.get('in_visible_answer_type', False) |
4745 | |
4746 | === modified file 'survey/wizard/__init__.py' |
4747 | --- survey/wizard/__init__.py 2011-01-14 00:11:01 +0000 |
4748 | +++ survey/wizard/__init__.py 2012-03-05 18:43:21 +0000 |
4749 | @@ -27,4 +27,4 @@ |
4750 | import survey_answer |
4751 | import survey_print |
4752 | |
4753 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4754 | \ No newline at end of file |
4755 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4756 | |
4757 | === modified file 'survey/wizard/survey_answer.py' |
4758 | --- survey/wizard/survey_answer.py 2012-02-13 15:27:55 +0000 |
4759 | +++ survey/wizard/survey_answer.py 2012-03-05 18:43:21 +0000 |
4760 | @@ -997,7 +997,7 @@ |
4761 | |
4762 | return survey_question_wiz_id |
4763 | |
4764 | - def action_new_question(self,cr, uid, ids, context=None): |
4765 | + def action_new_question(self, cr, uid, ids, context=None): |
4766 | """ |
4767 | New survey.Question form. |
4768 | """ |
4769 | @@ -1039,7 +1039,7 @@ |
4770 | 'context': context |
4771 | } |
4772 | |
4773 | - def action_edit_page(self,cr, uid, ids, context=None): |
4774 | + def action_edit_page(self, cr, uid, ids, context=None): |
4775 | """ |
4776 | Edit survey.page. |
4777 | """ |
4778 | @@ -1061,7 +1061,7 @@ |
4779 | 'context': context |
4780 | } |
4781 | |
4782 | - def action_delete_page(self,cr, uid, ids, context=None): |
4783 | + def action_delete_page(self, cr, uid, ids, context=None): |
4784 | """ |
4785 | Delete survey.page. |
4786 | """ |
4787 | @@ -1087,7 +1087,7 @@ |
4788 | 'context': context |
4789 | } |
4790 | |
4791 | - def action_edit_question(self,cr, uid, ids, context=None): |
4792 | + def action_edit_question(self, cr, uid, ids, context=None): |
4793 | """ |
4794 | Edit survey.question. |
4795 | """ |
4796 | @@ -1109,7 +1109,7 @@ |
4797 | 'context': context |
4798 | } |
4799 | |
4800 | - def action_delete_question(self,cr, uid, ids, context=None): |
4801 | + def action_delete_question(self, cr, uid, ids, context=None): |
4802 | """ |
4803 | Delete survey.question. |
4804 | """ |
4805 | |
4806 | === modified file 'wiki/web/widgets/rss/feedparser.py' (properties changed: +x to -x) |
4807 | --- wiki/web/widgets/rss/feedparser.py 2011-12-19 16:54:40 +0000 |
4808 | +++ wiki/web/widgets/rss/feedparser.py 2012-03-05 18:43:21 +0000 |
4809 | @@ -2446,8 +2446,10 @@ |
4810 | data = doctype_pattern.sub('', data) |
4811 | return version, data |
4812 | |
4813 | -def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, referrer=None, handlers=[]): |
4814 | +def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, referrer=None, handlers=None): |
4815 | '''Parse a feed from a URL, file, stream, or string''' |
4816 | + if handlers is None: |
4817 | + handlers = [] |
4818 | result = FeedParserDict() |
4819 | result['feed'] = FeedParserDict() |
4820 | result['entries'] = [] |
4821 | |
4822 | === modified file 'wiki/web/widgets/wikimarkup/__init__.py' |
4823 | --- wiki/web/widgets/wikimarkup/__init__.py 2011-12-19 16:54:40 +0000 |
4824 | +++ wiki/web/widgets/wikimarkup/__init__.py 2012-03-05 18:43:21 +0000 |
4825 | @@ -489,7 +489,7 @@ |
4826 | return text.encode("utf-8") |
4827 | return text |
4828 | |
4829 | - def strip(self, text, stripcomments=False, dontstrip=[]): |
4830 | + def strip(self, text, stripcomments=False, dontstrip=None): |
4831 | render = True |
4832 | |
4833 | commentState = {} |
4834 | @@ -2087,7 +2087,9 @@ |
4835 | # <quote cite="person">quote</quote> |
4836 | from cgi import escape |
4837 | |
4838 | -def hook_quote(env, body, attributes={}): |
4839 | +def hook_quote(env, body, attributes=None): |
4840 | + if attributes is None: |
4841 | + attributes = {} |
4842 | text = [u'<div class="blockquote">'] |
4843 | if 'cite' in attributes: |
4844 | text.append(u"<strong class=\"cite\">%s wrote:</strong>\n" % escape(attributes['cite'])) |
Hello,
Thanks for this proposal. Would you mind resolve the conflicts with trunk before we merge those together ?
Regards,
Anto.