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