Merge lp:~numerigraphe/openobject-addons/trunk-unmutable-defaults into lp:openobject-addons

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
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+95967@code.launchpad.net

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 :

Hello,

Thanks for this proposal. Would you mind resolve the conflicts with trunk before we merge those together ?

Regards,
Anto.

Revision history for this message
Anto (abourguignon) wrote :
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
=== modified file 'account/account.py'
--- account/account.py 2012-02-28 14:08:16 +0000
+++ account/account.py 2012-03-05 18:43:21 +0000
@@ -591,12 +591,15 @@
591 res.append((record['id'], name))591 res.append((record['id'], name))
592 return res592 return res
593593
594 def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False):594 def copy(self, cr, uid, id, None, context=None, done_list=None, local=False):
595 if default is None:
596 default = {}
597 else:
598 default = default.copy()
599 if done_list is None:
600 done_list = []
595 account = self.browse(cr, uid, id, context=context)601 account = self.browse(cr, uid, id, context=context)
596 new_child_ids = []602 new_child_ids = []
597 if not default:
598 default = {}
599 default = default.copy()
600 default['code'] = (account['code'] or '') + '(copy)'603 default['code'] = (account['code'] or '') + '(copy)'
601 if not local:604 if not local:
602 done_list = []605 done_list = []
@@ -765,11 +768,14 @@
765 (_check_currency, 'Configuration error! The currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']),768 (_check_currency, 'Configuration error! The currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']),
766 ]769 ]
767770
768 def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False):771 def copy(self, cr, uid, id, default=None, context=None, done_list=None, local=False):
772 if default is None:
773 default = {}
774 else:
775 default = default.copy()
776 if done_list is None:
777 done_list = []
769 journal = self.browse(cr, uid, id, context=context)778 journal = self.browse(cr, uid, id, context=context)
770 if not default:
771 default = {}
772 default = default.copy()
773 default['code'] = (journal['code'] or '') + '(copy)'779 default['code'] = (journal['code'] or '') + '(copy)'
774 default['name'] = (journal['name'] or '') + '(copy)'780 default['name'] = (journal['name'] or '') + '(copy)'
775 default['sequence_id'] = False781 default['sequence_id'] = False
@@ -1161,7 +1167,7 @@
1161 'end_journal_period_id':fields.many2one('account.journal.period','End of Year Entries Journal', readonly=True),1167 'end_journal_period_id':fields.many2one('account.journal.period','End of Year Entries Journal', readonly=True),
1162 }1168 }
11631169
1164 def copy(self, cr, uid, id, default={}, context=None):1170 def copy(self, cr, uid, id, default=None, context=None):
1165 default.update({1171 default.update({
1166 'period_ids': [],1172 'period_ids': [],
1167 'end_journal_period_id': False1173 'end_journal_period_id': False
@@ -1420,9 +1426,15 @@
1420 result = super(account_move, self).create(cr, uid, vals, context)1426 result = super(account_move, self).create(cr, uid, vals, context)
1421 return result1427 return result
14221428
1423 def copy(self, cr, uid, id, default={}, context=None):1429 def copy(self, cr, uid, id, default=None, context=None):
1430 if context is None:
1431 default = {}
1432 else:
1433 default = default.copy()
1424 if context is None:1434 if context is None:
1425 context = {}1435 context = {}
1436 else:
1437 context = context.copy()
1426 default.update({1438 default.update({
1427 'state':'draft',1439 'state':'draft',
1428 'name':'/',1440 'name':'/',
@@ -2239,7 +2251,9 @@
2239 _defaults = {2251 _defaults = {
2240 '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'),2252 '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'),
2241 }2253 }
2242 def generate(self, cr, uid, ids, datas={}, context=None):2254 def generate(self, cr, uid, ids, datas=None, context=None):
2255 if datas is None:
2256 datas = {}
2243 move_ids = []2257 move_ids = []
2244 entry = {}2258 entry = {}
2245 account_move_obj = self.pool.get('account.move')2259 account_move_obj = self.pool.get('account.move')
@@ -3193,7 +3207,7 @@
3193 property_obj.create(cr, uid, vals, context=context)3207 property_obj.create(cr, uid, vals, context=context)
3194 return True3208 return True
31953209
3196 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):3210 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):
3197 '''3211 '''
3198 This function recursively loads the template objects and create the real objects from them.3212 This function recursively loads the template objects and create the real objects from them.
31993213
@@ -3211,6 +3225,12 @@
3211 * a last identical containing the mapping of tax code templates and tax codes3225 * a last identical containing the mapping of tax code templates and tax codes
3212 :rtype: tuple(dict, dict, dict)3226 :rtype: tuple(dict, dict, dict)
3213 '''3227 '''
3228 if acc_ref is None:
3229 acc_ref = {}
3230 if taxes_ref is None:
3231 taxes_ref = {}
3232 if tax_code_ref is None:
3233 tax_code_ref = {}
3214 template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context)3234 template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context)
3215 if template.parent_id:3235 if template.parent_id:
3216 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)3236 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)
@@ -3223,7 +3243,7 @@
3223 tax_code_ref.update(tmp3)3243 tax_code_ref.update(tmp3)
3224 return acc_ref, taxes_ref, tax_code_ref3244 return acc_ref, taxes_ref, tax_code_ref
32253245
3226 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):3246 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):
3227 '''3247 '''
3228 This function generates all the objects from the templates3248 This function generates all the objects from the templates
32293249
@@ -3241,6 +3261,12 @@
3241 * a last identical containing the mapping of tax code templates and tax codes3261 * a last identical containing the mapping of tax code templates and tax codes
3242 :rtype: tuple(dict, dict, dict)3262 :rtype: tuple(dict, dict, dict)
3243 '''3263 '''
3264 if account_ref is None:
3265 account_ref = {}
3266 if taxes_ref is None:
3267 taxes_ref = {}
3268 if tax_code_ref is None:
3269 tax_code_ref = {}
3244 template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context)3270 template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context)
3245 obj_tax_code_template = self.pool.get('account.tax.code.template')3271 obj_tax_code_template = self.pool.get('account.tax.code.template')
3246 obj_acc_tax = self.pool.get('account.tax')3272 obj_acc_tax = self.pool.get('account.tax')
32473273
=== modified file 'account/account_bank.py'
--- account/account_bank.py 2012-02-01 12:50:42 +0000
+++ account/account_bank.py 2012-03-05 18:43:21 +0000
@@ -29,12 +29,12 @@
29 'currency_id': fields.related('journal_id', 'currency', type="many2one", relation='res.currency', readonly=True,29 'currency_id': fields.related('journal_id', 'currency', type="many2one", relation='res.currency', readonly=True,
30 string="Currency", help="Currency of the related account journal."),30 string="Currency", help="Currency of the related account journal."),
31 }31 }
32 def create(self, cr, uid, data, context={}):32 def create(self, cr, uid, data, context=None):
33 result = super(bank, self).create(cr, uid, data, context=context)33 result = super(bank, self).create(cr, uid, data, context=context)
34 self.post_write(cr, uid, [result], context=context)34 self.post_write(cr, uid, [result], context=context)
35 return result35 return result
3636
37 def write(self, cr, uid, ids, data, context={}):37 def write(self, cr, uid, ids, data, context=None):
38 result = super(bank, self).write(cr, uid, ids, data, context=context)38 result = super(bank, self).write(cr, uid, ids, data, context=context)
39 self.post_write(cr, uid, ids, context=context)39 self.post_write(cr, uid, ids, context=context)
40 return result40 return result
@@ -43,7 +43,7 @@
43 "Return the name to use when creating a bank journal"43 "Return the name to use when creating a bank journal"
44 return (bank.bank_name or '') + ' ' + bank.acc_number44 return (bank.bank_name or '') + ' ' + bank.acc_number
4545
46 def post_write(self, cr, uid, ids, context={}):46 def post_write(self, cr, uid, ids, context=None):
47 if isinstance(ids, (int, long)):47 if isinstance(ids, (int, long)):
48 ids = [ids]48 ids = [ids]
4949
5050
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2012-02-13 18:07:41 +0000
+++ account/account_move_line.py 2012-03-05 18:43:21 +0000
@@ -1097,7 +1097,7 @@
1097 'has been confirmed!') % res[2])1097 'has been confirmed!') % res[2])
1098 return res1098 return res
10991099
1100 def _remove_move_reconcile(self, cr, uid, move_ids=[], context=None):1100 def _remove_move_reconcile(self, cr, uid, move_ids=None, context=None):
1101 # Function remove move rencocile ids related with moves1101 # Function remove move rencocile ids related with moves
1102 obj_move_line = self.pool.get('account.move.line')1102 obj_move_line = self.pool.get('account.move.line')
1103 obj_move_rec = self.pool.get('account.move.reconcile')1103 obj_move_rec = self.pool.get('account.move.reconcile')
11041104
=== modified file 'account/project/wizard/account_analytic_chart.py'
--- account/project/wizard/account_analytic_chart.py 2011-01-14 00:11:01 +0000
+++ account/project/wizard/account_analytic_chart.py 2012-03-05 18:43:21 +0000
@@ -47,4 +47,4 @@
47 return result47 return result
4848
49account_analytic_chart()49account_analytic_chart()
50# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
51\ No newline at end of file50\ No newline at end of file
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5252
=== modified file 'account/project/wizard/account_analytic_inverted_balance_report.py'
--- account/project/wizard/account_analytic_inverted_balance_report.py 2011-04-29 08:49:48 +0000
+++ account/project/wizard/account_analytic_inverted_balance_report.py 2012-03-05 18:43:21 +0000
@@ -52,4 +52,4 @@
52 }52 }
5353
54account_analytic_inverted_balance()54account_analytic_inverted_balance()
55# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
56\ No newline at end of file55\ No newline at end of file
56# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5757
=== modified file 'account/project/wizard/project_account_analytic_line.py'
--- account/project/wizard/project_account_analytic_line.py 2011-05-02 12:16:02 +0000
+++ account/project/wizard/project_account_analytic_line.py 2012-03-05 18:43:21 +0000
@@ -55,4 +55,4 @@
5555
56project_account_analytic_line()56project_account_analytic_line()
5757
58# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
59\ No newline at end of file58\ No newline at end of file
59# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6060
=== modified file 'account/report/account_balance.py'
--- account/report/account_balance.py 2011-06-08 10:04:27 +0000
+++ account/report/account_balance.py 2012-03-05 18:43:21 +0000
@@ -68,7 +68,7 @@
68 return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name68 return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
69 return super(account_balance ,self)._get_account(data)69 return super(account_balance ,self)._get_account(data)
7070
71 def lines(self, form, ids=[], done=None):#, level=1):71 def lines(self, form, ids=None, done=None):
72 def _process_child(accounts, disp_acc, parent):72 def _process_child(accounts, disp_acc, parent):
73 account_rec = [acct for acct in accounts if acct['id']==parent][0]73 account_rec = [acct for acct in accounts if acct['id']==parent][0]
74 currency_obj = self.pool.get('res.currency')74 currency_obj = self.pool.get('res.currency')
7575
=== modified file 'account/report/account_central_journal.py'
--- account/report/account_central_journal.py 2011-01-14 00:11:01 +0000
+++ account/report/account_central_journal.py 2012-03-05 18:43:21 +0000
@@ -105,4 +105,4 @@
105105
106report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/account_central_journal.rml', parser=journal_print, header='internal')106report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/account_central_journal.rml', parser=journal_print, header='internal')
107107
108# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
109\ No newline at end of file108\ No newline at end of file
109# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
110110
=== modified file 'account/report/account_general_journal.py'
--- account/report/account_general_journal.py 2011-01-14 00:11:01 +0000
+++ account/report/account_general_journal.py 2012-03-05 18:43:21 +0000
@@ -158,4 +158,4 @@
158158
159report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header='internal')159report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header='internal')
160160
161# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
162\ No newline at end of file161\ No newline at end of file
162# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
163163
=== modified file 'account/report/account_report.py'
--- account/report/account_report.py 2011-12-21 22:15:04 +0000
+++ account/report/account_report.py 2012-03-05 18:43:21 +0000
@@ -283,4 +283,4 @@
283 )""")283 )""")
284report_account_sales()284report_account_sales()
285285
286# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
287\ No newline at end of file286\ No newline at end of file
287# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
288288
=== modified file 'account/report/account_tax_report.py'
--- account/report/account_tax_report.py 2012-02-03 16:26:19 +0000
+++ account/report/account_tax_report.py 2012-03-05 18:43:21 +0000
@@ -160,7 +160,7 @@
160 i+=1160 i+=1
161 return res161 return res
162162
163 def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=[], context=None):163 def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=None, context=None):
164 obj_tc = self.pool.get('account.tax.code')164 obj_tc = self.pool.get('account.tax.code')
165 ids = obj_tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)], order='sequence', context=context)165 ids = obj_tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)], order='sequence', context=context)
166166
@@ -171,7 +171,11 @@
171 res += self._get_codes(based_on, company_id, code.id, level+1, context=context)171 res += self._get_codes(based_on, company_id, code.id, level+1, context=context)
172 return res172 return res
173173
174 def _add_codes(self, based_on, account_list=[], period_list=[], context=None):174 def _add_codes(self, based_on, account_list=None, period_list=None, context=None):
175 if account_list is None:
176 account_list = []
177 if period_list is None:
178 period_list = []
175 res = []179 res = []
176 obj_tc = self.pool.get('account.tax.code')180 obj_tc = self.pool.get('account.tax.code')
177 for account in account_list:181 for account in account_list:
178182
=== modified file 'account/res_currency.py'
--- account/res_currency.py 2011-01-14 00:11:01 +0000
+++ account/res_currency.py 2012-03-05 18:43:21 +0000
@@ -44,4 +44,4 @@
4444
45res_currency_account()45res_currency_account()
4646
47# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
48\ No newline at end of file47\ No newline at end of file
48# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4949
=== modified file 'account/wizard/account_invoice_state.py'
--- account/wizard/account_invoice_state.py 2011-01-14 00:11:01 +0000
+++ account/wizard/account_invoice_state.py 2012-03-05 18:43:21 +0000
@@ -71,4 +71,4 @@
7171
72account_invoice_cancel()72account_invoice_cancel()
7373
74# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
75\ No newline at end of file74\ No newline at end of file
75# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
7676
=== modified file 'account/wizard/account_journal_select.py'
--- account/wizard/account_journal_select.py 2011-01-14 00:11:01 +0000
+++ account/wizard/account_journal_select.py 2012-03-05 18:43:21 +0000
@@ -47,4 +47,4 @@
4747
48account_journal_select()48account_journal_select()
4949
50# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
51\ No newline at end of file50\ No newline at end of file
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5252
=== modified file 'account/wizard/account_move_bank_reconcile.py'
--- account/wizard/account_move_bank_reconcile.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_move_bank_reconcile.py 2012-03-05 18:43:21 +0000
@@ -61,4 +61,4 @@
6161
62account_move_bank_reconcile()62account_move_bank_reconcile()
6363
64# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
65\ No newline at end of file64\ No newline at end of file
65# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6666
=== modified file 'account/wizard/account_move_journal.py'
--- account/wizard/account_move_journal.py 2011-11-14 11:34:05 +0000
+++ account/wizard/account_move_journal.py 2012-03-05 18:43:21 +0000
@@ -38,7 +38,7 @@
38 _defaults = {38 _defaults = {
39 'target_move': 'all'39 'target_move': 'all'
40 }40 }
41 def _get_period(self, cr, uid, context={}):41 def _get_period(self, cr, uid, context=None):
42 """42 """
43 Return default account period value43 Return default account period value
44 """44 """
4545
=== modified file 'account/wizard/account_move_line_reconcile_select.py'
--- account/wizard/account_move_line_reconcile_select.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_move_line_reconcile_select.py 2012-03-05 18:43:21 +0000
@@ -52,4 +52,4 @@
5252
53account_move_line_reconcile_select()53account_move_line_reconcile_select()
5454
55# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
56\ No newline at end of file55\ No newline at end of file
56# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5757
=== modified file 'account/wizard/account_move_line_select.py'
--- account/wizard/account_move_line_select.py 2011-01-14 00:11:01 +0000
+++ account/wizard/account_move_line_select.py 2012-03-05 18:43:21 +0000
@@ -69,4 +69,4 @@
6969
70account_move_line_select()70account_move_line_select()
7171
72# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
73\ No newline at end of file72\ No newline at end of file
73# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
7474
=== modified file 'account/wizard/account_move_line_unreconcile_select.py'
--- account/wizard/account_move_line_unreconcile_select.py 2011-02-15 12:13:39 +0000
+++ account/wizard/account_move_line_unreconcile_select.py 2012-03-05 18:43:21 +0000
@@ -41,4 +41,4 @@
4141
42account_move_line_unreconcile_select()42account_move_line_unreconcile_select()
4343
44# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
45\ No newline at end of file44\ No newline at end of file
45# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4646
=== modified file 'account/wizard/account_period_close.py'
--- account/wizard/account_period_close.py 2011-12-13 04:41:48 +0000
+++ account/wizard/account_period_close.py 2012-03-05 18:43:21 +0000
@@ -60,4 +60,4 @@
6060
61account_period_close()61account_period_close()
6262
63# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
64\ No newline at end of file63\ No newline at end of file
64# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6565
=== modified file 'account/wizard/account_reconcile.py'
--- account/wizard/account_reconcile.py 2011-11-03 09:56:12 +0000
+++ account/wizard/account_reconcile.py 2012-03-05 18:43:21 +0000
@@ -173,4 +173,4 @@
173173
174account_move_line_reconcile_writeoff()174account_move_line_reconcile_writeoff()
175175
176# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
177\ No newline at end of file176\ No newline at end of file
177# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
178178
=== modified file 'account/wizard/account_reconcile_partner_process.py'
--- account/wizard/account_reconcile_partner_process.py 2011-01-14 00:11:01 +0000
+++ account/wizard/account_reconcile_partner_process.py 2012-03-05 18:43:21 +0000
@@ -100,4 +100,4 @@
100100
101account_partner_reconcile_process()101account_partner_reconcile_process()
102102
103# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
104\ No newline at end of file103\ No newline at end of file
104# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
105105
=== modified file 'account/wizard/account_state_open.py'
--- account/wizard/account_state_open.py 2011-01-27 06:32:26 +0000
+++ account/wizard/account_state_open.py 2012-03-05 18:43:21 +0000
@@ -41,4 +41,4 @@
4141
42account_state_open()42account_state_open()
4343
44# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
45\ No newline at end of file44\ No newline at end of file
45# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4646
=== modified file 'account/wizard/account_subscription_generate.py'
--- account/wizard/account_subscription_generate.py 2011-04-29 08:49:48 +0000
+++ account/wizard/account_subscription_generate.py 2012-03-05 18:43:21 +0000
@@ -50,4 +50,4 @@
5050
51account_subscription_generate()51account_subscription_generate()
5252
53# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
54\ No newline at end of file53\ No newline at end of file
54# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5555
=== modified file 'account/wizard/account_unreconcile.py'
--- account/wizard/account_unreconcile.py 2011-01-14 00:11:01 +0000
+++ account/wizard/account_unreconcile.py 2012-03-05 18:43:21 +0000
@@ -50,4 +50,4 @@
5050
51account_unreconcile_reconcile()51account_unreconcile_reconcile()
5252
53# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
54\ No newline at end of file53\ No newline at end of file
54# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5555
=== modified file 'account_analytic_plans/report/crossovered_analytic.py'
--- account_analytic_plans/report/crossovered_analytic.py 2011-01-14 00:11:01 +0000
+++ account_analytic_plans/report/crossovered_analytic.py 2012-03-05 18:43:21 +0000
@@ -34,7 +34,7 @@
34 })34 })
35 self.base_amount = 0.0035 self.base_amount = 0.00
3636
37 def find_children(self,ref_ids):37 def find_children(self, ref_ids):
38 to_return_ids = []38 to_return_ids = []
39 final_list = []39 final_list = []
40 parent_list = []40 parent_list = []
@@ -53,7 +53,7 @@
53 final_list.extend(set_list)53 final_list.extend(set_list)
54 return final_list #to_return_ids[0]54 return final_list #to_return_ids[0]
5555
56 def set_account(self,cats):56 def set_account(self, cats):
57 lst = []57 lst = []
58 category = self.pool.get('account.analytic.account').read(self.cr, self.uid, cats)58 category = self.pool.get('account.analytic.account').read(self.cr, self.uid, cats)
59 for cat in category:59 for cat in category:
@@ -62,7 +62,7 @@
62 lst.extend(self.set_account(cat['child_ids']))62 lst.extend(self.set_account(cat['child_ids']))
63 return lst63 return lst
6464
65 def _ref_lines(self,form):65 def _ref_lines(self, form):
66 result = []66 result = []
67 res = {}67 res = {}
68 acc_pool = self.pool.get('account.analytic.account')68 acc_pool = self.pool.get('account.analytic.account')
@@ -113,7 +113,9 @@
113 result.append(res)113 result.append(res)
114 return result114 return result
115115
116 def _lines(self, form, ids={}):116 def _lines(self, form, ids=None):
117 if ids is None:
118 ids = {}
117 if not ids:119 if not ids:
118 ids = self.ids120 ids = self.ids
119121
120122
=== modified file 'account_analytic_plans/wizard/analytic_plan_create_model.py'
--- account_analytic_plans/wizard/analytic_plan_create_model.py 2011-01-14 00:11:01 +0000
+++ account_analytic_plans/wizard/analytic_plan_create_model.py 2012-03-05 18:43:21 +0000
@@ -57,4 +57,4 @@
5757
58analytic_plan_create_model()58analytic_plan_create_model()
5959
60# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
61\ No newline at end of file60\ No newline at end of file
61# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6262
=== modified file 'account_anglo_saxon/__init__.py'
--- account_anglo_saxon/__init__.py 2011-01-14 00:11:01 +0000
+++ account_anglo_saxon/__init__.py 2012-03-05 18:43:21 +0000
@@ -23,4 +23,4 @@
23import purchase23import purchase
24import invoice24import invoice
2525
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
27\ No newline at end of file26\ No newline at end of file
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2828
=== removed file 'account_anglo_saxon/sale.py'
--- account_anglo_saxon/sale.py 2011-01-14 00:11:01 +0000
+++ account_anglo_saxon/sale.py 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import fields, osv
23
24#class sale_order_line(osv.osv):
25# _name = 'sale.order.line'
26# _description = 'Sale Order line'
27# _inherit = 'sale.order.line'
28#
29# def invoice_line_create(self, cr, uid, ids, context={}):
30# line_ids = super('sale_order_line',self).invoice_line_create(cr, uid, ids, context)
31# invoice_line_obj = self.pool.get('account.invoice.line')
32# for line in invoice_line_obj.browse(cr, uid, line_ids):
33# if line.product_id:
34# a = line.product_id.product_tmpl_id.property_stock_account_output and line.product_id.product_tmpl_id.property_stock_account_output.id
35# if not a:
36# a = line.product_id.categ_id.property_stock_account_output_categ and line.product_id.categ_id.property_stock_account_output_categ.id
37# if a:
38# a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, a)
39# invoice_line_obj.write(cr, uid, line.id, {'account_id':a})
40#
41#sale_order_line()
42
43# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
440
=== modified file 'account_asset/account_asset.py'
--- account_asset/account_asset.py 2012-01-31 13:36:57 +0000
+++ account_asset/account_asset.py 2012-03-05 18:43:21 +0000
@@ -75,7 +75,7 @@
75 _name = 'account.asset.asset'75 _name = 'account.asset.asset'
76 _description = 'Asset'76 _description = 'Asset'
7777
78 def _get_period(self, cr, uid, context={}):78 def _get_period(self, cr, uid, context=None):
79 periods = self.pool.get('account.period').find(cr, uid)79 periods = self.pool.get('account.period').find(cr, uid)
80 if periods:80 if periods:
81 return periods[0]81 return periods[0]
@@ -176,7 +176,9 @@
176 year = depreciation_date.year176 year = depreciation_date.year
177 return True177 return True
178178
179 def validate(self, cr, uid, ids, context={}):179 def validate(self, cr, uid, ids, context=None):
180 if context is None:
181 context = {}
180 return self.write(cr, uid, ids, {182 return self.write(cr, uid, ids, {
181 'state':'open'183 'state':'open'
182 }, context)184 }, context)
@@ -304,7 +306,7 @@
304 default.update({'depreciation_line_ids': [], 'state': 'draft'})306 default.update({'depreciation_line_ids': [], 'state': 'draft'})
305 return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)307 return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)
306308
307 def _compute_entries(self, cr, uid, ids, period_id, context={}):309 def _compute_entries(self, cr, uid, ids, period_id, context=None):
308 result = []310 result = []
309 period_obj = self.pool.get('account.period')311 period_obj = self.pool.get('account.period')
310 depreciation_obj = self.pool.get('account.asset.depreciation.line')312 depreciation_obj = self.pool.get('account.asset.depreciation.line')
311313
=== modified file 'account_budget/report/analytic_account_budget_report.py'
--- account_budget/report/analytic_account_budget_report.py 2011-01-14 00:11:01 +0000
+++ account_budget/report/analytic_account_budget_report.py 2012-03-05 18:43:21 +0000
@@ -35,7 +35,9 @@
35 })35 })
36 self.context = context36 self.context = context
3737
38 def funct(self, object, form, ids={}, done=None, level=1):38 def funct(self, object, form, ids=None, done=None, level=1):
39 if ids is None:
40 ids = {}
39 if not ids:41 if not ids:
40 ids = self.ids42 ids = self.ids
41 if not done:43 if not done:
@@ -153,7 +155,7 @@
153 tot['perc'] = float(tot['prac'] / tot['theo']) * 100155 tot['perc'] = float(tot['prac'] / tot['theo']) * 100
154 return result156 return result
155157
156 def funct_total(self,form):158 def funct_total(self, form):
157 result = []159 result = []
158 res = {}160 res = {}
159 res = {161 res = {
@@ -167,4 +169,4 @@
167169
168report_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')170report_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')
169171
170# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
171\ No newline at end of file172\ No newline at end of file
173# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
172174
=== modified file 'account_budget/report/budget_report.py'
--- account_budget/report/budget_report.py 2011-04-15 06:09:42 +0000
+++ account_budget/report/budget_report.py 2012-03-05 18:43:21 +0000
@@ -34,7 +34,9 @@
34 })34 })
35 self.context = context35 self.context = context
3636
37 def funct(self, object, form, ids={}, done=None, level=1):37 def funct(self, object, form, ids=None, done=None, level=1):
38 if ids is None:
39 ids = {}
38 if not ids:40 if not ids:
39 ids = self.ids41 ids = self.ids
40 if not done:42 if not done:
4143
=== modified file 'account_budget/report/crossovered_budget_report.py'
--- account_budget/report/crossovered_budget_report.py 2011-04-15 06:09:42 +0000
+++ account_budget/report/crossovered_budget_report.py 2012-03-05 18:43:21 +0000
@@ -37,7 +37,9 @@
37 })37 })
38 self.context = context38 self.context = context
3939
40 def funct(self, object, form, ids={}, done=None, level=1):40 def funct(self, object, form, ids=None, done=None, level=1):
41 if ids is None:
42 ids = {}
41 if not ids:43 if not ids:
42 ids = self.ids44 ids = self.ids
43 if not done:45 if not done:
4446
=== modified file 'account_budget/wizard/account_budget_analytic.py'
--- account_budget/wizard/account_budget_analytic.py 2011-04-29 08:49:48 +0000
+++ account_budget/wizard/account_budget_analytic.py 2012-03-05 18:43:21 +0000
@@ -52,4 +52,4 @@
5252
53account_budget_analytic()53account_budget_analytic()
5454
55# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
56\ No newline at end of file55\ No newline at end of file
56# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5757
=== modified file 'account_budget/wizard/account_budget_crossovered_report.py'
--- account_budget/wizard/account_budget_crossovered_report.py 2011-04-29 08:49:48 +0000
+++ account_budget/wizard/account_budget_crossovered_report.py 2012-03-05 18:43:21 +0000
@@ -53,4 +53,4 @@
5353
54account_budget_crossvered_report()54account_budget_crossvered_report()
5555
56# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
57\ No newline at end of file56\ No newline at end of file
57# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5858
=== modified file 'account_budget/wizard/account_budget_report.py'
--- account_budget/wizard/account_budget_report.py 2011-04-29 08:49:48 +0000
+++ account_budget/wizard/account_budget_report.py 2012-03-05 18:43:21 +0000
@@ -54,4 +54,4 @@
5454
55account_budget_report()55account_budget_report()
5656
57# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
58\ No newline at end of file57\ No newline at end of file
58# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5959
=== modified file 'account_coda/account_coda.py'
--- account_coda/account_coda.py 2012-02-13 18:07:41 +0000
+++ account_coda/account_coda.py 2012-03-05 18:43:21 +0000
@@ -217,7 +217,9 @@
217 _name = 'coda.bank.statement' 217 _name = 'coda.bank.statement'
218 _description = 'CODA Bank Statement' 218 _description = 'CODA Bank Statement'
219 219
220 def _default_journal_id(self, cr, uid, context={}):220 def _default_journal_id(self, cr, uid, context=None):
221 if context is None:
222 context = {}
221 if context.get('journal_id', False):223 if context.get('journal_id', False):
222 return context['journal_id']224 return context['journal_id']
223 return False225 return False
@@ -233,7 +235,7 @@
233 res[r] = round(res[r], 2)235 res[r] = round(res[r], 2)
234 return res236 return res
235237
236 def _get_period(self, cr, uid, context={}):238 def _get_period(self, cr, uid, context=None):
237 periods = self.pool.get('account.period').find(cr, uid)239 periods = self.pool.get('account.period').find(cr, uid)
238 if periods:240 if periods:
239 return periods[0]241 return periods[0]
240242
=== modified file 'account_followup/__init__.py'
--- account_followup/__init__.py 2011-01-14 00:11:01 +0000
+++ account_followup/__init__.py 2012-03-05 18:43:21 +0000
@@ -23,4 +23,4 @@
23import wizard23import wizard
24import report24import report
2525
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
27\ No newline at end of file26\ No newline at end of file
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2828
=== modified file 'account_followup/wizard/__init__.py'
--- account_followup/wizard/__init__.py 2011-01-14 00:11:01 +0000
+++ account_followup/wizard/__init__.py 2012-03-05 18:43:21 +0000
@@ -21,4 +21,4 @@
2121
22import account_followup_print22import account_followup_print
2323
24# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
25\ No newline at end of file24\ No newline at end of file
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2626
=== modified file 'account_followup/wizard/account_followup_print.py'
--- account_followup/wizard/account_followup_print.py 2012-02-13 16:03:19 +0000
+++ account_followup/wizard/account_followup_print.py 2012-03-05 18:43:21 +0000
@@ -209,7 +209,7 @@
209 to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id}209 to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id}
210 return {'partner_ids': partner_list, 'to_update': to_update}210 return {'partner_ids': partner_list, 'to_update': to_update}
211211
212 def do_mail(self ,cr, uid, ids, context=None):212 def do_mail(self, cr, uid, ids, context=None):
213 mod_obj = self.pool.get('ir.model.data')213 mod_obj = self.pool.get('ir.model.data')
214 move_obj = self.pool.get('account.move.line')214 move_obj = self.pool.get('account.move.line')
215 user_obj = self.pool.get('res.users')215 user_obj = self.pool.get('res.users')
216216
=== modified file 'account_invoice_layout/wizard/account_invoice_special_message.py'
--- account_invoice_layout/wizard/account_invoice_special_message.py 2011-04-29 08:49:48 +0000
+++ account_invoice_layout/wizard/account_invoice_special_message.py 2012-03-05 18:43:21 +0000
@@ -47,4 +47,4 @@
4747
48account_invoice_special_msg()48account_invoice_special_msg()
4949
50# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
51\ No newline at end of file50\ No newline at end of file
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5252
=== modified file 'account_payment/__init__.py'
--- account_payment/__init__.py 2011-01-14 00:11:01 +0000
+++ account_payment/__init__.py 2012-03-05 18:43:21 +0000
@@ -29,4 +29,4 @@
29import account_invoice29import account_invoice
30import report30import report
3131
32# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
33\ No newline at end of file32\ No newline at end of file
33# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3434
=== modified file 'account_payment/account_invoice.py'
--- account_payment/account_invoice.py 2011-07-01 23:41:24 +0000
+++ account_payment/account_invoice.py 2012-03-05 18:43:21 +0000
@@ -50,4 +50,4 @@
5050
51Invoice()51Invoice()
5252
53# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
54\ No newline at end of file53\ No newline at end of file
54# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5555
=== modified file 'account_payment/account_move_line.py'
--- account_payment/account_move_line.py 2011-07-01 23:41:24 +0000
+++ account_payment/account_move_line.py 2012-03-05 18:43:21 +0000
@@ -26,7 +26,7 @@
26class account_move_line(osv.osv):26class account_move_line(osv.osv):
27 _inherit = "account.move.line"27 _inherit = "account.move.line"
2828
29 def amount_to_pay(self, cr, uid, ids, name, arg={}, context=None):29 def amount_to_pay(self, cr, uid, ids, name, arg=None, context=None):
30 """ Return the amount still to pay regarding all the payemnt orders30 """ Return the amount still to pay regarding all the payemnt orders
31 (excepting cancelled orders)"""31 (excepting cancelled orders)"""
32 if not ids:32 if not ids:
@@ -117,4 +117,4 @@
117117
118account_move_line()118account_move_line()
119119
120# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
121\ No newline at end of file120\ No newline at end of file
121# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
122122
=== modified file 'account_payment/account_payment.py'
--- account_payment/account_payment.py 2012-01-31 13:36:57 +0000
+++ account_payment/account_payment.py 2012-03-05 18:43:21 +0000
@@ -139,7 +139,9 @@
139 wf_service.trg_validate(uid, 'payment.order', ids[0], 'done', cr)139 wf_service.trg_validate(uid, 'payment.order', ids[0], 'done', cr)
140 return True140 return True
141141
142 def copy(self, cr, uid, id, default={}, context=None):142 def copy(self, cr, uid, id, default=None, context=None):
143 if default is None:
144 default = {}
143 default.update({145 default.update({
144 'state': 'draft',146 'state': 'draft',
145 'line_ids': [],147 'line_ids': [],
146148
=== modified file 'account_payment/report/__init__.py'
--- account_payment/report/__init__.py 2011-01-14 00:11:01 +0000
+++ account_payment/report/__init__.py 2012-03-05 18:43:21 +0000
@@ -20,4 +20,4 @@
20##############################################################################20##############################################################################
2121
22import payment_order22import payment_order
23# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
24\ No newline at end of file23\ No newline at end of file
24# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2525
=== modified file 'account_payment/report/payment_order.py'
--- account_payment/report/payment_order.py 2011-01-14 00:11:01 +0000
+++ account_payment/report/payment_order.py 2012-03-05 18:43:21 +0000
@@ -77,7 +77,7 @@
77 user = pool.get('res.users').browse(self.cr, self.uid, self.uid)77 user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
78 return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False78 return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
7979
80 def _get_account_name(self,bank_id):80 def _get_account_name(self, bank_id):
81 if bank_id:81 if bank_id:
82 pool = pooler.get_pool(self.cr.dbname)82 pool = pooler.get_pool(self.cr.dbname)
83 value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id])83 value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id])
@@ -87,4 +87,4 @@
8787
88report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="external")88report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="external")
8989
90# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
91\ No newline at end of file90\ No newline at end of file
91# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
9292
=== modified file 'account_payment/wizard/__init__.py'
--- account_payment/wizard/__init__.py 2011-01-14 00:11:01 +0000
+++ account_payment/wizard/__init__.py 2012-03-05 18:43:21 +0000
@@ -23,4 +23,4 @@
23import account_payment_populate_statement23import account_payment_populate_statement
24import account_payment_pay24import account_payment_pay
2525
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
27\ No newline at end of file26\ No newline at end of file
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2828
=== modified file 'account_payment/wizard/account_payment_order.py'
--- account_payment/wizard/account_payment_order.py 2011-10-16 01:28:00 +0000
+++ account_payment/wizard/account_payment_order.py 2012-03-05 18:43:21 +0000
@@ -119,4 +119,4 @@
119119
120payment_order_create()120payment_order_create()
121121
122# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
123\ No newline at end of file122\ No newline at end of file
123# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
124124
=== modified file 'account_payment/wizard/account_payment_pay.py'
--- account_payment/wizard/account_payment_pay.py 2012-01-31 13:36:57 +0000
+++ account_payment/wizard/account_payment_pay.py 2012-03-05 18:43:21 +0000
@@ -56,4 +56,4 @@
5656
57account_payment_make_payment()57account_payment_make_payment()
5858
59# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
60\ No newline at end of file59\ No newline at end of file
60# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6161
=== modified file 'account_payment/wizard/account_payment_populate_statement.py'
--- account_payment/wizard/account_payment_populate_statement.py 2012-01-31 13:36:57 +0000
+++ account_payment/wizard/account_payment_populate_statement.py 2012-03-05 18:43:21 +0000
@@ -120,4 +120,4 @@
120120
121account_payment_populate_statement()121account_payment_populate_statement()
122122
123# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
124\ No newline at end of file123\ No newline at end of file
124# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
125125
=== modified file 'account_sequence/__init__.py'
--- account_sequence/__init__.py 2011-01-14 00:11:01 +0000
+++ account_sequence/__init__.py 2012-03-05 18:43:21 +0000
@@ -22,4 +22,4 @@
22import account_sequence22import account_sequence
23import account_sequence_installer23import account_sequence_installer
2424
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26\ No newline at end of file25\ No newline at end of file
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2727
=== modified file 'account_voucher/__init__.py'
--- account_voucher/__init__.py 2011-10-16 01:28:00 +0000
+++ account_voucher/__init__.py 2012-03-05 18:43:21 +0000
@@ -24,4 +24,4 @@
24import report24import report
25import wizard25import wizard
2626
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
28\ No newline at end of file27\ No newline at end of file
28# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2929
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2012-02-24 10:23:05 +0000
+++ account_voucher/account_voucher.py 2012-03-05 18:43:21 +0000
@@ -830,7 +830,7 @@
830 res['account_id'] = account_id830 res['account_id'] = account_id
831 return {'value':res}831 return {'value':res}
832832
833 def _sel_context(self, cr, uid, voucher_id,context=None):833 def _sel_context(self, cr, uid, voucher_id, context=None):
834 """834 """
835 Select the context to use accordingly if it needs to be multicurrency or not.835 Select the context to use accordingly if it needs to be multicurrency or not.
836836
@@ -1251,7 +1251,9 @@
1251 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)1251 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)
1252 return True1252 return True
12531253
1254 def copy(self, cr, uid, id, default={}, context=None):1254 def copy(self, cr, uid, id, default=None, context=None):
1255 if default is None:
1256 default = {}
1255 default.update({1257 default.update({
1256 'state': 'draft',1258 'state': 'draft',
1257 'number': False,1259 'number': False,
12581260
=== modified file 'account_voucher/report/__init__.py'
--- account_voucher/report/__init__.py 2011-01-14 00:11:01 +0000
+++ account_voucher/report/__init__.py 2012-03-05 18:43:21 +0000
@@ -23,4 +23,4 @@
23import account_voucher_print23import account_voucher_print
24import account_voucher_sales_receipt24import account_voucher_sales_receipt
2525
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
27\ No newline at end of file26\ No newline at end of file
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2828
=== modified file 'account_voucher/report/account_voucher.py'
--- account_voucher/report/account_voucher.py 2011-01-14 00:11:01 +0000
+++ account_voucher/report/account_voucher.py 2012-03-05 18:43:21 +0000
@@ -72,4 +72,4 @@
72 parser=report_voucher,header="external"72 parser=report_voucher,header="external"
73)73)
7474
75# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
76\ No newline at end of file75\ No newline at end of file
76# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
7777
=== modified file 'account_voucher/report/account_voucher_print.py'
--- account_voucher/report/account_voucher_print.py 2011-01-14 00:11:01 +0000
+++ account_voucher/report/account_voucher_print.py 2012-03-05 18:43:21 +0000
@@ -93,4 +93,4 @@
93 parser=report_voucher_print,header="external"93 parser=report_voucher_print,header="external"
94)94)
9595
96# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
97\ No newline at end of file96\ No newline at end of file
97# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
9898
=== modified file 'account_voucher/wizard/__init__.py'
--- account_voucher/wizard/__init__.py 2011-01-14 00:11:01 +0000
+++ account_voucher/wizard/__init__.py 2012-03-05 18:43:21 +0000
@@ -22,4 +22,4 @@
22import account_voucher_unreconcile22import account_voucher_unreconcile
23import account_statement_from_invoice23import account_statement_from_invoice
2424
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26\ No newline at end of file25\ No newline at end of file
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2727
=== modified file 'account_voucher/wizard/account_voucher_unreconcile.py'
--- account_voucher/wizard/account_voucher_unreconcile.py 2011-01-14 00:11:01 +0000
+++ account_voucher/wizard/account_voucher_unreconcile.py 2012-03-05 18:43:21 +0000
@@ -59,4 +59,4 @@
5959
60account_voucher_unreconcile()60account_voucher_unreconcile()
6161
62# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
63\ No newline at end of file62\ No newline at end of file
63# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6464
=== modified file 'analytic/analytic.py'
--- analytic/analytic.py 2012-02-16 18:01:11 +0000
+++ analytic/analytic.py 2012-03-05 18:43:21 +0000
@@ -219,7 +219,7 @@
219 default['line_ids'] = []219 default['line_ids'] = []
220 return super(account_analytic_account, self).copy(cr, uid, id, default, context=context)220 return super(account_analytic_account, self).copy(cr, uid, id, default, context=context)
221221
222 def on_change_partner_id(self, cr, uid, id, partner_id, context={}):222 def on_change_partner_id(self, cr, uid, id, partner_id, context=None):
223 if not partner_id:223 if not partner_id:
224 return {'value': {'contact_id': False}}224 return {'value': {'contact_id': False}}
225 addr = self.pool.get('res.partner').address_get(cr, uid, [partner_id], ['invoice'])225 addr = self.pool.get('res.partner').address_get(cr, uid, [partner_id], ['invoice'])
226226
=== modified file 'anonymization/anonymization.py'
--- anonymization/anonymization.py 2011-12-19 16:54:40 +0000
+++ anonymization/anonymization.py 2012-03-05 18:43:21 +0000
@@ -350,7 +350,7 @@
350 })350 })
351 raise osv.except_osv(error_type, error_msg)351 raise osv.except_osv(error_type, error_msg)
352352
353 def anonymize_database(self,cr, uid, ids, context=None):353 def anonymize_database(self, cr, uid, ids, context=None):
354 """Sets the 'anonymized' state to defined fields"""354 """Sets the 'anonymized' state to defined fields"""
355355
356 # create a new history record:356 # create a new history record:
@@ -485,7 +485,7 @@
485 'target':'new',485 'target':'new',
486 }486 }
487487
488 def reverse_anonymize_database(self,cr, uid, ids, context=None):488 def reverse_anonymize_database(self, cr, uid, ids, context=None):
489 """Set the 'clear' state to defined fields"""489 """Set the 'clear' state to defined fields"""
490490
491 ir_model_fields_anonymization_model = self.pool.get('ir.model.fields.anonymization')491 ir_model_fields_anonymization_model = self.pool.get('ir.model.fields.anonymization')
492492
=== modified file 'auction/auction.py'
--- auction/auction.py 2011-12-09 06:03:08 +0000
+++ auction/auction.py 2012-03-05 18:43:21 +0000
@@ -533,7 +533,7 @@
533 return self._sum_taxes_by_type_and_id(costs)533 return self._sum_taxes_by_type_and_id(costs)
534534
535 # sum remise limite net and ristourne535 # sum remise limite net and ristourne
536 def compute_seller_costs_summed(self, cr, uid, ids): #ach_pay_id536 def compute_seller_costs_summed(self, cr, uid, ids):
537537
538 """This Fuction sum Net remittance limit and refund"""538 """This Fuction sum Net remittance limit and refund"""
539539
540540
=== modified file 'auction/barcode/code39.py'
--- auction/barcode/code39.py 2011-01-14 00:11:01 +0000
+++ auction/barcode/code39.py 2012-03-05 18:43:21 +0000
@@ -114,7 +114,7 @@
114114
115 115
116class _Code39Base(Barcode):116class _Code39Base(Barcode):
117 def __init__(self, value = "", **args):117 def __init__(self, value="", **args):
118 self.xdim = inch * 0.0075118 self.xdim = inch * 0.0075
119 self.lquiet = None119 self.lquiet = None
120 self.rquiet = None120 self.rquiet = None
121121
=== modified file 'auction/barcode/common.py'
--- auction/barcode/common.py 2011-01-14 00:11:01 +0000
+++ auction/barcode/common.py 2012-03-05 18:43:21 +0000
@@ -39,7 +39,7 @@
39 """Abstract Base for barcodes. Includes implementations of39 """Abstract Base for barcodes. Includes implementations of
40 some methods suitable for the more primitive barcode types"""40 some methods suitable for the more primitive barcode types"""
41 41
42 def __init__(self, value = ''):42 def __init__(self, value=''):
43 self.value = value43 self.value = value
44 44
45 if not hasattr(self, 'gap'):45 if not hasattr(self, 'gap'):
4646
=== modified file 'auction/report/auction_invoice.py'
--- auction/report/auction_invoice.py 2011-01-14 00:11:01 +0000
+++ auction/report/auction_invoice.py 2012-03-05 18:43:21 +0000
@@ -26,7 +26,7 @@
26 def __init__(self, name):26 def __init__(self, name):
27 report_int.__init__(self, name)27 report_int.__init__(self, name)
2828
29 def create(self,cr, uid, ids, datas, context):29 def create(self, cr, uid, ids, datas, context):
30 lots = self.pool.get('auction.lots').read(cr, uid, ids, ['ach_inv_id'], context=context)30 lots = self.pool.get('auction.lots').read(cr, uid, ids, ['ach_inv_id'], context=context)
3131
32 invoices = {}32 invoices = {}
3333
=== modified file 'auction/report/auction_total_rml.py'
--- auction/report/auction_total_rml.py 2011-04-29 08:49:48 +0000
+++ auction/report/auction_total_rml.py 2012-03-05 18:43:21 +0000
@@ -65,7 +65,7 @@
65 return auct_dat65 return auct_dat
6666
6767
68 def sum_taxes(self,auction_id):68 def sum_taxes(self, auction_id):
69 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,))69 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,))
70 res = self.cr.fetchone()70 res = self.cr.fetchone()
71 return res[0]71 return res[0]
@@ -105,17 +105,17 @@
105 res = self.cr.fetchone()105 res = self.cr.fetchone()
106 return str(res[0]) or 0.0106 return str(res[0]) or 0.0
107107
108 def sum_credit(self,auction_id):108 def sum_credit(self, auction_id):
109 self.cr.execute("select sum(buyer_price) from auction_lots where id IN %s and auction_id=%s", (tuple(self.total_obj),auction_id,))109 self.cr.execute("select sum(buyer_price) from auction_lots where id IN %s and auction_id=%s", (tuple(self.total_obj),auction_id,))
110 res = self.cr.fetchone()110 res = self.cr.fetchone()
111 return str(res[0])111 return str(res[0])
112112
113 def sum_debit_buyer(self,auction_id):113 def sum_debit_buyer(self, auction_id):
114 self.cr.execute("select sum(buyer_price) from auction_lots where id IN %s and auction_id=%s", (tuple(self.total_obj),auction_id,))114 self.cr.execute("select sum(buyer_price) from auction_lots where id IN %s and auction_id=%s", (tuple(self.total_obj),auction_id,))
115 res = self.cr.fetchone()115 res = self.cr.fetchone()
116 return str(res[0] or 0)116 return str(res[0] or 0)
117117
118 def sum_debit(self,object_id):118 def sum_debit(self, object_id):
119 self.cr.execute("select sum(seller_price) from auction_lots where auction_id=%s", (object_id,))119 self.cr.execute("select sum(seller_price) from auction_lots where auction_id=%s", (object_id,))
120 res = self.cr.fetchone()120 res = self.cr.fetchone()
121 return str(res[0] or 0)121 return str(res[0] or 0)
122122
=== modified file 'auction/report/buyer_form_report.py'
--- auction/report/buyer_form_report.py 2011-04-29 08:49:48 +0000
+++ auction/report/buyer_form_report.py 2012-03-05 18:43:21 +0000
@@ -58,7 +58,7 @@
58 lots.append(object)58 lots.append(object)
59 return ret_dict.values()59 return ret_dict.values()
6060
61 def grand_buyer_total(self,o):61 def grand_buyer_total(self, o):
62 grand_total = 062 grand_total = 0
63 for oo in o:63 for oo in o:
64 grand_total =grand_total + oo['obj_price'] +self.sum_taxes(oo)64 grand_total =grand_total + oo['obj_price'] +self.sum_taxes(oo)
6565
=== modified file 'auction/report/buyer_list.py'
--- auction/report/buyer_list.py 2011-04-29 08:49:48 +0000
+++ auction/report/buyer_list.py 2012-03-05 18:43:21 +0000
@@ -62,7 +62,7 @@
62 auct_dat.append(auc_dates_fields)62 auct_dat.append(auc_dates_fields)
63 return auct_dat63 return auct_dat
6464
65 def lines_lots_auct_lot(self,obj):65 def lines_lots_auct_lot(self, obj):
6666
67 auc_date_ids = self.pool.get('auction.dates').search(self.cr, self.uid, ([('name','like',obj['name'])]))67 auc_date_ids = self.pool.get('auction.dates').search(self.cr, self.uid, ([('name','like',obj['name'])]))
6868
6969
=== modified file 'auction/report/huissier.py'
--- auction/report/huissier.py 2011-04-29 08:49:48 +0000
+++ auction/report/huissier.py 2012-03-05 18:43:21 +0000
@@ -30,7 +30,7 @@
30 def __init__(self, name, table, tmpl, xsl):30 def __init__(self, name, table, tmpl, xsl):
31 report_rml.__init__(self, name, table, tmpl, xsl)31 report_rml.__init__(self, name, table, tmpl, xsl)
3232
33 def create_xml(self,cr, uid, ids, datas, context=None):33 def create_xml(self, cr, uid, ids, datas, context=None):
34 pool= pooler.get_pool(cr.dbname)34 pool= pooler.get_pool(cr.dbname)
35 lots = pool.get('auction.lots').browse(cr, uid, ids, context=context)35 lots = pool.get('auction.lots').browse(cr, uid, ids, context=context)
36 auction = lots[0].auction_id36 auction = lots[0].auction_id
3737
=== modified file 'auction/report/photo_shadow.py'
--- auction/report/photo_shadow.py 2011-11-14 06:51:05 +0000
+++ auction/report/photo_shadow.py 2012-03-05 18:43:21 +0000
@@ -19,7 +19,7 @@
19#19#
20##############################################################################20##############################################################################
2121
22def convert_catalog(from_file, to_file, size=220) :22def convert_catalog(from_file, to_file, size=220):
23 return __convert(from_file, to_file, size)23 return __convert(from_file, to_file, size)
2424
25def convert(from_file, to_file):25def convert(from_file, to_file):
2626
=== modified file 'auction/report/seller_form_report.py'
--- auction/report/seller_form_report.py 2011-04-29 08:49:48 +0000
+++ auction/report/seller_form_report.py 2012-03-05 18:43:21 +0000
@@ -58,7 +58,7 @@
58 lots = partner.get('lots')58 lots = partner.get('lots')
59 lots.append(object)59 lots.append(object)
60 return ret_dict.values()60 return ret_dict.values()
61 def grand_seller_total(self,o):61 def grand_seller_total(self, o):
62 grand_total = 062 grand_total = 0
63 for oo in o:63 for oo in o:
64 grand_total =grand_total + oo['obj_price']+ self.sum_taxes(oo)64 grand_total =grand_total + oo['obj_price']+ self.sum_taxes(oo)
6565
=== modified file 'audittrail/audittrail.py'
--- audittrail/audittrail.py 2011-11-21 16:27:12 +0000
+++ audittrail/audittrail.py 2012-03-05 18:43:21 +0000
@@ -201,7 +201,7 @@
201 res = value201 res = value
202 return res202 return res
203203
204 def create_log_line(self, cr, uid, log_id, model, lines=[]):204 def create_log_line(self, cr, uid, log_id, model, lines=None):
205 """205 """
206 Creates lines for changed fields with its old and new values206 Creates lines for changed fields with its old and new values
207207
@@ -210,6 +210,8 @@
210 @param model: Object which values are being changed210 @param model: Object which values are being changed
211 @param lines: List of values for line is to be created211 @param lines: List of values for line is to be created
212 """212 """
213 if lines is None:
214 lines = []
213 pool = pooler.get_pool(cr.dbname)215 pool = pooler.get_pool(cr.dbname)
214 obj_pool = pool.get(model.model)216 obj_pool = pool.get(model.model)
215 model_pool = pool.get('ir.model')217 model_pool = pool.get('ir.model')
@@ -348,7 +350,7 @@
348 data[(model.id, resource_id)] = {'text':values_text, 'value': values}350 data[(model.id, resource_id)] = {'text':values_text, 'value': values}
349 return data351 return data
350352
351 def prepare_audittrail_log_line(self, cr, uid, pool, model, resource_id, method, old_values, new_values, field_list=[]):353 def prepare_audittrail_log_line(self, cr, uid, pool, model, resource_id, method, old_values, new_values, field_list=None):
352 """354 """
353 This function compares the old data (i.e before the method was executed) and the new data 355 This function compares the old data (i.e before the method was executed) and the new data
354 (after the method was executed) and returns a structure with all the needed information to356 (after the method was executed) and returns a structure with all the needed information to
@@ -378,6 +380,8 @@
378 record (res.partner, for example), we may have to log a change done in a x2many field (on 380 record (res.partner, for example), we may have to log a change done in a x2many field (on
379 res.partner.address, for example)381 res.partner.address, for example)
380 """382 """
383 if field_list is None:
384 field_list = []
381 key = (model.id, resource_id)385 key = (model.id, resource_id)
382 lines = {386 lines = {
383 key: []387 key: []
@@ -416,7 +420,7 @@
416 lines[key].append(data)420 lines[key].append(data)
417 return lines421 return lines
418422
419 def process_data(self, cr, uid, pool, res_ids, model, method, old_values={}, new_values={}, field_list=[]):423 def process_data(self, cr, uid, pool, res_ids, model, method, old_values=None, new_values=None, field_list=None):
420 """424 """
421 This function processes and iterates recursively to log the difference between the old425 This function processes and iterates recursively to log the difference between the old
422 data (i.e before the method was executed) and the new data and creates audittrail log426 data (i.e before the method was executed) and the new data and creates audittrail log
423427
=== modified file 'base_contact/base_contact.py'
--- base_contact/base_contact.py 2012-02-15 13:22:13 +0000
+++ base_contact/base_contact.py 2012-03-05 18:43:21 +0000
@@ -175,7 +175,7 @@
175 ids = self.pool.get('res.partner.location').search(cr, uid, [('partner_id','=',context['default_partner_id'])], context=context)175 ids = self.pool.get('res.partner.location').search(cr, uid, [('partner_id','=',context['default_partner_id'])], context=context)
176 return ids and ids[0] or False176 return ids and ids[0] or False
177177
178 def onchange_location_id(self,cr, uid, ids, location_id=False, context={}):178 def onchange_location_id(self, cr, uid, ids, location_id=False, context=None):
179 if not location_id:179 if not location_id:
180 return {}180 return {}
181 location = self.pool.get('res.partner.location').browse(cr, uid, location_id, context=context)181 location = self.pool.get('res.partner.location').browse(cr, uid, location_id, context=context)
@@ -209,7 +209,7 @@
209 'name' : fields.related('contact_id', 'name', type='char', size=64, string="Contact Name", store=True),209 'name' : fields.related('contact_id', 'name', type='char', size=64, string="Contact Name", store=True),
210 'title' : fields.related('contact_id', 'title', type='many2one', relation='res.partner.title', string="Title", store=True),210 'title' : fields.related('contact_id', 'title', type='many2one', relation='res.partner.title', string="Title", store=True),
211 }211 }
212 def create(self, cr, uid, data, context={}):212 def create(self, cr, uid, data, context=None):
213 if not data.get('location_id', False):213 if not data.get('location_id', False):
214 loc_id = self.pool.get('res.partner.location').create(cr, uid, {214 loc_id = self.pool.get('res.partner.location').create(cr, uid, {
215 'street': data.get('street',''),215 'street': data.get('street',''),
@@ -241,7 +241,7 @@
241 'location_id': _default_location_id241 'location_id': _default_location_id
242 }242 }
243243
244 def default_get(self, cr, uid, fields=[], context=None):244 def default_get(self, cr, uid, fields=None, context=None):
245 if context is None:245 if context is None:
246 context = {}246 context = {}
247 if 'default_type' in context:247 if 'default_type' in context:
248248
=== modified file 'base_crypt/crypt.py'
--- base_crypt/crypt.py 2011-10-18 09:38:13 +0000
+++ base_crypt/crypt.py 2012-03-05 18:43:21 +0000
@@ -45,7 +45,9 @@
4545
46magic_md5 = '$1$'46magic_md5 = '$1$'
4747
48def gen_salt( length=8, symbols=ascii_letters + digits ):48def gen_salt( length=8, symbols=None):
49 if symbols is None:
50 symbols = ascii_letters + digits
49 seed()51 seed()
50 return ''.join( sample( symbols, length ) )52 return ''.join( sample( symbols, length ) )
5153
5254
=== modified file 'base_module_doc_rst/report/ir_module_reference_print_graph.py'
--- base_module_doc_rst/report/ir_module_reference_print_graph.py 2011-01-14 00:11:01 +0000
+++ base_module_doc_rst/report/ir_module_reference_print_graph.py 2012-03-05 18:43:21 +0000
@@ -79,4 +79,4 @@
79 'addons/base_module_doc_rst/report/ir_module_reference_graph.rml',79 'addons/base_module_doc_rst/report/ir_module_reference_graph.rml',
80 parser=ir_module_reference_print_graph, header=False)80 parser=ir_module_reference_print_graph, header=False)
8181
82# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
83\ No newline at end of file82\ No newline at end of file
83# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
8484
=== modified file 'base_module_quality/__init__.py'
--- base_module_quality/__init__.py 2011-01-14 00:11:01 +0000
+++ base_module_quality/__init__.py 2012-03-05 18:43:21 +0000
@@ -22,4 +22,4 @@
22import base_module_quality22import base_module_quality
23import wizard23import wizard
2424
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26\ No newline at end of file25\ No newline at end of file
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2727
=== modified file 'base_module_quality/base_module_quality.py'
--- base_module_quality/base_module_quality.py 2011-10-27 21:11:24 +0000
+++ base_module_quality/base_module_quality.py 2012-03-05 18:43:21 +0000
@@ -115,7 +115,9 @@
115 self.log.debug('get_objects() obj_list: %s', ','.join(obj_list))115 self.log.debug('get_objects() obj_list: %s', ','.join(obj_list))
116 return obj_list116 return obj_list
117117
118 def get_model_ids(self, cr, uid, models=[]):118 def get_model_ids(self, cr, uid, models=None):
119 if models is None:
120 models = []
119 # This function returns all ids of the given objects..121 # This function returns all ids of the given objects..
120 if not models:122 if not models:
121 return []123 return []
@@ -133,7 +135,12 @@
133 result_ids[obj] = ids135 result_ids[obj] = ids
134 return result_ids136 return result_ids
135137
136 def format_table(self, header=[], data_list={}): #This function can work forwidget="text_wiki"138 def format_table(self, header=None, data_list=None):
139 #This function can work forwidget="text_wiki"
140 if header is None:
141 header = []
142 if data_list is None:
143 data_list = {}
137 detail = ""144 detail = ""
138 detail += (header[0]) % tuple(header[1])145 detail += (header[0]) % tuple(header[1])
139 frow = '\n|-'146 frow = '\n|-'
@@ -144,7 +151,12 @@
144 detail = detail + '\n|}'151 detail = detail + '\n|}'
145 return detail152 return detail
146153
147 def format_html_table(self, header=[], data_list=[]): #This function can work for widget="html_tag"154 def format_html_table(self, header=None, data_list=None):
155 #This function can work for widget="html_tag"
156 if header is None:
157 header = []
158 if data_list is None:
159 data_list = []
148 # function create html table....160 # function create html table....
149 detail = ""161 detail = ""
150 detail += (header[0]) % tuple(header[1])162 detail += (header[0]) % tuple(header[1])
151163
=== modified file 'base_module_quality/method_test/method_test.py'
--- base_module_quality/method_test/method_test.py 2011-01-14 00:11:01 +0000
+++ base_module_quality/method_test/method_test.py 2012-03-05 18:43:21 +0000
@@ -85,4 +85,4 @@
85 detail += self.format_table(header, dict_method)85 detail += self.format_table(header, dict_method)
86 return detail86 return detail
8787
88# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
89\ No newline at end of file88\ No newline at end of file
89# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
9090
=== modified file 'base_module_quality/object_test/object_test.py'
--- base_module_quality/object_test/object_test.py 2011-01-14 00:11:01 +0000
+++ base_module_quality/object_test/object_test.py 2012-03-05 18:43:21 +0000
@@ -208,4 +208,4 @@
208 return res208 return res
209 return ""209 return ""
210210
211# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
212\ No newline at end of file211\ No newline at end of file
212# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
213213
=== modified file 'base_module_quality/pep8_test/pep8_test.py'
--- base_module_quality/pep8_test/pep8_test.py 2011-01-14 00:11:01 +0000
+++ base_module_quality/pep8_test/pep8_test.py 2012-03-05 18:43:21 +0000
@@ -278,4 +278,4 @@
278 return res278 return res
279 return ""279 return ""
280280
281# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
282\ No newline at end of file281\ No newline at end of file
282# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
283283
=== modified file 'base_module_quality/structure_test/structure_test.py'
--- base_module_quality/structure_test/structure_test.py 2011-01-14 00:11:01 +0000
+++ base_module_quality/structure_test/structure_test.py 2012-03-05 18:43:21 +0000
@@ -176,4 +176,4 @@
176 return res176 return res
177 return ""177 return ""
178178
179# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
180\ No newline at end of file179\ No newline at end of file
180# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
181181
=== modified file 'base_module_quality/unit_test/unit_test.py'
--- base_module_quality/unit_test/unit_test.py 2011-01-14 00:11:01 +0000
+++ base_module_quality/unit_test/unit_test.py 2012-03-05 18:43:21 +0000
@@ -111,4 +111,4 @@
111 return detail + html +'</tr></table></body></html>'111 return detail + html +'</tr></table></body></html>'
112 return ''112 return ''
113113
114# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
115\ No newline at end of file114\ No newline at end of file
115# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
116116
=== modified file 'base_module_quality/wizard/module_quality_check.py'
--- base_module_quality/wizard/module_quality_check.py 2011-10-27 21:11:24 +0000
+++ base_module_quality/wizard/module_quality_check.py 2012-03-05 18:43:21 +0000
@@ -49,4 +49,4 @@
49 49
50quality_check()50quality_check()
5151
52# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
53\ No newline at end of file52\ No newline at end of file
53# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5454
=== modified file 'base_module_quality/wizard/quality_save_report.py'
--- base_module_quality/wizard/quality_save_report.py 2011-10-27 21:11:24 +0000
+++ base_module_quality/wizard/quality_save_report.py 2012-03-05 18:43:21 +0000
@@ -49,4 +49,4 @@
4949
50quality_save_report()50quality_save_report()
5151
52# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
53\ No newline at end of file52\ No newline at end of file
53# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5454
=== modified file 'base_module_quality/workflow_test/workflow_test.py'
--- base_module_quality/workflow_test/workflow_test.py 2011-01-14 00:11:01 +0000
+++ base_module_quality/workflow_test/workflow_test.py 2012-03-05 18:43:21 +0000
@@ -155,4 +155,4 @@
155 count = self.count_button(node, count)155 count = self.count_button(node, count)
156 return count156 return count
157157
158# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
159\ No newline at end of file158\ No newline at end of file
159# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
160160
=== modified file 'base_module_record/wizard/base_module_record_objects.py'
--- base_module_record/wizard/base_module_record_objects.py 2012-02-09 09:12:03 +0000
+++ base_module_record/wizard/base_module_record_objects.py 2012-03-05 18:43:21 +0000
@@ -127,7 +127,7 @@
127 _name = 'base.module.record.objects'127 _name = 'base.module.record.objects'
128 _description = "Base Module Record Objects"128 _description = "Base Module Record Objects"
129 129
130 def inter_call(self,cr,uid,data,context=None):130 def inter_call(self, cr, uid, data, context=None):
131 res=base_module_save._create_module(self, cr, uid, data, context)131 res=base_module_save._create_module(self, cr, uid, data, context)
132 mod_obj = self.pool.get('ir.model.data')132 mod_obj = self.pool.get('ir.model.data')
133 model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'module_create_form_view')], context=context)133 model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'module_create_form_view')], context=context)
134134
=== modified file 'base_module_record/wizard/base_module_save.py'
--- base_module_record/wizard/base_module_save.py 2011-09-08 07:06:49 +0000
+++ base_module_record/wizard/base_module_save.py 2012-03-05 18:43:21 +0000
@@ -167,4 +167,4 @@
167 167
168base_module_save()168base_module_save()
169169
170# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
171\ No newline at end of file170\ No newline at end of file
171# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
172172
=== modified file 'base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py'
--- base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py 2011-01-14 00:11:01 +0000
+++ base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py 2012-03-05 18:43:21 +0000
@@ -42,11 +42,11 @@
4242
43class DomApiGeneral:43class DomApiGeneral:
44 """General DOM API utilities."""44 """General DOM API utilities."""
45 def __init__(self,content_string="",file=""):45 def __init__(self, content_string="", file=""):
46 self.content_string = content_string46 self.content_string = content_string
47 self.re_digits = re.compile(r"(.*?\d)(pt|cm|mm|inch|in)")47 self.re_digits = re.compile(r"(.*?\d)(pt|cm|mm|inch|in)")
4848
49 def _unitTuple(self,string):49 def _unitTuple(self, string):
50 """Split values and units to a tuple."""50 """Split values and units to a tuple."""
51 temp = self.re_digits.findall(string)51 temp = self.re_digits.findall(string)
52 if not temp:52 if not temp:
@@ -54,13 +54,15 @@
54 else:54 else:
55 return (temp[0])55 return (temp[0])
5656
57 def stringPercentToFloat(self,string):57 def stringPercentToFloat(self, string):
58 temp = string.replace("""%""","")58 temp = string.replace("""%""","")
59 return float(temp)/10059 return float(temp)/100
6060
61 def findChildrenByName(self,parent,name,attr_dict={}):61 def findChildrenByName(self, parent, name, attr_dict=None):
62 """Helper functions. Does not work recursively.62 """Helper functions. Does not work recursively.
63 Optional: also test for certain attribute/value pairs."""63 Optional: also test for certain attribute/value pairs."""
64 if attr_dict is None:
65 attr_dict = {}
64 children = []66 children = []
65 for c in parent.childNodes:67 for c in parent.childNodes:
66 if c.nodeType == c.ELEMENT_NODE and c.nodeName == name:68 if c.nodeType == c.ELEMENT_NODE and c.nodeName == name:
@@ -70,7 +72,7 @@
70 else:72 else:
71 return self._selectForAttributes(nodelist=children,attr_dict=attr_dict)73 return self._selectForAttributes(nodelist=children,attr_dict=attr_dict)
7274
73 def _selectForAttributes(self,nodelist,attr_dict):75 def _selectForAttributes(self, nodelist, attr_dict):
74 "Helper function."""76 "Helper function."""
75 selected_nodes = []77 selected_nodes = []
76 for n in nodelist:78 for n in nodelist:
@@ -83,7 +85,7 @@
83 selected_nodes.append(n)85 selected_nodes.append(n)
84 return selected_nodes86 return selected_nodes
8587
86 def _stringToTuple(self,s):88 def _stringToTuple(self, s):
87 """Helper function."""89 """Helper function."""
88 try:90 try:
89 temp = string.split(s,",")91 temp = string.split(s,",")
@@ -91,13 +93,13 @@
91 except:93 except:
92 return None94 return None
9395
94 def _tupleToString(self,t):96 def _tupleToString(self, t):
95 try:97 try:
96 return self.openOfficeStringUtf8("%s,%s" % (t[0],t[1]))98 return self.openOfficeStringUtf8("%s,%s" % (t[0],t[1]))
97 except:99 except:
98 return None100 return None
99101
100 def _lengthToFloat(self,value):102 def _lengthToFloat(self, value):
101 v = value103 v = value
102 if not self.re_digits.search(v):104 if not self.re_digits.search(v):
103 return v105 return v
@@ -113,7 +115,7 @@
113 except:115 except:
114 return v116 return v
115117
116 def openOfficeStringUtf8(self,string):118 def openOfficeStringUtf8(self, string):
117 if type(string) == unicode:119 if type(string) == unicode:
118 return string.encode("utf-8")120 return string.encode("utf-8")
119 tempstring = unicode(string,"cp1252").encode("utf-8")121 tempstring = unicode(string,"cp1252").encode("utf-8")
@@ -121,7 +123,7 @@
121123
122class DomApi(DomApiGeneral):124class DomApi(DomApiGeneral):
123 """This class provides a DOM-API for XML-Files from an SXW-Archive."""125 """This class provides a DOM-API for XML-Files from an SXW-Archive."""
124 def __init__(self,xml_content,xml_styles):126 def __init__(self, xml_content, xml_styles):
125 DomApiGeneral.__init__(self)127 DomApiGeneral.__init__(self)
126 self.content_dom = xml.dom.minidom.parseString(xml_content)128 self.content_dom = xml.dom.minidom.parseString(xml_content)
127 self.styles_dom = xml.dom.minidom.parseString(xml_styles)129 self.styles_dom = xml.dom.minidom.parseString(xml_styles)
@@ -145,7 +147,7 @@
145 for s in self.style_dict.keys():147 for s in self.style_dict.keys():
146 self.style_properties_dict[s] = self.getStylePropertiesDict(s)148 self.style_properties_dict[s] = self.getStylePropertiesDict(s)
147149
148 def updateWithPercents(self,dict,updatedict):150 def updateWithPercents(self, dict, updatedict):
149 """Sometimes you find values like "115%" in the style hierarchy."""151 """Sometimes you find values like "115%" in the style hierarchy."""
150 if not updatedict:152 if not updatedict:
151 # no style hierarchies for this style? =>153 # no style hierarchies for this style? =>
@@ -244,7 +246,7 @@
244 def toxml(self):246 def toxml(self):
245 return self.content_dom.toxml(encoding="utf-8")247 return self.content_dom.toxml(encoding="utf-8")
246248
247 def getStylePropertiesDict(self,style_name):249 def getStylePropertiesDict(self, style_name):
248 res = {}250 res = {}
249251
250 if self.style_dict[style_name].hasAttribute("style:parent-style-name"):252 if self.style_dict[style_name].hasAttribute("style:parent-style-name"):
@@ -265,7 +267,7 @@
265 self.save_pict = save_pict267 self.save_pict = save_pict
266 self.images = {}268 self.images = {}
267269
268 def oo_read(self,fname):270 def oo_read(self, fname):
269 z = zipfile.ZipFile(fname,"r")271 z = zipfile.ZipFile(fname,"r")
270 content = z.read('content.xml')272 content = z.read('content.xml')
271 style = z.read('styles.xml')273 style = z.read('styles.xml')
@@ -281,7 +283,7 @@
281 z.close()283 z.close()
282 return content,style284 return content,style
283285
284 def oo_replace(self,content):286 def oo_replace(self, content):
285 regex = [287 regex = [
286 (r"<para[^>]*/>", ""),288 (r"<para[^>]*/>", ""),
287 (r"<para(.*)>(.*?)<text:line-break[^>]*/>", "<para$1>$2</para><para$1>"),289 (r"<para(.*)>(.*?)<text:line-break[^>]*/>", "<para$1>$2</para><para$1>"),
@@ -290,7 +292,7 @@
290 content = re.sub(key, val, content)292 content = re.sub(key, val, content)
291 return content293 return content
292294
293 def unpackNormalize(self,sourcefile):295 def unpackNormalize(self, sourcefile):
294 c,s = self.oo_read(sourcefile)296 c,s = self.oo_read(sourcefile)
295 c = self.oo_replace(c)297 c = self.oo_replace(c)
296 dom = DomApi(c,s)298 dom = DomApi(c,s)
297299
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/About.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/About.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/About.py 2012-03-05 18:43:21 +0000
@@ -52,7 +52,7 @@
52 from lib.gui import *52 from lib.gui import *
5353
54class About(unohelper.Base, XJobExecutor):54class About(unohelper.Base, XJobExecutor):
55 def __init__(self,ctx):55 def __init__(self, ctx):
56 self.ctx = ctx56 self.ctx = ctx
57 self.module = "openerp_report"57 self.module = "openerp_report"
58 self.version = "0.1"58 self.version = "0.1"
5959
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py 2012-03-05 18:43:21 +0000
@@ -64,7 +64,7 @@
64 'PDF' : 'pdf',64 'PDF' : 'pdf',
65 'OpenOffice': 'sxw',65 'OpenOffice': 'sxw',
66 }66 }
67 def __init__(self,ctx):67 def __init__(self, ctx):
68 self.ctx = ctx68 self.ctx = ctx
69 self.module = "openerp_report"69 self.module = "openerp_report"
70 self.version = "0.1"70 self.version = "0.1"
@@ -132,7 +132,7 @@
132 self.win.addButton('btnCancel', -2 - 27 , -5 , 30 , 15, 'Cancel' ,actionListenerProc = self.btnCancel_clicked )132 self.win.addButton('btnCancel', -2 - 27 , -5 , 30 , 15, 'Cancel' ,actionListenerProc = self.btnCancel_clicked )
133 self.win.doModalDialog("lstResourceType", self.Kind.keys()[0])133 self.win.doModalDialog("lstResourceType", self.Kind.keys()[0])
134134
135 def btnSearch_clicked( self, oActionEvent ):135 def btnSearch_clicked(self, oActionEvent):
136 modelSelectedItem = self.win.getListBoxSelectedItem("lstmodel")136 modelSelectedItem = self.win.getListBoxSelectedItem("lstmodel")
137 if modelSelectedItem == "":137 if modelSelectedItem == "":
138 return138 return
@@ -151,7 +151,7 @@
151 for result in self.aSearchResult:151 for result in self.aSearchResult:
152 self.lstResource.addItem(result[1],result[0])152 self.lstResource.addItem(result[1],result[0])
153153
154 def _send_attachment( self, name, data, res_model, res_id ):154 def _send_attachment(self, name, data, res_model, res_id):
155 desktop = getDesktop()155 desktop = getDesktop()
156 oDoc2 = desktop.getCurrentComponent()156 oDoc2 = desktop.getCurrentComponent()
157 docinfo = oDoc2.getDocumentInfo()157 docinfo = oDoc2.getDocumentInfo()
@@ -166,7 +166,7 @@
166166
167 return self.sock.execute( database, uid, self.password, 'ir.attachment', 'create', params )167 return self.sock.execute( database, uid, self.password, 'ir.attachment', 'create', params )
168168
169 def send_attachment( self, model, resource_id ):169 def send_attachment(self, model, resource_id):
170 desktop = getDesktop()170 desktop = getDesktop()
171 oDoc2 = desktop.getCurrentComponent()171 oDoc2 = desktop.getCurrentComponent()
172 docinfo = oDoc2.getDocumentInfo()172 docinfo = oDoc2.getDocumentInfo()
@@ -187,7 +187,7 @@
187 data = read_data_from_file( get_absolute_file_path( url ) )187 data = read_data_from_file( get_absolute_file_path( url ) )
188 return self._send_attachment( os.path.basename( url ), data, model, resource_id )188 return self._send_attachment( os.path.basename( url ), data, model, resource_id )
189189
190 def btnOkWithoutInformation_clicked( self, oActionEvent ):190 def btnOkWithoutInformation_clicked(self, oActionEvent):
191 desktop = getDesktop()191 desktop = getDesktop()
192 oDoc2 = desktop.getCurrentComponent()192 oDoc2 = desktop.getCurrentComponent()
193 docinfo = oDoc2.getDocumentInfo()193 docinfo = oDoc2.getDocumentInfo()
@@ -199,7 +199,7 @@
199 res = self.send_attachment( docinfo.getUserFieldValue(3), docinfo.getUserFieldValue(2) )199 res = self.send_attachment( docinfo.getUserFieldValue(3), docinfo.getUserFieldValue(2) )
200 self.win.endExecute()200 self.win.endExecute()
201201
202 def btnOkWithInformation_clicked(self,oActionEvent):202 def btnOkWithInformation_clicked(self, oActionEvent):
203 if self.win.getListBoxSelectedItem("lstResourceType") == "":203 if self.win.getListBoxSelectedItem("lstResourceType") == "":
204 ErrorDialog( "Please select resource type", "", "Selection ERROR" )204 ErrorDialog( "Please select resource type", "", "Selection ERROR" )
205 return205 return
@@ -221,7 +221,7 @@
221 res = self.send_attachment( self.dModel[self.win.getListBoxSelectedItem('lstmodel')], resourceid )221 res = self.send_attachment( self.dModel[self.win.getListBoxSelectedItem('lstmodel')], resourceid )
222 self.win.endExecute()222 self.win.endExecute()
223223
224 def btnCancel_clicked( self, oActionEvent ):224 def btnCancel_clicked(self, oActionEvent):
225 self.win.endExecute()225 self.win.endExecute()
226226
227 def doc2pdf(self, strFile):227 def doc2pdf(self, strFile):
@@ -262,7 +262,7 @@
262 # Can be None if len(strFilterSubName) <= 0262 # Can be None if len(strFilterSubName) <= 0
263 return filename263 return filename
264264
265 def _MakePropertyValue(self, cName = "", uValue = u"" ):265 def _MakePropertyValue(self, cName="", uValue=u"" ):
266 oPropertyValue = createUnoStruct( "com.sun.star.beans.PropertyValue" )266 oPropertyValue = createUnoStruct( "com.sun.star.beans.PropertyValue" )
267 if cName:267 if cName:
268 oPropertyValue.Name = cName268 oPropertyValue.Name = cName
269269
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Change.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/Change.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/Change.py 2012-03-05 18:43:21 +0000
@@ -59,7 +59,7 @@
59 database="test"59 database="test"
6060
61class Change( unohelper.Base, XJobExecutor ):61class Change( unohelper.Base, XJobExecutor ):
62 def __init__(self,ctx):62 def __init__(self, ctx):
63 self.ctx = ctx63 self.ctx = ctx
64 self.module = "openerp_report"64 self.module = "openerp_report"
65 self.version = "0.1"65 self.version = "0.1"
@@ -107,7 +107,7 @@
107 self.lstProtocol.addItem(i,self.lstProtocol.getItemCount() )107 self.lstProtocol.addItem(i,self.lstProtocol.getItemCount() )
108 self.win.doModalDialog( "lstProtocol", protocol)108 self.win.doModalDialog( "lstProtocol", protocol)
109109
110 def btnNext_clicked(self,oActionEvent):110 def btnNext_clicked(self, oActionEvent):
111 global url111 global url
112 aVal=''112 aVal=''
113 #aVal= Fetature used 113 #aVal= Fetature used
114114
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py 2012-03-05 18:43:21 +0000
@@ -63,7 +63,7 @@
6363
64class ConvertBracesToField( unohelper.Base, XJobExecutor ):64class ConvertBracesToField( unohelper.Base, XJobExecutor ):
6565
66 def __init__(self,ctx):66 def __init__(self, ctx):
6767
68 self.ctx = ctx68 self.ctx = ctx
69 self.module = "openerp_report"69 self.module = "openerp_report"
@@ -198,7 +198,7 @@
198 info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))198 info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
199 self.logobj.log_write('ConvertBraceToField', LOG_ERROR, info)199 self.logobj.log_write('ConvertBraceToField', LOG_ERROR, info)
200200
201 def getRes(self,sock,sObject,sVar):201 def getRes(self, sock, sObject, sVar):
202 desktop=getDesktop()202 desktop=getDesktop()
203 doc =desktop.getCurrentComponent()203 doc =desktop.getCurrentComponent()
204 docinfo=doc.getDocumentInfo()204 docinfo=doc.getDocumentInfo()
@@ -215,7 +215,7 @@
215 sObject = self.getRes(sock,res[myval]['relation'], sVar[sVar.find("/")+1:])215 sObject = self.getRes(sock,res[myval]['relation'], sVar[sVar.find("/")+1:])
216 return sObject216 return sObject
217217
218 def getBraces(self,aReportSyntex=[]):218 def getBraces(self, aReportSyntex=None):
219 desktop=getDesktop()219 desktop=getDesktop()
220 doc = desktop.getCurrentComponent()220 doc = desktop.getCurrentComponent()
221 aSearchString=[]221 aSearchString=[]
222222
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py 2012-03-05 18:43:21 +0000
@@ -57,7 +57,7 @@
57 uid = 357 uid = 3
5858
59class ConvertFieldsToBraces( unohelper.Base, XJobExecutor ):59class ConvertFieldsToBraces( unohelper.Base, XJobExecutor ):
60 def __init__(self,ctx):60 def __init__(self, ctx):
61 self.ctx = ctx61 self.ctx = ctx
62 self.module = "openerp_report"62 self.module = "openerp_report"
63 self.version = "0.1"63 self.version = "0.1"
6464
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py 2012-03-05 18:43:21 +0000
@@ -67,7 +67,7 @@
6767
6868
69class ExportToRML( unohelper.Base, XJobExecutor ):69class ExportToRML( unohelper.Base, XJobExecutor ):
70 def __init__(self,ctx):70 def __init__(self, ctx):
71 self.ctx = ctx71 self.ctx = ctx
72 self.module = "openerp_report"72 self.module = "openerp_report"
73 self.version = "0.1"73 self.version = "0.1"
7474
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py 2012-03-05 18:43:21 +0000
@@ -57,7 +57,7 @@
57 uid = 357 uid = 3
5858
59class Expression(unohelper.Base, XJobExecutor ):59class Expression(unohelper.Base, XJobExecutor ):
60 def __init__(self,sExpression="",sName="", bFromModify=False):60 def __init__(self, sExpression="", sName="", bFromModify=False):
61 LoginTest()61 LoginTest()
62 if not loginstatus and __name__=="package":62 if not loginstatus and __name__=="package":
63 exit(1)63 exit(1)
@@ -75,7 +75,7 @@
75 self.win.doModalDialog("",None)75 self.win.doModalDialog("",None)
7676
7777
78 def btnOk_clicked( self, oActionEvent ):78 def btnOk_clicked(self, oActionEvent):
79 desktop=getDesktop()79 desktop=getDesktop()
80 doc = desktop.getCurrentComponent()80 doc = desktop.getCurrentComponent()
81 text = doc.Text81 text = doc.Text
@@ -105,7 +105,7 @@
105 else:105 else:
106 ErrorDialog("Please Fill appropriate data in Name field or \nExpression field")106 ErrorDialog("Please Fill appropriate data in Name field or \nExpression field")
107107
108 def btnCancel_clicked( self, oActionEvent ):108 def btnCancel_clicked(self, oActionEvent):
109 self.win.endExecute()109 self.win.endExecute()
110110
111if __name__<>"package" and __name__=="__main__":111if __name__<>"package" and __name__=="__main__":
112112
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py 2012-03-05 18:43:21 +0000
@@ -64,7 +64,7 @@
6464
6565
66class Fields(unohelper.Base, XJobExecutor ):66class Fields(unohelper.Base, XJobExecutor ):
67 def __init__(self,sVariable="",sFields="",sDisplayName="",bFromModify=False):67 def __init__(self, sVariable="", sFields="", sDisplayName="", bFromModify=False):
68 LoginTest()68 LoginTest()
69 if not loginstatus and __name__=="package":69 if not loginstatus and __name__=="package":
70 exit(1)70 exit(1)
@@ -177,7 +177,7 @@
177 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")177 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")
178 self.win.endExecute()178 self.win.endExecute()
179179
180 def lstbox_selected(self,oItemEvent):180 def lstbox_selected(self, oItemEvent):
181 try:181 try:
182182
183 desktop=getDesktop()183 desktop=getDesktop()
@@ -200,7 +200,7 @@
200 if self.bModify:200 if self.bModify:
201 self.win.setEditText("txtUName",self.sGDisplayName)201 self.win.setEditText("txtUName",self.sGDisplayName)
202202
203 def getRes(self,sock ,sObject,sVar):203 def getRes(self, sock, sObject, sVar):
204 desktop=getDesktop()204 desktop=getDesktop()
205 doc =desktop.getCurrentComponent()205 doc =desktop.getCurrentComponent()
206 docinfo=doc.getDocumentInfo()206 docinfo=doc.getDocumentInfo()
@@ -219,7 +219,7 @@
219 else:219 else:
220 return sObject220 return sObject
221221
222 def cmbVariable_selected(self,oItemEvent):222 def cmbVariable_selected(self, oItemEvent):
223 if self.count > 0 :223 if self.count > 0 :
224 try:224 try:
225 desktop=getDesktop()225 desktop=getDesktop()
@@ -246,7 +246,7 @@
246 info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))246 info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
247 self.logobj.log_write('Fields', LOG_ERROR, info)247 self.logobj.log_write('Fields', LOG_ERROR, info)
248248
249 def btnOk_clicked( self, oActionEvent ):249 def btnOk_clicked(self, oActionEvent):
250 desktop=getDesktop()250 desktop=getDesktop()
251 doc = desktop.getCurrentComponent()251 doc = desktop.getCurrentComponent()
252 cursor = doc.getCurrentController().getViewCursor()252 cursor = doc.getCurrentController().getViewCursor()
@@ -281,7 +281,7 @@
281 else:281 else:
282 ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields")282 ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields")
283283
284 def btnCancel_clicked( self, oActionEvent ):284 def btnCancel_clicked(self, oActionEvent):
285 self.win.endExecute()285 self.win.endExecute()
286286
287if __name__<>"package" and __name__=="__main__":287if __name__<>"package" and __name__=="__main__":
288288
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py 2012-03-05 18:43:21 +0000
@@ -66,7 +66,7 @@
6666
67#67#
68class ModifyExistingReport(unohelper.Base, XJobExecutor):68class ModifyExistingReport(unohelper.Base, XJobExecutor):
69 def __init__(self,ctx):69 def __init__(self, ctx):
70 self.ctx = ctx70 self.ctx = ctx
71 self.module = "openerp_report"71 self.module = "openerp_report"
72 self.version = "0.1"72 self.version = "0.1"
@@ -178,10 +178,10 @@
178178
179 self.win.endExecute()179 self.win.endExecute()
180180
181 def btnCancel_clicked( self, oActionEvent ):181 def btnCancel_clicked(self, oActionEvent):
182 self.win.endExecute()182 self.win.endExecute()
183183
184 def btnDelete_clicked( self, oActionEvent ):184 def btnDelete_clicked(self, oActionEvent):
185 desktop=getDesktop()185 desktop=getDesktop()
186 doc = desktop.getCurrentComponent()186 doc = desktop.getCurrentComponent()
187 docinfo=doc.getDocumentInfo()187 docinfo=doc.getDocumentInfo()
188188
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py 2012-03-05 18:43:21 +0000
@@ -66,7 +66,7 @@
66#66#
67#67#
68class NewReport(unohelper.Base, XJobExecutor):68class NewReport(unohelper.Base, XJobExecutor):
69 def __init__(self,ctx):69 def __init__(self, ctx):
70 self.ctx = ctx70 self.ctx = ctx
71 self.module = "openerp_report"71 self.module = "openerp_report"
72 self.version = "0.1"72 self.version = "0.1"
@@ -99,7 +99,7 @@
99 self.win.addButton('btnCancel',-2 - 70 - 5 ,-5, 35,15,'Cancel' ,actionListenerProc = self.btnCancel_clicked )99 self.win.addButton('btnCancel',-2 - 70 - 5 ,-5, 35,15,'Cancel' ,actionListenerProc = self.btnCancel_clicked )
100 self.win.doModalDialog("",None)100 self.win.doModalDialog("",None)
101101
102 def btnOk_clicked(self,oActionEvent):102 def btnOk_clicked(self, oActionEvent):
103 desktop=getDesktop()103 desktop=getDesktop()
104 doc = desktop.getCurrentComponent()104 doc = desktop.getCurrentComponent()
105 docinfo=doc.getDocumentInfo()105 docinfo=doc.getDocumentInfo()
@@ -107,7 +107,7 @@
107 self.logobj.log_write('Module Name',LOG_INFO, ':Module use in creating a report %s using database %s' % (self.aModuleName[self.lstModule.getSelectedItemPos()], database))107 self.logobj.log_write('Module Name',LOG_INFO, ':Module use in creating a report %s using database %s' % (self.aModuleName[self.lstModule.getSelectedItemPos()], database))
108 self.win.endExecute()108 self.win.endExecute()
109109
110 def btnCancel_clicked( self, oActionEvent ):110 def btnCancel_clicked(self, oActionEvent):
111 self.win.endExecute()111 self.win.endExecute()
112112
113if __name__<>"package" and __name__=="__main__":113if __name__<>"package" and __name__=="__main__":
114114
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py 2012-03-05 18:43:21 +0000
@@ -64,7 +64,7 @@
6464
65#class RepeatIn:65#class RepeatIn:
66class RepeatIn( unohelper.Base, XJobExecutor ):66class RepeatIn( unohelper.Base, XJobExecutor ):
67 def __init__(self,sObject="",sVariable="",sFields="",sDisplayName="",bFromModify=False):67 def __init__(self, sObject="", sVariable="", sFields="", sDisplayName="", bFromModify=False):
68 # Interface Design68 # Interface Design
69 LoginTest()69 LoginTest()
70 self.logobj=Logger()70 self.logobj=Logger()
@@ -204,7 +204,7 @@
204 ErrorDialog("Please Select Appropriate module" ,"Create new report from: \nOpenERP -> Open a New Report")204 ErrorDialog("Please Select Appropriate module" ,"Create new report from: \nOpenERP -> Open a New Report")
205 self.win.endExecute()205 self.win.endExecute()
206206
207 def lstbox_selected(self,oItemEvent):207 def lstbox_selected(self, oItemEvent):
208 sItem=self.win.getListBoxSelectedItem("lstFields")208 sItem=self.win.getListBoxSelectedItem("lstFields")
209 sMain=self.aListRepeatIn[self.win.getListBoxSelectedItemPos("lstFields")]209 sMain=self.aListRepeatIn[self.win.getListBoxSelectedItemPos("lstFields")]
210210
@@ -215,7 +215,7 @@
215 self.win.setEditText("txtName",sMain[sMain.rfind("/")+1:])215 self.win.setEditText("txtName",sMain[sMain.rfind("/")+1:])
216 self.win.setEditText("txtUName","|-."+sItem[sItem.rfind("/")+1:]+".-|")216 self.win.setEditText("txtUName","|-."+sItem[sItem.rfind("/")+1:]+".-|")
217217
218 def cmbVariable_selected(self,oItemEvent):218 def cmbVariable_selected(self, oItemEvent):
219219
220 if self.count > 0 :220 if self.count > 0 :
221221
@@ -290,7 +290,7 @@
290 else:290 else:
291 ErrorDialog("Please Fill appropriate data in Object Field or Name field \nor select perticular value from the list of fields")291 ErrorDialog("Please Fill appropriate data in Object Field or Name field \nor select perticular value from the list of fields")
292292
293 def btnCancel_clicked( self, oActionEvent ):293 def btnCancel_clicked(self, oActionEvent):
294 self.win.endExecute()294 self.win.endExecute()
295295
296if __name__<>"package" and __name__=="__main__":296if __name__<>"package" and __name__=="__main__":
297297
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py 2012-03-05 18:43:21 +0000
@@ -74,7 +74,7 @@
74 'HTML' : 'html'74 'HTML' : 'html'
75 }75 }
7676
77 def __init__(self,ctx):77 def __init__(self, ctx):
78 self.ctx = ctx78 self.ctx = ctx
79 self.module = "openerp_report"79 self.module = "openerp_report"
80 self.version = "0.1"80 self.version = "0.1"
@@ -138,10 +138,10 @@
138138
139 self.win.doModalDialog("lstResourceType", self.Kind.keys()[0])139 self.win.doModalDialog("lstResourceType", self.Kind.keys()[0])
140140
141 def lstbox_selected(self,oItemEvent):141 def lstbox_selected(self, oItemEvent):
142 pass142 pass
143143
144 def btnCancel_clicked( self, oActionEvent ):144 def btnCancel_clicked(self, oActionEvent):
145 self.win.endExecute()145 self.win.endExecute()
146146
147 def btnOk_clicked(self, oActionEvent):147 def btnOk_clicked(self, oActionEvent):
@@ -223,7 +223,7 @@
223 id=self.sock.execute(database, uid, self.password, 'ir.actions.report.xml' ,'create', params)223 id=self.sock.execute(database, uid, self.password, 'ir.actions.report.xml' ,'create', params)
224 return id224 return id
225225
226 def getInverseFieldsRecord(self,nVal):226 def getInverseFieldsRecord(self, nVal):
227 desktop=getDesktop()227 desktop=getDesktop()
228 doc = desktop.getCurrentComponent()228 doc = desktop.getCurrentComponent()
229 count=0229 count=0
230230
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py 2012-03-05 18:43:21 +0000
@@ -59,7 +59,7 @@
59 database="test"59 database="test"
6060
61class ServerParameter( unohelper.Base, XJobExecutor ):61class ServerParameter( unohelper.Base, XJobExecutor ):
62 def __init__(self, aVal= None, sURL=""):62 def __init__(self, aVal=None, sURL=""):
63 self.module = "openerp_report"63 self.module = "openerp_report"
64 self.version = "0.1"64 self.version = "0.1"
65 desktop=getDesktop()65 desktop=getDesktop()
@@ -116,7 +116,7 @@
116116
117 #self.win.doModalDialog("lstDatabase",docinfo.getUserFieldValue(2))117 #self.win.doModalDialog("lstDatabase",docinfo.getUserFieldValue(2))
118118
119 def btnOk_clicked(self,oActionEvent):119 def btnOk_clicked(self, oActionEvent):
120120
121 sLogin=self.win.getEditText("txtLoginName")121 sLogin=self.win.getEditText("txtLoginName")
122 sPassword=self.win.getEditText("txtPassword")122 sPassword=self.win.getEditText("txtPassword")
@@ -158,10 +158,10 @@
158 self.win.endExecute()158 self.win.endExecute()
159159
160 160
161 def btnCancel_clicked( self, oActionEvent ):161 def btnCancel_clicked(self, oActionEvent):
162 self.win.endExecute()162 self.win.endExecute()
163163
164 def btnPrevious_clicked(self,oActionEvent):164 def btnPrevious_clicked(self, oActionEvent):
165 self.win.endExecute()165 self.win.endExecute()
166 Change(None)166 Change(None)
167 self.win.endExecute()167 self.win.endExecute()
168168
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py 2012-03-05 18:43:21 +0000
@@ -61,7 +61,7 @@
6161
6262
63class AddLang(unohelper.Base, XJobExecutor ):63class AddLang(unohelper.Base, XJobExecutor ):
64 def __init__(self,sVariable="",sFields="",sDisplayName="",bFromModify=False):64 def __init__(self, sVariable="", sFields="", sDisplayName="", bFromModify=False):
65 LoginTest()65 LoginTest()
66 if not loginstatus and __name__=="package":66 if not loginstatus and __name__=="package":
67 exit(1)67 exit(1)
@@ -157,7 +157,7 @@
157 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")157 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")
158 self.win.endExecute()158 self.win.endExecute()
159159
160 def lstbox_selected(self,oItemEvent):160 def lstbox_selected(self, oItemEvent):
161 try:161 try:
162162
163 desktop=getDesktop()163 desktop=getDesktop()
@@ -183,7 +183,7 @@
183 if self.bModify:183 if self.bModify:
184 self.win.setEditText("txtUName",self.sGDisplayName)184 self.win.setEditText("txtUName",self.sGDisplayName)
185185
186 def getRes(self,sock ,sObject,sVar):186 def getRes(self, sock, sObject, sVar):
187 desktop=getDesktop()187 desktop=getDesktop()
188 doc =desktop.getCurrentComponent()188 doc =desktop.getCurrentComponent()
189 docinfo=doc.getDocumentInfo()189 docinfo=doc.getDocumentInfo()
@@ -203,7 +203,7 @@
203 return sObject203 return sObject
204204
205205
206 def cmbVariable_selected(self,oItemEvent):206 def cmbVariable_selected(self, oItemEvent):
207 if self.count > 0 :207 if self.count > 0 :
208 try:208 try:
209 desktop=getDesktop()209 desktop=getDesktop()
@@ -229,7 +229,7 @@
229 except:229 except:
230 import traceback;traceback.print_exc()230 import traceback;traceback.print_exc()
231231
232 def btnOk_clicked( self, oActionEvent ):232 def btnOk_clicked(self, oActionEvent):
233 self.bOkay = True233 self.bOkay = True
234 desktop=getDesktop()234 desktop=getDesktop()
235 doc = desktop.getCurrentComponent()235 doc = desktop.getCurrentComponent()
@@ -263,7 +263,7 @@
263 else:263 else:
264 ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields")264 ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields")
265265
266 def btnCancel_clicked( self, oActionEvent ):266 def btnCancel_clicked(self, oActionEvent):
267 self.win.endExecute()267 self.win.endExecute()
268268
269269
270270
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py 2012-03-05 18:43:21 +0000
@@ -48,7 +48,7 @@
48if __name__<>"package":48if __name__<>"package":
49 from gui import *49 from gui import *
50class ErrorDialog:50class ErrorDialog:
51 def __init__(self,sErrorMsg, sErrorHelpMsg="",sTitle="Error Message"):51 def __init__(self, sErrorMsg, sErrorHelpMsg="", sTitle="Error Message"):
52 self.win = DBModalDialog(50, 50, 150, 90, sTitle)52 self.win = DBModalDialog(50, 50, 150, 90, sTitle)
53 self.win.addFixedText("lblErrMsg", 5, 5, 190, 25, sErrorMsg)53 self.win.addFixedText("lblErrMsg", 5, 5, 190, 25, sErrorMsg)
54 self.win.addFixedText("lblErrHelpMsg", 5, 30, 190, 25, sErrorHelpMsg)54 self.win.addFixedText("lblErrHelpMsg", 5, 30, 190, 25, sErrorHelpMsg)
5555
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py 2012-03-05 18:43:21 +0000
@@ -59,7 +59,13 @@
59 database="test"59 database="test"
60 uid = 160 uid = 1
6161
62def genTree(object,aList,insField,host,level=3, ending=[], ending_excl=[], recur=[], root='', actualroot=""):62def genTree(object, aList, insField, host, level=3, ending=None, ending_excl=None, recur=None, root='', actualroot=""):
63 if ending is None:
64 ending = []
65 if ending_excl is None:
66 ending_excl = []
67 if recur is None:
68 recur = []
63 try:69 try:
64 global url70 global url
65 sock=RPCSession(url)71 sock=RPCSession(url)
@@ -79,7 +85,7 @@
79 info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))85 info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
80 obj.log_write('Function', LOG_ERROR, info)86 obj.log_write('Function', LOG_ERROR, info)
8187
82def VariableScope(oTcur,insVariable,aObjectList,aComponentAdd,aItemList,sTableName=""):88def VariableScope(oTcur, insVariable, aObjectList, aComponentAdd, aItemList, sTableName=""):
83 if sTableName.find(".") != -1:89 if sTableName.find(".") != -1:
84 for i in range(len(aItemList)):90 for i in range(len(aItemList)):
85 if aComponentAdd[i]==sTableName:91 if aComponentAdd[i]==sTableName:
@@ -96,7 +102,7 @@
96 if aObjectList[j][:aObjectList[j].find("(")] == sLVal and sLVal!="":102 if aObjectList[j][:aObjectList[j].find("(")] == sLVal and sLVal!="":
97 insVariable.append(aObjectList[j])103 insVariable.append(aObjectList[j])
98104
99def getList(aObjectList,host,count):105def getList(aObjectList, host, count):
100 desktop=getDesktop()106 desktop=getDesktop()
101 doc =desktop.getCurrentComponent()107 doc =desktop.getCurrentComponent()
102 docinfo=doc.getDocumentInfo()108 docinfo=doc.getDocumentInfo()
@@ -128,7 +134,7 @@
128 else:134 else:
129 aObjectList.append("List of " + docinfo.getUserFieldValue(3))135 aObjectList.append("List of " + docinfo.getUserFieldValue(3))
130136
131def getRelation(sRelName, sItem, sObjName, aObjectList, host ):137def getRelation(sRelName, sItem, sObjName, aObjectList, host):
132 global url138 global url
133 sock=RPCSession(url)139 sock=RPCSession(url)
134 global passwd140 global passwd
@@ -143,7 +149,7 @@
143 getRelation(res[k]['relation'], sItem[sItem.find(".")+1:], sObjName,aObjectList,host)149 getRelation(res[k]['relation'], sItem[sItem.find(".")+1:], sObjName,aObjectList,host)
144150
145151
146def getPath(sPath,sMain):152def getPath(sPath, sMain):
147 desktop=getDesktop()153 desktop=getDesktop()
148 doc =desktop.getCurrentComponent()154 doc =desktop.getCurrentComponent()
149 oParEnum = doc.getTextFields().createEnumeration()155 oParEnum = doc.getTextFields().createEnumeration()
@@ -161,7 +167,7 @@
161 getPath(sPath, sMain)167 getPath(sPath, sMain)
162 return sPath168 return sPath
163169
164def EnumDocument(aItemList,aComponentAdd):170def EnumDocument(aItemList, aComponentAdd):
165 desktop = getDesktop()171 desktop = getDesktop()
166 parent=""172 parent=""
167 bFlag = False173 bFlag = False
@@ -183,7 +189,7 @@
183 aItemList.append( templist )189 aItemList.append( templist )
184 aComponentAdd.append( parent )190 aComponentAdd.append( parent )
185191
186def getChildTable(oPar,aItemList,aComponentAdd,sTableName=""):192def getChildTable(oPar, aItemList, aComponentAdd, sTableName=""):
187 sNames = oPar.getCellNames()193 sNames = oPar.getCellNames()
188 bEmptyTableFlag=True194 bEmptyTableFlag=True
189 for val in sNames:195 for val in sNames:
@@ -229,7 +235,7 @@
229 aComponentAdd.append(sTableName+"."+oPar.Name)235 aComponentAdd.append(sTableName+"."+oPar.Name)
230 return 0236 return 0
231237
232def getRecersiveSection(oCurrentSection,aSectionList):238def getRecersiveSection(oCurrentSection, aSectionList):
233 desktop=getDesktop()239 desktop=getDesktop()
234 doc =desktop.getCurrentComponent()240 doc =desktop.getCurrentComponent()
235 oParEnum=doc.getText().createEnumeration()241 oParEnum=doc.getText().createEnumeration()
236242
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py 2012-03-05 18:43:21 +0000
@@ -39,7 +39,7 @@
39 logger.setLevel(logging.INFO)39 logger.setLevel(logging.INFO)
4040
41class Logger(object):41class Logger(object):
42 def log_write(self,name,level,msg):42 def log_write(self, name, level, msg):
43 log = logging.getLogger(name)43 log = logging.getLogger(name)
44 getattr(log,level)(msg)44 getattr(log,level)(msg)
4545
4646
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py 2012-03-05 18:43:21 +0000
@@ -52,7 +52,7 @@
5252
5353
54class RPCSession(object):54class RPCSession(object):
55 def __init__(self,url):55 def __init__(self, url):
5656
57 m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '')57 m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '')
5858
@@ -152,7 +152,7 @@
152152
153 return res153 return res
154154
155 def execute(self, sDatabase,UID,sPassword,obj, method, *args):155 def execute(self, sDatabase, UID, sPassword, obj, method, *args):
156 global rpc_url156 global rpc_url
157157
158 sock = xmlrpclib.ServerProxy(rpc_url + 'object')158 sock = xmlrpclib.ServerProxy(rpc_url + 'object')
159159
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py 2012-03-05 18:43:21 +0000
@@ -21,19 +21,19 @@
21##############################################################################21##############################################################################
22import urllib22import urllib
2323
24def get_absolute_file_path( url ):24def get_absolute_file_path(url):
25 url_unquoted = urllib.unquote(url)25 url_unquoted = urllib.unquote(url)
26 return os.name == 'nt' and url_unquoted[1:] or url_unquoted 26 return os.name == 'nt' and url_unquoted[1:] or url_unquoted
2727
28# This function reads the content of a file and return it to the caller28# This function reads the content of a file and return it to the caller
29def read_data_from_file( filename ):29def read_data_from_file(filename):
30 fp = file( filename, "rb" )30 fp = file( filename, "rb" )
31 data = fp.read()31 data = fp.read()
32 fp.close()32 fp.close()
33 return data33 return data
3434
35# This function writes the content to a file35# This function writes the content to a file
36def write_data_to_file( filename, data ):36def write_data_to_file(filename, data):
37 fp = file( filename, 'wb' )37 fp = file( filename, 'wb' )
38 fp.write( data )38 fp.write( data )
39 fp.close()39 fp.close()
4040
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/modify.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/modify.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/modify.py 2012-03-05 18:43:21 +0000
@@ -61,7 +61,7 @@
61 uid = 361 uid = 3
6262
63class modify(unohelper.Base, XJobExecutor ):63class modify(unohelper.Base, XJobExecutor ):
64 def __init__( self, ctx ):64 def __init__(self, ctx):
65 self.ctx = ctx65 self.ctx = ctx
66 self.module = "openerp_report"66 self.module = "openerp_report"
67 self.version = "0.1"67 self.version = "0.1"
6868
=== modified file 'base_report_designer/plugin/openerp_report_designer/test/test_fields.py'
--- base_report_designer/plugin/openerp_report_designer/test/test_fields.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/test/test_fields.py 2012-03-05 18:43:21 +0000
@@ -10,7 +10,11 @@
1010
11sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')11sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')
1212
13def get(object, level=3, ending=[], ending_excl=[], recur=[], root=''):13def get(object, level=3, ending=None, ending_excl=None, recur=None, root=''):
14 if ending is None:
15 ending = []
16 if ending_excl is None:
17 ending_excl = []
14 res = sock.execute('terp', 3, 'admin', 'account.invoice', 'fields_get')18 res = sock.execute('terp', 3, 'admin', 'account.invoice', 'fields_get')
15 key = res.keys()19 key = res.keys()
16 key.sort()20 key.sort()
1721
=== modified file 'base_setup/base_setup.py'
--- base_setup/base_setup.py 2011-12-19 16:54:40 +0000
+++ base_setup/base_setup.py 2012-03-05 18:43:21 +0000
@@ -84,7 +84,7 @@
84 res = [(r['code'], r['name']) for r in res]84 res = [(r['code'], r['name']) for r in res]
85 return res85 return res
8686
87def _tz_get(self,cr,uid, context=None):87def _tz_get(self, cr, uid, context=None):
88 return [(x, x) for x in pytz.all_timezones]88 return [(x, x) for x in pytz.all_timezones]
8989
90class user_preferences_config(osv.osv_memory):90class user_preferences_config(osv.osv_memory):
9191
=== modified file 'base_synchro/base_synchro_obj.py'
--- base_synchro/base_synchro_obj.py 2012-02-28 11:16:26 +0000
+++ base_synchro/base_synchro_obj.py 2012-03-05 18:43:21 +0000
@@ -65,10 +65,12 @@
65 # Return a list of changes: [ (date, id) ]65 # Return a list of changes: [ (date, id) ]
66 #66 #
6767
68 def get_ids(self, cr, uid, object, dt, domain=[], context=None):68 def get_ids(self, cr, uid, object, dt, domain=None, context=None):
69 return self._get_ids(cr, uid, object, dt, domain, context=context)69 return self._get_ids(cr, uid, object, dt, domain=domain, context=context)
7070
71 def _get_ids(self, cr, uid, object, dt, domain=[], context=None):71 def _get_ids(self, cr, uid, object, dt, domain=None, context=None):
72 if domain is None:
73 domain = []
72 result = []74 result = []
73 if dt:75 if dt:
74 domain2 = domain+[('write_date','>=',dt)]76 domain2 = domain+[('write_date','>=',dt)]
7577
=== modified file 'base_vat/__init__.py'
--- base_vat/__init__.py 2011-12-19 16:54:40 +0000
+++ base_vat/__init__.py 2012-03-05 18:43:21 +0000
@@ -22,4 +22,4 @@
22import res_company22import res_company
23import base_vat23import base_vat
2424
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26\ No newline at end of file25\ No newline at end of file
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2727
=== modified file 'base_vat/res_company.py'
--- base_vat/res_company.py 2011-11-28 16:40:14 +0000
+++ base_vat/res_company.py 2012-03-05 18:43:21 +0000
@@ -29,4 +29,4 @@
29 "rather than via a simple format validation (checksum)."),29 "rather than via a simple format validation (checksum)."),
30 }30 }
3131
32
33\ No newline at end of file32\ No newline at end of file
33
3434
=== modified file 'caldav/caldav_node.py'
--- caldav/caldav_node.py 2011-10-27 21:11:24 +0000
+++ caldav/caldav_node.py 2012-03-05 18:43:21 +0000
@@ -42,7 +42,7 @@
42 DAV_M_NS = dict_merge2(nodes.node_dir.DAV_M_NS,42 DAV_M_NS = dict_merge2(nodes.node_dir.DAV_M_NS,
43 { "http://calendarserver.org/ns/" : '_get_dav', } )43 { "http://calendarserver.org/ns/" : '_get_dav', } )
4444
45 def _file_get(self,cr, nodename=False):45 def _file_get(self, cr, nodename=False):
46 return []46 return []
4747
48 def _child_get(self, cr, name=False, parent_id=False, domain=None):48 def _child_get(self, cr, name=False, parent_id=False, domain=None):
@@ -99,7 +99,7 @@
99 DAV_M_NS = dict_merge2(nodes.node_res_obj.DAV_M_NS,99 DAV_M_NS = dict_merge2(nodes.node_res_obj.DAV_M_NS,
100 { "http://calendarserver.org/ns/" : '_get_dav', } )100 { "http://calendarserver.org/ns/" : '_get_dav', } )
101101
102 def _file_get(self,cr, nodename=False):102 def _file_get(self, cr, nodename=False):
103 return []103 return []
104104
105 def _child_get(self, cr, name=False, parent_id=False, domain=None):105 def _child_get(self, cr, name=False, parent_id=False, domain=None):
@@ -180,7 +180,7 @@
180180
181 http_options = { 'DAV': ['calendar-access'] }181 http_options = { 'DAV': ['calendar-access'] }
182182
183 def __init__(self,path, parent, context, calendar):183 def __init__(self, path, parent, context, calendar):
184 super(node_calendar,self).__init__(path, parent,context)184 super(node_calendar,self).__init__(path, parent,context)
185 self.calendar_id = calendar.id185 self.calendar_id = calendar.id
186 self.mimetype = 'application/x-directory'186 self.mimetype = 'application/x-directory'
@@ -271,7 +271,7 @@
271 def children(self, cr, domain=None):271 def children(self, cr, domain=None):
272 return self._child_get(cr, domain=domain)272 return self._child_get(cr, domain=domain)
273273
274 def child(self,cr, name, domain=None):274 def child(self, cr, name, domain=None):
275 res = self._child_get(cr, name, domain=domain)275 res = self._child_get(cr, name, domain=domain)
276 if res:276 if res:
277 return res[0]277 return res[0]
@@ -353,16 +353,16 @@
353 return None353 return None
354354
355355
356 def set_data(self, cr, data, fil_obj = None):356 def set_data(self, cr, data, fil_obj=None):
357 uid = self.context.uid357 uid = self.context.uid
358 calendar_obj = self.context._dirobj.pool.get('basic.calendar')358 calendar_obj = self.context._dirobj.pool.get('basic.calendar')
359 res = calendar_obj.import_cal(cr, uid, data, self.calendar_id)359 res = calendar_obj.import_cal(cr, uid, data, self.calendar_id)
360 return res360 return res
361361
362 def get_data_len(self, cr, fil_obj = None):362 def get_data_len(self, cr, fil_obj=None):
363 return self.content_length363 return self.content_length
364364
365 def _get_ttag(self,cr):365 def _get_ttag(self, cr):
366 return 'calendar-%d' % (self.calendar_id,)366 return 'calendar-%d' % (self.calendar_id,)
367367
368 def rmcol(self, cr):368 def rmcol(self, cr):
@@ -441,7 +441,7 @@
441441
442 http_options = { 'DAV': ['calendar-access'] }442 http_options = { 'DAV': ['calendar-access'] }
443443
444 def __init__(self,path, parent, context, res_obj, res_model=None, res_id=None):444 def __init__(self, path, parent, context, res_obj, res_model=None, res_id=None):
445 super(res_node_calendar,self).__init__(path, parent, context)445 super(res_node_calendar,self).__init__(path, parent, context)
446 self.mimetype = 'text/calendar'446 self.mimetype = 'text/calendar'
447 self.create_date = parent.create_date447 self.create_date = parent.create_date
@@ -474,10 +474,10 @@
474 def _get_caldav_calendar_data(self, cr):474 def _get_caldav_calendar_data(self, cr):
475 return self.get_data(cr)475 return self.get_data(cr)
476476
477 def get_data_len(self, cr, fil_obj = None):477 def get_data_len(self, cr, fil_obj=None):
478 return self.content_length478 return self.content_length
479479
480 def set_data(self, cr, data, fil_obj = None):480 def set_data(self, cr, data, fil_obj=None):
481 uid = self.context.uid481 uid = self.context.uid
482 context = self.context.context.copy()482 context = self.context.context.copy()
483 context.update(self.dctx)483 context.update(self.dctx)
@@ -486,7 +486,7 @@
486 res = calendar_obj.import_cal(cr, uid, data, self.calendar_id, context=context)486 res = calendar_obj.import_cal(cr, uid, data, self.calendar_id, context=context)
487 return res487 return res
488488
489 def _get_ttag(self,cr):489 def _get_ttag(self, cr):
490 res = False490 res = False
491 if self.model and self.res_id:491 if self.model and self.res_id:
492 res = '%s_%d' % (self.model, self.res_id)492 res = '%s_%d' % (self.model, self.res_id)
493493
=== modified file 'crm/crm.py'
--- crm/crm.py 2011-12-31 07:57:20 +0000
+++ crm/crm.py 2012-03-05 18:43:21 +0000
@@ -331,7 +331,9 @@
331 And object that inherit (orm inheritance) from a class the overwrite copy 331 And object that inherit (orm inheritance) from a class the overwrite copy
332 """332 """
333333
334 def stage_find(self, cr, uid, section_id, domain=[], order='sequence'):334 def stage_find(self, cr, uid, section_id, domain=None, order='sequence'):
335 if domain is None:
336 domain = []
335 domain = list(domain)337 domain = list(domain)
336 if section_id:338 if section_id:
337 domain.append(('section_ids', '=', section_id))339 domain.append(('section_ids', '=', section_id))
338340
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2012-01-31 13:36:57 +0000
+++ crm/crm_lead.py 2012-03-05 18:43:21 +0000
@@ -239,7 +239,7 @@
239 def on_change_optout(self, cr, uid, ids, optout):239 def on_change_optout(self, cr, uid, ids, optout):
240 return {'value':{'optout':optout,'optin':False}}240 return {'value':{'optout':optout,'optin':False}}
241241
242 def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):242 def onchange_stage_id(self, cr, uid, ids, stage_id, context=None):
243 if not stage_id:243 if not stage_id:
244 return {'value':{}}244 return {'value':{}}
245 stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)245 stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
246246
=== modified file 'crm_claim/crm_claim.py'
--- crm_claim/crm_claim.py 2011-12-21 22:15:04 +0000
+++ crm_claim/crm_claim.py 2012-03-05 18:43:21 +0000
@@ -157,7 +157,7 @@
157 self.write(cr, uid, [res_id], vals, context=context)157 self.write(cr, uid, [res_id], vals, context=context)
158 return res_id158 return res_id
159159
160 def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None):160 def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None):
161 if isinstance(ids, (str, int, long)):161 if isinstance(ids, (str, int, long)):
162 ids = [ids]162 ids = [ids]
163163
164164
=== modified file 'crm_helpdesk/crm_helpdesk.py'
--- crm_helpdesk/crm_helpdesk.py 2011-10-16 01:28:00 +0000
+++ crm_helpdesk/crm_helpdesk.py 2012-03-05 18:43:21 +0000
@@ -112,7 +112,7 @@
112 self.write(cr, uid, [res_id], vals, context)112 self.write(cr, uid, [res_id], vals, context)
113 return res_id113 return res_id
114114
115 def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None):115 def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None):
116 if isinstance(ids, (str, int, long)):116 if isinstance(ids, (str, int, long)):
117 ids = [ids]117 ids = [ids]
118118
119119
=== modified file 'crm_profiling/crm_profiling.py'
--- crm_profiling/crm_profiling.py 2011-12-19 16:54:40 +0000
+++ crm_profiling/crm_profiling.py 2012-03-05 18:43:21 +0000
@@ -77,7 +77,7 @@
77 return ids_to_check77 return ids_to_check
7878
7979
80def test_prof(cr, uid, seg_id, pid, answers_ids = []):80def test_prof(cr, uid, seg_id, pid, answers_ids=None):
8181
82 """ return True if the partner pid fetch the segmentation rule seg_id82 """ return True if the partner pid fetch the segmentation rule seg_id
83 @param cr: the current row, from the database cursor,83 @param cr: the current row, from the database cursor,
8484
=== modified file 'delivery/wizard/delivery_sale_order.py'
--- delivery/wizard/delivery_sale_order.py 2012-02-13 15:27:55 +0000
+++ delivery/wizard/delivery_sale_order.py 2012-03-05 18:43:21 +0000
@@ -44,7 +44,7 @@
44 44
45 return res45 return res
46 46
47 def view_init(self, cr , uid , fields, context=None):47 def view_init(self, cr, uid, fields, context=None):
48 if context is None:48 if context is None:
49 context = {}49 context = {}
50 order_obj = self.pool.get('sale.order')50 order_obj = self.pool.get('sale.order')
5151
=== modified file 'document/content_index.py'
--- document/content_index.py 2011-12-31 07:57:20 +0000
+++ document/content_index.py 2012-03-05 18:43:21 +0000
@@ -51,7 +51,7 @@
51 return mts[0]51 return mts[0]
52 return None52 return None
5353
54 def indexContent(self, content, filename=None, realfile = None):54 def indexContent(self, content, filename=None, realfile=None):
55 """ Use either content or the real file, to index.55 """ Use either content or the real file, to index.
56 Some parsers will work better with the actual56 Some parsers will work better with the actual
57 content, others parse a file easier. Try the57 content, others parse a file easier. Try the
@@ -95,10 +95,10 @@
9595
96 raise NhException('No appropriate method to index file')96 raise NhException('No appropriate method to index file')
9797
98 def _doIndexContent(self,content):98 def _doIndexContent(self, content):
99 raise NhException("Content not handled here")99 raise NhException("Content not handled here")
100100
101 def _doIndexFile(self,fpath):101 def _doIndexFile(self, fpath):
102 raise NhException("Content not handled here")102 raise NhException("Content not handled here")
103103
104 def __repr__(self):104 def __repr__(self):
@@ -136,7 +136,7 @@
136 if not f:136 if not f:
137 raise Exception("Your indexer should at least suport a mimetype or extension")137 raise Exception("Your indexer should at least suport a mimetype or extension")
138138
139 def doIndex(self, content, filename=None, content_type=None, realfname = None, debug=False):139 def doIndex(self, content, filename=None, content_type=None, realfname=None, debug=False):
140 fobj = None140 fobj = None
141 fname = None141 fname = None
142 mime = None142 mime = None
143143
=== modified file 'document/document.py'
--- document/document.py 2011-12-19 16:54:40 +0000
+++ document/document.py 2012-03-05 18:43:21 +0000
@@ -146,7 +146,7 @@
146 _sql_constraints = [146 _sql_constraints = [
147 # filename_uniq is not possible in pure SQL147 # filename_uniq is not possible in pure SQL
148 ]148 ]
149 def _check_duplication(self, cr, uid, vals, ids=[], op='create'):149 def _check_duplication(self, cr, uid, vals, ids=None, op='create'):
150 name = vals.get('name', False)150 name = vals.get('name', False)
151 parent_id = vals.get('parent_id', False)151 parent_id = vals.get('parent_id', False)
152 res_model = vals.get('res_model', False)152 res_model = vals.get('res_model', False)
153153
=== modified file 'document/document_directory.py'
--- document/document_directory.py 2011-12-19 16:54:40 +0000
+++ document/document_directory.py 2012-03-05 18:43:21 +0000
@@ -69,7 +69,7 @@
69 }69 }
7070
7171
72 def _get_root_directory(self, cr,uid, context=None):72 def _get_root_directory(self, cr, uid, context=None):
73 objid=self.pool.get('ir.model.data')73 objid=self.pool.get('ir.model.data')
74 try:74 try:
75 mid = objid._get_id(cr, uid, 'document', 'dir_root')75 mid = objid._get_id(cr, uid, 'document', 'dir_root')
@@ -224,7 +224,7 @@
224 pass224 pass
225 return res225 return res
226226
227 def _locate_child(self, cr, uid, root_id, uri,nparent, ncontext):227 def _locate_child(self, cr, uid, root_id, uri, nparent, ncontext):
228 """ try to locate the node in uri,228 """ try to locate the node in uri,
229 Return a tuple (node_dir, remaining_path)229 Return a tuple (node_dir, remaining_path)
230 """230 """
@@ -237,7 +237,7 @@
237 default.update({'name': name+ " (copy)"})237 default.update({'name': name+ " (copy)"})
238 return super(document_directory,self).copy(cr, uid, id, default, context=context)238 return super(document_directory,self).copy(cr, uid, id, default, context=context)
239239
240 def _check_duplication(self, cr, uid, vals, ids=[], op='create'):240 def _check_duplication(self, cr, uid, vals, ids=None, op='create'):
241 name=vals.get('name',False)241 name=vals.get('name',False)
242 parent_id=vals.get('parent_id',False)242 parent_id=vals.get('parent_id',False)
243 ressource_parent_type_id=vals.get('ressource_parent_type_id',False)243 ressource_parent_type_id=vals.get('ressource_parent_type_id',False)
244244
=== modified file 'document/nodes.py'
--- document/nodes.py 2011-12-19 16:54:40 +0000
+++ document/nodes.py 2012-03-05 18:43:21 +0000
@@ -104,7 +104,7 @@
104 def get(self, name, default=None):104 def get(self, name, default=None):
105 return self.context.get(name, default)105 return self.context.get(name, default)
106106
107 def get_uri(self, cr, uri):107 def get_uri(self, cr, uri):
108 """ Although this fn passes back to doc.dir, it is needed since108 """ Although this fn passes back to doc.dir, it is needed since
109 it is a potential caching point.109 it is a potential caching point.
110 """110 """
@@ -253,7 +253,7 @@
253 print "node_class.children()"253 print "node_class.children()"
254 return [] #stub254 return [] #stub
255255
256 def child(self,cr, name, domain=None):256 def child(self, cr, name, domain=None):
257 print "node_class.child()"257 print "node_class.child()"
258 return None258 return None
259259
@@ -271,7 +271,7 @@
271 print "node_class.path_get()"271 print "node_class.path_get()"
272 return False272 return False
273273
274 def get_data(self,cr):274 def get_data(self, cr):
275 raise TypeError('no data for %s'% self.type)275 raise TypeError('no data for %s'% self.type)
276276
277 def open_data(self, cr, mode):277 def open_data(self, cr, mode):
@@ -288,10 +288,10 @@
288 """288 """
289 raise TypeError('no data for %s' % self.type)289 raise TypeError('no data for %s' % self.type)
290290
291 def _get_storage(self,cr):291 def _get_storage(self, cr):
292 raise RuntimeError("no storage for base class")292 raise RuntimeError("no storage for base class")
293293
294 def get_etag(self,cr):294 def get_etag(self, cr):
295 """ Get a tag, unique per object + modification.295 """ Get a tag, unique per object + modification.
296296
297 see. http://tools.ietf.org/html/rfc2616#section-13.3.3 """297 see. http://tools.ietf.org/html/rfc2616#section-13.3.3 """
@@ -435,7 +435,9 @@
435435
436 """436 """
437 our_type = 'database'437 our_type = 'database'
438 def __init__(self, path=[], parent=False, context=None):438 def __init__(self, path=None, parent=False, context=None):
439 if path is None:
440 path = []
439 super(node_database,self).__init__(path, parent, context)441 super(node_database,self).__init__(path, parent, context)
440 self.unixperms = 040750442 self.unixperms = 040750
441 self.uidperms = 5443 self.uidperms = 5
@@ -478,11 +480,11 @@
478480
479 return res481 return res
480482
481 def _file_get(self,cr, nodename=False):483 def _file_get(self, cr, nodename=False):
482 res = []484 res = []
483 return res485 return res
484486
485 def _get_ttag(self,cr):487 def _get_ttag(self, cr):
486 return 'db-%s' % cr.dbname488 return 'db-%s' % cr.dbname
487489
488def mkdosname(company_name, default='noname'):490def mkdosname(company_name, default='noname'):
@@ -694,7 +696,7 @@
694 fnode.set_data(cr, data, fil)696 fnode.set_data(cr, data, fil)
695 return fnode697 return fnode
696698
697 def _get_ttag(self,cr):699 def _get_ttag(self, cr):
698 return 'dir-%d' % self.dir_id700 return 'dir-%d' % self.dir_id
699701
700 def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False):702 def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False):
@@ -803,7 +805,7 @@
803 def children(self, cr, domain=None):805 def children(self, cr, domain=None):
804 return self._child_get(cr, domain=domain)806 return self._child_get(cr, domain=domain)
805807
806 def child(self,cr, name, domain=None):808 def child(self, cr, name, domain=None):
807 res = self._child_get(cr, name, domain=domain)809 res = self._child_get(cr, name, domain=domain)
808 if res:810 if res:
809 return res[0]811 return res[0]
@@ -879,7 +881,7 @@
879 res.append(self.res_obj_class(res_name, self.dir_id, self, self.context, self.res_model, bo))881 res.append(self.res_obj_class(res_name, self.dir_id, self, self.context, self.res_model, bo))
880 return res882 return res
881883
882 def _get_ttag(self,cr):884 def _get_ttag(self, cr):
883 return 'rdir-%d' % self.dir_id885 return 'rdir-%d' % self.dir_id
884886
885class node_res_obj(node_class):887class node_res_obj(node_class):
@@ -890,7 +892,7 @@
890 node_dirs (with limited domain).892 node_dirs (with limited domain).
891 """893 """
892 our_type = 'collection'894 our_type = 'collection'
893 def __init__(self, path, dir_id, parent, context, res_model, res_bo, res_id = None):895 def __init__(self, path, dir_id, parent, context, res_model, res_bo, res_id=None):
894 super(node_res_obj,self).__init__(path, parent,context)896 super(node_res_obj,self).__init__(path, parent,context)
895 assert parent897 assert parent
896 #todo: more info from dirr898 #todo: more info from dirr
@@ -959,7 +961,7 @@
959 return res[0]961 return res[0]
960 return None962 return None
961963
962 def _file_get(self,cr, nodename=False):964 def _file_get(self, cr, nodename=False):
963 res = []965 res = []
964 is_allowed = self.check_perms((nodename and 1) or 5)966 is_allowed = self.check_perms((nodename and 1) or 5)
965 if not is_allowed:967 if not is_allowed:
@@ -1161,7 +1163,7 @@
1161 fnode.set_data(cr, data, fil)1163 fnode.set_data(cr, data, fil)
1162 return fnode1164 return fnode
11631165
1164 def _get_ttag(self,cr):1166 def _get_ttag(self, cr):
1165 return 'rodir-%d-%d' % (self.dir_id, self.res_id)1167 return 'rodir-%d-%d' % (self.dir_id, self.res_id)
11661168
1167node_res_dir.res_obj_class = node_res_obj1169node_res_dir.res_obj_class = node_res_obj
@@ -1263,7 +1265,7 @@
1263 else:1265 else:
1264 self.path = dirpath[0]1266 self.path = dirpath[0]
12651267
1266 def get_data(self, cr, fil_obj = None):1268 def get_data(self, cr, fil_obj=None):
1267 """ Retrieve the data for some file.1269 """ Retrieve the data for some file.
1268 fil_obj may optionally be specified, and should be a browse object1270 fil_obj may optionally be specified, and should be a browse object
1269 for the file. This is useful when the caller has already initiated1271 for the file. This is useful when the caller has already initiated
@@ -1279,14 +1281,14 @@
1279 stobj = self.context._dirobj.pool.get('document.storage')1281 stobj = self.context._dirobj.pool.get('document.storage')
1280 return stobj.get_data(cr, self.context.uid,stor, self,self.context.context, fil_obj)1282 return stobj.get_data(cr, self.context.uid,stor, self,self.context.context, fil_obj)
12811283
1282 def get_data_len(self, cr, fil_obj = None):1284 def get_data_len(self, cr, fil_obj=None):
1283 # TODO: verify with the storage object!1285 # TODO: verify with the storage object!
1284 bin_size = self.context.context.get('bin_size', False)1286 bin_size = self.context.context.get('bin_size', False)
1285 if bin_size and not self.content_length:1287 if bin_size and not self.content_length:
1286 self.content_length = fil_obj.db_datas1288 self.content_length = fil_obj.db_datas
1287 return self.content_length1289 return self.content_length
12881290
1289 def set_data(self, cr, data, fil_obj = None):1291 def set_data(self, cr, data, fil_obj=None):
1290 """ Store data at some file.1292 """ Store data at some file.
1291 fil_obj may optionally be specified, and should be a browse object1293 fil_obj may optionally be specified, and should be a browse object
1292 for the file. This is useful when the caller has already initiated1294 for the file. This is useful when the caller has already initiated
@@ -1300,7 +1302,7 @@
1300 stobj = self.context._dirobj.pool.get('document.storage')1302 stobj = self.context._dirobj.pool.get('document.storage')
1301 return stobj.set_data(cr, self.context.uid,stor, self, data, self.context.context, fil_obj)1303 return stobj.set_data(cr, self.context.uid,stor, self, data, self.context.context, fil_obj)
13021304
1303 def _get_ttag(self,cr):1305 def _get_ttag(self, cr):
1304 return 'file-%d' % self.file_id1306 return 'file-%d' % self.file_id
13051307
1306 def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False):1308 def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False):
@@ -1363,7 +1365,7 @@
13631365
1364class node_content(node_class):1366class node_content(node_class):
1365 our_type = 'content'1367 our_type = 'content'
1366 def __init__(self, path, parent, context, cnt, dctx = None, act_id=None):1368 def __init__(self, path, parent, context, cnt, dctx=None, act_id=None):
1367 super(node_content,self).__init__(path, parent,context)1369 super(node_content,self).__init__(path, parent,context)
1368 self.cnt_id = cnt.id1370 self.cnt_id = cnt.id
1369 self.create_date = False1371 self.create_date = False
@@ -1383,7 +1385,7 @@
1383 self.dctx.update(dctx)1385 self.dctx.update(dctx)
1384 self.act_id = act_id1386 self.act_id = act_id
13851387
1386 def fill_fields(self, cr, dctx = None):1388 def fill_fields(self, cr, dctx=None):
1387 """ Try to read the object and fill missing fields, like mimetype,1389 """ Try to read the object and fill missing fields, like mimetype,
1388 dates etc.1390 dates etc.
1389 This function must be different from the constructor, because1391 This function must be different from the constructor, because
@@ -1397,7 +1399,7 @@
1397 self.mimetype = str(res[0][0])1399 self.mimetype = str(res[0][0])
13981400
13991401
1400 def get_data(self, cr, fil_obj = None):1402 def get_data(self, cr, fil_obj=None):
1401 cntobj = self.context._dirobj.pool.get('document.directory.content')1403 cntobj = self.context._dirobj.pool.get('document.directory.content')
1402 if not self.check_perms(4):1404 if not self.check_perms(4):
1403 raise IOError(errno.EPERM, "Permission denied")1405 raise IOError(errno.EPERM, "Permission denied")
@@ -1427,7 +1429,7 @@
1427 1429
1428 return nodefd_content(self, cr, mode, ctx)1430 return nodefd_content(self, cr, mode, ctx)
14291431
1430 def get_data_len(self, cr, fil_obj = None):1432 def get_data_len(self, cr, fil_obj=None):
1431 # FIXME : here, we actually generate the content twice!!1433 # FIXME : here, we actually generate the content twice!!
1432 # we should have cached the generated content, but it is1434 # we should have cached the generated content, but it is
1433 # not advisable to do keep it in memory, until we have a cache1435 # not advisable to do keep it in memory, until we have a cache
@@ -1436,7 +1438,7 @@
1436 self.get_data(cr,fil_obj)1438 self.get_data(cr,fil_obj)
1437 return self.content_length1439 return self.content_length
14381440
1439 def set_data(self, cr, data, fil_obj = None):1441 def set_data(self, cr, data, fil_obj=None):
1440 cntobj = self.context._dirobj.pool.get('document.directory.content')1442 cntobj = self.context._dirobj.pool.get('document.directory.content')
1441 if not self.check_perms(2):1443 if not self.check_perms(2):
1442 raise IOError(errno.EPERM, "Permission denied")1444 raise IOError(errno.EPERM, "Permission denied")
@@ -1445,7 +1447,7 @@
1445 ctx.update(self.dctx)1447 ctx.update(self.dctx)
1446 return cntobj.process_write(cr, self.context.uid, self, data, ctx)1448 return cntobj.process_write(cr, self.context.uid, self, data, ctx)
14471449
1448 def _get_ttag(self,cr):1450 def _get_ttag(self, cr):
1449 return 'cnt-%d%s' % (self.cnt_id,(self.act_id and ('-' + str(self.act_id))) or '')1451 return 'cnt-%d%s' % (self.cnt_id,(self.act_id and ('-' + str(self.act_id))) or '')
14501452
1451 def get_dav_resourcetype(self, cr):1453 def get_dav_resourcetype(self, cr):
14521454
=== modified file 'document/odt2txt.py' (properties changed: +x to -x)
--- document/odt2txt.py 2011-09-22 09:55:31 +0000
+++ document/odt2txt.py 2012-03-05 18:43:21 +0000
@@ -24,11 +24,11 @@
24import StringIO24import StringIO
2525
26class OpenDocumentTextFile :26class OpenDocumentTextFile :
27 def __init__ (self, filepath) :27 def __init__ (self, filepath):
28 zip = zipfile.ZipFile(filepath)28 zip = zipfile.ZipFile(filepath)
29 self.content = xml.dom.minidom.parseString(zip.read("content.xml"))29 self.content = xml.dom.minidom.parseString(zip.read("content.xml"))
3030
31 def toString (self) :31 def toString (self):
32 """ Converts the document to a string. """32 """ Converts the document to a string. """
33 buffer = u""33 buffer = u""
34 for val in ["text:p", "text:h", "text:list"]:34 for val in ["text:p", "text:h", "text:list"]:
@@ -36,7 +36,7 @@
36 buffer += self.textToString(paragraph) + "\n"36 buffer += self.textToString(paragraph) + "\n"
37 return buffer37 return buffer
3838
39 def textToString(self, element) :39 def textToString(self, element):
40 buffer = u""40 buffer = u""
41 for node in element.childNodes :41 for node in element.childNodes :
42 if node.nodeType == xml.dom.Node.TEXT_NODE :42 if node.nodeType == xml.dom.Node.TEXT_NODE :
4343
=== modified file 'document/std_index.py'
--- document/std_index.py 2011-12-19 16:54:40 +0000
+++ document/std_index.py 2012-03-05 18:43:21 +0000
@@ -38,7 +38,7 @@
38 except UnicodeError:38 except UnicodeError:
39 return s39 return s
4040
41def textToString(element) :41def textToString(element):
42 buffer = u""42 buffer = u""
43 for node in element.childNodes :43 for node in element.childNodes :
44 if node.nodeType == xml.dom.Node.TEXT_NODE :44 if node.nodeType == xml.dom.Node.TEXT_NODE :
@@ -55,7 +55,7 @@
55 def _getExtensions(self):55 def _getExtensions(self):
56 return ['.txt', '.py']56 return ['.txt', '.py']
5757
58 def _doIndexContent(self,content):58 def _doIndexContent(self, content):
59 return content59 return content
6060
61cntIndex.register(TxtIndex())61cntIndex.register(TxtIndex())
@@ -67,7 +67,7 @@
67 def _getExtensions(self):67 def _getExtensions(self):
68 return ['.pptx']68 return ['.pptx']
6969
70 def _doIndexFile(self,fname):70 def _doIndexFile(self, fname):
71 def toString () :71 def toString () :
72 """ Converts the document to a string. """72 """ Converts the document to a string. """
73 buffer = u""73 buffer = u""
@@ -95,7 +95,7 @@
95 def _getExtensions(self):95 def _getExtensions(self):
96 return ['.doc']96 return ['.doc']
9797
98 def _doIndexFile(self,fname):98 def _doIndexFile(self, fname):
99 try:99 try:
100 pop = Popen(['antiword', fname], shell=False, stdout=PIPE)100 pop = Popen(['antiword', fname], shell=False, stdout=PIPE)
101 (data, _) = pop.communicate()101 (data, _) = pop.communicate()
@@ -115,7 +115,7 @@
115 def _getExtensions(self):115 def _getExtensions(self):
116 return ['.docx']116 return ['.docx']
117117
118 def _doIndexFile(self,fname):118 def _doIndexFile(self, fname):
119 zip = zipfile.ZipFile(fname)119 zip = zipfile.ZipFile(fname)
120 content = xml.dom.minidom.parseString(zip.read("word/document.xml"))120 content = xml.dom.minidom.parseString(zip.read("word/document.xml"))
121 def toString () :121 def toString () :
@@ -140,7 +140,7 @@
140 def _getExtensions(self):140 def _getExtensions(self):
141 return ['.xlsx']141 return ['.xlsx']
142142
143 def _doIndexFile(self,fname):143 def _doIndexFile(self, fname):
144 zip = zipfile.ZipFile(fname)144 zip = zipfile.ZipFile(fname)
145 content = xml.dom.minidom.parseString(zip.read("xl/sharedStrings.xml"))145 content = xml.dom.minidom.parseString(zip.read("xl/sharedStrings.xml"))
146 def toString () :146 def toString () :
@@ -164,7 +164,7 @@
164 def _getExtensions(self):164 def _getExtensions(self):
165 return ['.pdf']165 return ['.pdf']
166166
167 def _doIndexFile(self,fname):167 def _doIndexFile(self, fname):
168 pop = Popen(['pdftotext', '-enc', 'UTF-8', '-nopgbrk', fname, '-'], shell=False, stdout=PIPE)168 pop = Popen(['pdftotext', '-enc', 'UTF-8', '-nopgbrk', fname, '-'], shell=False, stdout=PIPE)
169 (data, _) = pop.communicate()169 (data, _) = pop.communicate()
170 return _to_unicode(data)170 return _to_unicode(data)
@@ -180,7 +180,7 @@
180 return []180 return []
181 #return ['.png','.jpg','.gif','.jpeg','.bmp','.tiff']181 #return ['.png','.jpg','.gif','.jpeg','.bmp','.tiff']
182182
183 def _doIndexContent(self,content):183 def _doIndexContent(self, content):
184 return 'image'184 return 'image'
185185
186186
187187
=== modified file 'document_webdav/document_webdav.py'
--- document_webdav/document_webdav.py 2011-12-19 16:54:40 +0000
+++ document_webdav/document_webdav.py 2012-03-05 18:43:21 +0000
@@ -57,7 +57,7 @@
57 # TODO group57 # TODO group
58 return58 return
5959
60 def _locate_child(self, cr, uid, root_id, uri,nparent, ncontext):60 def _locate_child(self, cr, uid, root_id, uri, nparent, ncontext):
61 """ try to locate the node in uri,61 """ try to locate the node in uri,
62 Return a tuple (node_dir, remaining_path)62 Return a tuple (node_dir, remaining_path)
63 """63 """
6464
=== modified file 'document_webdav/redirect.py'
--- document_webdav/redirect.py 2011-12-19 16:54:40 +0000
+++ document_webdav/redirect.py 2012-03-05 18:43:21 +0000
@@ -30,7 +30,7 @@
30 _HTTP_OPTIONS = { 'Allow': ['OPTIONS', 'GET', 'HEAD', 'PROPFIND'] }30 _HTTP_OPTIONS = { 'Allow': ['OPTIONS', 'GET', 'HEAD', 'PROPFIND'] }
31 redirect_paths = {}31 redirect_paths = {}
3232
33 def __init__(self,request, client_address, server):33 def __init__(self, request, client_address, server):
34 HTTPHandler.__init__(self,request,client_address,server)34 HTTPHandler.__init__(self,request,client_address,server)
3535
36 def send_head(self):36 def send_head(self):
3737
=== modified file 'document_webdav/test_davclient.py' (properties changed: +x to -x)
--- document_webdav/test_davclient.py 2011-12-19 16:54:40 +0000
+++ document_webdav/test_davclient.py 2012-03-05 18:43:21 +0000
@@ -682,7 +682,7 @@
682 assert d2 == d, "Data does not match"682 assert d2 == d, "Data does not match"
683 return ctype, rrange, d683 return ctype, rrange, d
684684
685 def gd_put(self, path, body=None, srcpath=None, mime=None, noclobber=False, ):685 def gd_put(self, path, body=None, srcpath=None, mime=None, noclobber=False):
686 """ HTTP PUT 686 """ HTTP PUT
687 @param noclobber will prevent overwritting a resource (If-None-Match)687 @param noclobber will prevent overwritting a resource (If-None-Match)
688 @param mime will set the content-type688 @param mime will set the content-type
689689
=== modified file 'document_webdav/webdav.py'
--- document_webdav/webdav.py 2011-12-19 16:54:40 +0000
+++ document_webdav/webdav.py 2012-03-05 18:43:21 +0000
@@ -236,7 +236,7 @@
236 return re236 return re
237237
238238
239def mk_propname_response(self,uri,propnames,doc):239def mk_propname_response(self, uri, propnames, doc):
240 """ make a new <prop> result element for a PROPNAME request240 """ make a new <prop> result element for a PROPNAME request
241241
242 This will simply format the propnames list.242 This will simply format the propnames list.
243243
=== modified file 'document_webdav/webdav_server.py'
--- document_webdav/webdav_server.py 2012-02-09 09:06:22 +0000
+++ document_webdav/webdav_server.py 2012-03-05 18:43:21 +0000
@@ -81,7 +81,7 @@
81 'DELETE', 'TRACE', 'REPORT', ]81 'DELETE', 'TRACE', 'REPORT', ]
82 }82 }
8383
84 def get_userinfo(self,user,pw):84 def get_userinfo(self, user, pw):
85 return False85 return False
8686
87 def _log(self, message):87 def _log(self, message):
@@ -167,7 +167,7 @@
167 self.close_connection = 1167 self.close_connection = 1
168 DAVRequestHandler.send_header(self, key, value)168 DAVRequestHandler.send_header(self, key, value)
169169
170 def send_body(self, DATA, code = None, msg = None, desc = None, ctype='application/octet-stream', headers=None):170 def send_body(self, DATA, code=None, msg=None, desc=None, ctype='application/octet-stream', headers=None):
171 if headers and 'Connection' in headers:171 if headers and 'Connection' in headers:
172 pass172 pass
173 elif self.request_version in ('HTTP/1.0', 'HTTP/0.9'):173 elif self.request_version in ('HTTP/1.0', 'HTTP/0.9'):
@@ -441,10 +441,10 @@
441 def __init__(self, parent):441 def __init__(self, parent):
442 self.parent = parent442 self.parent = parent
443443
444 def get_propnames(self,uri):444 def get_propnames(self, uri):
445 return self.PROPS445 return self.PROPS
446446
447 def get_prop(self,uri,ns,propname):447 def get_prop(self, uri, ns, propname):
448 if self.M_NS.has_key(ns):448 if self.M_NS.has_key(ns):
449 prefix=self.M_NS[ns]449 prefix=self.M_NS[ns]
450 else:450 else:
@@ -460,10 +460,10 @@
460 def get_data(self, uri, range=None):460 def get_data(self, uri, range=None):
461 raise DAV_NotFound461 raise DAV_NotFound
462462
463 def _get_dav_creationdate(self,uri):463 def _get_dav_creationdate(self, uri):
464 return time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())464 return time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
465465
466 def _get_dav_getlastmodified(self,uri):466 def _get_dav_getlastmodified(self, uri):
467 return time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime())467 return time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime())
468468
469 def _get_dav_displayname(self, uri):469 def _get_dav_displayname(self, uri):
470470
=== modified file 'email_template/html2text.py' (properties changed: +x to -x)
--- email_template/html2text.py 2011-12-19 16:54:40 +0000
+++ email_template/html2text.py 2012-03-05 18:43:21 +0000
@@ -158,7 +158,7 @@
158 self.abbr_list = {} # stack of abbreviations to write later158 self.abbr_list = {} # stack of abbreviations to write later
159 self.baseurl = baseurl159 self.baseurl = baseurl
160 160
161 def outtextf(self, s): 161 def outtextf(self, s):
162 self.outtext += s162 self.outtext += s
163 163
164 def close(self):164 def close(self):
@@ -338,7 +338,7 @@
338 def pbr(self):338 def pbr(self):
339 if self.p_p == 0: self.p_p = 1339 if self.p_p == 0: self.p_p = 1
340340
341 def p(self): self.p_p = 2341 def p(self):
342 342
343 def o(self, data, puredata=0, force=0):343 def o(self, data, puredata=0, force=0):
344 if self.abbr_data is not None: self.abbr_data += data344 if self.abbr_data is not None: self.abbr_data += data
@@ -411,7 +411,8 @@
411 if r'\/script>' in data: self.quiet -= 1411 if r'\/script>' in data: self.quiet -= 1
412 self.o(data, 1)412 self.o(data, 1)
413 413
414 def unknown_decl(self, data): pass414 def unknown_decl(self, data):
415 pass
415416
416def wrapwrite(text): sys.stdout.write(text.encode('utf8'))417def wrapwrite(text): sys.stdout.write(text.encode('utf8'))
417418
418419
=== modified file 'email_template/wizard/mail_compose_message.py'
--- email_template/wizard/mail_compose_message.py 2012-01-31 13:36:57 +0000
+++ email_template/wizard/mail_compose_message.py 2012-03-05 18:43:21 +0000
@@ -27,7 +27,7 @@
27import tools27import tools
2828
2929
30def _reopen(self,res_id,model):30def _reopen(self, res_id, model):
31 return {'type': 'ir.actions.act_window',31 return {'type': 'ir.actions.act_window',
32 'view_mode': 'form',32 'view_mode': 'form',
33 'view_type': 'form',33 'view_type': 'form',
3434
=== modified file 'event/event.py'
--- event/event.py 2012-03-01 11:39:44 +0000
+++ event/event.py 2012-03-05 18:43:21 +0000
@@ -66,7 +66,7 @@
66 res.append((record['id'], name))66 res.append((record['id'], name))
67 return res67 return res
6868
69 def _name_get_fnc(self, cr, uid, ids,prop,unknow, context=None):69 def _name_get_fnc(self, cr, uid, ids, prop, unknow, context=None):
70 res = self.name_get(cr, uid, ids, context=context)70 res = self.name_get(cr, uid, ids, context=context)
71 return dict(res)71 return dict(res)
7272
7373
=== modified file 'event/report/__init__.py'
--- event/report/__init__.py 2011-01-14 00:11:01 +0000
+++ event/report/__init__.py 2012-03-05 18:43:21 +0000
@@ -21,4 +21,4 @@
2121
22import report_event_registration22import report_event_registration
2323
24# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
25\ No newline at end of file24\ No newline at end of file
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2626
=== modified file 'event/res_partner.py'
--- event/res_partner.py 2012-02-24 13:20:14 +0000
+++ event/res_partner.py 2012-03-05 18:43:21 +0000
@@ -32,4 +32,4 @@
3232
33res_partner()33res_partner()
3434
35# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
36\ No newline at end of file35\ No newline at end of file
36# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3737
=== modified file 'event/wizard/event_confirm.py'
--- event/wizard/event_confirm.py 2011-01-14 00:11:01 +0000
+++ event/wizard/event_confirm.py 2012-03-05 18:43:21 +0000
@@ -34,4 +34,4 @@
3434
35event_confirm()35event_confirm()
3636
37# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
38\ No newline at end of file37\ No newline at end of file
38# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3939
=== modified file 'event_moodle/event_moodle.py'
--- event_moodle/event_moodle.py 2012-02-28 14:48:22 +0000
+++ event_moodle/event_moodle.py 2012-03-05 18:43:21 +0000
@@ -125,7 +125,7 @@
125 passwd = passwd + '+'125 passwd = passwd + '+'
126 return passwd126 return passwd
127127
128 def check_email(self,email):128 def check_email(self, email):
129 129
130 """130 """
131 check if email is correct131 check if email is correct
132132
=== modified file 'event_project/event_project.py'
--- event_project/event_project.py 2011-01-14 00:11:01 +0000
+++ event_project/event_project.py 2012-03-05 18:43:21 +0000
@@ -55,4 +55,4 @@
55 55
56event()56event()
5757
58# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
59\ No newline at end of file58\ No newline at end of file
59# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6060
=== modified file 'event_project/wizard/event_project_retro.py'
--- event_project/wizard/event_project_retro.py 2011-01-14 00:11:01 +0000
+++ event_project/wizard/event_project_retro.py 2012-03-05 18:43:21 +0000
@@ -80,4 +80,4 @@
8080
81event_project()81event_project()
8282
83# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
84\ No newline at end of file83\ No newline at end of file
84# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
8585
=== modified file 'hr_attendance/wizard/__init__.py'
--- hr_attendance/wizard/__init__.py 2011-01-14 00:11:01 +0000
+++ hr_attendance/wizard/__init__.py 2012-03-05 18:43:21 +0000
@@ -24,4 +24,4 @@
24import hr_attendance_byweek24import hr_attendance_byweek
25import hr_attendance_bymonth25import hr_attendance_bymonth
2626
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
28\ No newline at end of file27\ No newline at end of file
28# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2929
=== modified file 'hr_attendance/wizard/hr_attendance_bymonth.py'
--- hr_attendance/wizard/hr_attendance_bymonth.py 2011-12-16 05:52:38 +0000
+++ hr_attendance/wizard/hr_attendance_bymonth.py 2012-03-05 18:43:21 +0000
@@ -50,4 +50,4 @@
5050
51hr_attendance_bymonth()51hr_attendance_bymonth()
5252
53# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
54\ No newline at end of file53\ No newline at end of file
54# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5555
=== modified file 'hr_attendance/wizard/hr_attendance_byweek.py'
--- hr_attendance/wizard/hr_attendance_byweek.py 2011-01-14 00:11:01 +0000
+++ hr_attendance/wizard/hr_attendance_byweek.py 2012-03-05 18:43:21 +0000
@@ -48,4 +48,4 @@
4848
49hr_attendance_byweek()49hr_attendance_byweek()
5050
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
52\ No newline at end of file51\ No newline at end of file
52# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5353
=== modified file 'hr_attendance/wizard/hr_attendance_error.py'
--- hr_attendance/wizard/hr_attendance_error.py 2011-01-14 00:11:01 +0000
+++ hr_attendance/wizard/hr_attendance_error.py 2012-03-05 18:43:21 +0000
@@ -66,4 +66,4 @@
6666
67hr_attendance_error()67hr_attendance_error()
6868
69# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
70\ No newline at end of file69\ No newline at end of file
70# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
7171
=== modified file 'hr_evaluation/hr_evaluation.py'
--- hr_evaluation/hr_evaluation.py 2012-02-13 15:27:55 +0000
+++ hr_evaluation/hr_evaluation.py 2012-03-05 18:43:21 +0000
@@ -244,7 +244,7 @@
244 raise osv.except_osv(_('Warning !'),_("You cannot change state, because some appraisal in waiting answer or draft state"))244 raise osv.except_osv(_('Warning !'),_("You cannot change state, because some appraisal in waiting answer or draft state"))
245 return True245 return True
246246
247 def button_done(self,cr, uid, ids, context=None):247 def button_done(self, cr, uid, ids, context=None):
248 self.write(cr, uid, ids,{'progress': 1 * 100}, context=context)248 self.write(cr, uid, ids,{'progress': 1 * 100}, context=context)
249 self.write(cr, uid, ids,{'state':'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context)249 self.write(cr, uid, ids,{'state':'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context)
250 return True250 return True
251251
=== modified file 'hr_payroll/report/report_contribution_register.py'
--- hr_payroll/report/report_contribution_register.py 2011-06-29 09:20:32 +0000
+++ hr_payroll/report/report_contribution_register.py 2012-03-05 18:43:21 +0000
@@ -72,4 +72,4 @@
7272
73report_sxw.report_sxw('report.contribution.register.lines', 'hr.contribution.register', 'hr_payroll/report/report_contribution_register.rml', parser=contribution_register_report)73report_sxw.report_sxw('report.contribution.register.lines', 'hr.contribution.register', 'hr_payroll/report/report_contribution_register.rml', parser=contribution_register_report)
7474
75# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
76\ No newline at end of file75\ No newline at end of file
76# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
7777
=== modified file 'hr_payroll/report/report_payslip.py'
--- hr_payroll/report/report_payslip.py 2011-12-19 16:54:40 +0000
+++ hr_payroll/report/report_payslip.py 2012-03-05 18:43:21 +0000
@@ -46,4 +46,4 @@
4646
47report_sxw.report_sxw('report.payslip', 'hr.payslip', 'hr_payroll/report/report_payslip.rml', parser=payslip_report)47report_sxw.report_sxw('report.payslip', 'hr.payslip', 'hr_payroll/report/report_payslip.rml', parser=payslip_report)
4848
49# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
50\ No newline at end of file49\ No newline at end of file
50# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5151
=== modified file 'hr_payroll/report/report_payslip_details.py'
--- hr_payroll/report/report_payslip_details.py 2011-09-14 13:11:06 +0000
+++ hr_payroll/report/report_payslip_details.py 2012-03-05 18:43:21 +0000
@@ -116,4 +116,4 @@
116116
117report_sxw.report_sxw('report.paylip.details', 'hr.payslip', 'hr_payroll/report/report_payslip_details.rml', parser=payslip_details_report)117report_sxw.report_sxw('report.paylip.details', 'hr.payslip', 'hr_payroll/report/report_payslip_details.rml', parser=payslip_details_report)
118118
119# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
120\ No newline at end of file119\ No newline at end of file
120# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
121121
=== modified file 'hr_payroll_account/__init__.py'
--- hr_payroll_account/__init__.py 2011-09-15 05:45:39 +0000
+++ hr_payroll_account/__init__.py 2012-03-05 18:43:21 +0000
@@ -23,4 +23,4 @@
23import hr_payroll_account23import hr_payroll_account
24import wizard24import wizard
2525
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
27\ No newline at end of file26\ No newline at end of file
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2828
=== modified file 'hr_payroll_account/wizard/__init__.py'
--- hr_payroll_account/wizard/__init__.py 2011-09-15 05:45:39 +0000
+++ hr_payroll_account/wizard/__init__.py 2012-03-05 18:43:21 +0000
@@ -22,4 +22,4 @@
2222
23import hr_payroll_payslips_by_employees23import hr_payroll_payslips_by_employees
2424
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26\ No newline at end of file25\ No newline at end of file
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2727
=== modified file 'hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py'
--- hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py 2011-09-15 05:45:39 +0000
+++ hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py 2012-03-05 18:43:21 +0000
@@ -37,4 +37,4 @@
3737
38hr_payslip_employees()38hr_payslip_employees()
3939
40# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
41\ No newline at end of file40\ No newline at end of file
41# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4242
=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py 2011-12-31 07:57:20 +0000
+++ hr_recruitment/hr_recruitment.py 2012-03-05 18:43:21 +0000
@@ -213,7 +213,7 @@
213 }213 }
214214
215215
216 def onchange_job(self,cr, uid, ids, job, context=None):216 def onchange_job(self, cr, uid, ids, job, context=None):
217 result = {}217 result = {}
218218
219 if job:219 if job:
220220
=== modified file 'hr_recruitment/wizard/hr_recruitment_create_partner_job.py'
--- hr_recruitment/wizard/hr_recruitment_create_partner_job.py 2011-01-14 00:11:01 +0000
+++ hr_recruitment/wizard/hr_recruitment_create_partner_job.py 2012-03-05 18:43:21 +0000
@@ -29,7 +29,7 @@
29 'close': fields.boolean('Close job request'),29 'close': fields.boolean('Close job request'),
30 }30 }
3131
32 def view_init(self, cr , uid , fields_list, context=None):32 def view_init(self, cr, uid, fields_list, context=None):
33 case_obj = self.pool.get('hr.applicant')33 case_obj = self.pool.get('hr.applicant')
34 if context is None:34 if context is None:
35 context = {}35 context = {}
@@ -88,4 +88,4 @@
8888
89hr_recruitment_partner_create()89hr_recruitment_partner_create()
9090
91# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
92\ No newline at end of file91\ No newline at end of file
92# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
9393
=== modified file 'hr_recruitment/wizard/hr_recruitment_employee_hired.py'
--- hr_recruitment/wizard/hr_recruitment_employee_hired.py 2011-11-17 10:53:01 +0000
+++ hr_recruitment/wizard/hr_recruitment_employee_hired.py 2012-03-05 18:43:21 +0000
@@ -26,7 +26,7 @@
26 _name = 'hired.employee'26 _name = 'hired.employee'
27 _description = 'Create Employee'27 _description = 'Create Employee'
2828
29 def case_close(self, cr, uid,ids, context=None):29 def case_close(self, cr, uid, ids, context=None):
30 """30 """
31 @param self: The object pointer31 @param self: The object pointer
32 @param cr: the current row, from the database cursor,32 @param cr: the current row, from the database cursor,
@@ -39,7 +39,7 @@
39 self.pool.get('hr.applicant').case_close(cr, uid,context.get('active_ids',[]))39 self.pool.get('hr.applicant').case_close(cr, uid,context.get('active_ids',[]))
40 return {}40 return {}
4141
42 def case_close_with_emp(self, cr, uid,ids, context=None):42 def case_close_with_emp(self, cr, uid, ids, context=None):
43 """43 """
44 @param self: The object pointer44 @param self: The object pointer
45 @param cr: the current row, from the database cursor,45 @param cr: the current row, from the database cursor,
4646
=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py'
--- hr_timesheet_invoice/hr_timesheet_invoice.py 2012-01-03 12:33:39 +0000
+++ hr_timesheet_invoice/hr_timesheet_invoice.py 2012-03-05 18:43:21 +0000
@@ -77,7 +77,7 @@
77 _defaults = {77 _defaults = {
78 'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False),78 'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False),
79 }79 }
80 def on_change_partner_id(self, cr, uid, id, partner_id, context={}):80 def on_change_partner_id(self, cr, uid, id, partner_id, context=None):
81 res = super(account_analytic_account, self).on_change_partner_id(cr, uid, id, partner_id, context)81 res = super(account_analytic_account, self).on_change_partner_id(cr, uid, id, partner_id, context)
82 if (not res.get('value', False)) or not partner_id:82 if (not res.get('value', False)) or not partner_id:
83 return res83 return res
8484
=== modified file 'hr_timesheet_invoice/report/account_analytic_profit.py'
--- hr_timesheet_invoice/report/account_analytic_profit.py 2011-01-14 00:11:01 +0000
+++ hr_timesheet_invoice/report/account_analytic_profit.py 2012-03-05 18:43:21 +0000
@@ -120,4 +120,4 @@
120120
121report_sxw.report_sxw('report.account.analytic.profit', 'account.analytic.line', 'addons/hr_timesheet_invoice/report/account_analytic_profit.rml', parser=account_analytic_profit)121report_sxw.report_sxw('report.account.analytic.profit', 'account.analytic.line', 'addons/hr_timesheet_invoice/report/account_analytic_profit.rml', parser=account_analytic_profit)
122122
123# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
124\ No newline at end of file123\ No newline at end of file
124# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
125125
=== modified file 'hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py'
--- hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2011-11-16 14:59:58 +0000
+++ hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2012-03-05 18:43:21 +0000
@@ -38,7 +38,7 @@
38 # 'price': boolean38 # 'price': boolean
39 # 'product': many2one id39 # 'product': many2one id
40 # }40 # }
41 def invoice_cost_create(self, cr, uid, ids, data={}, context=None):41 def invoice_cost_create(self, cr, uid, ids, data=None, context=None):
42 analytic_account_obj = self.pool.get('account.analytic.account')42 analytic_account_obj = self.pool.get('account.analytic.account')
43 res_partner_obj = self.pool.get('res.partner')43 res_partner_obj = self.pool.get('res.partner')
44 account_payment_term_obj = self.pool.get('account.payment.term')44 account_payment_term_obj = self.pool.get('account.payment.term')
4545
=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py'
--- hr_timesheet_sheet/hr_timesheet_sheet.py 2012-02-13 15:27:55 +0000
+++ hr_timesheet_sheet/hr_timesheet_sheet.py 2012-03-05 18:43:21 +0000
@@ -374,7 +374,7 @@
374 'department_id':fields.many2one('hr.department','Department'),374 'department_id':fields.many2one('hr.department','Department'),
375 }375 }
376376
377 def _default_date_from(self,cr, uid, context=None):377 def _default_date_from(self, cr, uid, context=None):
378 user = self.pool.get('res.users').browse(cr, uid, uid, context=context)378 user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
379 r = user.company_id and user.company_id.timesheet_range or 'month'379 r = user.company_id and user.company_id.timesheet_range or 'month'
380 if r=='month':380 if r=='month':
@@ -385,7 +385,7 @@
385 return time.strftime('%Y-01-01')385 return time.strftime('%Y-01-01')
386 return time.strftime('%Y-%m-%d')386 return time.strftime('%Y-%m-%d')
387387
388 def _default_date_to(self,cr, uid, context=None):388 def _default_date_to(self, cr, uid, context=None):
389 user = self.pool.get('res.users').browse(cr, uid, uid, context=context)389 user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
390 r = user.company_id and user.company_id.timesheet_range or 'month'390 r = user.company_id and user.company_id.timesheet_range or 'month'
391 if r=='month':391 if r=='month':
392392
=== modified file 'hr_timesheet_sheet/wizard/hr_timesheet_current.py'
--- hr_timesheet_sheet/wizard/hr_timesheet_current.py 2011-01-14 00:11:01 +0000
+++ hr_timesheet_sheet/wizard/hr_timesheet_current.py 2012-03-05 18:43:21 +0000
@@ -61,4 +61,4 @@
6161
62hr_timesheet_current_open()62hr_timesheet_current_open()
6363
64# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
65\ No newline at end of file64\ No newline at end of file
65# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6666
=== modified file 'idea/idea.py'
--- idea/idea.py 2011-12-31 07:57:20 +0000
+++ idea/idea.py 2012-03-05 18:43:21 +0000
@@ -234,7 +234,7 @@
234 res_id = super(idea_idea, self).create(cr, user, vals, context=context)234 res_id = super(idea_idea, self).create(cr, user, vals, context=context)
235 return res_id235 return res_id
236236
237 def copy(self, cr, uid, id, default={}, context=None):237 def copy(self, cr, uid, id, default=None, context=None):
238 """238 """
239 Create the new record in idea_idea model from existing one239 Create the new record in idea_idea model from existing one
240 @param cr: A database cursor240 @param cr: A database cursor
241241
=== modified file 'import_base/import_framework.py'
--- import_base/import_framework.py 2011-12-31 07:57:20 +0000
+++ import_base/import_framework.py 2012-03-05 18:43:21 +0000
@@ -228,7 +228,7 @@
228 return map228 return map
229229
230230
231 def _fields_mapp(self,dict_sugar, openerp_dict, table):231 def _fields_mapp(self, dict_sugar, openerp_dict, table):
232 """232 """
233 call all the mapper and transform data233 call all the mapper and transform data
234 to be compatible with import_data234 to be compatible with import_data
235235
=== modified file 'import_sugarcrm/import_sugarcrm.py'
--- import_sugarcrm/import_sugarcrm.py 2012-02-16 17:29:41 +0000
+++ import_sugarcrm/import_sugarcrm.py 2012-03-05 18:43:21 +0000
@@ -253,7 +253,7 @@
253 val['datas_fname'] = Filename253 val['datas_fname'] = Filename
254 return val 254 return val
255 255
256 def get_history_mapping(self): 256 def get_history_mapping(self):
257 return { 257 return {
258 'model' : 'ir.attachment',258 'model' : 'ir.attachment',
259 '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],259 '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],
@@ -301,7 +301,7 @@
301 val['email_from'] = partner_email301 val['email_from'] = partner_email
302 return val302 return val
303 303
304 def get_crm_claim_mapping(self): 304 def get_crm_claim_mapping(self):
305 return { 305 return {
306 'model' : 'crm.claim',306 'model' : 'crm.claim',
307 'dependencies' : [self.TABLE_USER, self.TABLE_ACCOUNT, self.TABLE_CONTACT, self.TABLE_LEAD],307 'dependencies' : [self.TABLE_USER, self.TABLE_ACCOUNT, self.TABLE_CONTACT, self.TABLE_LEAD],
@@ -604,7 +604,7 @@
604 partner_contact_email = address.email604 partner_contact_email = address.email
605 return partner_contact_id, partner_contact_email605 return partner_contact_id, partner_contact_email
606606
607 def import_opp(self, val): 607 def import_opp(self, val):
608 partner_contact_id, partner_contact_email = self.import_opportunity_contact(val)608 partner_contact_id, partner_contact_email = self.import_opportunity_contact(val)
609 val['partner_address_id/id'] = partner_contact_id609 val['partner_address_id/id'] = partner_contact_id
610 val['email_from'] = partner_contact_email610 val['email_from'] = partner_contact_email
611611
=== modified file 'l10n_be/__init__.py'
--- l10n_be/__init__.py 2011-01-14 00:11:01 +0000
+++ l10n_be/__init__.py 2012-03-05 18:43:21 +0000
@@ -22,4 +22,4 @@
22import company22import company
23import wizard23import wizard
2424
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26\ No newline at end of file25\ No newline at end of file
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2727
=== modified file 'l10n_be_invoice_bba/invoice.py'
--- l10n_be_invoice_bba/invoice.py 2011-12-19 16:54:40 +0000
+++ l10n_be_invoice_bba/invoice.py 2012-03-05 18:43:21 +0000
@@ -35,7 +35,7 @@
35class account_invoice(osv.osv):35class account_invoice(osv.osv):
36 _inherit = 'account.invoice'36 _inherit = 'account.invoice'
3737
38 def _get_reference_type(self, cursor, user, context=None):38 def _get_reference_type(self, cursor, user, context=None):
39 """Add BBA Structured Communication Type and change labels from 'reference' into 'communication' """ 39 """Add BBA Structured Communication Type and change labels from 'reference' into 'communication' """
40 res = super(account_invoice, self)._get_reference_type(cursor, user,40 res = super(account_invoice, self)._get_reference_type(cursor, user,
41 context=context)41 context=context)
@@ -44,7 +44,7 @@
44 #logger.notifyChannel('addons.'+self._name, netsvc.LOG_WARNING, 'reference_type = %s' %res ) 44 #logger.notifyChannel('addons.'+self._name, netsvc.LOG_WARNING, 'reference_type = %s' %res )
45 return res45 return res
4646
47 def check_bbacomm(self, val):47 def check_bbacomm(self, val):
48 supported_chars = '0-9+*/ '48 supported_chars = '0-9+*/ '
49 pattern = re.compile('[^' + supported_chars + ']')49 pattern = re.compile('[^' + supported_chars + ']')
50 if pattern.findall(val or ''):50 if pattern.findall(val or ''):
@@ -57,7 +57,7 @@
57 return True57 return True
58 return False58 return False
5959
60 def _check_communication(self, cr, uid, ids):60 def _check_communication(self, cr, uid, ids):
61 for inv in self.browse(cr, uid, ids):61 for inv in self.browse(cr, uid, ids):
62 if inv.reference_type == 'bba':62 if inv.reference_type == 'bba':
63 return self.check_bbacomm(inv.reference)63 return self.check_bbacomm(inv.reference)
@@ -86,7 +86,7 @@
86 result['value'].update(res_update)86 result['value'].update(res_update)
87 return result 87 return result
8888
89 def generate_bbacomm(self, cr, uid, ids, type, reference_type, algorithm, partner_id, reference):89 def generate_bbacomm(self, cr, uid, ids, type, reference_type, algorithm, partner_id, reference):
90 partner_obj = self.pool.get('res.partner')90 partner_obj = self.pool.get('res.partner')
91 reference = reference or '' 91 reference = reference or ''
92 if (type == 'out_invoice'):92 if (type == 'out_invoice'):
@@ -157,7 +157,7 @@
157 "\nPlease contact your OpenERP support channel.") % algorithm) 157 "\nPlease contact your OpenERP support channel.") % algorithm)
158 return {'value': {'reference': reference}} 158 return {'value': {'reference': reference}}
159 159
160 def create(self, cr, uid, vals, context=None):160 def create(self, cr, uid, vals, context=None):
161 if vals.has_key('reference_type'):161 if vals.has_key('reference_type'):
162 reference_type = vals['reference_type']162 reference_type = vals['reference_type']
163 if reference_type == 'bba': 163 if reference_type == 'bba':
@@ -179,7 +179,7 @@
179 '\nPlease create manually a unique BBA Structured Communication.')) 179 '\nPlease create manually a unique BBA Structured Communication.'))
180 return super(account_invoice, self).create(cr, uid, vals, context=context) 180 return super(account_invoice, self).create(cr, uid, vals, context=context)
181181
182 def write(self, cr, uid, ids, vals, context={}):182 def write(self, cr, uid, ids, vals, context=None):
183 if isinstance(ids, (int, long)):183 if isinstance(ids, (int, long)):
184 ids = [ids]184 ids = [ids]
185 for inv in self.browse(cr, uid, ids, context): 185 for inv in self.browse(cr, uid, ids, context):
186186
=== modified file 'l10n_br/l10n_br.py'
--- l10n_br/l10n_br.py 2011-10-03 13:32:03 +0000
+++ l10n_br/l10n_br.py 2012-03-05 18:43:21 +0000
@@ -81,4 +81,4 @@
81 81
82l10n_br_account_cst()82l10n_br_account_cst()
8383
84# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
85\ No newline at end of file84\ No newline at end of file
85# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
8686
=== modified file 'l10n_ch/partner.py'
--- l10n_ch/partner.py 2011-09-16 14:32:55 +0000
+++ l10n_ch/partner.py 2012-03-05 18:43:21 +0000
@@ -30,4 +30,4 @@
30 }30 }
3131
32res_partner()32res_partner()
33# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
34\ No newline at end of file33\ No newline at end of file
34# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3535
=== modified file 'l10n_ch/payment.py'
--- l10n_ch/payment.py 2011-01-14 12:41:54 +0000
+++ l10n_ch/payment.py 2012-03-05 18:43:21 +0000
@@ -24,7 +24,7 @@
24class payment_order(osv.osv):24class payment_order(osv.osv):
25 _inherit = 'payment.order'25 _inherit = 'payment.order'
2626
27 def get_wizard(self,mode):27 def get_wizard(self, mode):
28 if mode == 'dta':28 if mode == 'dta':
29 return 'l10n_ch', 'action_dta_create'29 return 'l10n_ch', 'action_dta_create'
3030
3131
=== modified file 'l10n_ch/report/report_webkit_html.py'
--- l10n_ch/report/report_webkit_html.py 2012-02-13 14:44:56 +0000
+++ l10n_ch/report/report_webkit_html.py 2012-03-05 18:43:21 +0000
@@ -67,7 +67,7 @@
67 self._check(ids)67 self._check(ids)
68 return super(l10n_ch_report_webkit_html, self).set_context(objects, data, ids, report_type=report_type)68 return super(l10n_ch_report_webkit_html, self).set_context(objects, data, ids, report_type=report_type)
69 69
70 def police_absolute_path(self, inner_path) :70 def police_absolute_path(self, inner_path):
71 """Will get the ocrb police absolute path"""71 """Will get the ocrb police absolute path"""
72 path = addons.get_module_resource(os.path.join('l10n_ch', 'report', inner_path))72 path = addons.get_module_resource(os.path.join('l10n_ch', 'report', inner_path))
73 return path73 return path
7474
=== modified file 'l10n_ch/wizard/create_dta.py'
--- l10n_ch/wizard/create_dta.py 2012-01-17 17:21:53 +0000
+++ l10n_ch/wizard/create_dta.py 2012-03-05 18:43:21 +0000
@@ -41,7 +41,7 @@
41 (u'ä','a'),41 (u'ä','a'),
42]42]
4343
44def _u2a(text) :44def _u2a(text):
45 """Tries to convert unicode charactere to asci equivalence"""45 """Tries to convert unicode charactere to asci equivalence"""
46 if not text : return ""46 if not text : return ""
47 txt = ""47 txt = ""
4848
=== modified file 'l10n_fr/l10n_fr.py'
--- l10n_fr/l10n_fr.py 2011-01-14 00:11:01 +0000
+++ l10n_fr/l10n_fr.py 2012-03-05 18:43:21 +0000
@@ -51,4 +51,4 @@
5151
52l10n_fr_line()52l10n_fr_line()
5353
54# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
55\ No newline at end of file54\ No newline at end of file
55# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5656
=== modified file 'l10n_fr/report/base_report.py'
--- l10n_fr/report/base_report.py 2011-01-14 00:11:01 +0000
+++ l10n_fr/report/base_report.py 2012-03-05 18:43:21 +0000
@@ -117,4 +117,4 @@
117 break117 break
118 self._set_variable(code, sum)118 self._set_variable(code, sum)
119119
120# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
121\ No newline at end of file120\ No newline at end of file
121# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
122122
=== modified file 'l10n_fr/wizard/fr_report_bilan.py'
--- l10n_fr/wizard/fr_report_bilan.py 2011-01-14 00:11:01 +0000
+++ l10n_fr/wizard/fr_report_bilan.py 2012-03-05 18:43:21 +0000
@@ -54,4 +54,4 @@
5454
55account_bilan_report()55account_bilan_report()
5656
57# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
58\ No newline at end of file57\ No newline at end of file
58# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5959
=== modified file 'l10n_fr/wizard/fr_report_compute_resultant.py'
--- l10n_fr/wizard/fr_report_compute_resultant.py 2011-01-14 00:11:01 +0000
+++ l10n_fr/wizard/fr_report_compute_resultant.py 2012-03-05 18:43:21 +0000
@@ -54,4 +54,4 @@
5454
55account_cdr_report()55account_cdr_report()
5656
57# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
58\ No newline at end of file57\ No newline at end of file
58# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5959
=== modified file 'l10n_lu/wizard/pdf_ext.py'
--- l10n_lu/wizard/pdf_ext.py 2011-01-14 00:11:01 +0000
+++ l10n_lu/wizard/pdf_ext.py 2012-03-05 18:43:21 +0000
@@ -57,7 +57,7 @@
57%%EOF57%%EOF
58"""58"""
5959
60def output_field( f ):60def output_field(f):
61 return "\xfe\xff" + "".join( [ "\x00"+c for c in f ] )61 return "\xfe\xff" + "".join( [ "\x00"+c for c in f ] )
6262
63def extract_keys(lines):63def extract_keys(lines):
6464
=== modified file 'lunch/report/order.py'
--- lunch/report/order.py 2011-01-14 00:11:01 +0000
+++ lunch/report/order.py 2012-03-05 18:43:21 +0000
@@ -26,14 +26,14 @@
2626
27class order(report_sxw.rml_parse):27class order(report_sxw.rml_parse):
2828
29 def get_lines(self, user,objects):29 def get_lines(self, user, objects):
30 lines=[]30 lines=[]
31 for obj in objects:31 for obj in objects:
32 if user.id==obj.user_id.id:32 if user.id==obj.user_id.id:
33 lines.append(obj)33 lines.append(obj)
34 return lines34 return lines
3535
36 def get_total(self, user,objects):36 def get_total(self, user, objects):
37 lines=[]37 lines=[]
38 for obj in objects:38 for obj in objects:
39 if user.id==obj.user_id.id:39 if user.id==obj.user_id.id:
4040
=== modified file 'mail/mail_thread.py'
--- mail/mail_thread.py 2011-12-19 16:54:40 +0000
+++ mail/mail_thread.py 2012-03-05 18:43:21 +0000
@@ -134,7 +134,7 @@
134 self.message_append_dict(cr, uid, [res_id], msg_dict, context=context)134 self.message_append_dict(cr, uid, [res_id], msg_dict, context=context)
135 return res_id135 return res_id
136136
137 def message_update(self, cr, uid, ids, msg_dict, vals={}, default_act=None, context=None):137 def message_update(self, cr, uid, ids, msg_dict, vals=None, default_act=None, context=None):
138 """Called by ``message_process`` when a new message is received138 """Called by ``message_process`` when a new message is received
139 for an existing thread. The default behavior is to create a139 for an existing thread. The default behavior is to create a
140 new mail.message in the given thread (by calling140 new mail.message in the given thread (by calling
141141
=== modified file 'mail/static/scripts/openerp_mailgate.py' (properties changed: +x to -x)
=== modified file 'membership/report/__init__.py'
--- membership/report/__init__.py 2011-01-14 00:11:01 +0000
+++ membership/report/__init__.py 2012-03-05 18:43:21 +0000
@@ -20,4 +20,4 @@
20##############################################################################20##############################################################################
2121
22import report_membership22import report_membership
23# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
24\ No newline at end of file23\ No newline at end of file
24# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2525
=== modified file 'membership/report/report_membership.py'
--- membership/report/report_membership.py 2011-12-19 16:54:40 +0000
+++ membership/report/report_membership.py 2012-03-05 18:43:21 +0000
@@ -141,4 +141,4 @@
141141
142report_membership()142report_membership()
143143
144# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
145\ No newline at end of file144\ No newline at end of file
145# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
146146
=== modified file 'membership/wizard/__init__.py'
--- membership/wizard/__init__.py 2011-01-14 00:11:01 +0000
+++ membership/wizard/__init__.py 2012-03-05 18:43:21 +0000
@@ -20,4 +20,4 @@
20##############################################################################20##############################################################################
2121
22import membership_invoice22import membership_invoice
23# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
24\ No newline at end of file23\ No newline at end of file
24# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2525
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py 2012-02-13 18:07:41 +0000
+++ mrp/mrp.py 2012-03-05 18:43:21 +0000
@@ -271,13 +271,15 @@
271 return {'value': {'name': prod.name, 'product_uom': prod.uom_id.id}}271 return {'value': {'name': prod.name, 'product_uom': prod.uom_id.id}}
272 return {}272 return {}
273273
274 def _bom_find(self, cr, uid, product_id, product_uom, properties=[]):274 def _bom_find(self, cr, uid, product_id, product_uom, properties=None):
275 """ Finds BoM for particular product and product uom.275 """ Finds BoM for particular product and product uom.
276 @param product_id: Selected product.276 @param product_id: Selected product.
277 @param product_uom: Unit of measure of a product.277 @param product_uom: Unit of measure of a product.
278 @param properties: List of related properties.278 @param properties: List of related properties.
279 @return: False or BoM id.279 @return: False or BoM id.
280 """280 """
281 if properties is None:
282 properties = []
281 cr.execute('select id from mrp_bom where product_id=%s and bom_id is null order by sequence', (product_id,))283 cr.execute('select id from mrp_bom where product_id=%s and bom_id is null order by sequence', (product_id,))
282 ids = map(lambda x: x[0], cr.fetchall())284 ids = map(lambda x: x[0], cr.fetchall())
283 max_prop = 0285 max_prop = 0
@@ -292,7 +294,7 @@
292 max_prop = prop294 max_prop = prop
293 return result295 return result
294296
295 def _bom_explode(self, cr, uid, bom, factor, properties=[], addthis=False, level=0, routing_id=False):297 def _bom_explode(self, cr, uid, bom, factor, properties=None, addthis=False, level=0, routing_id=False):
296 """ Finds Products and Work Centers for related BoM for manufacturing order.298 """ Finds Products and Work Centers for related BoM for manufacturing order.
297 @param bom: BoM of particular product.299 @param bom: BoM of particular product.
298 @param factor: Factor of product UoM.300 @param factor: Factor of product UoM.
@@ -577,7 +579,7 @@
577 self.write(cr, uid, ids, {'state': 'picking_except'})579 self.write(cr, uid, ids, {'state': 'picking_except'})
578 return True580 return True
579581
580 def action_compute(self, cr, uid, ids, properties=[], context=None):582 def action_compute(self, cr, uid, ids, properties=None, context=None):
581 """ Computes bills of material of a product.583 """ Computes bills of material of a product.
582 @param properties: List containing dictionaries of properties.584 @param properties: List containing dictionaries of properties.
583 @return: No. of products.585 @return: No. of products.
584586
=== modified file 'mrp/procurement.py'
--- mrp/procurement.py 2011-09-17 16:41:25 +0000
+++ mrp/procurement.py 2012-03-05 18:43:21 +0000
@@ -33,7 +33,7 @@
33 'property_ids': fields.many2many('mrp.property', 'procurement_property_rel', 'procurement_id','property_id', 'Properties'),33 'property_ids': fields.many2many('mrp.property', 'procurement_property_rel', 'procurement_id','property_id', 'Properties'),
34 }34 }
35 35
36 def check_produce_product(self, cr, uid, procurement, context=[]):36 def check_produce_product(self, cr, uid, procurement, context=None):
37 """ Finds the bill of material for the product from procurement order.37 """ Finds the bill of material for the product from procurement order.
38 @return: True or False38 @return: True or False
39 """39 """
4040
=== modified file 'mrp/report/bom_structure.py'
--- mrp/report/bom_structure.py 2011-01-14 00:11:01 +0000
+++ mrp/report/bom_structure.py 2012-03-05 18:43:21 +0000
@@ -35,7 +35,7 @@
35 def get_children(self, object, level=0):35 def get_children(self, object, level=0):
36 result = []36 result = []
3737
38 def _get_rec(object,level):38 def _get_rec(object, level):
39 for l in object:39 for l in object:
40 res = {}40 res = {}
41 res['name'] = l.name41 res['name'] = l.name
@@ -61,4 +61,4 @@
61report_sxw.report_sxw('report.bom.structure','mrp.bom','mrp/report/bom_structure.rml',parser=bom_structure,header='internal')61report_sxw.report_sxw('report.bom.structure','mrp.bom','mrp/report/bom_structure.rml',parser=bom_structure,header='internal')
6262
6363
64# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
65\ No newline at end of file64\ No newline at end of file
65# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6666
=== modified file 'mrp/stock.py'
--- mrp/stock.py 2012-02-13 15:27:55 +0000
+++ mrp/stock.py 2012-03-05 18:43:21 +0000
@@ -102,7 +102,7 @@
102 wf_service.trg_validate(uid, 'procurement.order', m, 'button_wait_done', cr)102 wf_service.trg_validate(uid, 'procurement.order', m, 'button_wait_done', cr)
103 return processed_ids103 return processed_ids
104 104
105 def action_consume(self, cr, uid, ids, product_qty, location_id=False, context=None): 105 def action_consume(self, cr, uid, ids, product_qty, location_id=False, context=None):
106 """ Consumed product with specific quatity from specific source location.106 """ Consumed product with specific quatity from specific source location.
107 @param product_qty: Consumed product quantity107 @param product_qty: Consumed product quantity
108 @param location_id: Source location108 @param location_id: Source location
109109
=== modified file 'mrp_operations/mrp_operations.py'
--- mrp_operations/mrp_operations.py 2012-01-31 13:36:57 +0000
+++ mrp_operations/mrp_operations.py 2012-03-05 18:43:21 +0000
@@ -372,7 +372,7 @@
372 pass372 pass
373 return result373 return result
374374
375 def action_compute(self, cr, uid, ids, properties=[], context=None):375 def action_compute(self, cr, uid, ids, properties=None, context=None):
376 """ Computes bills of material of a product and planned date of work order.376 """ Computes bills of material of a product and planned date of work order.
377 @param properties: List containing dictionaries of properties.377 @param properties: List containing dictionaries of properties.
378 @return: No. of products.378 @return: No. of products.
379379
=== modified file 'plugin/plugin_handler.py'
--- plugin/plugin_handler.py 2011-12-26 17:12:29 +0000
+++ plugin/plugin_handler.py 2012-03-05 18:43:21 +0000
@@ -132,7 +132,7 @@
132 return ('res.partner', partner_id, url)132 return ('res.partner', partner_id, url)
133133
134 # Specific to outlook rfc822 is not available so we split in arguments headerd,body,attachemnts134 # Specific to outlook rfc822 is not available so we split in arguments headerd,body,attachemnts
135 def push_message_outlook(self, cr, uid, model, headers,res_id=0 ,body_text=False, body_html=False, attachments=False):135 def push_message_outlook(self, cr, uid, model, headers, res_id=0 , body_text=False, body_html=False, attachments=False):
136 # ----------------------------------------136 # ----------------------------------------
137 # solution 1137 # solution 1
138 # construct a fake rfc822 from the separated arguement138 # construct a fake rfc822 from the separated arguement
139139
=== modified file 'point_of_sale/report/account_statement.py'
--- point_of_sale/report/account_statement.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/account_statement.py 2012-03-05 18:43:21 +0000
@@ -48,4 +48,4 @@
4848
49report_sxw.report_sxw('report.account.statement', 'account.bank.statement', 'addons/statement/report/account_statement.rml', parser=account_statement,header='internal')49report_sxw.report_sxw('report.account.statement', 'account.bank.statement', 'addons/statement/report/account_statement.rml', parser=account_statement,header='internal')
5050
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
52\ No newline at end of file51\ No newline at end of file
52# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5353
=== modified file 'point_of_sale/report/all_closed_cashbox_of_the_day.py'
--- point_of_sale/report/all_closed_cashbox_of_the_day.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/all_closed_cashbox_of_the_day.py 2012-03-05 18:43:21 +0000
@@ -38,13 +38,13 @@
38 'get_net_total_starting':self._get_net_total_starting,38 'get_net_total_starting':self._get_net_total_starting,
39 })39 })
4040
41 def _get_user(self,line_ids):41 def _get_user(self, line_ids):
42 sql = "select name from res_users where id = %d"%(line_ids['create_uid'])42 sql = "select name from res_users where id = %d"%(line_ids['create_uid'])
43 self.cr.execute(sql)43 self.cr.execute(sql)
44 user = self.cr.fetchone()44 user = self.cr.fetchone()
45 return user[0]45 return user[0]
4646
47 def _get_data(self,user):47 def _get_data(self, user):
48 data = {}48 data = {}
49 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,49 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,
50 abs.state,abs.balance_end_real FROM account_bank_statement as abs50 abs.state,abs.balance_end_real FROM account_bank_statement as abs
@@ -57,7 +57,7 @@
57 data = self.cr.dictfetchall()57 data = self.cr.dictfetchall()
58 return data58 return data
5959
60 def _get_lines(self,statement):60 def _get_lines(self, statement):
61 data = {}61 data = {}
62 sql = """ select absl.* from account_bank_statement_line as absl, account_bank_statement as abs62 sql = """ select absl.* from account_bank_statement_line as absl, account_bank_statement as abs
63 where absl.statement_id = abs.id and abs.id = %d"""%(statement['id'])63 where absl.statement_id = abs.id and abs.id = %d"""%(statement['id'])
@@ -65,7 +65,7 @@
65 data = self.cr.dictfetchall()65 data = self.cr.dictfetchall()
66 return data66 return data
6767
68 def _get_bal(self,data):68 def _get_bal(self, data):
69 res = {}69 res = {}
70 sql =""" select sum(pieces*number) as bal from account_cashbox_line where starting_id = %d """%(data['id'])70 sql =""" select sum(pieces*number) as bal from account_cashbox_line where starting_id = %d """%(data['id'])
71 self.cr.execute(sql)71 self.cr.execute(sql)
@@ -75,7 +75,7 @@
75 else:75 else:
76 return False76 return False
7777
78 def _get_sub_total(self,user,data,date):78 def _get_sub_total(self, user, data, date):
79 res={}79 res={}
80 self.cr.execute(""" select sum(absl.amount) from account_bank_statement as abs80 self.cr.execute(""" select sum(absl.amount) from account_bank_statement as abs
81 LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id81 LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id
@@ -90,7 +90,7 @@
90 else:90 else:
91 return False91 return False
9292
93 def _get_partner(self,statement):93 def _get_partner(self, statement):
94 res = {}94 res = {}
95 if statement['pos_statement_id']:95 if statement['pos_statement_id']:
96 sql =""" select rp.name from account_bank_statement_line as absl,res_partner as rp96 sql =""" select rp.name from account_bank_statement_line as absl,res_partner as rp
@@ -102,7 +102,7 @@
102 else:102 else:
103 return 0.00103 return 0.00
104104
105 def _get_net_total_starting(self,user):105 def _get_net_total_starting(self, user):
106 lst = []106 lst = []
107 res={}107 res={}
108 total_ending_bal = 0.0108 total_ending_bal = 0.0
@@ -124,7 +124,7 @@
124 lst.append(total_starting_bal)124 lst.append(total_starting_bal)
125 return lst125 return lst
126126
127 def _get_net_total(self,user):127 def _get_net_total(self, user):
128 res={}128 res={}
129 sql = """select sum(absl.amount) as net_total from account_bank_statement as abs129 sql = """select sum(absl.amount) as net_total from account_bank_statement as abs
130 LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id130 LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id
@@ -137,4 +137,4 @@
137137
138report_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')138report_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')
139139
140# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
141\ No newline at end of file140\ No newline at end of file
141# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
142142
=== modified file 'point_of_sale/report/pos_details.py'
--- point_of_sale/report/pos_details.py 2011-12-29 16:58:23 +0000
+++ point_of_sale/report/pos_details.py 2012-03-05 18:43:21 +0000
@@ -24,7 +24,7 @@
2424
25class pos_details(report_sxw.rml_parse):25class pos_details(report_sxw.rml_parse):
2626
27 def _get_invoice(self,inv_id):27 def _get_invoice(self, inv_id):
28 res={}28 res={}
29 if inv_id:29 if inv_id:
30 self.cr.execute("select number from account_invoice as ac where id = %s", (inv_id,))30 self.cr.execute("select number from account_invoice as ac where id = %s", (inv_id,))
@@ -37,7 +37,7 @@
37 user_obj = self.pool.get('res.users')37 user_obj = self.pool.get('res.users')
38 return user_obj.search(self.cr, self.uid, [])38 return user_obj.search(self.cr, self.uid, [])
3939
40 def _pos_sales_details(self,form):40 def _pos_sales_details(self, form):
41 pos_obj = self.pool.get('pos.order')41 pos_obj = self.pool.get('pos.order')
42 user_obj = self.pool.get('res.users')42 user_obj = self.pool.get('res.users')
43 data = []43 data = []
@@ -74,7 +74,7 @@
74 def _get_sales_total_2(self):74 def _get_sales_total_2(self):
75 return self.total75 return self.total
7676
77 def _get_sum_invoice_2(self,form):77 def _get_sum_invoice_2(self, form):
78 pos_obj = self.pool.get('pos.order')78 pos_obj = self.pool.get('pos.order')
79 user_obj = self.pool.get('res.users')79 user_obj = self.pool.get('res.users')
80 user_ids = form['user_ids'] or self._get_all_users()80 user_ids = form['user_ids'] or self._get_all_users()
8181
=== modified file 'point_of_sale/report/pos_details_summary.py'
--- point_of_sale/report/pos_details_summary.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/pos_details_summary.py 2012-03-05 18:43:21 +0000
@@ -42,7 +42,7 @@
42 'getcompany':self.get_company42 'getcompany':self.get_company
43 })43 })
4444
45 def get_company(self,objects):45 def get_company(self, objects):
46 comp=[obj.company_id.name for obj in objects]46 comp=[obj.company_id.name for obj in objects]
47 return '%s' % (comp[0])47 return '%s' % (comp[0])
4848
@@ -136,4 +136,4 @@
136 parser=pos_details_summary,136 parser=pos_details_summary,
137 header='internal')137 header='internal')
138138
139# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
140\ No newline at end of file139\ No newline at end of file
140# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
141141
=== modified file 'point_of_sale/report/pos_lines.py'
--- point_of_sale/report/pos_lines.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/pos_lines.py 2012-03-05 18:43:21 +0000
@@ -41,7 +41,7 @@
41 self.total = tot41 self.total = tot
42 return self.total42 return self.total
4343
44 def __taxes__(self,obj):44 def __taxes__(self, obj):
45 self.cr.execute ( " Select acct.name from pos_order as po " \45 self.cr.execute ( " Select acct.name from pos_order as po " \
46 " LEFT JOIN pos_order_line as pol ON po.id = pol.order_id " \46 " LEFT JOIN pos_order_line as pol ON po.id = pol.order_id " \
47 " LEFT JOIN product_taxes_rel as ptr ON pol.product_id = ptr.prod_id " \47 " LEFT JOIN product_taxes_rel as ptr ON pol.product_id = ptr.prod_id " \
@@ -52,4 +52,4 @@
5252
53report_sxw.report_sxw('report.pos.lines', 'pos.order', 'addons/point_of_sale/report/pos_lines.rml', parser=pos_lines,header='internal')53report_sxw.report_sxw('report.pos.lines', 'pos.order', 'addons/point_of_sale/report/pos_lines.rml', parser=pos_lines,header='internal')
5454
55# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
56\ No newline at end of file55\ No newline at end of file
56# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5757
=== modified file 'point_of_sale/report/pos_payment_report.py'
--- point_of_sale/report/pos_payment_report.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/pos_payment_report.py 2012-03-05 18:43:21 +0000
@@ -33,7 +33,7 @@
33 'pos_payment_total':self._pos_payment_total,33 'pos_payment_total':self._pos_payment_total,
34 })34 })
3535
36 def _pos_payment(self,obj):36 def _pos_payment(self, obj):
37 data={}37 data={}
38 sql = """ select id from pos_order where id = %d"""%(obj.id)38 sql = """ select id from pos_order where id = %d"""%(obj.id)
39 self.cr.execute(sql)39 self.cr.execute(sql)
@@ -56,9 +56,9 @@
56 self.total += d['price_unit'] * d['qty']56 self.total += d['price_unit'] * d['qty']
57 return data57 return data
5858
59 def _pos_payment_total(self,o):59 def _pos_payment_total(self, o):
60 return self.total60 return self.total
6161
62report_sxw.report_sxw('report.pos.payment.report', 'pos.order', 'addons/point_of_sale/report/pos_payment_report.rml', parser=pos_payment_report,header='internal')62report_sxw.report_sxw('report.pos.payment.report', 'pos.order', 'addons/point_of_sale/report/pos_payment_report.rml', parser=pos_payment_report,header='internal')
6363
64# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
65\ No newline at end of file64\ No newline at end of file
65# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6666
=== modified file 'point_of_sale/report/pos_payment_report_user.py'
--- point_of_sale/report/pos_payment_report_user.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/pos_payment_report_user.py 2012-03-05 18:43:21 +0000
@@ -33,7 +33,7 @@
33 'pos_payment_user_total':self.__pos_payment_user__total__,33 'pos_payment_user_total':self.__pos_payment_user__total__,
34 })34 })
3535
36 def __pos_payment_user__(self,form):36 def __pos_payment_user__(self, form):
37 data={}37 data={}
38 ids = form['user_id']38 ids = form['user_id']
39 sql = "select pt.name,pp.default_code as code,pol.qty,pu.name as uom,pol.discount,pol.price_unit, " \39 sql = "select pt.name,pp.default_code as code,pol.qty,pu.name as uom,pol.discount,pol.price_unit, " \
@@ -61,4 +61,4 @@
6161
62report_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')62report_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')
6363
64# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
65\ No newline at end of file64\ No newline at end of file
65# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6666
=== modified file 'point_of_sale/report/pos_receipt.py'
--- point_of_sale/report/pos_receipt.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/pos_receipt.py 2012-03-05 18:43:21 +0000
@@ -74,4 +74,4 @@
7474
75report_sxw.report_sxw('report.pos.receipt', 'pos.order', 'addons/point_of_sale/report/pos_receipt.rml', parser=order, header=False)75report_sxw.report_sxw('report.pos.receipt', 'pos.order', 'addons/point_of_sale/report/pos_receipt.rml', parser=order, header=False)
7676
77# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
78\ No newline at end of file77\ No newline at end of file
78# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
7979
=== modified file 'point_of_sale/report/pos_sales_user.py'
--- point_of_sale/report/pos_sales_user.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/pos_sales_user.py 2012-03-05 18:43:21 +0000
@@ -33,7 +33,7 @@
3333
34 })34 })
3535
36 def _get_data(self,form):36 def _get_data(self, form):
37 dt1 = form['date_start'] + ' 00:00:00'37 dt1 = form['date_start'] + ' 00:00:00'
38 dt2 = form['date_end'] + ' 23:59:59'38 dt2 = form['date_end'] + ' 23:59:59'
39 data={}39 data={}
@@ -47,4 +47,4 @@
4747
48report_sxw.report_sxw('report.pos.sales.user', 'pos.order', 'addons/point_of_sale/report/pos_sales_user.rml', parser=pos_sales_user,header='internal')48report_sxw.report_sxw('report.pos.sales.user', 'pos.order', 'addons/point_of_sale/report/pos_sales_user.rml', parser=pos_sales_user,header='internal')
4949
50# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
51\ No newline at end of file50\ No newline at end of file
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5252
=== modified file 'point_of_sale/report/pos_sales_user_today.py'
--- point_of_sale/report/pos_sales_user_today.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/pos_sales_user_today.py 2012-03-05 18:43:21 +0000
@@ -33,7 +33,7 @@
3333
34 })34 })
3535
36 def _get_data(self,form):36 def _get_data(self, form):
37 data={}37 data={}
38 ids = form['user_id']38 ids = form['user_id']
3939
@@ -47,4 +47,4 @@
4747
48report_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')48report_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')
4949
50# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
51\ No newline at end of file50\ No newline at end of file
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5252
=== modified file 'point_of_sale/report/pos_users_product.py'
--- point_of_sale/report/pos_users_product.py 2011-01-14 00:11:01 +0000
+++ point_of_sale/report/pos_users_product.py 2012-03-05 18:43:21 +0000
@@ -60,9 +60,9 @@
60 data = self.cr.fetchone()60 data = self.cr.fetchone()
61 return data[0]61 return data[0]
6262
63 def _get_total(self,o):63 def _get_total(self, o):
64 return self.total64 return self.total
6565
66report_sxw.report_sxw('report.pos.user.product', 'account.bank.statement', 'addons/statement/report/pos_users_product.rml', parser=pos_user_product,header='internal')66report_sxw.report_sxw('report.pos.user.product', 'account.bank.statement', 'addons/statement/report/pos_users_product.rml', parser=pos_user_product,header='internal')
6767
68# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
69\ No newline at end of file68\ No newline at end of file
69# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
7070
=== modified file 'point_of_sale/report/report_cash_register.py'
--- point_of_sale/report/report_cash_register.py 2012-02-10 09:11:03 +0000
+++ point_of_sale/report/report_cash_register.py 2012-03-05 18:43:21 +0000
@@ -65,4 +65,4 @@
6565
66report_cash_register()66report_cash_register()
6767
68# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
69\ No newline at end of file68\ No newline at end of file
69# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
7070
=== modified file 'procurement/company.py'
--- procurement/company.py 2011-01-14 00:11:01 +0000
+++ procurement/company.py 2012-03-05 18:43:21 +0000
@@ -35,4 +35,4 @@
3535
36company()36company()
3737
38# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
39\ No newline at end of file38\ No newline at end of file
39# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4040
=== modified file 'product/product.py'
--- product/product.py 2012-02-22 11:53:32 +0000
+++ product/product.py 2012-03-05 18:43:21 +0000
@@ -349,7 +349,7 @@
349 res = False349 res = False
350 return res350 return res
351351
352 def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id):352 def onchange_uom(self, cursor, user, ids, uom_id, uom_po_id):
353 if uom_id:353 if uom_id:
354 return {'value': {'uom_po_id': uom_id}}354 return {'value': {'uom_po_id': uom_id}}
355 return {}355 return {}
@@ -540,7 +540,7 @@
540 self.pool.get('product.template').unlink(cr, uid, unlink_product_tmpl_ids, context=context)540 self.pool.get('product.template').unlink(cr, uid, unlink_product_tmpl_ids, context=context)
541 return super(product_product, self).unlink(cr, uid, unlink_ids, context=context)541 return super(product_product, self).unlink(cr, uid, unlink_ids, context=context)
542542
543 def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id):543 def onchange_uom(self, cursor, user, ids, uom_id, uom_po_id):
544 if uom_id and uom_po_id:544 if uom_id and uom_po_id:
545 uom_obj=self.pool.get('product.uom')545 uom_obj=self.pool.get('product.uom')
546 uom=uom_obj.browse(cursor,user,[uom_id])[0]546 uom=uom_obj.browse(cursor,user,[uom_id])[0]
547547
=== modified file 'product/report/product_pricelist.py'
--- product/report/product_pricelist.py 2011-01-17 08:00:48 +0000
+++ product/report/product_pricelist.py 2012-03-05 18:43:21 +0000
@@ -39,7 +39,7 @@
39 'get_titles': self._get_titles,39 'get_titles': self._get_titles,
40 })40 })
4141
42 def _get_titles(self,form):42 def _get_titles(self, form):
43 lst = []43 lst = []
44 vals = {}44 vals = {}
45 qtys = 145 qtys = 1
@@ -51,7 +51,7 @@
51 lst.append(vals)51 lst.append(vals)
52 return lst52 return lst
5353
54 def _set_quantity(self,form):54 def _set_quantity(self, form):
55 for i in range(1,6):55 for i in range(1,6):
56 q = 'qty%d'%i56 q = 'qty%d'%i
57 if form[q] >0 and form[q] not in self.quantity:57 if form[q] >0 and form[q] not in self.quantity:
@@ -76,7 +76,7 @@
76 symbol = pool.get('res.currency').read(self.cr, self.uid, [pricelist['currency_id'][0]], ['symbol'], context=self.localcontext)[0]76 symbol = pool.get('res.currency').read(self.cr, self.uid, [pricelist['currency_id'][0]], ['symbol'], context=self.localcontext)[0]
77 return symbol['symbol'] or ''77 return symbol['symbol'] or ''
7878
79 def _get_categories(self, products,form):79 def _get_categories(self, products, form):
80 cat_ids=[]80 cat_ids=[]
81 res=[]81 res=[]
82 self.pricelist = form['price_list']82 self.pricelist = form['price_list']
@@ -111,7 +111,7 @@
111 res.append({'name':cat[1],'products': products})111 res.append({'name':cat[1],'products': products})
112 return res112 return res
113113
114 def _get_price(self,pricelist_id, product_id,qty):114 def _get_price(self, pricelist_id, product_id, qty):
115 sale_price_digits = self.get_digits(dp='Sale Price')115 sale_price_digits = self.get_digits(dp='Sale Price')
116 pool = pooler.get_pool(self.cr.dbname)116 pool = pooler.get_pool(self.cr.dbname)
117 price_dict = pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)117 price_dict = pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)
118118
=== modified file 'product_manufacturer/product_manufacturer.py'
--- product_manufacturer/product_manufacturer.py 2011-01-14 00:11:01 +0000
+++ product_manufacturer/product_manufacturer.py 2012-03-05 18:43:21 +0000
@@ -40,4 +40,4 @@
40 }40 }
41product_attribute()41product_attribute()
4242
43# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
44\ No newline at end of file43\ No newline at end of file
44# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4545
=== modified file 'product_visible_discount/__init__.py'
--- product_visible_discount/__init__.py 2011-01-14 00:11:01 +0000
+++ product_visible_discount/__init__.py 2012-03-05 18:43:21 +0000
@@ -20,4 +20,4 @@
2020
21import product_visible_discount21import product_visible_discount
2222
23# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
24\ No newline at end of file23\ No newline at end of file
24# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2525
=== modified file 'project/project.py'
--- project/project.py 2012-02-28 14:08:16 +0000
+++ project/project.py 2012-03-05 18:43:21 +0000
@@ -265,7 +265,7 @@
265 task_obj.duplicate_task(cr, uid, map_task_id, context=context)265 task_obj.duplicate_task(cr, uid, map_task_id, context=context)
266 return True266 return True
267267
268 def copy(self, cr, uid, id, default={}, context=None):268 def copy(self, cr, uid, id, default=None, context=None):
269 if context is None:269 if context is None:
270 context = {}270 context = {}
271271
@@ -545,12 +545,12 @@
545 return res545 return res
546546
547547
548 def onchange_remaining(self, cr, uid, ids, remaining=0.0, planned = 0.0):548 def onchange_remaining(self, cr, uid, ids, remaining=0.0, planned=0.0):
549 if remaining and not planned:549 if remaining and not planned:
550 return {'value':{'planned_hours': remaining}}550 return {'value':{'planned_hours': remaining}}
551 return {}551 return {}
552552
553 def onchange_planned(self, cr, uid, ids, planned = 0.0, effective = 0.0):553 def onchange_planned(self, cr, uid, ids, planned=0.0, effective=0.0):
554 return {'value':{'remaining_hours': planned - effective}}554 return {'value':{'remaining_hours': planned - effective}}
555555
556 def onchange_project(self, cr, uid, id, project_id):556 def onchange_project(self, cr, uid, id, project_id):
@@ -581,7 +581,9 @@
581 #FIXME why there is already the copy and the old one581 #FIXME why there is already the copy and the old one
582 self.write(cr, uid, new, {'parent_ids':[(6,0,set(parent_ids))], 'child_ids':[(6,0, set(child_ids))]})582 self.write(cr, uid, new, {'parent_ids':[(6,0,set(parent_ids))], 'child_ids':[(6,0, set(child_ids))]})
583583
584 def copy_data(self, cr, uid, id, default={}, context=None):584 def copy_data(self, cr, uid, id, default=None, context=None):
585 if default is None:
586 default = {}
585 default = default or {}587 default = default or {}
586 default.update({'work_ids':[], 'date_start': False, 'date_end': False, 'date_deadline': False})588 default.update({'work_ids':[], 'date_start': False, 'date_end': False, 'date_deadline': False})
587 if not default.get('remaining_hours', False):589 if not default.get('remaining_hours', False):
@@ -810,7 +812,7 @@
810 }812 }
811 return res813 return res
812814
813 def do_close(self, cr, uid, ids, context={}):815 def do_close(self, cr, uid, ids, context=None):
814 """816 """
815 Close Task817 Close Task
816 """818 """
@@ -868,7 +870,7 @@
868 self.write(cr, uid, [task.id], {'state': 'open'}, context=context)870 self.write(cr, uid, [task.id], {'state': 'open'}, context=context)
869 return True871 return True
870872
871 def do_cancel(self, cr, uid, ids, context={}):873 def do_cancel(self, cr, uid, ids, context=None):
872 request = self.pool.get('res.request')874 request = self.pool.get('res.request')
873 tasks = self.browse(cr, uid, ids, context=context)875 tasks = self.browse(cr, uid, ids, context=context)
874 self._check_child_task(cr, uid, ids, context=context)876 self._check_child_task(cr, uid, ids, context=context)
@@ -889,7 +891,7 @@
889 self.write(cr, uid, [task.id], {'state': 'cancelled', 'remaining_hours':0.0}, context=context)891 self.write(cr, uid, [task.id], {'state': 'cancelled', 'remaining_hours':0.0}, context=context)
890 return True892 return True
891893
892 def do_open(self, cr, uid, ids, context={}):894 def do_open(self, cr, uid, ids, context=None):
893 if not isinstance(ids,list): ids = [ids]895 if not isinstance(ids,list): ids = [ids]
894 tasks= self.browse(cr, uid, ids, context=context)896 tasks= self.browse(cr, uid, ids, context=context)
895 for t in tasks:897 for t in tasks:
@@ -901,7 +903,7 @@
901 self.log(cr, uid, t.id, message)903 self.log(cr, uid, t.id, message)
902 return True904 return True
903905
904 def do_draft(self, cr, uid, ids, context={}):906 def do_draft(self, cr, uid, ids, context=None):
905 self.write(cr, uid, ids, {'state': 'draft'}, context=context)907 self.write(cr, uid, ids, {'state': 'draft'}, context=context)
906 return True908 return True
907909
@@ -915,10 +917,12 @@
915 return new_attachment_ids917 return new_attachment_ids
916 918
917919
918 def do_delegate(self, cr, uid, ids, delegate_data={}, context=None):920 def do_delegate(self, cr, uid, ids, delegate_data=None, context=None):
919 """921 """
920 Delegate Task to another users.922 Delegate Task to another users.
921 """923 """
924 if delegate_data is None:
925 delegate_data = {}
922 assert delegate_data['user_id'], _("Delegated User should be specified")926 assert delegate_data['user_id'], _("Delegated User should be specified")
923 delegated_tasks = {}927 delegated_tasks = {}
924 for task in self.browse(cr, uid, ids, context=context):928 for task in self.browse(cr, uid, ids, context=context):
@@ -950,7 +954,7 @@
950 delegated_tasks[task.id] = delegated_task_id954 delegated_tasks[task.id] = delegated_task_id
951 return delegated_tasks955 return delegated_tasks
952956
953 def do_pending(self, cr, uid, ids, context={}):957 def do_pending(self, cr, uid, ids, context=None):
954 self.write(cr, uid, ids, {'state': 'pending'}, context=context)958 self.write(cr, uid, ids, {'state': 'pending'}, context=context)
955 for (id, name) in self.name_get(cr, uid, ids):959 for (id, name) in self.name_get(cr, uid, ids):
956 message = _("The task '%s' is pending.") % name960 message = _("The task '%s' is pending.") % name
957961
=== modified file 'project/wizard/project_task_reevaluate.py'
--- project/wizard/project_task_reevaluate.py 2011-12-19 16:54:40 +0000
+++ project/wizard/project_task_reevaluate.py 2012-03-05 18:43:21 +0000
@@ -26,7 +26,7 @@
26class project_task_reevaluate(osv.osv_memory):26class project_task_reevaluate(osv.osv_memory):
27 _name = 'project.task.reevaluate'27 _name = 'project.task.reevaluate'
2828
29 def _get_remaining(self,cr, uid, context=None):29 def _get_remaining(self, cr, uid, context=None):
30 if context is None:30 if context is None:
31 context = {}31 context = {}
32 active_id = context.get('active_id', False)32 active_id = context.get('active_id', False)
3333
=== modified file 'project_gtd/project_gtd.py'
--- project_gtd/project_gtd.py 2011-12-21 22:15:04 +0000
+++ project_gtd/project_gtd.py 2012-03-05 18:43:21 +0000
@@ -67,7 +67,7 @@
67 default['context_id'] = False67 default['context_id'] = False
68 return super(project_task,self).copy_data(cr, uid, id, default, context)68 return super(project_task,self).copy_data(cr, uid, id, default, context)
6969
70 def _get_context(self,cr, uid, context=None):70 def _get_context(self, cr, uid, context=None):
71 ids = self.pool.get('project.gtd.context').search(cr, uid, [], context=context)71 ids = self.pool.get('project.gtd.context').search(cr, uid, [], context=context)
72 return ids and ids[0] or False72 return ids and ids[0] or False
7373
7474
=== modified file 'project_gtd/wizard/project_gtd_empty.py'
--- project_gtd/wizard/project_gtd_empty.py 2011-01-14 00:11:01 +0000
+++ project_gtd/wizard/project_gtd_empty.py 2012-03-05 18:43:21 +0000
@@ -30,7 +30,7 @@
30 'name': fields.char('Name', size=32)30 'name': fields.char('Name', size=32)
31 }31 }
3232
33 def view_init(self, cr , uid , fields_list, context=None):33 def view_init(self, cr, uid, fields_list, context=None):
34 if context is None:34 if context is None:
35 context = {}35 context = {}
36 self._empty(cr, uid, context=context)36 self._empty(cr, uid, context=context)
3737
=== modified file 'project_mailgate/project_mailgate.py'
--- project_mailgate/project_mailgate.py 2011-09-07 22:38:59 +0000
+++ project_mailgate/project_mailgate.py 2012-03-05 18:43:21 +0000
@@ -47,7 +47,9 @@
47 self.write(cr, uid, [res_id], data, context)47 self.write(cr, uid, [res_id], data, context)
48 return res_id48 return res_id
4949
50 def message_update(self, cr, uid, ids, msg, data={}, default_act='pending'):50 def message_update(self, cr, uid, ids, msg, data=None, default_act='pending'):
51 if data is None:
52 data = {}
51 data.update({53 data.update({
52 'description': msg['body_text'],54 'description': msg['body_text'],
53 })55 })
5456
=== modified file 'project_mrp/project_procurement.py'
--- project_mrp/project_procurement.py 2011-12-19 16:54:40 +0000
+++ project_mrp/project_procurement.py 2012-03-05 18:43:21 +0000
@@ -40,7 +40,7 @@
40 return all(proc.product_id.type != 'service' or (proc.task_id and proc.task_id.state in ('done', 'cancelled')) \40 return all(proc.product_id.type != 'service' or (proc.task_id and proc.task_id.state in ('done', 'cancelled')) \
41 for proc in self.browse(cr, uid, ids, context=context))41 for proc in self.browse(cr, uid, ids, context=context))
4242
43 def check_produce_service(self, cr, uid, procurement, context=None): 43 def check_produce_service(self, cr, uid, procurement, context=None):
44 return True44 return True
4545
46 def _convert_qty_company_hours(self, cr, uid, procurement, context=None):46 def _convert_qty_company_hours(self, cr, uid, procurement, context=None):
4747
=== modified file 'project_timesheet/project_timesheet.py'
--- project_timesheet/project_timesheet.py 2012-01-31 13:36:57 +0000
+++ project_timesheet/project_timesheet.py 2012-03-05 18:43:21 +0000
@@ -197,7 +197,7 @@
197197
198 return super(task,self).unlink(cr, uid, ids, *args, **kwargs)198 return super(task,self).unlink(cr, uid, ids, *args, **kwargs)
199199
200 def write(self, cr, uid, ids,vals,context=None):200 def write(self, cr, uid, ids, vals, context=None):
201 if context is None:201 if context is None:
202 context = {}202 context = {}
203 if vals.get('project_id',False) or vals.get('name',False):203 if vals.get('project_id',False) or vals.get('name',False):
204204
=== modified file 'project_timesheet/report/task_report.py'
--- project_timesheet/report/task_report.py 2011-07-01 23:41:24 +0000
+++ project_timesheet/report/task_report.py 2012-03-05 18:43:21 +0000
@@ -29,7 +29,7 @@
29 _auto = False29 _auto = False
30 _order = "name"30 _order = "name"
3131
32 def _get_task_hours(self, cr, uid, ids, name,args,context):32 def _get_task_hours(self, cr, uid, ids, name, args, context):
33 result = {}33 result = {}
34 for record in self.browse(cr, uid, ids,context):34 for record in self.browse(cr, uid, ids,context):
35 last_date = datetime.strptime(record.name, '%Y-%m-%d') + relativedelta(months=1) - relativedelta(days=1)35 last_date = datetime.strptime(record.name, '%Y-%m-%d') + relativedelta(months=1) - relativedelta(days=1)
@@ -42,7 +42,7 @@
42 result[record.id] = total42 result[record.id] = total
43 return result43 return result
4444
45 def get_hrs_timesheet(self, cr, uid, ids, name,args,context):45 def get_hrs_timesheet(self, cr, uid, ids, name, args, context):
46 result = {}46 result = {}
47 sum = 0.047 sum = 0.0
48 for record in self.browse(cr, uid, ids, context):48 for record in self.browse(cr, uid, ids, context):
4949
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py 2012-02-28 14:08:16 +0000
+++ purchase/purchase.py 2012-03-05 18:43:21 +0000
@@ -395,7 +395,7 @@
395 res = inv_id395 res = inv_id
396 return res396 return res
397397
398 def has_stockable_product(self,cr, uid, ids, *args):398 def has_stockable_product(self, cr, uid, ids, *args):
399 for order in self.browse(cr, uid, ids):399 for order in self.browse(cr, uid, ids):
400 for order_line in order.order_line:400 for order_line in order.order_line:
401 if order_line.product_id and order_line.product_id.product_tmpl_id.type in ('product', 'consu'):401 if order_line.product_id and order_line.product_id.product_tmpl_id.type in ('product', 'consu'):
@@ -498,7 +498,7 @@
498 wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)498 wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
499 return [picking_id]499 return [picking_id]
500500
501 def action_picking_create(self,cr, uid, ids, context=None):501 def action_picking_create(self, cr, uid, ids, context=None):
502 picking_ids = []502 picking_ids = []
503 for order in self.browse(cr, uid, ids):503 for order in self.browse(cr, uid, ids):
504 picking_ids.extend(self._create_pickings(cr, uid, order, order.order_line, None, context=context))504 picking_ids.extend(self._create_pickings(cr, uid, order, order.order_line, None, context=context))
505505
=== modified file 'purchase/wizard/purchase_order_group.py'
--- purchase/wizard/purchase_order_group.py 2011-05-19 13:12:28 +0000
+++ purchase/wizard/purchase_order_group.py 2012-03-05 18:43:21 +0000
@@ -88,4 +88,4 @@
8888
89purchase_order_group()89purchase_order_group()
9090
91# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
92\ No newline at end of file91\ No newline at end of file
92# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
9393
=== modified file 'purchase_requisition/purchase_requisition.py'
--- purchase_requisition/purchase_requisition.py 2011-12-23 11:22:41 +0000
+++ purchase_requisition/purchase_requisition.py 2012-03-05 18:43:21 +0000
@@ -183,7 +183,7 @@
183 'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),183 'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
184 }184 }
185185
186 def onchange_product_id(self, cr, uid, ids, product_id,product_uom_id, context=None):186 def onchange_product_id(self, cr, uid, ids, product_id, product_uom_id, context=None):
187 """ Changes UoM and name if product_id changes.187 """ Changes UoM and name if product_id changes.
188 @param name: Name of the field188 @param name: Name of the field
189 @param product_id: Changed product_id189 @param product_id: Changed product_id
190190
=== modified file 'report_webkit/ir_report.py'
--- report_webkit/ir_report.py 2011-12-19 16:54:40 +0000
+++ report_webkit/ir_report.py 2012-03-05 18:43:21 +0000
@@ -35,7 +35,7 @@
35from report.report_sxw import rml_parse35from report.report_sxw import rml_parse
3636
37def register_report(name, model, tmpl_path, parser=rml_parse):37def register_report(name, model, tmpl_path, parser=rml_parse):
38 "Register the report into the services"38 """Register the report into the services"""
39 name = 'report.%s' % name39 name = 'report.%s' % name
40 if netsvc.Service._services.get(name, False):40 if netsvc.Service._services.get(name, False):
41 service = netsvc.Service._services[name]41 service = netsvc.Service._services[name]
4242
=== modified file 'report_webkit/report_helper.py'
--- report_webkit/report_helper.py 2011-12-19 16:54:40 +0000
+++ report_webkit/report_helper.py 2012-03-05 18:43:21 +0000
@@ -75,7 +75,7 @@
75 head = header_obj.browse(self.cursor, self.uid, header_img_id)75 head = header_obj.browse(self.cursor, self.uid, header_img_id)
76 return (head.img, head.type)76 return (head.img, head.type)
77 77
78 def embed_logo_by_name(self, name, width=0, height=0) :78 def embed_logo_by_name(self, name, width=0, height=0):
79 """Return HTML embedded logo by name"""79 """Return HTML embedded logo by name"""
80 img, type = self.get_logo_by_name(name)80 img, type = self.get_logo_by_name(name)
81 return self.embed_image(type, img, width, height)81 return self.embed_image(type, img, width, height)
8282
=== modified file 'resource/faces/task.py'
--- resource/faces/task.py 2011-12-19 16:54:40 +0000
+++ resource/faces/task.py 2012-03-05 18:43:21 +0000
@@ -567,7 +567,8 @@
567 return result567 return result
568 #@-node:_cmp568 #@-node:_cmp
569 #@+node:__getattr__569 #@+node:__getattr__
570 def __getattr__(self, name): return getattr(self._value, name)570 def __getattr__(self, name):
571 return getattr(self._value, name)
571 #@-node:__getattr__572 #@-node:__getattr__
572 #@+node:__getitem__573 #@+node:__getitem__
573 def __getitem__(self, slice):574 def __getitem__(self, slice):
574575
=== modified file 'resource/resource.py'
--- resource/resource.py 2011-12-21 12:37:24 +0000
+++ resource/resource.py 2012-03-05 18:43:21 +0000
@@ -438,7 +438,7 @@
438 (check_dates, 'Error! leave start-date must be lower then leave end-date.', ['date_from', 'date_to'])438 (check_dates, 'Error! leave start-date must be lower then leave end-date.', ['date_from', 'date_to'])
439 ]439 ]
440440
441 def onchange_resource(self,cr, uid, ids, resource, context=None):441 def onchange_resource(self, cr, uid, ids, resource, context=None):
442 result = {}442 result = {}
443 if resource:443 if resource:
444 resource_pool = self.pool.get('resource.resource')444 resource_pool = self.pool.get('resource.resource')
445445
=== modified file 'sale/edi/sale_order.py'
--- sale/edi/sale_order.py 2011-11-05 01:56:31 +0000
+++ sale/edi/sale_order.py 2012-03-05 18:43:21 +0000
@@ -219,4 +219,4 @@
219 edi_doc_list.append(edi_doc)219 edi_doc_list.append(edi_doc)
220 return edi_doc_list220 return edi_doc_list
221221
222# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
223\ No newline at end of file222\ No newline at end of file
223# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
224224
=== modified file 'sale/report/__init__.py'
--- sale/report/__init__.py 2011-01-14 00:11:01 +0000
+++ sale/report/__init__.py 2012-03-05 18:43:21 +0000
@@ -22,4 +22,4 @@
22import sale_order22import sale_order
23import sale_report23import sale_report
2424
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26\ No newline at end of file25\ No newline at end of file
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2727
=== modified file 'sale/sale.py'
--- sale/sale.py 2012-02-28 14:08:16 +0000
+++ sale/sale.py 2012-03-05 18:43:21 +0000
@@ -326,7 +326,7 @@
326 self.log(cr, uid, id, message)326 self.log(cr, uid, id, message)
327 return True327 return True
328328
329 def onchange_pricelist_id(self, cr, uid, ids, pricelist_id, order_lines, context={}):329 def onchange_pricelist_id(self, cr, uid, ids, pricelist_id, order_lines, context=None):
330 if (not pricelist_id) or (not order_lines):330 if (not pricelist_id) or (not order_lines):
331 return {}331 return {}
332 warning = {332 warning = {
@@ -335,7 +335,7 @@
335 }335 }
336 return {'warning': warning}336 return {'warning': warning}
337337
338 def onchange_partner_order_id(self, cr, uid, ids, order_id, invoice_id=False, shipping_id=False, context={}):338 def onchange_partner_order_id(self, cr, uid, ids, order_id, invoice_id=False, shipping_id=False, context=None):
339 if not order_id:339 if not order_id:
340 return {}340 return {}
341 val = {}341 val = {}
@@ -501,7 +501,9 @@
501 'res_id': inv_ids and inv_ids[0] or False,501 'res_id': inv_ids and inv_ids[0] or False,
502 }502 }
503503
504 def action_invoice_create(self, cr, uid, ids, grouped=False, states=['confirmed', 'done', 'exception'], date_inv = False, context=None):504 def action_invoice_create(self, cr, uid, ids, grouped=False, states=None, date_inv=False, context=None):
505 if states is None:
506 states = ['confirmed', 'done', 'exception']
505 res = False507 res = False
506 invoices = {}508 invoices = {}
507 invoice_ids = []509 invoice_ids = []
508510
=== modified file 'sale/wizard/__init__.py'
--- sale/wizard/__init__.py 2011-01-14 00:11:01 +0000
+++ sale/wizard/__init__.py 2012-03-05 18:43:21 +0000
@@ -23,4 +23,4 @@
23import sale_line_invoice23import sale_line_invoice
24import sale_make_invoice_advance24import sale_make_invoice_advance
2525
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
27\ No newline at end of file26\ No newline at end of file
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2828
=== modified file 'sale/wizard/sale_make_invoice.py'
--- sale/wizard/sale_make_invoice.py 2011-12-26 08:41:35 +0000
+++ sale/wizard/sale_make_invoice.py 2012-03-05 18:43:21 +0000
@@ -68,4 +68,4 @@
6868
69sale_make_invoice()69sale_make_invoice()
7070
71# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
72\ No newline at end of file71\ No newline at end of file
72# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
7373
=== modified file 'sale_crm/__init__.py'
--- sale_crm/__init__.py 2011-01-14 00:11:01 +0000
+++ sale_crm/__init__.py 2012-03-05 18:43:21 +0000
@@ -22,4 +22,4 @@
22import wizard22import wizard
23import sale_crm23import sale_crm
2424
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26\ No newline at end of file25\ No newline at end of file
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2727
=== modified file 'sale_layout/sale_layout.py'
--- sale_layout/sale_layout.py 2012-02-14 23:24:48 +0000
+++ sale_layout/sale_layout.py 2012-03-05 18:43:21 +0000
@@ -53,7 +53,7 @@
53 seq += 153 seq += 1
54 return invoice_line_ids54 return invoice_line_ids
5555
56 def onchange_sale_order_line_view(self, cr, uid, id, type, context={}, *args):56 def onchange_sale_order_line_view(self, cr, uid, id, type, context=None, *args):
57 temp = {}57 temp = {}
58 temp['value'] = {}58 temp['value'] = {}
59 if (not type):59 if (not type):
6060
=== modified file 'sale_order_dates/sale_order_dates.py'
--- sale_order_dates/sale_order_dates.py 2011-07-01 23:41:24 +0000
+++ sale_order_dates/sale_order_dates.py 2012-03-05 18:43:21 +0000
@@ -61,4 +61,4 @@
6161
62sale_order_dates()62sale_order_dates()
6363
64# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
65\ No newline at end of file64\ No newline at end of file
65# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6666
=== modified file 'stock/report/lot_overview.py'
--- stock/report/lot_overview.py 2011-01-14 00:11:01 +0000
+++ stock/report/lot_overview.py 2012-03-05 18:43:21 +0000
@@ -34,7 +34,7 @@
34 'grand_total_price':self._grand_total,34 'grand_total_price':self._grand_total,
35 })35 })
3636
37 def process(self,location_id):37 def process(self, location_id):
38 location_obj = pooler.get_pool(self.cr.dbname).get('stock.location')38 location_obj = pooler.get_pool(self.cr.dbname).get('stock.location')
39 data = location_obj._product_get_report(self.cr,self.uid, [location_id])39 data = location_obj._product_get_report(self.cr,self.uid, [location_id])
4040
4141
=== modified file 'stock/report/lot_overview_all.py'
--- stock/report/lot_overview_all.py 2011-01-14 00:11:01 +0000
+++ stock/report/lot_overview_all.py 2012-03-05 18:43:21 +0000
@@ -34,7 +34,7 @@
34 'grand_total_price':self._grand_total,34 'grand_total_price':self._grand_total,
35 })35 })
3636
37 def process(self,location_id):37 def process(self, location_id):
38 location_obj = pooler.get_pool(self.cr.dbname).get('stock.location')38 location_obj = pooler.get_pool(self.cr.dbname).get('stock.location')
39 data = location_obj._product_get_all_report(self.cr,self.uid, [location_id])39 data = location_obj._product_get_all_report(self.cr,self.uid, [location_id])
40 data['location_name'] = location_obj.read(self.cr, self.uid, [location_id],['complete_name'])[0]['complete_name']40 data['location_name'] = location_obj.read(self.cr, self.uid, [location_id],['complete_name'])[0]['complete_name']
4141
=== modified file 'stock/report/product_stock.py'
--- stock/report/product_stock.py 2011-01-14 00:11:01 +0000
+++ stock/report/product_stock.py 2012-03-05 18:43:21 +0000
@@ -42,7 +42,9 @@
4242
4343
44class report_stock(report_int):44class report_stock(report_int):
45 def create(self, cr, uid, ids, datas, context={}):45 def create(self, cr, uid, ids, datas, context=None):
46 if context is None:
47 context = {}
46 product_ids = ids48 product_ids = ids
47 if 'location_id' in context:49 if 'location_id' in context:
48 location_id = context['location_id']50 location_id = context['location_id']
4951
=== modified file 'stock/report/report_stock.py'
--- stock/report/report_stock.py 2011-12-19 16:54:40 +0000
+++ stock/report/report_stock.py 2012-03-05 18:43:21 +0000
@@ -74,7 +74,7 @@
74 group by location_id, product_id, prodlot_id74 group by location_id, product_id, prodlot_id
75 )""")75 )""")
7676
77 def unlink(self, cr, uid, ids, context={}):77 def unlink(self, cr, uid, ids, context=None):
78 raise osv.except_osv(_('Error !'), _('You cannot delete any record!'))78 raise osv.except_osv(_('Error !'), _('You cannot delete any record!'))
7979
8080
@@ -131,7 +131,7 @@
131 group by location_id, product_id, tracking_id131 group by location_id, product_id, tracking_id
132 )""")132 )""")
133 133
134 def unlink(self, cr, uid, ids, context={}):134 def unlink(self, cr, uid, ids, context=None):
135 raise osv.except_osv(_('Error !'), _('You cannot delete any record!'))135 raise osv.except_osv(_('Error !'), _('You cannot delete any record!'))
136136
137stock_report_tracklots()137stock_report_tracklots()
138138
=== modified file 'stock/report/stock_by_location.py'
--- stock/report/stock_by_location.py 2011-01-14 00:11:01 +0000
+++ stock/report/stock_by_location.py 2012-03-05 18:43:21 +0000
@@ -26,7 +26,7 @@
26#FIXME: we should use toxml26#FIXME: we should use toxml
2727
28class report_custom(report_rml):28class report_custom(report_rml):
29 def create_xml(self, cr, uid, ids, datas, context={}):29 def create_xml(self, cr, uid, ids, datas, context=None):
30 config = """30 config = """
31 <config>31 <config>
32 <date>09/09/2005</date>32 <date>09/09/2005</date>
3333
=== modified file 'stock/report/stock_inventory_move_report.py'
--- stock/report/stock_inventory_move_report.py 2011-01-14 00:11:01 +0000
+++ stock/report/stock_inventory_move_report.py 2012-03-05 18:43:21 +0000
@@ -30,7 +30,7 @@
30 'qty_total':self._qty_total30 'qty_total':self._qty_total
31 })31 })
3232
33 def _qty_total(self,objects):33 def _qty_total(self, objects):
34 total = 0.034 total = 0.0
35 uom = objects[0].product_uom.name35 uom = objects[0].product_uom.name
36 for obj in objects:36 for obj in objects:
3737
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-02-28 14:08:16 +0000
+++ stock/stock.py 2012-03-05 18:43:21 +0000
@@ -345,22 +345,28 @@
345 })345 })
346 return product_obj.get_product_available(cr, uid, product_ids, context=context)346 return product_obj.get_product_available(cr, uid, product_ids, context=context)
347347
348 def _product_get(self, cr, uid, id, product_ids=False, context=None, states=['done']):348 def _product_get(self, cr, uid, id, product_ids=False, context=None, states=None):
349 """349 """
350 @param product_ids:350 @param product_ids:
351 @param states:351 @param states:
352 @return:352 @return:
353 """353 """
354 if states is None:
355 states = ['done']
354 ids = id and [id] or []356 ids = id and [id] or []
355 return self._product_get_multi_location(cr, uid, ids, product_ids, context=context, states=states)357 return self._product_get_multi_location(cr, uid, ids, product_ids, context=context, states=states)
356358
357 def _product_all_get(self, cr, uid, id, product_ids=False, context=None, states=['done']):359 def _product_all_get(self, cr, uid, id, product_ids=False, context=None, states=None):
360 if states is None:
361 states = ['done']
358 # build the list of ids of children of the location given by id362 # build the list of ids of children of the location given by id
359 ids = id and [id] or []363 ids = id and [id] or []
360 location_ids = self.search(cr, uid, [('location_id', 'child_of', ids)])364 location_ids = self.search(cr, uid, [('location_id', 'child_of', ids)])
361 return self._product_get_multi_location(cr, uid, location_ids, product_ids, context, states)365 return self._product_get_multi_location(cr, uid, location_ids, product_ids, context, states)
362366
363 def _product_virtual_get(self, cr, uid, id, product_ids=False, context=None, states=['done']):367 def _product_virtual_get(self, cr, uid, id, product_ids=False, context=None, states=None):
368 if states is None:
369 states = ['done']
364 return self._product_all_get(cr, uid, id, product_ids, context, ['confirmed', 'waiting', 'assigned', 'done'])370 return self._product_all_get(cr, uid, id, product_ids, context, ['confirmed', 'waiting', 'assigned', 'done'])
365371
366 def _product_reserve(self, cr, uid, ids, product_id, product_qty, context=None, lock=False):372 def _product_reserve(self, cr, uid, ids, product_id, product_qty, context=None, lock=False):
@@ -518,7 +524,7 @@
518 def unlink(self, cr, uid, ids, context=None):524 def unlink(self, cr, uid, ids, context=None):
519 raise osv.except_osv(_('Error'), _('You can not remove a lot line !'))525 raise osv.except_osv(_('Error'), _('You can not remove a lot line !'))
520526
521 def action_traceability(self, cr, uid, ids, context={}):527 def action_traceability(self, cr, uid, ids, context=None):
522 """ It traces the information of a product528 """ It traces the information of a product
523 @param self: The object pointer.529 @param self: The object pointer.
524 @param cr: A database cursor530 @param cr: A database cursor
525531
=== modified file 'stock_invoice_directly/wizard/stock_invoice.py'
--- stock_invoice_directly/wizard/stock_invoice.py 2011-10-16 01:28:00 +0000
+++ stock_invoice_directly/wizard/stock_invoice.py 2012-03-05 18:43:21 +0000
@@ -47,4 +47,4 @@
4747
48invoice_directly()48invoice_directly()
4949
50# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
51\ No newline at end of file50\ No newline at end of file
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5252
=== modified file 'stock_location/procurement_pull.py'
--- stock_location/procurement_pull.py 2011-12-19 16:54:40 +0000
+++ stock_location/procurement_pull.py 2012-03-05 18:43:21 +0000
@@ -45,7 +45,7 @@
45 return (line.type_proc=='move') and (line.location_src_id)45 return (line.type_proc=='move') and (line.location_src_id)
46 return False46 return False
4747
48 def action_move_create(self, cr, uid, ids,context=None):48 def action_move_create(self, cr, uid, ids, context=None):
49 proc_obj = self.pool.get('procurement.order')49 proc_obj = self.pool.get('procurement.order')
50 move_obj = self.pool.get('stock.move')50 move_obj = self.pool.get('stock.move')
51 picking_obj=self.pool.get('stock.picking')51 picking_obj=self.pool.get('stock.picking')
5252
=== modified file 'stock_planning/stock_planning.py'
--- stock_planning/stock_planning.py 2011-12-21 22:15:04 +0000
+++ stock_planning/stock_planning.py 2012-03-05 18:43:21 +0000
@@ -406,7 +406,7 @@
406 res[val.id] = 'Future'406 res[val.id] = 'Future'
407 return res407 return res
408408
409 def _get_op(self, cr, uid, ids, field_names, arg, context=None): # op = OrderPoint409 def _get_op(self, cr, uid, ids, field_names, arg, context=None):
410 res = {}410 res = {}
411 for val in self.browse(cr, uid, ids, context=context):411 for val in self.browse(cr, uid, ids, context=context):
412 res[val.id]={}412 res[val.id]={}
413413
=== modified file 'stock_planning/wizard/stock_planning_createlines.py'
--- stock_planning/wizard/stock_planning_createlines.py 2011-09-21 07:37:15 +0000
+++ stock_planning/wizard/stock_planning_createlines.py 2012-03-05 18:43:21 +0000
@@ -49,7 +49,7 @@
49 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.planning', context=c),49 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.planning', context=c),
50 }50 }
5151
52 def create_planning(self,cr, uid, ids, context=None):52 def create_planning(self, cr, uid, ids, context=None):
53 if context is None:53 if context is None:
54 context = {}54 context = {}
55 product_obj = self.pool.get('product.product')55 product_obj = self.pool.get('product.product')
5656
=== modified file 'survey/survey.py'
--- survey/survey.py 2012-02-13 15:27:55 +0000
+++ survey/survey.py 2012-03-05 18:43:21 +0000
@@ -514,7 +514,7 @@
514 _description = 'Survey Question Column Heading'514 _description = 'Survey Question Column Heading'
515 _rec_name = 'title'515 _rec_name = 'title'
516516
517 def _get_in_visible_rating_weight(self,cr, uid, context=None):517 def _get_in_visible_rating_weight(self, cr, uid, context=None):
518 if context is None:518 if context is None:
519 context = {}519 context = {}
520 if context.get('in_visible_rating_weight', False):520 if context.get('in_visible_rating_weight', False):
@@ -567,7 +567,7 @@
567 }567 }
568 return val568 return val
569569
570 def _get_in_visible_answer_type(self,cr, uid, context=None):570 def _get_in_visible_answer_type(self, cr, uid, context=None):
571 if context is None:571 if context is None:
572 context = {}572 context = {}
573 return context.get('in_visible_answer_type', False)573 return context.get('in_visible_answer_type', False)
574574
=== modified file 'survey/wizard/__init__.py'
--- survey/wizard/__init__.py 2011-01-14 00:11:01 +0000
+++ survey/wizard/__init__.py 2012-03-05 18:43:21 +0000
@@ -27,4 +27,4 @@
27import survey_answer27import survey_answer
28import survey_print28import survey_print
2929
30# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
31\ No newline at end of file30\ No newline at end of file
31# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3232
=== modified file 'survey/wizard/survey_answer.py'
--- survey/wizard/survey_answer.py 2012-02-13 15:27:55 +0000
+++ survey/wizard/survey_answer.py 2012-03-05 18:43:21 +0000
@@ -997,7 +997,7 @@
997997
998 return survey_question_wiz_id998 return survey_question_wiz_id
999999
1000 def action_new_question(self,cr, uid, ids, context=None):1000 def action_new_question(self, cr, uid, ids, context=None):
1001 """1001 """
1002 New survey.Question form.1002 New survey.Question form.
1003 """1003 """
@@ -1039,7 +1039,7 @@
1039 'context': context1039 'context': context
1040 }1040 }
10411041
1042 def action_edit_page(self,cr, uid, ids, context=None):1042 def action_edit_page(self, cr, uid, ids, context=None):
1043 """1043 """
1044 Edit survey.page.1044 Edit survey.page.
1045 """1045 """
@@ -1061,7 +1061,7 @@
1061 'context': context1061 'context': context
1062 }1062 }
10631063
1064 def action_delete_page(self,cr, uid, ids, context=None):1064 def action_delete_page(self, cr, uid, ids, context=None):
1065 """1065 """
1066 Delete survey.page.1066 Delete survey.page.
1067 """1067 """
@@ -1087,7 +1087,7 @@
1087 'context': context1087 'context': context
1088 }1088 }
10891089
1090 def action_edit_question(self,cr, uid, ids, context=None):1090 def action_edit_question(self, cr, uid, ids, context=None):
1091 """1091 """
1092 Edit survey.question.1092 Edit survey.question.
1093 """1093 """
@@ -1109,7 +1109,7 @@
1109 'context': context1109 'context': context
1110 }1110 }
11111111
1112 def action_delete_question(self,cr, uid, ids, context=None):1112 def action_delete_question(self, cr, uid, ids, context=None):
1113 """1113 """
1114 Delete survey.question.1114 Delete survey.question.
1115 """1115 """
11161116
=== modified file 'wiki/web/widgets/rss/feedparser.py' (properties changed: +x to -x)
--- wiki/web/widgets/rss/feedparser.py 2011-12-19 16:54:40 +0000
+++ wiki/web/widgets/rss/feedparser.py 2012-03-05 18:43:21 +0000
@@ -2446,8 +2446,10 @@
2446 data = doctype_pattern.sub('', data)2446 data = doctype_pattern.sub('', data)
2447 return version, data2447 return version, data
24482448
2449def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, referrer=None, handlers=[]):2449def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, referrer=None, handlers=None):
2450 '''Parse a feed from a URL, file, stream, or string'''2450 '''Parse a feed from a URL, file, stream, or string'''
2451 if handlers is None:
2452 handlers = []
2451 result = FeedParserDict()2453 result = FeedParserDict()
2452 result['feed'] = FeedParserDict()2454 result['feed'] = FeedParserDict()
2453 result['entries'] = []2455 result['entries'] = []
24542456
=== modified file 'wiki/web/widgets/wikimarkup/__init__.py'
--- wiki/web/widgets/wikimarkup/__init__.py 2011-12-19 16:54:40 +0000
+++ wiki/web/widgets/wikimarkup/__init__.py 2012-03-05 18:43:21 +0000
@@ -489,7 +489,7 @@
489 return text.encode("utf-8")489 return text.encode("utf-8")
490 return text490 return text
491491
492 def strip(self, text, stripcomments=False, dontstrip=[]):492 def strip(self, text, stripcomments=False, dontstrip=None):
493 render = True493 render = True
494494
495 commentState = {}495 commentState = {}
@@ -2087,7 +2087,9 @@
2087# <quote cite="person">quote</quote>2087# <quote cite="person">quote</quote>
2088from cgi import escape2088from cgi import escape
20892089
2090def hook_quote(env, body, attributes={}):2090def hook_quote(env, body, attributes=None):
2091 if attributes is None:
2092 attributes = {}
2091 text = [u'<div class="blockquote">']2093 text = [u'<div class="blockquote">']
2092 if 'cite' in attributes:2094 if 'cite' in attributes:
2093 text.append(u"<strong class=\"cite\">%s wrote:</strong>\n" % escape(attributes['cite']))2095 text.append(u"<strong class=\"cite\">%s wrote:</strong>\n" % escape(attributes['cite']))

Subscribers

People subscribed via source and target branches

to all changes: