Merge lp:~camptocamp/openobject-addons/trunk-proposed-cleanups into lp:openobject-addons

Proposed by Alexandre Fayolle - camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-addons/trunk-proposed-cleanups
Merge into: lp:openobject-addons
Diff against target: 16860 lines (+2335/-2214) (has conflicts)
500 files modified
account/account.py (+32/-60)
account/account_analytic_line.py (+3/-5)
account/account_bank.py (+2/-2)
account/account_bank_statement.py (+4/-6)
account/account_cash_statement.py (+5/-9)
account/account_financial_report.py (+2/-3)
account/account_invoice.py (+6/-7)
account/account_move_line.py (+1/-2)
account/company.py (+2/-3)
account/edi/invoice.py (+4/-4)
account/installer.py (+2/-3)
account/ir_sequence.py (+3/-5)
account/partner.py (+5/-9)
account/product.py (+3/-5)
account/project/project.py (+3/-5)
account/project/wizard/account_analytic_balance_report.py (+2/-3)
account/project/wizard/account_analytic_chart.py (+2/-3)
account/project/wizard/account_analytic_cost_ledger_for_journal_report.py (+2/-3)
account/project/wizard/account_analytic_cost_ledger_report.py (+2/-3)
account/project/wizard/account_analytic_inverted_balance_report.py (+2/-3)
account/project/wizard/account_analytic_journal_report.py (+2/-3)
account/project/wizard/project_account_analytic_line.py (+2/-3)
account/report/account_analytic_entries_report.py (+2/-3)
account/report/account_entries_report.py (+2/-3)
account/report/account_invoice_report.py (+2/-3)
account/report/account_report.py (+9/-15)
account/report/account_treasury_report.py (+2/-3)
account/res_config.py (+2/-2)
account/res_currency.py (+2/-3)
account/wizard/account_automatic_reconcile.py (+2/-3)
account/wizard/account_change_currency.py (+2/-3)
account/wizard/account_chart.py (+2/-3)
account/wizard/account_financial_report.py (+2/-3)
account/wizard/account_fiscalyear_close.py (+2/-3)
account/wizard/account_fiscalyear_close_state.py (+2/-3)
account/wizard/account_invoice_refund.py (+2/-3)
account/wizard/account_invoice_state.py (+3/-5)
account/wizard/account_journal_select.py (+2/-3)
account/wizard/account_move_bank_reconcile.py (+2/-3)
account/wizard/account_move_line_reconcile_select.py (+2/-3)
account/wizard/account_move_line_select.py (+2/-3)
account/wizard/account_move_line_unreconcile_select.py (+2/-3)
account/wizard/account_open_closed_fiscalyear.py (+2/-3)
account/wizard/account_period_close.py (+2/-3)
account/wizard/account_reconcile.py (+3/-5)
account/wizard/account_reconcile_partner_process.py (+2/-3)
account/wizard/account_report_account_balance.py (+2/-3)
account/wizard/account_report_aged_partner_balance.py (+2/-3)
account/wizard/account_report_central_journal.py (+2/-3)
account/wizard/account_report_common.py (+2/-3)
account/wizard/account_report_common_account.py (+2/-3)
account/wizard/account_report_common_journal.py (+2/-3)
account/wizard/account_report_common_partner.py (+2/-3)
account/wizard/account_report_general_journal.py (+2/-3)
account/wizard/account_report_general_ledger.py (+2/-3)
account/wizard/account_report_partner_balance.py (+2/-3)
account/wizard/account_report_partner_ledger.py (+2/-3)
account/wizard/account_report_print_journal.py (+2/-3)
account/wizard/account_state_open.py (+2/-3)
account/wizard/account_subscription_generate.py (+2/-3)
account/wizard/account_tax_chart.py (+2/-3)
account/wizard/account_unreconcile.py (+3/-5)
account/wizard/account_use_model.py (+2/-3)
account/wizard/account_validate_account_move.py (+3/-5)
account/wizard/account_vat.py (+2/-3)
account/wizard/pos_box.py (+2/-4)
account_analytic_analysis/account_analytic_analysis.py (+4/-7)
account_analytic_analysis/cron_account_analytic_account.py (+2/-3)
account_analytic_analysis/res_config.py (+2/-2)
account_analytic_default/account_analytic_default.py (+7/-11)
account_analytic_plans/account_analytic_plans.py (+19/-33)
account_analytic_plans/wizard/account_crossovered_analytic.py (+2/-3)
account_analytic_plans/wizard/analytic_plan_create_model.py (+2/-3)
account_anglo_saxon/invoice.py (+3/-3)
account_anglo_saxon/product.py (+3/-5)
account_anglo_saxon/purchase.py (+2/-3)
account_anglo_saxon/stock.py (+2/-3)
account_asset/account_asset.py (+6/-11)
account_asset/account_asset_invoice.py (+3/-5)
account_asset/report/account_asset_report.py (+2/-3)
account_asset/wizard/account_asset_change_duration.py (+2/-3)
account_asset/wizard/wizard_asset_compute.py (+2/-3)
account_bank_statement_extensions/account_bank_statement.py (+5/-8)
account_bank_statement_extensions/res_partner_bank.py (+2/-3)
account_bank_statement_extensions/wizard/cancel_statement_line.py (+2/-3)
account_bank_statement_extensions/wizard/confirm_statement_line.py (+2/-3)
account_budget/account_budget.py (+7/-11)
account_budget/report/crossovered_budget_report.py (+0/-4)
account_budget/wizard/account_budget_analytic.py (+2/-3)
account_budget/wizard/account_budget_crossovered_report.py (+2/-3)
account_budget/wizard/account_budget_crossovered_summary_report.py (+2/-3)
account_budget/wizard/account_budget_report.py (+4/-5)
account_check_writing/account.py (+3/-5)
account_check_writing/account_voucher.py (+2/-3)
account_check_writing/wizard/account_check_batch_printing.py (+2/-3)
account_followup/account_followup.py (+5/-5)
account_followup/report/account_followup_report.py (+2/-3)
account_followup/wizard/account_followup_print.py (+8/-11)
account_payment/account_invoice.py (+2/-3)
account_payment/account_move_line.py (+2/-3)
account_payment/account_payment.py (+4/-7)
account_payment/wizard/account_payment_order.py (+2/-3)
account_payment/wizard/account_payment_pay.py (+2/-3)
account_payment/wizard/account_payment_populate_statement.py (+2/-3)
account_sequence/account_sequence.py (+4/-7)
account_sequence/account_sequence_installer.py (+2/-3)
account_test/account_test.py (+2/-3)
account_voucher/account_voucher.py (+37/-12)
account_voucher/invoice.py (+2/-3)
account_voucher/report/account_voucher_sales_receipt.py (+2/-3)
account_voucher/wizard/account_statement_from_invoice.py (+2/-3)
analytic/analytic.py (+22/-3)
analytic_contract_hr_expense/analytic_contract_hr_expense.py (+2/-3)
analytic_user_function/analytic_user_function.py (+5/-5)
anonymization/anonymization.py (+5/-5)
audittrail/audittrail.py (+7/-9)
audittrail/wizard/audittrail_view_log.py (+2/-3)
auth_crypt/auth_crypt.py (+2/-2)
auth_ldap/users_ldap.py (+8/-11)
auth_oauth/auth_oauth.py (+2/-2)
auth_oauth/res_config.py (+1/-1)
auth_oauth/res_users.py (+1/-1)
auth_oauth_signup/res_users.py (+1/-1)
auth_openid/res_users.py (+2/-3)
auth_signup/res_config.py (+1/-1)
auth_signup/res_users.py (+1/-1)
base_action_rule/base_action_rule.py (+3/-6)
base_calendar/base_calendar.py (+13/-22)
base_calendar/crm_meeting.py (+8/-3)
base_gengo/ir_translation.py (+1/-1)
base_gengo/res_company.py (+1/-1)
base_gengo/wizard/base_gengo_translations.py (+2/-2)
base_iban/base_iban.py (+2/-3)
base_report_designer/base_report_designer.py (+2/-3)
base_report_designer/installer.py (+2/-3)
base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py (+1/-2)
base_report_designer/wizard/base_report_designer_modify.py (+8/-15)
base_setup/base_setup.py (+2/-2)
base_setup/res_config.py (+3/-3)
base_status/base_stage.py (+1/-1)
base_status/base_state.py (+1/-1)
base_vat/base_vat.py (+2/-3)
base_vat/res_company.py (+2/-2)
board/board.py (+3/-3)
crm/crm.py (+8/-8)
crm/crm_action_rule.py (+2/-2)
crm/crm_lead.py (+2/-2)
crm/crm_meeting.py (+8/-2)
crm/crm_phonecall.py (+7/-1)
crm/crm_segmentation.py (+2/-4)
crm/report/crm_lead_report.py (+2/-3)
crm/report/crm_phonecall_report.py (+2/-3)
crm/res_config.py (+2/-2)
crm/res_partner.py (+2/-3)
crm/wizard/crm_lead_to_opportunity.py (+3/-3)
crm/wizard/crm_merge_opportunities.py (+2/-2)
crm/wizard/crm_opportunity_to_phonecall.py (+2/-2)
crm/wizard/crm_partner_binding.py (+2/-2)
crm/wizard/crm_phonecall_to_meeting.py (+2/-2)
crm/wizard/crm_phonecall_to_phonecall.py (+2/-2)
crm_claim/crm_claim.py (+29/-3)
crm_claim/report/crm_claim_report.py (+2/-3)
crm_claim/res_config.py (+2/-2)
crm_helpdesk/crm_helpdesk.py (+2/-2)
crm_helpdesk/report/crm_helpdesk_report.py (+2/-3)
crm_partner_assign/partner_geo_assign.py (+5/-9)
crm_partner_assign/report/crm_lead_report.py (+2/-3)
crm_partner_assign/report/crm_partner_report.py (+2/-3)
crm_partner_assign/wizard/crm_forward_to_partner.py (+2/-2)
crm_profiling/crm_profiling.py (+15/-20)
crm_profiling/wizard/open_questionnaire.py (+3/-5)
crm_todo/crm_todo.py (+3/-3)
decimal_precision/decimal_precision.py (+2/-3)
delivery/delivery.py (+4/-7)
delivery/partner.py (+2/-3)
delivery/sale.py (+2/-3)
delivery/stock.py (+5/-9)
document/document.py (+8/-8)
document/report/document_report.py (+3/-3)
document/wizard/document_configuration.py (+2/-3)
document_ftp/ftpserver/abstracted_fs.py (+1/-1)
document_ftp/res_config.py (+2/-2)
document_ftp/wizard/ftp_browse.py (+2/-3)
document_ftp/wizard/ftp_configuration.py (+2/-3)
document_page/document_page.py (+3/-3)
document_page/wizard/document_page_create_menu.py (+2/-2)
document_page/wizard/document_page_show_diff.py (+2/-2)
document_webdav/document_webdav.py (+4/-4)
document_webdav/webdav.py (+1/-1)
document_webdav/webdav_server.py (+0/-2)
edi/edi_service.py (+0/-1)
edi/models/edi.py (+1/-1)
edi/models/res_company.py (+2/-2)
edi/models/res_currency.py (+2/-2)
edi/models/res_partner.py (+2/-2)
email_template/email_template.py (+2/-2)
email_template/res_partner.py (+2/-2)
email_template/wizard/email_template_preview.py (+2/-2)
email_template/wizard/mail_compose_message.py (+1/-1)
event/event.py (+55/-6)
event/report/report_event_registration.py (+2/-3)
event/res_partner.py (+2/-3)
event/wizard/event_confirm.py (+2/-3)
event_moodle/event_moodle.py (+4/-7)
event_sale/event_sale.py (+3/-4)
fetchmail/fetchmail.py (+3/-3)
fetchmail/res_config.py (+3/-3)
fleet/fleet.py (+1/-1)
google_base_account/google_base_account.py (+2/-3)
google_base_account/wizard/google_login.py (+2/-3)
google_docs/google_docs.py (+3/-4)
hr/hr.py (+6/-10)
hr/hr_department.py (+3/-5)
hr/res_config.py (+2/-2)
hr_attendance/hr_attendance.py (+4/-7)
hr_attendance/res_config.py (+2/-2)
hr_attendance/wizard/hr_attendance_bymonth.py (+2/-3)
hr_attendance/wizard/hr_attendance_byweek.py (+2/-3)
hr_attendance/wizard/hr_attendance_error.py (+2/-3)
hr_contract/hr_contract.py (+4/-7)
hr_evaluation/hr_evaluation.py (+7/-12)
hr_evaluation/report/hr_evaluation_report.py (+2/-3)
hr_expense/hr_expense.py (+4/-7)
hr_expense/report/hr_expense_report.py (+2/-3)
hr_holidays/hr_holidays.py (+25/-8)
hr_holidays/report/holidays_summary_report.py (+1/-1)
hr_holidays/report/hr_holidays_report.py (+2/-3)
hr_holidays/wizard/hr_holidays_summary_department.py (+2/-3)
hr_holidays/wizard/hr_holidays_summary_employees.py (+2/-3)
hr_payroll/hr_payroll.py (+14/-27)
hr_payroll/res_config.py (+2/-2)
hr_payroll/wizard/hr_payroll_contribution_register_report.py (+2/-3)
hr_payroll/wizard/hr_payroll_payslips_by_employees.py (+2/-3)
hr_payroll_account/hr_payroll_account.py (+5/-9)
hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py (+2/-3)
hr_recruitment/hr_recruitment.py (+6/-6)
hr_recruitment/report/hr_recruitment_report.py (+2/-3)
hr_recruitment/res_config.py (+2/-2)
hr_recruitment/wizard/hr_recruitment_create_partner_job.py (+2/-3)
hr_recruitment/wizard/hr_recruitment_employee_hired.py (+2/-3)
hr_timesheet/hr_timesheet.py (+6/-7)
hr_timesheet/wizard/hr_timesheet_print_employee.py (+2/-3)
hr_timesheet/wizard/hr_timesheet_print_users.py (+2/-3)
hr_timesheet/wizard/hr_timesheet_sign_in_out.py (+3/-5)
hr_timesheet_invoice/hr_timesheet_invoice.py (+25/-19)
hr_timesheet_invoice/report/hr_timesheet_invoice_report.py (+14/-19)
hr_timesheet_invoice/report/report_analytic.py (+3/-5)
hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit.py (+2/-3)
hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py (+2/-3)
hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py (+2/-3)
hr_timesheet_sheet/hr_timesheet_sheet.py (+18/-20)
hr_timesheet_sheet/report/hr_timesheet_report.py (+2/-3)
hr_timesheet_sheet/report/timesheet_report.py (+2/-3)
hr_timesheet_sheet/res_config.py (+2/-2)
hr_timesheet_sheet/wizard/hr_timesheet_current.py (+2/-3)
idea/idea.py (+3/-3)
knowledge/res_config.py (+2/-2)
l10n_at/account_wizard.py (+2/-3)
l10n_be/wizard/l10n_be_account_vat_declaration.py (+2/-2)
l10n_be/wizard/l10n_be_partner_vat_listing.py (+4/-7)
l10n_be/wizard/l10n_be_vat_intra.py (+2/-3)
l10n_be_coda/l10n_be_coda.py (+3/-3)
l10n_be_coda/wizard/account_coda_import.py (+2/-2)
l10n_be_hr_payroll/l10n_be_hr_payroll.py (+3/-5)
l10n_be_invoice_bba/invoice.py (+2/-2)
l10n_be_invoice_bba/partner.py (+2/-3)
l10n_br/account.py (+94/-3)
l10n_br/l10n_br.py.OTHER (+84/-0)
l10n_ch/account_wizard.py (+2/-3)
l10n_ch/bank.py (+3/-3)
l10n_ch/company.py (+2/-3)
l10n_ch/invoice.py (+3/-5)
l10n_ch/partner.py (+2/-3)
l10n_ch/payment.py (+2/-3)
l10n_ch/report/report_webkit_html.py (+1/-1)
l10n_ch/wizard/bvr_import.py (+2/-3)
l10n_ch/wizard/create_dta.py (+2/-3)
l10n_fr/l10n_fr.py (+4/-5)
l10n_fr/wizard/fr_report_bilan.py (+2/-3)
l10n_fr/wizard/fr_report_compute_resultant.py (+2/-3)
l10n_fr_hr_payroll/l10n_fr_hr_payroll.py (+4/-7)
l10n_fr_rib/bank.py (+3/-5)
l10n_in_hr_payroll/l10n_in_hr_payroll.py (+7/-13)
l10n_in_hr_payroll/report/payment_advice_report.py (+2/-3)
l10n_in_hr_payroll/report/payslip_report.py (+2/-3)
l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py (+2/-3)
l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py (+2/-3)
l10n_lu/wizard/print_vat.py (+2/-3)
l10n_ma/l10n_ma.py (+3/-3)
l10n_multilang/account.py (+28/-39)
l10n_multilang/l10n_multilang.py (+2/-3)
l10n_ro/res_partner.py (+2/-3)
lunch/lunch.py (+1/-1)
lunch/report/order.py (+1/-1)
lunch/report/report_lunch_order.py (+2/-3)
lunch/wizard/lunch_cancel.py (+1/-1)
lunch/wizard/lunch_order.py (+1/-1)
lunch/wizard/lunch_validation.py (+1/-1)
mail/mail_alias.py (+1/-1)
mail/mail_followers.py (+1/-1)
mail/mail_group.py (+1/-1)
mail/mail_group_menu.py (+2/-2)
mail/mail_mail.py (+1/-1)
mail/mail_message_subtype.py (+2/-2)
mail/mail_thread.py (+4/-0)
mail/mail_vote.py (+1/-1)
mail/res_config.py (+1/-1)
mail/res_partner.py (+1/-1)
mail/res_users.py (+1/-1)
mail/update.py (+2/-2)
mail/wizard/invite.py (+2/-2)
mail/wizard/mail_compose_message.py (+1/-1)
marketing/res_config.py (+2/-2)
marketing_campaign/marketing_campaign.py (+8/-15)
marketing_campaign/report/campaign_analysis.py (+2/-3)
marketing_campaign/res_partner.py (+2/-3)
membership/membership.py (+10/-15)
membership/report/report_membership.py (+2/-3)
membership/wizard/membership_invoice.py (+2/-3)
mrp/company.py (+2/-3)
mrp/mrp.py (+69/-15)
mrp/procurement.py (+2/-3)
mrp/product.py (+2/-3)
mrp/report/bom_structure.py (+1/-1)
mrp/report/mrp_report.py (+7/-9)
mrp/res_config.py (+2/-2)
mrp/stock.py (+8/-11)
mrp/wizard/change_production_qty.py (+2/-3)
mrp/wizard/mrp_price.py (+2/-3)
mrp/wizard/mrp_product_produce.py (+2/-3)
mrp/wizard/mrp_workcenter_load.py (+2/-3)
mrp_byproduct/mrp_byproduct.py (+5/-8)
mrp_operations/mrp_operations.py (+58/-11)
mrp_operations/report/mrp_workorder_analysis.py (+2/-3)
mrp_repair/mrp_repair.py (+52/-6)
mrp_repair/wizard/cancel_repair.py (+2/-3)
mrp_repair/wizard/make_invoice.py (+2/-3)
note/note.py (+5/-5)
note_pad/note_pad.py (+2/-2)
pad/pad.py (+2/-2)
pad/res_company.py (+2/-2)
pad_project/project_task.py (+2/-2)
plugin/plugin_handler.py (+2/-2)
plugin_outlook/plugin_outlook.py (+2/-2)
plugin_thunderbird/plugin_thunderbird.py (+2/-2)
point_of_sale/account_bank_statement.py (+3/-5)
point_of_sale/point_of_sale.py (+10/-12)
point_of_sale/report/pos_invoice.py (+1/-1)
point_of_sale/report/pos_order_report.py (+2/-3)
point_of_sale/report/pos_report.py (+6/-11)
point_of_sale/res_partner.py (+2/-2)
point_of_sale/res_users.py (+2/-2)
point_of_sale/wizard/pos_box.py (+1/-1)
point_of_sale/wizard/pos_box_entries.py (+2/-3)
point_of_sale/wizard/pos_box_out.py (+2/-3)
point_of_sale/wizard/pos_confirm.py (+4/-5)
point_of_sale/wizard/pos_details.py (+2/-3)
point_of_sale/wizard/pos_discount.py (+2/-3)
point_of_sale/wizard/pos_open_statement.py (+2/-3)
point_of_sale/wizard/pos_payment.py (+3/-4)
point_of_sale/wizard/pos_payment_report.py (+2/-3)
point_of_sale/wizard/pos_payment_report_user.py (+2/-3)
point_of_sale/wizard/pos_receipt.py (+2/-3)
point_of_sale/wizard/pos_return.py (+3/-5)
point_of_sale/wizard/pos_sales_user.py (+2/-3)
point_of_sale/wizard/pos_sales_user_current_user.py (+2/-3)
point_of_sale/wizard/pos_sales_user_today.py (+4/-5)
point_of_sale/wizard/pos_session_opening.py (+2/-3)
portal/acquirer.py (+1/-1)
portal/mail_mail.py (+1/-1)
portal/portal.py (+4/-4)
portal/wizard/portal_wizard.py (+3/-3)
portal/wizard/share_wizard.py (+1/-2)
portal_crm/contact.py (+1/-1)
portal_event/event.py (+2/-2)
portal_hr_employees/hr_employee.py (+2/-2)
portal_sale/portal_sale.py (+2/-2)
portal_sale/res_config.py (+1/-1)
process/process.py (+6/-11)
procurement/company.py (+2/-3)
procurement/procurement.py (+39/-11)
procurement/schedulers.py (+2/-3)
procurement/wizard/make_procurement_product.py (+2/-3)
procurement/wizard/mrp_procurement.py (+2/-3)
procurement/wizard/orderpoint_procurement.py (+2/-3)
procurement/wizard/schedulers_all.py (+2/-3)
product/partner.py (+4/-5)
product/pricelist.py (+10/-15)
product/product.py (+18/-27)
product/report/pricelist.py (+1/-1)
product/report/product_pricelist.py (+1/-1)
product/wizard/product_price.py (+2/-3)
product_expiry/product_expiry.py (+3/-5)
product_manufacturer/product_manufacturer.py (+3/-5)
product_margin/product_margin.py (+4/-5)
product_margin/wizard/product_margin.py (+2/-3)
product_visible_discount/product_visible_discount.py (+4/-7)
project/company.py (+2/-3)
project/project.py (+10/-10)
project/report/project_report.py (+2/-3)
project/res_config.py (+2/-2)
project/res_partner.py (+2/-3)
project/wizard/project_task_delegate.py (+2/-3)
project/wizard/project_task_reevaluate.py (+2/-3)
project_gtd/project_gtd.py (+6/-9)
project_gtd/wizard/project_gtd_empty.py (+2/-3)
project_gtd/wizard/project_gtd_fill.py (+2/-3)
project_issue/project_issue.py (+41/-10)
project_issue/report/project_issue_report.py (+2/-3)
project_issue/res_config.py (+2/-2)
project_issue_sheet/project_issue_sheet.py (+3/-6)
project_long_term/project_long_term.py (+6/-11)
project_long_term/wizard/project_compute_phases.py (+2/-3)
project_long_term/wizard/project_compute_tasks.py (+2/-3)
project_mrp/project_mrp.py (+4/-7)
project_mrp/project_procurement.py (+2/-3)
project_timesheet/project_timesheet.py (+6/-11)
project_timesheet/report/task_report.py (+2/-3)
purchase/company.py (+2/-3)
purchase/edi/purchase_order.py (+3/-3)
purchase/partner.py (+2/-3)
purchase/purchase.py (+61/-12)
purchase/report/order.py (+1/-1)
purchase/report/purchase_report.py (+2/-3)
purchase/report/request_quotation.py (+1/-1)
purchase/res_config.py (+3/-3)
purchase/stock.py (+5/-6)
purchase/wizard/purchase_line_invoice.py (+2/-3)
purchase/wizard/purchase_order_group.py (+2/-3)
purchase_analytic_plans/purchase_analytic_plans.py (+5/-7)
purchase_double_validation/purchase_double_validation_installer.py (+2/-2)
purchase_requisition/purchase_requisition.py (+21/-12)
purchase_requisition/report/requisition.py (+1/-1)
purchase_requisition/wizard/purchase_requisition_partner.py (+2/-3)
report_intrastat/report_intrastat.py (+9/-13)
report_webkit/company.py (+2/-2)
report_webkit/header.py (+3/-5)
report_webkit/ir_report.py (+2/-3)
report_webkit/wizard/report_webkit_actions.py (+2/-3)
resource/resource.py (+5/-9)
sale/edi/sale_order.py (+3/-3)
sale/report/sale_report.py (+2/-3)
sale/res_config.py (+3/-3)
sale/res_partner.py (+2/-2)
sale/sale.py (+41/-8)
sale/wizard/sale_line_invoice.py (+2/-3)
sale/wizard/sale_make_invoice.py (+2/-3)
sale/wizard/sale_make_invoice_advance.py (+2/-3)
sale_analytic_plans/sale_analytic_plans.py (+3/-4)
sale_crm/report/sales_crm_account_invoice_report.py (+2/-2)
sale_crm/sale_crm.py (+24/-2)
sale_crm/wizard/crm_make_sale.py (+2/-3)
sale_journal/sale_journal.py (+9/-15)
sale_margin/sale_margin.py (+3/-5)
sale_mrp/sale_mrp.py (+2/-3)
sale_order_dates/sale_order_dates.py (+2/-3)
sale_stock/company.py (+2/-3)
sale_stock/report/sale_report.py (+2/-3)
sale_stock/res_config.py (+2/-2)
sale_stock/sale_stock.py (+6/-7)
sale_stock/stock.py (+4/-4)
share/ir_model.py (+1/-1)
share/res_users.py (+3/-5)
share/wizard/share_wizard.py (+2/-3)
stock/partner.py (+2/-3)
stock/product.py (+4/-7)
stock/report/picking.py (+1/-1)
stock/report/product_stock.py (+0/-1)
stock/report/report_stock.py (+4/-7)
stock/report/report_stock_move.py (+5/-7)
stock/res_config.py (+2/-2)
stock/stock.py (+101/-27)
stock/wizard/stock_change_product_qty.py (+15/-2)
stock/wizard/stock_change_standard_price.py (+2/-3)
stock/wizard/stock_fill_inventory.py (+2/-3)
stock/wizard/stock_inventory_line_split.py (+3/-3)
stock/wizard/stock_inventory_merge.py (+2/-3)
stock/wizard/stock_invoice_onshipping.py (+2/-3)
stock/wizard/stock_location_product.py (+2/-3)
stock/wizard/stock_move.py (+9/-12)
stock/wizard/stock_partial_move.py (+3/-3)
stock/wizard/stock_partial_picking.py (+2/-2)
stock/wizard/stock_return_picking.py (+5/-7)
stock/wizard/stock_splitinto.py (+2/-3)
stock/wizard/stock_traceability.py (+2/-3)
stock_invoice_directly/wizard/stock_invoice.py (+2/-3)
stock_location/procurement_pull.py (+2/-3)
stock_location/stock_location.py (+6/-11)
stock_no_autopicking/stock_no_autopicking.py (+3/-5)
subscription/subscription.py (+5/-9)
survey/survey.py (+16/-29)
survey/wizard/survey_answer.py (+2/-3)
survey/wizard/survey_browse_answer.py (+2/-3)
survey/wizard/survey_print.py (+2/-3)
survey/wizard/survey_print_answer.py (+2/-3)
survey/wizard/survey_print_statistics.py (+2/-3)
survey/wizard/survey_selection.py (+2/-2)
survey/wizard/survey_send_invitation.py (+3/-5)
warning/warning.py (+17/-25)
web_linkedin/web_linkedin.py (+2/-2)
Text conflict in account_voucher/account_voucher.py
Text conflict in analytic/analytic.py
Text conflict in base_calendar/crm_meeting.py
Text conflict in crm/crm_meeting.py
Text conflict in crm/crm_phonecall.py
Text conflict in crm_claim/crm_claim.py
Text conflict in event/event.py
Text conflict in hr_holidays/hr_holidays.py
Text conflict in hr_timesheet_invoice/hr_timesheet_invoice.py
Text conflict in hr_timesheet_sheet/hr_timesheet_sheet.py
Text conflict in l10n_br/account.py
Contents conflict in l10n_br/l10n_br.py
Text conflict in mail/mail_thread.py
Text conflict in mrp/mrp.py
Text conflict in mrp_operations/mrp_operations.py
Text conflict in mrp_repair/mrp_repair.py
Text conflict in procurement/procurement.py
Text conflict in project_issue/project_issue.py
Text conflict in purchase/purchase.py
Text conflict in purchase_requisition/purchase_requisition.py
Text conflict in sale/sale.py
Text conflict in sale_crm/sale_crm.py
Text conflict in stock/stock.py
Text conflict in stock/wizard/stock_change_product_qty.py
To merge this branch: bzr merge lp:~camptocamp/openobject-addons/trunk-proposed-cleanups
Reviewer Review Type Date Requested Status
Antony Lesuisse (OpenERP) Pending
OpenERP Core Team Pending
Review via email: mp+140925@code.launchpad.net

Description of the change

Use more "modern" form for model declaration (deriving from orm.Model rather than osv.osv, and removing explicit instanciation of the class).

This works together with https://code.launchpad.net/~c2c/openobject-server/trunk-proposed-cleanups/

To post a comment you must log in.

Unmerged revisions

6779. By Alexandre Fayolle - camptocamp on 2012-12-20

[FIX] l10n_be_invoice_bba/invoice.py: syntax error resulting from sed processing a file with CR+LF line endings

6778. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-12-20

[FIX] object_proxy import problem

6777. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-12-20

[FIX] one more wrong import

6776. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-12-20

[FIX] some barfs from previous broad use of sed + some import cleanups

6775. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-12-20

[REF] user string.split method instead of the deprecated split function from the string module

6774. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-12-20

[MRG] update patch to latest trunk

6773. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-10-03

[FIX] a few more deprecated structure that crept in during the merge

6772. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-10-03

[MRG] from trunk

6771. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-09-17

[REF] more replacement of osv.osv with orm.Model
[FIX] l10n_ch/report/report_webkit_html.py: one NameError

6770. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-09-17

[MRG] from trunk

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-12-18 17:55:47 +0000
3+++ account/account.py 2012-12-20 15:08:18 +0000
4@@ -27,7 +27,7 @@
5
6 from openerp import SUPERUSER_ID
7 from openerp import pooler, tools
8-from openerp.osv import fields, osv
9+from openerp.osv import fields, osv, orm
10 from openerp.tools.translate import _
11 from openerp.tools.float_utils import float_round
12
13@@ -54,7 +54,7 @@
14 level -= 1
15 return True
16
17-class account_payment_term(osv.osv):
18+class account_payment_term(orm.Model):
19 _name = "account.payment.term"
20 _description = "Payment Term"
21 _columns = {
22@@ -99,7 +99,7 @@
23 result.append( (time.strftime('%Y-%m-%d'), dist) )
24 return result
25
26-class account_payment_term_line(osv.osv):
27+class account_payment_term_line(orm.Model):
28 _name = "account.payment.term.line"
29 _description = "Payment Term Line"
30 _columns = {
31@@ -131,9 +131,8 @@
32 (_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2%.', ['value_amount']),
33 ]
34
35-account_payment_term_line()
36
37-class account_account_type(osv.osv):
38+class account_account_type(orm.Model):
39 _name = "account.account.type"
40 _description = "Account Type"
41
42@@ -197,7 +196,6 @@
43 }
44 _order = "code"
45
46-account_account_type()
47
48 def _code_get(self, cr, uid, context=None):
49 acc_type_obj = self.pool.get('account.account.type')
50@@ -209,11 +207,10 @@
51 # Accounts
52 #----------------------------------------------------------
53
54-class account_tax(osv.osv):
55+class account_tax(orm.Model):
56 _name = 'account.tax'
57-account_tax()
58
59-class account_account(osv.osv):
60+class account_account(orm.Model):
61 _order = "parent_left"
62 _parent_order = "code"
63 _name = "account.account"
64@@ -696,9 +693,8 @@
65 self._check_moves(cr, uid, ids, "unlink", context=context)
66 return super(account_account, self).unlink(cr, uid, ids, context=context)
67
68-account_account()
69
70-class account_journal(osv.osv):
71+class account_journal(orm.Model):
72 _name = "account.journal"
73 _description = "Journal"
74 _columns = {
75@@ -848,9 +844,8 @@
76
77 return self.name_get(cr, user, ids, context=context)
78
79-account_journal()
80
81-class account_fiscalyear(osv.osv):
82+class account_fiscalyear(orm.Model):
83 _name = "account.fiscalyear"
84 _description = "Fiscal Year"
85 _columns = {
86@@ -944,9 +939,8 @@
87 ids = self.search(cr, user, [('name', operator, name)]+ args, limit=limit)
88 return self.name_get(cr, user, ids, context=context)
89
90-account_fiscalyear()
91
92-class account_period(osv.osv):
93+class account_period(orm.Model):
94 _name = "account.period"
95 _description = "Account period"
96 _columns = {
97@@ -1067,9 +1061,8 @@
98 return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)])
99 return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)])
100
101-account_period()
102
103-class account_journal_period(osv.osv):
104+class account_journal_period(orm.Model):
105 _name = "account.journal.period"
106 _description = "Journal Period"
107
108@@ -1124,9 +1117,8 @@
109 }
110 _order = "period_id"
111
112-account_journal_period()
113
114-class account_fiscalyear(osv.osv):
115+class account_fiscalyear(orm.Model):
116 _inherit = "account.fiscalyear"
117 _description = "Fiscal Year"
118 _columns = {
119@@ -1141,11 +1133,10 @@
120 })
121 return super(account_fiscalyear, self).copy(cr, uid, id, default=default, context=context)
122
123-account_fiscalyear()
124 #----------------------------------------------------------
125 # Entries
126 #----------------------------------------------------------
127-class account_move(osv.osv):
128+class account_move(orm.Model):
129 _name = "account.move"
130 _description = "Account Entry"
131 _order = 'id desc'
132@@ -1612,9 +1603,8 @@
133 valid_moves = [move.id for move in valid_moves]
134 return len(valid_moves) > 0 and valid_moves or False
135
136-account_move()
137
138-class account_move_reconcile(osv.osv):
139+class account_move_reconcile(orm.Model):
140 _name = "account.move.reconcile"
141 _description = "Account Reconciliation"
142 _columns = {
143@@ -1686,7 +1676,6 @@
144 result.append((r.id,r.name))
145 return result
146
147-account_move_reconcile()
148
149 #----------------------------------------------------------
150 # Tax
151@@ -1695,7 +1684,7 @@
152 a documenter
153 child_depend: la taxe depend des taxes filles
154 """
155-class account_tax_code(osv.osv):
156+class account_tax_code(orm.Model):
157 """
158 A code for the tax object.
159
160@@ -1834,9 +1823,8 @@
161 ]
162 _order = 'code'
163
164-account_tax_code()
165
166-class account_tax(osv.osv):
167+class account_tax(orm.Model):
168 """
169 A tax object.
170
171@@ -2235,13 +2223,12 @@
172 total += r['amount']
173 return res
174
175-account_tax()
176
177 # ---------------------------------------------------------
178 # Account Entries Models
179 # ---------------------------------------------------------
180
181-class account_model(osv.osv):
182+class account_model(orm.Model):
183 _name = "account.model"
184 _description = "Account Model"
185 _columns = {
186@@ -2347,9 +2334,8 @@
187
188 return {'value': {'company_id': company_id}}
189
190-account_model()
191
192-class account_model_line(osv.osv):
193+class account_model_line(orm.Model):
194 _name = "account.model.line"
195 _description = "Account Model Entries"
196 _columns = {
197@@ -2371,14 +2357,13 @@
198 ('credit_debit1', 'CHECK (credit*debit=0)', 'Wrong credit or debit value in model, they must be positive!'),
199 ('credit_debit2', 'CHECK (credit+debit>=0)', 'Wrong credit or debit value in model, they must be positive!'),
200 ]
201-account_model_line()
202
203 # ---------------------------------------------------------
204 # Account Subscription
205 # ---------------------------------------------------------
206
207
208-class account_subscription(osv.osv):
209+class account_subscription(orm.Model):
210 _name = "account.subscription"
211 _description = "Account Subscription"
212 _columns = {
213@@ -2445,9 +2430,8 @@
214 self.write(cr, uid, ids, {'state':'running'})
215 return True
216
217-account_subscription()
218
219-class account_subscription_line(osv.osv):
220+class account_subscription_line(orm.Model):
221 _name = "account.subscription.line"
222 _description = "Account Subscription Line"
223 _columns = {
224@@ -2474,17 +2458,15 @@
225
226 _rec_name = 'date'
227
228-account_subscription_line()
229
230 # ---------------------------------------------------------------
231 # Account Templates: Account, Tax, Tax Code and chart. + Wizard
232 # ---------------------------------------------------------------
233
234-class account_tax_template(osv.osv):
235+class account_tax_template(orm.Model):
236 _name = 'account.tax.template'
237-account_tax_template()
238
239-class account_account_template(osv.osv):
240+class account_account_template(orm.Model):
241 _order = "code"
242 _name = "account.account.template"
243 _description ='Templates for Accounts'
244@@ -2610,9 +2592,8 @@
245 obj_acc._parent_store_compute(cr)
246 return acc_template_ref
247
248-account_account_template()
249
250-class account_add_tmpl_wizard(osv.osv_memory):
251+class account_add_tmpl_wizard(orm.TransientModel):
252 """Add one more account from the template.
253
254 With the 'nocreate' option, some accounts may not be created. Use this to add them later."""
255@@ -2664,9 +2645,8 @@
256 def action_cancel(self, cr, uid, ids, context=None):
257 return { 'type': 'state', 'state': 'end' }
258
259-account_add_tmpl_wizard()
260
261-class account_tax_code_template(osv.osv):
262+class account_tax_code_template(orm.Model):
263
264 _name = 'account.tax.code.template'
265 _description = 'Tax Code Template'
266@@ -2736,10 +2716,9 @@
267 (_check_recursion, 'Error!\nYou cannot create recursive Tax Codes.', ['parent_id'])
268 ]
269 _order = 'code,name'
270-account_tax_code_template()
271-
272-
273-class account_chart_template(osv.osv):
274+
275+
276+class account_chart_template(orm.Model):
277 _name="account.chart.template"
278 _description= "Templates for Account Chart"
279
280@@ -2769,9 +2748,8 @@
281 'complete_tax_set': True,
282 }
283
284-account_chart_template()
285
286-class account_tax_template(osv.osv):
287+class account_tax_template(orm.Model):
288
289 _name = 'account.tax.template'
290 _description = 'Templates for Taxes'
291@@ -2899,11 +2877,10 @@
292 res.update({'tax_template_to_tax': tax_template_to_tax, 'account_dict': todo_dict})
293 return res
294
295-account_tax_template()
296
297 # Fiscal Position Templates
298
299-class account_fiscal_position_template(osv.osv):
300+class account_fiscal_position_template(orm.Model):
301 _name = 'account.fiscal.position.template'
302 _description = 'Template for Fiscal Position'
303
304@@ -2947,9 +2924,8 @@
305 })
306 return True
307
308-account_fiscal_position_template()
309
310-class account_fiscal_position_tax_template(osv.osv):
311+class account_fiscal_position_tax_template(orm.Model):
312 _name = 'account.fiscal.position.tax.template'
313 _description = 'Template Tax Fiscal Position'
314 _rec_name = 'position_id'
315@@ -2960,9 +2936,8 @@
316 'tax_dest_id': fields.many2one('account.tax.template', 'Replacement Tax')
317 }
318
319-account_fiscal_position_tax_template()
320
321-class account_fiscal_position_account_template(osv.osv):
322+class account_fiscal_position_account_template(orm.Model):
323 _name = 'account.fiscal.position.account.template'
324 _description = 'Template Account Fiscal Mapping'
325 _rec_name = 'position_id'
326@@ -2972,13 +2947,12 @@
327 'account_dest_id': fields.many2one('account.account.template', 'Account Destination', domain=[('type','<>','view')], required=True)
328 }
329
330-account_fiscal_position_account_template()
331
332 # ---------------------------------------------------------
333 # Account generation from template wizards
334 # ---------------------------------------------------------
335
336-class wizard_multi_charts_accounts(osv.osv_memory):
337+class wizard_multi_charts_accounts(orm.TransientModel):
338 """
339 Create a new account chart for a company.
340 Wizards ask for:
341@@ -3512,9 +3486,8 @@
342 current_num += 1
343 return True
344
345-wizard_multi_charts_accounts()
346
347-class account_bank_accounts_wizard(osv.osv_memory):
348+class account_bank_accounts_wizard(orm.TransientModel):
349 _name='account.bank.accounts.wizard'
350
351 _columns = {
352@@ -3524,6 +3497,5 @@
353 'account_type': fields.selection([('cash','Cash'), ('check','Check'), ('bank','Bank')], 'Account Type', size=32),
354 }
355
356-account_bank_accounts_wizard()
357
358 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
359
360=== modified file 'account/account_analytic_line.py'
361--- account/account_analytic_line.py 2012-12-18 22:50:15 +0000
362+++ account/account_analytic_line.py 2012-12-20 15:08:18 +0000
363@@ -20,10 +20,10 @@
364 ##############################################################################
365
366 from openerp.osv import fields
367-from openerp.osv import osv
368+from openerp.osv import osv, orm
369 from openerp.tools.translate import _
370
371-class account_analytic_line(osv.osv):
372+class account_analytic_line(orm.Model):
373 _inherit = 'account.analytic.line'
374 _description = 'Analytic Line'
375 _columns = {
376@@ -143,9 +143,8 @@
377 return res
378 return False
379
380-account_analytic_line()
381
382-class res_partner(osv.osv):
383+class res_partner(orm.Model):
384 """ Inherits partner and adds contract information in the partner form """
385 _inherit = 'res.partner'
386
387@@ -154,6 +153,5 @@
388 'partner_id', 'Contracts', readonly=True),
389 }
390
391-res_partner()
392
393 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
394
395=== modified file 'account/account_bank.py'
396--- account/account_bank.py 2012-12-06 14:56:32 +0000
397+++ account/account_bank.py 2012-12-20 15:08:18 +0000
398@@ -20,9 +20,9 @@
399 ##############################################################################
400
401 from openerp.tools.translate import _
402-from openerp.osv import fields, osv
403+from openerp.osv import fields, osv, orm
404
405-class bank(osv.osv):
406+class bank(orm.Model):
407 _inherit = "res.partner.bank"
408 _columns = {
409 'journal_id': fields.many2one('account.journal', 'Account Journal', help="This journal will be created automatically for this bank account when you save the record"),
410
411=== modified file 'account/account_bank_statement.py'
412--- account/account_bank_statement.py 2012-12-18 17:55:47 +0000
413+++ account/account_bank_statement.py 2012-12-20 15:08:18 +0000
414@@ -21,11 +21,11 @@
415
416 import time
417
418-from openerp.osv import fields, osv
419+from openerp.osv import fields, osv, orm
420 from openerp.tools.translate import _
421 import openerp.addons.decimal_precision as dp
422
423-class account_bank_statement(osv.osv):
424+class account_bank_statement(orm.Model):
425 def create(self, cr, uid, vals, context=None):
426 if 'line_ids' in vals:
427 for idx, line in enumerate(vals['line_ids']):
428@@ -475,7 +475,7 @@
429 unlink_ids.append(t['id'])
430 else:
431 raise osv.except_osv(_('Invalid Action!'), _('In order to delete a bank statement, you must first cancel it to delete related journal items.'))
432- osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
433+ orm.Model.unlink(self, cr, uid, unlink_ids, context=context)
434 return True
435
436 def copy(self, cr, uid, id, default=None, context=None):
437@@ -500,9 +500,8 @@
438 'context':ctx,
439 }
440
441-account_bank_statement()
442
443-class account_bank_statement_line(osv.osv):
444+class account_bank_statement_line(orm.Model):
445
446 def onchange_partner_id(self, cr, uid, ids, partner_id, context=None):
447 obj_partner = self.pool.get('res.partner')
448@@ -576,6 +575,5 @@
449 'type': 'general',
450 }
451
452-account_bank_statement_line()
453
454 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
455
456=== modified file 'account/account_cash_statement.py'
457--- account/account_cash_statement.py 2012-12-17 15:23:03 +0000
458+++ account/account_cash_statement.py 2012-12-20 15:08:18 +0000
459@@ -22,11 +22,11 @@
460
461 import time
462
463-from openerp.osv import fields, osv
464+from openerp.osv import fields, osv, orm
465 from openerp.tools.translate import _
466 import openerp.addons.decimal_precision as dp
467
468-class account_cashbox_line(osv.osv):
469+class account_cashbox_line(orm.Model):
470
471 """ Cash Box Details """
472
473@@ -66,9 +66,8 @@
474 'bank_statement_id' : fields.many2one('account.bank.statement', ondelete='cascade'),
475 }
476
477-account_cashbox_line()
478
479-class account_cash_statement(osv.osv):
480+class account_cash_statement(orm.Model):
481
482 _inherit = 'account.bank.statement'
483
484@@ -316,9 +315,8 @@
485
486 return self.write(cr, uid, ids, {'closing_date': time.strftime("%Y-%m-%d %H:%M:%S")}, context=context)
487
488-account_cash_statement()
489
490-class account_journal(osv.osv):
491+class account_journal(orm.Model):
492 _inherit = 'account.journal'
493
494 def _default_cashbox_line_ids(self, cr, uid, context=None):
495@@ -336,9 +334,8 @@
496 'cashbox_line_ids' : _default_cashbox_line_ids,
497 }
498
499-account_journal()
500
501-class account_journal_cashbox_line(osv.osv):
502+class account_journal_cashbox_line(orm.Model):
503 _name = 'account.journal.cashbox.line'
504 _rec_name = 'pieces'
505 _columns = {
506@@ -348,6 +345,5 @@
507
508 _order = 'pieces asc'
509
510-account_journal_cashbox_line()
511
512 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
513
514=== modified file 'account/account_financial_report.py'
515--- account/account_financial_report.py 2012-12-17 15:23:03 +0000
516+++ account/account_financial_report.py 2012-12-20 15:08:18 +0000
517@@ -26,7 +26,7 @@
518
519 from openerp import netsvc
520 from openerp import pooler
521-from openerp.osv import fields, osv
522+from openerp.osv import fields, osv, orm
523 import openerp.addons.decimal_precision as dp
524 from openerp.tools.translate import _
525
526@@ -34,7 +34,7 @@
527 # Account Financial Report
528 # ---------------------------------------------------------
529
530-class account_financial_report(osv.osv):
531+class account_financial_report(orm.Model):
532 _name = "account.financial.report"
533 _description = "Account Report"
534
535@@ -130,6 +130,5 @@
536 'style_overwrite': 0,
537 }
538
539-account_financial_report()
540
541 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
542
543=== modified file 'account/account_invoice.py'
544--- account/account_invoice.py 2012-12-20 11:47:30 +0000
545+++ account/account_invoice.py 2012-12-20 15:08:18 +0000
546@@ -28,7 +28,7 @@
547 from openerp.osv import fields, osv, orm
548 from openerp.tools.translate import _
549
550-class account_invoice(osv.osv):
551+class account_invoice(orm.Model):
552 def _amount_all(self, cr, uid, ids, name, args, context=None):
553 res = {}
554 for invoice in self.browse(cr, uid, ids, context=context):
555@@ -456,7 +456,7 @@
556 unlink_ids.append(t['id'])
557 else:
558 raise osv.except_osv(_('Invalid Action!'), _('You can not delete an invoice which is not cancelled. You should refund it instead.'))
559- osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
560+ orm.Model.unlink(self, cr, uid, unlink_ids, context=context)
561 return True
562
563 def onchange_partner_id(self, cr, uid, ids, type, partner_id,\
564@@ -1336,7 +1336,7 @@
565 return True
566
567
568-class account_invoice_line(osv.osv):
569+class account_invoice_line(orm.Model):
570
571 def _amount_line(self, cr, uid, ids, prop, unknow_none, unknow_dict):
572 res = {}
573@@ -1587,9 +1587,8 @@
574 unique_tax_ids = product_change_result['value']['invoice_line_tax_id']
575 return {'value':{'invoice_line_tax_id': unique_tax_ids}}
576
577-account_invoice_line()
578
579-class account_invoice_tax(osv.osv):
580+class account_invoice_tax(orm.Model):
581 _name = "account.invoice.tax"
582 _description = "Invoice Tax"
583
584@@ -1731,7 +1730,7 @@
585 return res
586
587
588-class res_partner(osv.osv):
589+class res_partner(orm.Model):
590 """ Inherits partner and adds invoice information in the partner form """
591 _inherit = 'res.partner'
592 _columns = {
593@@ -1744,7 +1743,7 @@
594 return super(res_partner, self).copy(cr, uid, id, default, context)
595
596
597-class mail_compose_message(osv.osv):
598+class mail_compose_message(orm.Model):
599 _inherit = 'mail.compose.message'
600
601 def send_mail(self, cr, uid, ids, context=None):
602
603=== modified file 'account/account_move_line.py'
604--- account/account_move_line.py 2012-12-18 17:55:47 +0000
605+++ account/account_move_line.py 2012-12-20 15:08:18 +0000
606@@ -32,7 +32,7 @@
607 import openerp.addons.decimal_precision as dp
608 from openerp import tools
609
610-class account_move_line(osv.osv):
611+class account_move_line(orm.Model):
612 _name = "account.move.line"
613 _description = "Journal Items"
614
615@@ -1304,6 +1304,5 @@
616 bool(journal.currency),bool(journal.analytic_journal_id)))
617 return result
618
619-account_move_line()
620
621 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
622
623=== modified file 'account/company.py'
624--- account/company.py 2012-12-06 14:56:32 +0000
625+++ account/company.py 2012-12-20 15:08:18 +0000
626@@ -19,9 +19,9 @@
627 #
628 ##############################################################################
629
630-from openerp.osv import fields, osv
631+from openerp.osv import fields, osv, orm
632
633-class res_company(osv.osv):
634+class res_company(orm.Model):
635 _inherit = "res.company"
636 _columns = {
637 'expects_chart_of_accounts': fields.boolean('Expects a Chart of Accounts'),
638@@ -47,6 +47,5 @@
639 Best Regards,'''
640 }
641
642-res_company()
643
644 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
645
646=== modified file 'account/edi/invoice.py'
647--- account/edi/invoice.py 2012-12-17 14:43:06 +0000
648+++ account/edi/invoice.py 2012-12-20 15:08:18 +0000
649@@ -18,7 +18,7 @@
650 # along with this program. If not, see <http://www.gnu.org/licenses/>.
651 #
652 ##############################################################################
653-from openerp.osv import osv, fields
654+from openerp.osv import osv, fields, orm
655 from openerp.addons.edi import EDIMixin
656
657 from urllib import urlencode
658@@ -68,7 +68,7 @@
659 'amount_tax': True,
660 }
661
662-class account_invoice(osv.osv, EDIMixin):
663+class account_invoice(orm.Model, EDIMixin):
664 _inherit = 'account.invoice'
665
666 def edi_export(self, cr, uid, records, edi_struct=None, context=None):
667@@ -282,10 +282,10 @@
668 }
669
670
671-class account_invoice_line(osv.osv, EDIMixin):
672+class account_invoice_line(orm.Model, EDIMixin):
673 _inherit='account.invoice.line'
674
675-class account_invoice_tax(osv.osv, EDIMixin):
676+class account_invoice_tax(orm.Model, EDIMixin):
677 _inherit = "account.invoice.tax"
678
679
680
681=== modified file 'account/installer.py'
682--- account/installer.py 2012-12-06 14:56:32 +0000
683+++ account/installer.py 2012-12-20 15:08:18 +0000
684@@ -28,11 +28,11 @@
685
686 from openerp import netsvc, tools
687 from openerp.tools.translate import _
688-from openerp.osv import fields, osv
689+from openerp.osv import fields, osv, orm
690
691 _logger = logging.getLogger(__name__)
692
693-class account_installer(osv.osv_memory):
694+class account_installer(orm.TransientModel):
695 _name = 'account.installer'
696 _inherit = 'res.config.installer'
697
698@@ -152,6 +152,5 @@
699 _logger.debug('Installing chart of accounts %s', chart)
700 return modules | set([chart])
701
702-account_installer()
703
704 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
705
706=== modified file 'account/ir_sequence.py'
707--- account/ir_sequence.py 2012-12-06 14:56:32 +0000
708+++ account/ir_sequence.py 2012-12-20 15:08:18 +0000
709@@ -19,9 +19,9 @@
710 #
711 ##############################################################################
712
713-from openerp.osv import fields, osv
714+from openerp.osv import fields, osv, orm
715
716-class ir_sequence_fiscalyear(osv.osv):
717+class ir_sequence_fiscalyear(orm.Model):
718 _name = 'account.sequence.fiscalyear'
719 _rec_name = "sequence_main_id"
720 _columns = {
721@@ -38,9 +38,8 @@
722 'Main Sequence must be different from current !'),
723 ]
724
725-ir_sequence_fiscalyear()
726
727-class ir_sequence(osv.osv):
728+class ir_sequence(orm.Model):
729 _inherit = 'ir.sequence'
730 _columns = {
731 'fiscal_ids': fields.one2many('account.sequence.fiscalyear',
732@@ -56,6 +55,5 @@
733 return super(ir_sequence, self)._next(cr, uid, [line.sequence_id.id], context)
734 return super(ir_sequence, self)._next(cr, uid, seq_ids, context)
735
736-ir_sequence()
737
738 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
739
740=== modified file 'account/partner.py'
741--- account/partner.py 2012-12-10 11:16:54 +0000
742+++ account/partner.py 2012-12-20 15:08:18 +0000
743@@ -22,9 +22,9 @@
744 from operator import itemgetter
745 import time
746
747-from openerp.osv import fields, osv
748+from openerp.osv import fields, osv, orm
749
750-class account_fiscal_position(osv.osv):
751+class account_fiscal_position(orm.Model):
752 _name = 'account.fiscal.position'
753 _description = 'Fiscal Position'
754 _columns = {
755@@ -66,9 +66,8 @@
756 break
757 return account_id
758
759-account_fiscal_position()
760
761-class account_fiscal_position_tax(osv.osv):
762+class account_fiscal_position_tax(orm.Model):
763 _name = 'account.fiscal.position.tax'
764 _description = 'Taxes Fiscal Position'
765 _rec_name = 'position_id'
766@@ -84,9 +83,8 @@
767 'A tax fiscal position could be defined only once time on same taxes.')
768 ]
769
770-account_fiscal_position_tax()
771
772-class account_fiscal_position_account(osv.osv):
773+class account_fiscal_position_account(orm.Model):
774 _name = 'account.fiscal.position.account'
775 _description = 'Accounts Fiscal Position'
776 _rec_name = 'position_id'
777@@ -102,9 +100,8 @@
778 'An account fiscal position could be defined only once time on same accounts.')
779 ]
780
781-account_fiscal_position_account()
782
783-class res_partner(osv.osv):
784+class res_partner(orm.Model):
785 _name = 'res.partner'
786 _inherit = 'res.partner'
787 _description = 'Partner'
788@@ -236,6 +233,5 @@
789 'last_reconciliation_date': fields.datetime('Latest Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the date of the last reconciliation made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 ways: either the last debit/credit entry was reconciled, either the user pressed the button "Fully Reconciled" in the manual reconciliation process')
790 }
791
792-res_partner()
793
794 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
795
796=== modified file 'account/product.py'
797--- account/product.py 2012-12-06 14:56:32 +0000
798+++ account/product.py 2012-12-20 15:08:18 +0000
799@@ -19,9 +19,9 @@
800 #
801 ##############################################################################
802
803-from openerp.osv import fields, osv
804+from openerp.osv import fields, osv, orm
805
806-class product_category(osv.osv):
807+class product_category(orm.Model):
808 _inherit = "product.category"
809 _columns = {
810 'property_account_income_categ': fields.property(
811@@ -39,13 +39,12 @@
812 view_load=True,
813 help="This account will be used for invoices to value expenses."),
814 }
815-product_category()
816
817 #----------------------------------------------------------
818 # Products
819 #----------------------------------------------------------
820
821-class product_template(osv.osv):
822+class product_template(orm.Model):
823 _inherit = "product.template"
824 _columns = {
825 'taxes_id': fields.many2many('account.tax', 'product_taxes_rel',
826@@ -70,6 +69,5 @@
827 help="This account will be used for invoices instead of the default one to value expenses for the current product."),
828 }
829
830-product_template()
831
832 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
833
834=== modified file 'account/project/project.py'
835--- account/project/project.py 2012-12-06 14:56:32 +0000
836+++ account/project/project.py 2012-12-20 15:08:18 +0000
837@@ -19,9 +19,9 @@
838 #
839 ##############################################################################
840
841-from openerp.osv import fields, osv
842+from openerp.osv import fields, osv, orm
843
844-class account_analytic_journal(osv.osv):
845+class account_analytic_journal(orm.Model):
846 _name = 'account.analytic.journal'
847 _description = 'Analytic Journal'
848 _columns = {
849@@ -38,15 +38,13 @@
850 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
851 }
852
853-account_analytic_journal()
854
855-class account_journal(osv.osv):
856+class account_journal(orm.Model):
857 _inherit="account.journal"
858
859 _columns = {
860 'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal', help="Journal for analytic entries"),
861 }
862
863-account_journal()
864
865 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
866
867=== modified file 'account/project/wizard/account_analytic_balance_report.py'
868--- account/project/wizard/account_analytic_balance_report.py 2012-12-06 14:56:32 +0000
869+++ account/project/wizard/account_analytic_balance_report.py 2012-12-20 15:08:18 +0000
870@@ -20,9 +20,9 @@
871 ##############################################################################
872 import time
873
874-from openerp.osv import fields, osv
875+from openerp.osv import fields, osv, orm
876
877-class account_analytic_balance(osv.osv_memory):
878+class account_analytic_balance(orm.TransientModel):
879 _name = 'account.analytic.balance'
880 _description = 'Account Analytic Balance'
881
882@@ -52,7 +52,6 @@
883 'datas': datas,
884 }
885
886-account_analytic_balance()
887
888 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
889
890
891=== modified file 'account/project/wizard/account_analytic_chart.py'
892--- account/project/wizard/account_analytic_chart.py 2012-12-06 14:56:32 +0000
893+++ account/project/wizard/account_analytic_chart.py 2012-12-20 15:08:18 +0000
894@@ -18,9 +18,9 @@
895 # along with this program. If not, see <http://www.gnu.org/licenses/>.
896 #
897 ##############################################################################
898-from openerp.osv import fields, osv
899+from openerp.osv import fields, osv, orm
900
901-class account_analytic_chart(osv.osv_memory):
902+class account_analytic_chart(orm.TransientModel):
903 _name = 'account.analytic.chart'
904 _description = 'Account Analytic Chart'
905
906@@ -46,5 +46,4 @@
907 result['context'] = str(result_context)
908 return result
909
910-account_analytic_chart()
911 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
912
913=== modified file 'account/project/wizard/account_analytic_cost_ledger_for_journal_report.py'
914--- account/project/wizard/account_analytic_cost_ledger_for_journal_report.py 2012-12-06 14:56:32 +0000
915+++ account/project/wizard/account_analytic_cost_ledger_for_journal_report.py 2012-12-20 15:08:18 +0000
916@@ -20,9 +20,9 @@
917 ##############################################################################
918 import time
919
920-from openerp.osv import fields, osv
921+from openerp.osv import fields, osv, orm
922
923-class account_analytic_cost_ledger_journal_report(osv.osv_memory):
924+class account_analytic_cost_ledger_journal_report(orm.TransientModel):
925 _name = 'account.analytic.cost.ledger.journal.report'
926 _description = 'Account Analytic Cost Ledger For Journal Report'
927
928@@ -52,5 +52,4 @@
929 'datas': datas,
930 }
931
932-account_analytic_cost_ledger_journal_report()
933 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
934
935=== modified file 'account/project/wizard/account_analytic_cost_ledger_report.py'
936--- account/project/wizard/account_analytic_cost_ledger_report.py 2012-12-06 14:56:32 +0000
937+++ account/project/wizard/account_analytic_cost_ledger_report.py 2012-12-20 15:08:18 +0000
938@@ -21,9 +21,9 @@
939
940 import time
941
942-from openerp.osv import osv, fields
943+from openerp.osv import osv, fields, orm
944
945-class account_analytic_cost_ledger(osv.osv_memory):
946+class account_analytic_cost_ledger(orm.TransientModel):
947 _name = 'account.analytic.cost.ledger'
948 _description = 'Account Analytic Cost Ledger'
949
950@@ -52,5 +52,4 @@
951 'datas': datas,
952 }
953
954-account_analytic_cost_ledger()
955 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
956
957=== modified file 'account/project/wizard/account_analytic_inverted_balance_report.py'
958--- account/project/wizard/account_analytic_inverted_balance_report.py 2012-12-06 14:56:32 +0000
959+++ account/project/wizard/account_analytic_inverted_balance_report.py 2012-12-20 15:08:18 +0000
960@@ -20,9 +20,9 @@
961 ##############################################################################
962 import time
963
964-from openerp.osv import fields, osv
965+from openerp.osv import fields, osv, orm
966
967-class account_analytic_inverted_balance(osv.osv_memory):
968+class account_analytic_inverted_balance(orm.TransientModel):
969 _name = 'account.analytic.inverted.balance'
970 _description = 'Account Analytic Inverted Balance'
971
972@@ -51,5 +51,4 @@
973 'datas': datas,
974 }
975
976-account_analytic_inverted_balance()
977 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
978
979=== modified file 'account/project/wizard/account_analytic_journal_report.py'
980--- account/project/wizard/account_analytic_journal_report.py 2012-12-06 14:56:32 +0000
981+++ account/project/wizard/account_analytic_journal_report.py 2012-12-20 15:08:18 +0000
982@@ -20,9 +20,9 @@
983 ##############################################################################
984 import time
985
986-from openerp.osv import fields, osv
987+from openerp.osv import fields, osv, orm
988
989-class account_analytic_journal_report(osv.osv_memory):
990+class account_analytic_journal_report(orm.TransientModel):
991 _name = 'account.analytic.journal.report'
992 _description = 'Account Analytic Journal'
993
994@@ -71,5 +71,4 @@
995 res.update({'analytic_account_journal_id': journal_ids})
996 return res
997
998-account_analytic_journal_report()
999 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1000
1001=== modified file 'account/project/wizard/project_account_analytic_line.py'
1002--- account/project/wizard/project_account_analytic_line.py 2012-12-06 14:56:32 +0000
1003+++ account/project/wizard/project_account_analytic_line.py 2012-12-20 15:08:18 +0000
1004@@ -18,10 +18,10 @@
1005 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1006 #
1007 ##############################################################################
1008-from openerp.osv import fields, osv
1009+from openerp.osv import fields, osv, orm
1010 from openerp.tools.translate import _
1011
1012-class project_account_analytic_line(osv.osv_memory):
1013+class project_account_analytic_line(orm.TransientModel):
1014 _name = "project.account.analytic.line"
1015 _description = "Analytic Entries by line"
1016 _columns = {
1017@@ -53,6 +53,5 @@
1018 'search_view_id': id['res_id'],
1019 }
1020
1021-project_account_analytic_line()
1022
1023 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1024
1025=== modified file 'account/report/account_analytic_entries_report.py'
1026--- account/report/account_analytic_entries_report.py 2012-12-06 14:56:32 +0000
1027+++ account/report/account_analytic_entries_report.py 2012-12-20 15:08:18 +0000
1028@@ -20,9 +20,9 @@
1029 ##############################################################################
1030
1031 from openerp import tools
1032-from openerp.osv import fields,osv
1033+from openerp.osv import fields,osv, orm
1034
1035-class analytic_entries_report(osv.osv):
1036+class analytic_entries_report(orm.Model):
1037 _name = "analytic.entries.report"
1038 _description = "Analytic Entries Statistics"
1039 _auto = False
1040@@ -81,6 +81,5 @@
1041 a.move_id,a.product_id,a.product_uom_id
1042 )
1043 """)
1044-analytic_entries_report()
1045
1046 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1047
1048=== modified file 'account/report/account_entries_report.py'
1049--- account/report/account_entries_report.py 2012-12-17 15:23:03 +0000
1050+++ account/report/account_entries_report.py 2012-12-20 15:08:18 +0000
1051@@ -20,10 +20,10 @@
1052 ##############################################################################
1053
1054 from openerp import tools
1055-from openerp.osv import fields,osv
1056+from openerp.osv import fields,osv, orm
1057 import openerp.addons.decimal_precision as dp
1058
1059-class account_entries_report(osv.osv):
1060+class account_entries_report(orm.Model):
1061 _name = "account.entries.report"
1062 _description = "Journal Items Analysis"
1063 _auto = False
1064@@ -152,6 +152,5 @@
1065 where l.state != 'draft'
1066 )
1067 """)
1068-account_entries_report()
1069
1070 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1071
1072=== modified file 'account/report/account_invoice_report.py'
1073--- account/report/account_invoice_report.py 2012-12-17 15:23:03 +0000
1074+++ account/report/account_invoice_report.py 2012-12-20 15:08:18 +0000
1075@@ -21,9 +21,9 @@
1076
1077 from openerp import tools
1078 import openerp.addons.decimal_precision as dp
1079-from openerp.osv import fields,osv
1080+from openerp.osv import fields,osv, orm
1081
1082-class account_invoice_report(osv.osv):
1083+class account_invoice_report(orm.Model):
1084 _name = "account.invoice.report"
1085 _description = "Invoices Statistics"
1086 _auto = False
1087@@ -217,6 +217,5 @@
1088 self._table,
1089 self._select(), self._sub_select(), self._from(), self._group_by()))
1090
1091-account_invoice_report()
1092
1093 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1094
1095=== modified file 'account/report/account_report.py'
1096--- account/report/account_report.py 2012-12-10 11:16:54 +0000
1097+++ account/report/account_report.py 2012-12-20 15:08:18 +0000
1098@@ -25,7 +25,7 @@
1099
1100 from openerp import pooler
1101 from openerp import tools
1102-from openerp.osv import fields,osv
1103+from openerp.osv import fields,osv, orm
1104
1105 def _code_get(self, cr, uid, context=None):
1106 acc_type_obj = self.pool.get('account.account.type')
1107@@ -34,7 +34,7 @@
1108 return [(r['code'], r['name']) for r in res]
1109
1110
1111-class report_account_receivable(osv.osv):
1112+class report_account_receivable(orm.Model):
1113 _name = "report.account.receivable"
1114 _description = "Receivable accounts"
1115 _auto = False
1116@@ -67,10 +67,9 @@
1117 group by
1118 to_char(date,'YYYY:IW'), a.type
1119 )""")
1120-report_account_receivable()
1121
1122 #a.type in ('receivable','payable')
1123-class temp_range(osv.osv):
1124+class temp_range(orm.Model):
1125 _name = 'temp.range'
1126 _description = 'A Temporary table used for Dashboard view'
1127
1128@@ -78,9 +77,8 @@
1129 'name': fields.char('Range',size=64)
1130 }
1131
1132-temp_range()
1133
1134-class report_aged_receivable(osv.osv):
1135+class report_aged_receivable(orm.Model):
1136 _name = "report.aged.receivable"
1137 _description = "Aged Receivable Till Today"
1138 _auto = False
1139@@ -148,9 +146,8 @@
1140 select id,name from temp_range
1141 )""")
1142
1143-report_aged_receivable()
1144
1145-class report_invoice_created(osv.osv):
1146+class report_invoice_created(orm.Model):
1147 _name = "report.invoice.created"
1148 _description = "Report of Invoices Created within Last 15 days"
1149 _auto = False
1150@@ -201,9 +198,8 @@
1151 AND
1152 (to_date(to_char(inv.create_date, 'YYYY-MM-dd'),'YYYY-MM-dd') > (CURRENT_DATE-15))
1153 )""")
1154-report_invoice_created()
1155
1156-class report_account_type_sales(osv.osv):
1157+class report_account_type_sales(orm.Model):
1158 _name = "report.account_type.sales"
1159 _description = "Report of the Sales by Account Type"
1160 _auto = False
1161@@ -242,10 +238,9 @@
1162 group by
1163 to_char(inv.date_invoice, 'YYYY'),to_char(inv.date_invoice,'MM'),inv.currency_id, inv.period_id, inv_line.product_id, account.user_type
1164 )""")
1165-report_account_type_sales()
1166-
1167-
1168-class report_account_sales(osv.osv):
1169+
1170+
1171+class report_account_sales(orm.Model):
1172 _name = "report.account.sales"
1173 _description = "Report of the Sales by Account"
1174 _auto = False
1175@@ -284,6 +279,5 @@
1176 group by
1177 to_char(inv.date_invoice, 'YYYY'),to_char(inv.date_invoice,'MM'),inv.currency_id, inv.period_id, inv_line.product_id, account.id
1178 )""")
1179-report_account_sales()
1180
1181 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1182
1183=== modified file 'account/report/account_treasury_report.py'
1184--- account/report/account_treasury_report.py 2012-12-17 15:23:03 +0000
1185+++ account/report/account_treasury_report.py 2012-12-20 15:08:18 +0000
1186@@ -20,10 +20,10 @@
1187 ##############################################################################
1188
1189 from openerp import tools
1190-from openerp.osv import fields,osv
1191+from openerp.osv import fields,osv, orm
1192 import openerp.addons.decimal_precision as dp
1193
1194-class account_treasury_report(osv.osv):
1195+class account_treasury_report(orm.Model):
1196 _name = "account.treasury.report"
1197 _description = "Treasury Analysis"
1198 _auto = False
1199@@ -78,6 +78,5 @@
1200 group by p.id, p.fiscalyear_id, p.date_start, am.company_id
1201 )
1202 """)
1203-account_treasury_report()
1204
1205 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1206
1207=== modified file 'account/res_config.py'
1208--- account/res_config.py 2012-12-10 11:16:54 +0000
1209+++ account/res_config.py 2012-12-20 15:08:18 +0000
1210@@ -26,10 +26,10 @@
1211 from os.path import join as opj
1212
1213 from openerp.tools.translate import _
1214-from openerp.osv import fields, osv
1215+from openerp.osv import fields, osv, orm
1216 from openerp import tools
1217
1218-class account_config_settings(osv.osv_memory):
1219+class account_config_settings(orm.TransientModel):
1220 _name = 'account.config.settings'
1221 _inherit = 'res.config.settings'
1222
1223
1224=== modified file 'account/res_currency.py'
1225--- account/res_currency.py 2012-12-10 11:16:54 +0000
1226+++ account/res_currency.py 2012-12-20 15:08:18 +0000
1227@@ -18,11 +18,11 @@
1228 #
1229 ##############################################################################
1230
1231-from openerp.osv import osv
1232+from openerp.osv import osv, orm
1233
1234 """Inherit res.currency to handle accounting date values when converting currencies"""
1235
1236-class res_currency_account(osv.osv):
1237+class res_currency_account(orm.Model):
1238 _inherit = "res.currency"
1239
1240 def _get_conversion_rate(self, cr, uid, from_currency, to_currency, context=None):
1241@@ -43,6 +43,5 @@
1242 rate = float(tot2)/float(tot1)
1243 return rate
1244
1245-res_currency_account()
1246
1247 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1248
1249=== modified file 'account/wizard/account_automatic_reconcile.py'
1250--- account/wizard/account_automatic_reconcile.py 2012-12-06 14:56:32 +0000
1251+++ account/wizard/account_automatic_reconcile.py 2012-12-20 15:08:18 +0000
1252@@ -21,10 +21,10 @@
1253
1254 import time
1255
1256-from openerp.osv import fields, osv
1257+from openerp.osv import fields, osv, orm
1258 from openerp.tools.translate import _
1259
1260-class account_automatic_reconcile(osv.osv_memory):
1261+class account_automatic_reconcile(orm.TransientModel):
1262 _name = 'account.automatic.reconcile'
1263 _description = 'Automatic Reconcile'
1264
1265@@ -246,6 +246,5 @@
1266 'context': context,
1267 }
1268
1269-account_automatic_reconcile()
1270
1271 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1272
1273=== modified file 'account/wizard/account_change_currency.py'
1274--- account/wizard/account_change_currency.py 2012-12-06 14:56:32 +0000
1275+++ account/wizard/account_change_currency.py 2012-12-20 15:08:18 +0000
1276@@ -19,10 +19,10 @@
1277 #
1278 ##############################################################################
1279
1280-from openerp.osv import fields, osv
1281+from openerp.osv import fields, osv, orm
1282 from openerp.tools.translate import _
1283
1284-class account_change_currency(osv.osv_memory):
1285+class account_change_currency(orm.TransientModel):
1286 _name = 'account.change.currency'
1287 _description = 'Change Currency'
1288 _columns = {
1289@@ -73,6 +73,5 @@
1290 obj_inv.write(cr, uid, [invoice.id], {'currency_id': new_currency}, context=context)
1291 return {'type': 'ir.actions.act_window_close'}
1292
1293-account_change_currency()
1294
1295 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1296
1297=== modified file 'account/wizard/account_chart.py'
1298--- account/wizard/account_chart.py 2012-12-06 14:56:32 +0000
1299+++ account/wizard/account_chart.py 2012-12-20 15:08:18 +0000
1300@@ -19,9 +19,9 @@
1301 #
1302 ##############################################################################
1303
1304-from openerp.osv import fields, osv
1305+from openerp.osv import fields, osv, orm
1306
1307-class account_chart(osv.osv_memory):
1308+class account_chart(orm.TransientModel):
1309 """
1310 For Chart of Accounts
1311 """
1312@@ -105,6 +105,5 @@
1313 'fiscalyear': _get_fiscalyear,
1314 }
1315
1316-account_chart()
1317
1318 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1319
1320=== modified file 'account/wizard/account_financial_report.py'
1321--- account/wizard/account_financial_report.py 2012-12-06 14:56:32 +0000
1322+++ account/wizard/account_financial_report.py 2012-12-20 15:08:18 +0000
1323@@ -19,9 +19,9 @@
1324 #
1325 ##############################################################################
1326
1327-from openerp.osv import fields, osv
1328+from openerp.osv import fields, osv, orm
1329
1330-class accounting_report(osv.osv_memory):
1331+class accounting_report(orm.TransientModel):
1332 _name = "accounting.report"
1333 _inherit = "account.common.report"
1334 _description = "Accounting Report"
1335@@ -93,6 +93,5 @@
1336 'datas': data,
1337 }
1338
1339-accounting_report()
1340
1341 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1342
1343=== modified file 'account/wizard/account_fiscalyear_close.py'
1344--- account/wizard/account_fiscalyear_close.py 2012-12-06 14:56:32 +0000
1345+++ account/wizard/account_fiscalyear_close.py 2012-12-20 15:08:18 +0000
1346@@ -19,10 +19,10 @@
1347 #
1348 ##############################################################################
1349
1350-from openerp.osv import fields, osv
1351+from openerp.osv import fields, osv, orm
1352 from openerp.tools.translate import _
1353
1354-class account_fiscalyear_close(osv.osv_memory):
1355+class account_fiscalyear_close(orm.TransientModel):
1356 """
1357 Closes Account Fiscalyear and Generate Opening entries for New Fiscalyear
1358 """
1359@@ -278,6 +278,5 @@
1360
1361 return {'type': 'ir.actions.act_window_close'}
1362
1363-account_fiscalyear_close()
1364
1365 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1366
1367=== modified file 'account/wizard/account_fiscalyear_close_state.py'
1368--- account/wizard/account_fiscalyear_close_state.py 2012-12-06 14:56:32 +0000
1369+++ account/wizard/account_fiscalyear_close_state.py 2012-12-20 15:08:18 +0000
1370@@ -19,10 +19,10 @@
1371 #
1372 ##############################################################################
1373
1374-from openerp.osv import fields, osv
1375+from openerp.osv import fields, osv, orm
1376 from openerp.tools.translate import _
1377
1378-class account_fiscalyear_close_state(osv.osv_memory):
1379+class account_fiscalyear_close_state(orm.TransientModel):
1380 """
1381 Closes Account Fiscalyear
1382 """
1383@@ -56,6 +56,5 @@
1384
1385 return {'type': 'ir.actions.act_window_close'}
1386
1387-account_fiscalyear_close_state()
1388
1389 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1390
1391=== modified file 'account/wizard/account_invoice_refund.py'
1392--- account/wizard/account_invoice_refund.py 2012-12-18 17:42:25 +0000
1393+++ account/wizard/account_invoice_refund.py 2012-12-20 15:08:18 +0000
1394@@ -21,11 +21,11 @@
1395
1396 import time
1397
1398-from openerp.osv import fields, osv
1399+from openerp.osv import fields, osv, orm
1400 from openerp.tools.translate import _
1401 from openerp import netsvc
1402
1403-class account_invoice_refund(osv.osv_memory):
1404+class account_invoice_refund(orm.TransientModel):
1405
1406 """Refunds invoice"""
1407
1408@@ -223,6 +223,5 @@
1409 return self.compute_refund(cr, uid, ids, data_refund, context=context)
1410
1411
1412-account_invoice_refund()
1413
1414 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1415
1416=== modified file 'account/wizard/account_invoice_state.py'
1417--- account/wizard/account_invoice_state.py 2012-12-06 14:56:32 +0000
1418+++ account/wizard/account_invoice_state.py 2012-12-20 15:08:18 +0000
1419@@ -19,12 +19,12 @@
1420 #
1421 ##############################################################################
1422
1423-from openerp.osv import osv
1424+from openerp.osv import osv, orm
1425 from openerp.tools.translate import _
1426 from openerp import netsvc
1427 from openerp import pooler
1428
1429-class account_invoice_confirm(osv.osv_memory):
1430+class account_invoice_confirm(orm.TransientModel):
1431 """
1432 This wizard will confirm the all the selected draft invoices
1433 """
1434@@ -45,9 +45,8 @@
1435 wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_open', cr)
1436 return {'type': 'ir.actions.act_window_close'}
1437
1438-account_invoice_confirm()
1439
1440-class account_invoice_cancel(osv.osv_memory):
1441+class account_invoice_cancel(orm.TransientModel):
1442 """
1443 This wizard will cancel the all the selected invoices.
1444 If in the journal, the option allow cancelling entry is not selected then it will give warning message.
1445@@ -69,6 +68,5 @@
1446 wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_cancel', cr)
1447 return {'type': 'ir.actions.act_window_close'}
1448
1449-account_invoice_cancel()
1450
1451 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1452
1453=== modified file 'account/wizard/account_journal_select.py'
1454--- account/wizard/account_journal_select.py 2012-12-06 14:56:32 +0000
1455+++ account/wizard/account_journal_select.py 2012-12-20 15:08:18 +0000
1456@@ -19,9 +19,9 @@
1457 #
1458 ##############################################################################
1459
1460-from openerp.osv import osv
1461+from openerp.osv import osv, orm
1462
1463-class account_journal_select(osv.osv_memory):
1464+class account_journal_select(orm.TransientModel):
1465 """
1466 Account Journal Select
1467 """
1468@@ -45,6 +45,5 @@
1469 result['context'] = str({'journal_id': journal_id, 'period_id': period_id})
1470 return result
1471
1472-account_journal_select()
1473
1474 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1475
1476=== modified file 'account/wizard/account_move_bank_reconcile.py'
1477--- account/wizard/account_move_bank_reconcile.py 2012-12-06 14:56:32 +0000
1478+++ account/wizard/account_move_bank_reconcile.py 2012-12-20 15:08:18 +0000
1479@@ -19,10 +19,10 @@
1480 #
1481 ##############################################################################
1482
1483-from openerp.osv import fields, osv
1484+from openerp.osv import fields, osv, orm
1485 from openerp.tools.translate import _
1486
1487-class account_move_bank_reconcile(osv.osv_memory):
1488+class account_move_bank_reconcile(orm.TransientModel):
1489 """
1490 Bank Reconciliation
1491 """
1492@@ -59,6 +59,5 @@
1493 'type': 'ir.actions.act_window'
1494 }
1495
1496-account_move_bank_reconcile()
1497
1498 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1499
1500=== modified file 'account/wizard/account_move_line_reconcile_select.py'
1501--- account/wizard/account_move_line_reconcile_select.py 2012-12-06 14:56:32 +0000
1502+++ account/wizard/account_move_line_reconcile_select.py 2012-12-20 15:08:18 +0000
1503@@ -19,10 +19,10 @@
1504 #
1505 ##############################################################################
1506
1507-from openerp.osv import fields, osv
1508+from openerp.osv import fields, osv, orm
1509 from openerp.tools.translate import _
1510
1511-class account_move_line_reconcile_select(osv.osv_memory):
1512+class account_move_line_reconcile_select(orm.TransientModel):
1513 _name = "account.move.line.reconcile.select"
1514 _description = "Move line reconcile select"
1515 _columns = {
1516@@ -50,6 +50,5 @@
1517 'type': 'ir.actions.act_window'
1518 }
1519
1520-account_move_line_reconcile_select()
1521
1522 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1523
1524=== modified file 'account/wizard/account_move_line_select.py'
1525--- account/wizard/account_move_line_select.py 2012-12-06 14:56:32 +0000
1526+++ account/wizard/account_move_line_select.py 2012-12-20 15:08:18 +0000
1527@@ -19,9 +19,9 @@
1528 #
1529 ##############################################################################
1530
1531-from openerp.osv import osv
1532+from openerp.osv import osv, orm
1533
1534-class account_move_line_select(osv.osv_memory):
1535+class account_move_line_select(orm.TransientModel):
1536 """
1537 Account move line select
1538 """
1539@@ -67,6 +67,5 @@
1540 result['domain']=result['domain'][0:-1]+','+domain+result['domain'][-1]
1541 return result
1542
1543-account_move_line_select()
1544
1545 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1546
1547=== modified file 'account/wizard/account_move_line_unreconcile_select.py'
1548--- account/wizard/account_move_line_unreconcile_select.py 2012-12-06 14:56:32 +0000
1549+++ account/wizard/account_move_line_unreconcile_select.py 2012-12-20 15:08:18 +0000
1550@@ -19,9 +19,9 @@
1551 #
1552 ##############################################################################
1553
1554-from openerp.osv import fields, osv
1555+from openerp.osv import fields, osv, orm
1556
1557-class account_move_line_unreconcile_select(osv.osv_memory):
1558+class account_move_line_unreconcile_select(orm.TransientModel):
1559 _name = "account.move.line.unreconcile.select"
1560 _description = "Unreconciliation"
1561 _columns ={
1562@@ -39,6 +39,5 @@
1563 'type': 'ir.actions.act_window'
1564 }
1565
1566-account_move_line_unreconcile_select()
1567
1568 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1569
1570=== modified file 'account/wizard/account_open_closed_fiscalyear.py'
1571--- account/wizard/account_open_closed_fiscalyear.py 2012-12-06 14:56:32 +0000
1572+++ account/wizard/account_open_closed_fiscalyear.py 2012-12-20 15:08:18 +0000
1573@@ -19,10 +19,10 @@
1574 #
1575 ##############################################################################
1576
1577-from openerp.osv import fields, osv
1578+from openerp.osv import fields, osv, orm
1579 from openerp.tools.translate import _
1580
1581-class account_open_closed_fiscalyear(osv.osv_memory):
1582+class account_open_closed_fiscalyear(orm.TransientModel):
1583 _name = "account.open.closed.fiscalyear"
1584 _description = "Choose Fiscal Year"
1585 _columns = {
1586@@ -43,6 +43,5 @@
1587 cr.execute('delete from account_move where id IN %s', (tuple(ids_move),))
1588 return {'type': 'ir.actions.act_window_close'}
1589
1590-account_open_closed_fiscalyear()
1591
1592 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1593
1594=== modified file 'account/wizard/account_period_close.py'
1595--- account/wizard/account_period_close.py 2012-12-06 14:56:32 +0000
1596+++ account/wizard/account_period_close.py 2012-12-20 15:08:18 +0000
1597@@ -19,10 +19,10 @@
1598 #
1599 ##############################################################################
1600
1601-from openerp.osv import fields, osv
1602+from openerp.osv import fields, osv, orm
1603 from openerp.tools.translate import _
1604
1605-class account_period_close(osv.osv_memory):
1606+class account_period_close(orm.TransientModel):
1607 """
1608 close period
1609 """
1610@@ -55,6 +55,5 @@
1611
1612 return {'type': 'ir.actions.act_window_close'}
1613
1614-account_period_close()
1615
1616 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1617
1618=== modified file 'account/wizard/account_reconcile.py'
1619--- account/wizard/account_reconcile.py 2012-12-17 15:23:03 +0000
1620+++ account/wizard/account_reconcile.py 2012-12-20 15:08:18 +0000
1621@@ -21,11 +21,11 @@
1622
1623 import time
1624
1625-from openerp.osv import fields, osv
1626+from openerp.osv import fields, osv, orm
1627 from openerp.tools.translate import _
1628 import openerp.addons.decimal_precision as dp
1629
1630-class account_move_line_reconcile(osv.osv_memory):
1631+class account_move_line_reconcile(orm.TransientModel):
1632 """
1633 Account move line reconcile wizard, it checks for the write off the reconcile entry or directly reconcile.
1634 """
1635@@ -91,9 +91,8 @@
1636 period_id, journal_id, context=context)
1637 return {'type': 'ir.actions.act_window_close'}
1638
1639-account_move_line_reconcile()
1640
1641-class account_move_line_reconcile_writeoff(osv.osv_memory):
1642+class account_move_line_reconcile_writeoff(orm.TransientModel):
1643 """
1644 It opens the write off wizard form, in that user can define the journal, account, analytic account for reconcile
1645 """
1646@@ -158,6 +157,5 @@
1647 period_id, journal_id, context=context)
1648 return {'type': 'ir.actions.act_window_close'}
1649
1650-account_move_line_reconcile_writeoff()
1651
1652 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1653
1654=== modified file 'account/wizard/account_reconcile_partner_process.py'
1655--- account/wizard/account_reconcile_partner_process.py 2012-12-06 14:56:32 +0000
1656+++ account/wizard/account_reconcile_partner_process.py 2012-12-20 15:08:18 +0000
1657@@ -21,9 +21,9 @@
1658
1659 import time
1660
1661-from openerp.osv import fields, osv
1662+from openerp.osv import fields, osv, orm
1663
1664-class account_partner_reconcile_process(osv.osv_memory):
1665+class account_partner_reconcile_process(orm.TransientModel):
1666 _name = 'account.partner.reconcile.process'
1667 _description = 'Reconcilation Process partner by partner'
1668
1669@@ -98,6 +98,5 @@
1670 'next_partner_id': _get_partner,
1671 }
1672
1673-account_partner_reconcile_process()
1674
1675 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1676
1677=== modified file 'account/wizard/account_report_account_balance.py'
1678--- account/wizard/account_report_account_balance.py 2012-12-06 14:56:32 +0000
1679+++ account/wizard/account_report_account_balance.py 2012-12-20 15:08:18 +0000
1680@@ -19,9 +19,9 @@
1681 #
1682 ##############################################################################
1683
1684-from openerp.osv import fields, osv
1685+from openerp.osv import fields, osv, orm
1686
1687-class account_balance_report(osv.osv_memory):
1688+class account_balance_report(orm.TransientModel):
1689 _inherit = "account.common.account.report"
1690 _name = 'account.balance.report'
1691 _description = 'Trial Balance Report'
1692@@ -38,6 +38,5 @@
1693 data = self.pre_print_report(cr, uid, ids, data, context=context)
1694 return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data}
1695
1696-account_balance_report()
1697
1698 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1699
1700=== modified file 'account/wizard/account_report_aged_partner_balance.py'
1701--- account/wizard/account_report_aged_partner_balance.py 2012-12-06 14:56:32 +0000
1702+++ account/wizard/account_report_aged_partner_balance.py 2012-12-20 15:08:18 +0000
1703@@ -22,10 +22,10 @@
1704 import time
1705 from datetime import datetime
1706 from dateutil.relativedelta import relativedelta
1707-from openerp.osv import fields, osv
1708+from openerp.osv import fields, osv, orm
1709 from openerp.tools.translate import _
1710
1711-class account_aged_trial_balance(osv.osv_memory):
1712+class account_aged_trial_balance(orm.TransientModel):
1713 _inherit = 'account.common.partner.report'
1714 _name = 'account.aged.trial.balance'
1715 _description = 'Account Aged Trial balance Report'
1716@@ -86,6 +86,5 @@
1717 'datas': data
1718 }
1719
1720-account_aged_trial_balance()
1721
1722 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1723
1724=== modified file 'account/wizard/account_report_central_journal.py'
1725--- account/wizard/account_report_central_journal.py 2012-12-06 14:56:32 +0000
1726+++ account/wizard/account_report_central_journal.py 2012-12-20 15:08:18 +0000
1727@@ -19,9 +19,9 @@
1728 #
1729 ##############################################################################
1730
1731-from openerp.osv import fields, osv
1732+from openerp.osv import fields, osv, orm
1733
1734-class account_central_journal(osv.osv_memory):
1735+class account_central_journal(orm.TransientModel):
1736 _name = 'account.central.journal'
1737 _description = 'Account Central Journal'
1738 _inherit = "account.common.journal.report"
1739@@ -38,7 +38,6 @@
1740 'datas': data,
1741 }
1742
1743-account_central_journal()
1744
1745 #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1746
1747
1748=== modified file 'account/wizard/account_report_common.py'
1749--- account/wizard/account_report_common.py 2012-12-19 23:31:33 +0000
1750+++ account/wizard/account_report_common.py 2012-12-20 15:08:18 +0000
1751@@ -22,11 +22,11 @@
1752 import time
1753 from lxml import etree
1754
1755-from openerp.osv import fields, osv
1756+from openerp.osv import fields, osv, orm
1757 from openerp.osv.orm import setup_modifiers
1758 from openerp.tools.translate import _
1759
1760-class account_common_report(osv.osv_memory):
1761+class account_common_report(orm.TransientModel):
1762 _name = "account.common.report"
1763 _description = "Account Common Report"
1764
1765@@ -178,6 +178,5 @@
1766 data['form']['used_context'] = used_context
1767 return self._print_report(cr, uid, ids, data, context=context)
1768
1769-account_common_report()
1770
1771 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1772
1773=== modified file 'account/wizard/account_report_common_account.py'
1774--- account/wizard/account_report_common_account.py 2012-12-06 14:56:32 +0000
1775+++ account/wizard/account_report_common_account.py 2012-12-20 15:08:18 +0000
1776@@ -19,9 +19,9 @@
1777 #
1778 ##############################################################################
1779
1780-from openerp.osv import fields, osv
1781+from openerp.osv import fields, osv, orm
1782
1783-class account_common_account_report(osv.osv_memory):
1784+class account_common_account_report(orm.TransientModel):
1785 _name = 'account.common.account.report'
1786 _description = 'Account Common Account Report'
1787 _inherit = "account.common.report"
1788@@ -41,7 +41,6 @@
1789 data['form'].update(self.read(cr, uid, ids, ['display_account'], context=context)[0])
1790 return data
1791
1792-account_common_account_report()
1793
1794 #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1795
1796
1797=== modified file 'account/wizard/account_report_common_journal.py'
1798--- account/wizard/account_report_common_journal.py 2012-12-06 14:56:32 +0000
1799+++ account/wizard/account_report_common_journal.py 2012-12-20 15:08:18 +0000
1800@@ -19,9 +19,9 @@
1801 #
1802 ##############################################################################
1803
1804-from openerp.osv import fields, osv
1805+from openerp.osv import fields, osv, orm
1806
1807-class account_common_journal_report(osv.osv_memory):
1808+class account_common_journal_report(orm.TransientModel):
1809 _name = 'account.common.journal.report'
1810 _description = 'Account Common Journal Report'
1811 _inherit = "account.common.report"
1812@@ -50,6 +50,5 @@
1813 data['form']['active_ids'] = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', data['form']['journal_ids']), ('period_id', 'in', period_list)], context=context)
1814 return data
1815
1816-account_common_journal_report()
1817
1818 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1819
1820=== modified file 'account/wizard/account_report_common_partner.py'
1821--- account/wizard/account_report_common_partner.py 2012-12-06 14:56:32 +0000
1822+++ account/wizard/account_report_common_partner.py 2012-12-20 15:08:18 +0000
1823@@ -19,9 +19,9 @@
1824 #
1825 ##############################################################################
1826
1827-from openerp.osv import fields, osv
1828+from openerp.osv import fields, osv, orm
1829
1830-class account_common_partner_report(osv.osv_memory):
1831+class account_common_partner_report(orm.TransientModel):
1832 _name = 'account.common.partner.report'
1833 _description = 'Account Common Partner Report'
1834 _inherit = "account.common.report"
1835@@ -42,7 +42,6 @@
1836 data['form'].update(self.read(cr, uid, ids, ['result_selection'], context=context)[0])
1837 return data
1838
1839-account_common_partner_report()
1840
1841 #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1842 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1843
1844=== modified file 'account/wizard/account_report_general_journal.py'
1845--- account/wizard/account_report_general_journal.py 2012-12-06 14:56:32 +0000
1846+++ account/wizard/account_report_general_journal.py 2012-12-20 15:08:18 +0000
1847@@ -19,9 +19,9 @@
1848 #
1849 ##############################################################################
1850
1851-from openerp.osv import fields, osv
1852+from openerp.osv import fields, osv, orm
1853
1854-class account_general_journal(osv.osv_memory):
1855+class account_general_journal(orm.TransientModel):
1856 _inherit = "account.common.journal.report"
1857 _name = 'account.general.journal'
1858 _description = 'Account General Journal'
1859@@ -34,7 +34,6 @@
1860 data = self.pre_print_report(cr, uid, ids, data, context=context)
1861 return {'type': 'ir.actions.report.xml', 'report_name': 'account.general.journal', 'datas': data}
1862
1863-account_general_journal()
1864
1865 #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1866
1867
1868=== modified file 'account/wizard/account_report_general_ledger.py'
1869--- account/wizard/account_report_general_ledger.py 2012-12-06 14:56:32 +0000
1870+++ account/wizard/account_report_general_ledger.py 2012-12-20 15:08:18 +0000
1871@@ -19,9 +19,9 @@
1872 #
1873 ##############################################################################
1874
1875-from openerp.osv import fields, osv
1876+from openerp.osv import fields, osv, orm
1877
1878-class account_report_general_ledger(osv.osv_memory):
1879+class account_report_general_ledger(orm.TransientModel):
1880 _inherit = "account.common.account.report"
1881 _name = "account.report.general.ledger"
1882 _description = "General Ledger Report"
1883@@ -58,6 +58,5 @@
1884 return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger_landscape', 'datas': data}
1885 return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger', 'datas': data}
1886
1887-account_report_general_ledger()
1888
1889 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1890
1891=== modified file 'account/wizard/account_report_partner_balance.py'
1892--- account/wizard/account_report_partner_balance.py 2012-12-06 14:56:32 +0000
1893+++ account/wizard/account_report_partner_balance.py 2012-12-20 15:08:18 +0000
1894@@ -19,9 +19,9 @@
1895 #
1896 ##############################################################################
1897
1898-from openerp.osv import fields, osv
1899+from openerp.osv import fields, osv, orm
1900
1901-class account_partner_balance(osv.osv_memory):
1902+class account_partner_balance(orm.TransientModel):
1903 """
1904 This wizard will provide the partner balance report by periods, between any two dates.
1905 """
1906@@ -50,6 +50,5 @@
1907 'datas': data,
1908 }
1909
1910-account_partner_balance()
1911
1912 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1913
1914=== modified file 'account/wizard/account_report_partner_ledger.py'
1915--- account/wizard/account_report_partner_ledger.py 2012-12-06 14:56:32 +0000
1916+++ account/wizard/account_report_partner_ledger.py 2012-12-20 15:08:18 +0000
1917@@ -19,9 +19,9 @@
1918 #
1919 ##############################################################################
1920
1921-from openerp.osv import fields, osv
1922+from openerp.osv import fields, osv, orm
1923
1924-class account_partner_ledger(osv.osv_memory):
1925+class account_partner_ledger(orm.TransientModel):
1926 """
1927 This wizard will provide the partner Ledger report by periods, between any two dates.
1928 """
1929@@ -67,6 +67,5 @@
1930 'datas': data,
1931 }
1932
1933-account_partner_ledger()
1934
1935 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1936
1937=== modified file 'account/wizard/account_report_print_journal.py'
1938--- account/wizard/account_report_print_journal.py 2012-12-06 14:56:32 +0000
1939+++ account/wizard/account_report_print_journal.py 2012-12-20 15:08:18 +0000
1940@@ -19,10 +19,10 @@
1941 #
1942 ##############################################################################
1943
1944-from openerp.osv import fields, osv
1945+from openerp.osv import fields, osv, orm
1946 from lxml import etree
1947
1948-class account_print_journal(osv.osv_memory):
1949+class account_print_journal(orm.TransientModel):
1950 _inherit = "account.common.journal.report"
1951 _name = 'account.print.journal'
1952 _description = 'Account Print Journal'
1953@@ -72,7 +72,6 @@
1954 report_name = 'account.journal.period.print'
1955 return {'type': 'ir.actions.report.xml', 'report_name': report_name, 'datas': data}
1956
1957-account_print_journal()
1958
1959 #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1960
1961
1962=== modified file 'account/wizard/account_state_open.py'
1963--- account/wizard/account_state_open.py 2012-12-06 14:56:32 +0000
1964+++ account/wizard/account_state_open.py 2012-12-20 15:08:18 +0000
1965@@ -18,12 +18,12 @@
1966 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1967 #
1968 ##############################################################################
1969-from openerp.osv import osv
1970+from openerp.osv import osv, orm
1971
1972 from openerp import netsvc
1973 from openerp.tools.translate import _
1974
1975-class account_state_open(osv.osv_memory):
1976+class account_state_open(orm.TransientModel):
1977 _name = 'account.state.open'
1978 _description = 'Account State Open'
1979
1980@@ -39,6 +39,5 @@
1981 wf_service.trg_validate(uid, 'account.invoice', context['active_ids'][0], 'open_test', cr)
1982 return {'type': 'ir.actions.act_window_close'}
1983
1984-account_state_open()
1985
1986 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1987
1988=== modified file 'account/wizard/account_subscription_generate.py'
1989--- account/wizard/account_subscription_generate.py 2012-12-06 14:56:32 +0000
1990+++ account/wizard/account_subscription_generate.py 2012-12-20 15:08:18 +0000
1991@@ -21,9 +21,9 @@
1992
1993 import time
1994
1995-from openerp.osv import fields, osv
1996+from openerp.osv import fields, osv, orm
1997
1998-class account_subscription_generate(osv.osv_memory):
1999+class account_subscription_generate(orm.TransientModel):
2000
2001 _name = "account.subscription.generate"
2002 _description = "Subscription Compute"
2003@@ -48,6 +48,5 @@
2004 result['domain'] = str([('id','in',moves_created)])
2005 return result
2006
2007-account_subscription_generate()
2008
2009 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2010
2011=== modified file 'account/wizard/account_tax_chart.py'
2012--- account/wizard/account_tax_chart.py 2012-12-06 14:56:32 +0000
2013+++ account/wizard/account_tax_chart.py 2012-12-20 15:08:18 +0000
2014@@ -19,9 +19,9 @@
2015 #
2016 ##############################################################################
2017
2018-from openerp.osv import fields, osv
2019+from openerp.osv import fields, osv, orm
2020
2021-class account_tax_chart(osv.osv_memory):
2022+class account_tax_chart(orm.TransientModel):
2023 """
2024 For Chart of taxes
2025 """
2026@@ -73,6 +73,5 @@
2027 'target_move': 'posted'
2028 }
2029
2030-account_tax_chart()
2031
2032 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2033
2034=== modified file 'account/wizard/account_unreconcile.py'
2035--- account/wizard/account_unreconcile.py 2012-12-06 14:56:32 +0000
2036+++ account/wizard/account_unreconcile.py 2012-12-20 15:08:18 +0000
2037@@ -19,9 +19,9 @@
2038 #
2039 ##############################################################################
2040
2041-from openerp.osv import osv
2042+from openerp.osv import osv, orm
2043
2044-class account_unreconcile(osv.osv_memory):
2045+class account_unreconcile(orm.TransientModel):
2046 _name = "account.unreconcile"
2047 _description = "Account Unreconcile"
2048
2049@@ -33,9 +33,8 @@
2050 obj_move_line._remove_move_reconcile(cr, uid, context['active_ids'], context=context)
2051 return {'type': 'ir.actions.act_window_close'}
2052
2053-account_unreconcile()
2054
2055-class account_unreconcile_reconcile(osv.osv_memory):
2056+class account_unreconcile_reconcile(orm.TransientModel):
2057 _name = "account.unreconcile.reconcile"
2058 _description = "Account Unreconcile Reconcile"
2059
2060@@ -48,6 +47,5 @@
2061 obj_move_reconcile.unlink(cr, uid, rec_ids, context=context)
2062 return {'type': 'ir.actions.act_window_close'}
2063
2064-account_unreconcile_reconcile()
2065
2066 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2067
2068=== modified file 'account/wizard/account_use_model.py'
2069--- account/wizard/account_use_model.py 2012-12-06 14:56:32 +0000
2070+++ account/wizard/account_use_model.py 2012-12-20 15:08:18 +0000
2071@@ -20,10 +20,10 @@
2072 ##############################################################################
2073 import time
2074
2075-from openerp.osv import fields, osv
2076+from openerp.osv import fields, osv, orm
2077 from openerp.tools.translate import _
2078
2079-class account_use_model(osv.osv_memory):
2080+class account_use_model(orm.TransientModel):
2081
2082 _name = 'account.use.model'
2083 _description = 'Use model'
2084@@ -71,6 +71,5 @@
2085 'type': 'ir.actions.act_window',
2086 }
2087
2088-account_use_model()
2089
2090 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2091
2092=== modified file 'account/wizard/account_validate_account_move.py'
2093--- account/wizard/account_validate_account_move.py 2012-12-06 14:56:32 +0000
2094+++ account/wizard/account_validate_account_move.py 2012-12-20 15:08:18 +0000
2095@@ -18,10 +18,10 @@
2096 # along with this program. If not, see <http://www.gnu.org/licenses/>.
2097 #
2098 ##############################################################################
2099-from openerp.osv import fields, osv
2100+from openerp.osv import fields, osv, orm
2101 from openerp.tools.translate import _
2102
2103-class validate_account_move(osv.osv_memory):
2104+class validate_account_move(orm.TransientModel):
2105 _name = "validate.account.move"
2106 _description = "Validate Account Move"
2107 _columns = {
2108@@ -40,9 +40,8 @@
2109 obj_move.button_validate(cr, uid, ids_move, context=context)
2110 return {'type': 'ir.actions.act_window_close'}
2111
2112-validate_account_move()
2113
2114-class validate_account_move_lines(osv.osv_memory):
2115+class validate_account_move_lines(orm.TransientModel):
2116 _name = "validate.account.move.lines"
2117 _description = "Validate Account Move Lines"
2118
2119@@ -61,7 +60,6 @@
2120 raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move enties in draft state.'))
2121 obj_move.button_validate(cr, uid, move_ids, context)
2122 return {'type': 'ir.actions.act_window_close'}
2123-validate_account_move_lines()
2124
2125 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2126
2127
2128=== modified file 'account/wizard/account_vat.py'
2129--- account/wizard/account_vat.py 2012-12-06 14:56:32 +0000
2130+++ account/wizard/account_vat.py 2012-12-20 15:08:18 +0000
2131@@ -19,9 +19,9 @@
2132 #
2133 ##############################################################################
2134
2135-from openerp.osv import fields, osv
2136+from openerp.osv import fields, osv, orm
2137
2138-class account_vat_declaration(osv.osv_memory):
2139+class account_vat_declaration(orm.TransientModel):
2140 _name = 'account.vat.declaration'
2141 _description = 'Account Vat Declaration'
2142 _inherit = "account.common.report"
2143@@ -59,6 +59,5 @@
2144 'datas': datas,
2145 }
2146
2147-account_vat_declaration()
2148
2149 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2150
2151=== modified file 'account/wizard/pos_box.py'
2152--- account/wizard/pos_box.py 2012-12-17 15:23:03 +0000
2153+++ account/wizard/pos_box.py 2012-12-20 15:08:18 +0000
2154@@ -1,9 +1,9 @@
2155 #!/usr/bin/env python
2156-from openerp.osv import fields, osv
2157+from openerp.osv import fields, osv, orm
2158 import openerp.addons.decimal_precision as dp
2159 from openerp.tools.translate import _
2160
2161-class CashBox(osv.osv_memory):
2162+class CashBox(orm.TransientModel):
2163 _register = False
2164 _columns = {
2165 'name' : fields.char('Reason', size=64, required=True),
2166@@ -63,7 +63,6 @@
2167 'name' : box.name,
2168 }
2169
2170-CashBoxIn()
2171
2172 class CashBoxOut(CashBox):
2173 _name = 'cash.box.out'
2174@@ -78,4 +77,3 @@
2175 'name' : box.name,
2176 }
2177
2178-CashBoxOut()
2179
2180=== modified file 'account_analytic_analysis/account_analytic_analysis.py'
2181--- account_analytic_analysis/account_analytic_analysis.py 2012-12-06 14:56:32 +0000
2182+++ account_analytic_analysis/account_analytic_analysis.py 2012-12-20 15:08:18 +0000
2183@@ -19,7 +19,7 @@
2184 #
2185 ##############################################################################
2186
2187-from openerp.osv import osv, fields
2188+from openerp.osv import osv, fields, orm
2189 from openerp.osv.orm import intersect, except_orm
2190 import openerp.tools
2191 from openerp.tools.translate import _
2192@@ -27,7 +27,7 @@
2193 from openerp.addons.decimal_precision import decimal_precision as dp
2194
2195
2196-class account_analytic_account(osv.osv):
2197+class account_analytic_account(orm.Model):
2198 _name = "account.analytic.account"
2199 _inherit = "account.analytic.account"
2200
2201@@ -484,9 +484,8 @@
2202 res['value']['to_invoice'] = template.to_invoice.id
2203 res['value']['pricelist_id'] = template.pricelist_id.id
2204 return res
2205-account_analytic_account()
2206
2207-class account_analytic_account_summary_user(osv.osv):
2208+class account_analytic_account_summary_user(orm.Model):
2209 _name = "account_analytic_analysis.summary.user"
2210 _description = "Hours Summary by User"
2211 _order='user'
2212@@ -539,9 +538,8 @@
2213 unit_amount
2214 from lu, mu)''')
2215
2216-account_analytic_account_summary_user()
2217
2218-class account_analytic_account_summary_month(osv.osv):
2219+class account_analytic_account_summary_month(orm.Model):
2220 _name = "account_analytic_analysis.summary.month"
2221 _description = "Hours summary by month"
2222 _auto = False
2223@@ -601,5 +599,4 @@
2224 ')')
2225
2226
2227-account_analytic_account_summary_month()
2228 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2229
2230=== modified file 'account_analytic_analysis/cron_account_analytic_account.py'
2231--- account_analytic_analysis/cron_account_analytic_account.py 2012-12-17 14:43:06 +0000
2232+++ account_analytic_analysis/cron_account_analytic_account.py 2012-12-20 15:08:18 +0000
2233@@ -7,7 +7,7 @@
2234 import StringIO
2235
2236 from openerp import tools
2237-from openerp.osv import osv
2238+from openerp.osv import osv, orm
2239
2240 MAKO_TEMPLATE = u"""Hello ${user.name},
2241
2242@@ -45,7 +45,7 @@
2243 OpenERP
2244 """
2245
2246-class analytic_account(osv.osv):
2247+class analytic_account(orm.Model):
2248 _inherit = 'account.analytic.account'
2249
2250 def cron_account_analytic_account(self, cr, uid, context=None):
2251@@ -74,6 +74,5 @@
2252
2253 return True
2254
2255-analytic_account()
2256
2257 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2258
2259=== modified file 'account_analytic_analysis/res_config.py'
2260--- account_analytic_analysis/res_config.py 2012-12-06 14:56:32 +0000
2261+++ account_analytic_analysis/res_config.py 2012-12-20 15:08:18 +0000
2262@@ -19,9 +19,9 @@
2263 #
2264 ##############################################################################
2265
2266-from openerp.osv import fields, osv
2267+from openerp.osv import fields, osv, orm
2268
2269-class sale_configuration(osv.osv_memory):
2270+class sale_configuration(orm.TransientModel):
2271 _inherit = 'sale.config.settings'
2272
2273 _columns = {
2274
2275=== modified file 'account_analytic_default/account_analytic_default.py'
2276--- account_analytic_default/account_analytic_default.py 2012-12-06 14:56:32 +0000
2277+++ account_analytic_default/account_analytic_default.py 2012-12-20 15:08:18 +0000
2278@@ -21,9 +21,9 @@
2279
2280 import time
2281
2282-from openerp.osv import fields, osv
2283+from openerp.osv import fields, osv, orm
2284
2285-class account_analytic_default(osv.osv):
2286+class account_analytic_default(orm.Model):
2287 _name = "account.analytic.default"
2288 _description = "Analytic Distribution"
2289 _rec_name = "analytic_id"
2290@@ -67,9 +67,8 @@
2291 best_index = index
2292 return res
2293
2294-account_analytic_default()
2295
2296-class account_invoice_line(osv.osv):
2297+class account_invoice_line(orm.Model):
2298 _inherit = "account.invoice.line"
2299 _description = "Invoice Line"
2300
2301@@ -82,10 +81,9 @@
2302 res_prod['value'].update({'account_analytic_id': False})
2303 return res_prod
2304
2305-account_invoice_line()
2306-
2307-
2308-class stock_picking(osv.osv):
2309+
2310+
2311+class stock_picking(orm.Model):
2312 _inherit = "stock.picking"
2313
2314 def _get_account_analytic_invoice(self, cursor, user, picking, move_line):
2315@@ -97,9 +95,8 @@
2316
2317 return super(stock_picking, self)._get_account_analytic_invoice(cursor, user, picking, move_line)
2318
2319-stock_picking()
2320
2321-class sale_order_line(osv.osv):
2322+class sale_order_line(orm.Model):
2323 _inherit = "sale.order.line"
2324
2325 # Method overridden to set the analytic account by default on criterion match
2326@@ -118,6 +115,5 @@
2327 inv_line_obj.write(cr, uid, [line.id], {'account_analytic_id': rec.analytic_id.id}, context=context)
2328 return create_ids
2329
2330-sale_order_line()
2331
2332 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2333
2334=== modified file 'account_analytic_plans/account_analytic_plans.py'
2335--- account_analytic_plans/account_analytic_plans.py 2012-12-06 14:56:32 +0000
2336+++ account_analytic_plans/account_analytic_plans.py 2012-12-20 15:08:18 +0000
2337@@ -22,7 +22,7 @@
2338 import time
2339 from lxml import etree
2340
2341-from openerp.osv import fields, osv
2342+from openerp.osv import fields, osv, orm
2343 from openerp import tools
2344 from openerp.tools.translate import _
2345
2346@@ -47,7 +47,7 @@
2347 res[r[self._fields_id]].append( r['id'] )
2348 return res
2349
2350-class account_analytic_line(osv.osv):
2351+class account_analytic_line(orm.Model):
2352 _inherit = 'account.analytic.line'
2353 _description = 'Analytic Line'
2354
2355@@ -65,9 +65,8 @@
2356 'percentage': fields.float('Percentage')
2357 }
2358
2359-account_analytic_line()
2360
2361-class account_analytic_plan(osv.osv):
2362+class account_analytic_plan(orm.Model):
2363 _name = "account.analytic.plan"
2364 _description = "Analytic Plan"
2365 _columns = {
2366@@ -75,9 +74,8 @@
2367 'plan_ids': fields.one2many('account.analytic.plan.line', 'plan_id', 'Analytic Plans'),
2368 }
2369
2370-account_analytic_plan()
2371
2372-class account_analytic_plan_line(osv.osv):
2373+class account_analytic_plan_line(orm.Model):
2374 _name = "account.analytic.plan.line"
2375 _description = "Analytic Plan Line"
2376 _order = "sequence, id"
2377@@ -94,9 +92,8 @@
2378 'max_required': 100.0,
2379 }
2380
2381-account_analytic_plan_line()
2382
2383-class account_analytic_plan_instance(osv.osv):
2384+class account_analytic_plan_instance(orm.Model):
2385 _name = "account.analytic.plan.instance"
2386 _description = "Analytic Plan Instance"
2387 _columns = {
2388@@ -257,9 +254,8 @@
2389 vals['code'] = this.code and (str(this.code)+'*') or "*"
2390 return super(account_analytic_plan_instance, self).write(cr, uid, ids, vals, context=context)
2391
2392-account_analytic_plan_instance()
2393
2394-class account_analytic_plan_instance_line(osv.osv):
2395+class account_analytic_plan_instance_line(orm.Model):
2396 _name = "account.analytic.plan.instance.line"
2397 _description = "Analytic Instance Line"
2398 _rec_name = "analytic_account_id"
2399@@ -280,18 +276,16 @@
2400 res.append((record['id'], record['analytic_account_id']))
2401 return res
2402
2403-account_analytic_plan_instance_line()
2404
2405-class account_journal(osv.osv):
2406+class account_journal(orm.Model):
2407 _inherit = "account.journal"
2408 _name = "account.journal"
2409 _columns = {
2410 'plan_id': fields.many2one('account.analytic.plan', 'Analytic Plans'),
2411 }
2412
2413-account_journal()
2414
2415-class account_invoice_line(osv.osv):
2416+class account_invoice_line(orm.Model):
2417 _inherit = "account.invoice.line"
2418 _name = "account.invoice.line"
2419 _columns = {
2420@@ -315,9 +309,8 @@
2421 res_prod['value'].update({'analytics_id': rec.analytics_id.id})
2422 return res_prod
2423
2424-account_invoice_line()
2425
2426-class account_move_line(osv.osv):
2427+class account_move_line(orm.Model):
2428
2429 _inherit = "account.move.line"
2430 _name = "account.move.line"
2431@@ -370,9 +363,8 @@
2432 result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
2433 return result
2434
2435-account_move_line()
2436
2437-class account_invoice(osv.osv):
2438+class account_invoice(orm.Model):
2439 _name = "account.invoice"
2440 _inherit = "account.invoice"
2441
2442@@ -425,24 +417,21 @@
2443 il['analytic_lines'].append((0, 0, al_vals))
2444 return iml
2445
2446-account_invoice()
2447
2448-class account_analytic_plan(osv.osv):
2449+class account_analytic_plan(orm.Model):
2450 _inherit = "account.analytic.plan"
2451 _columns = {
2452 'default_instance_id': fields.many2one('account.analytic.plan.instance', 'Default Entries'),
2453 }
2454-account_analytic_plan()
2455
2456-class analytic_default(osv.osv):
2457+class analytic_default(orm.Model):
2458 _inherit = "account.analytic.default"
2459 _columns = {
2460 'analytics_id': fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'),
2461 }
2462
2463-analytic_default()
2464
2465-class sale_order_line(osv.osv):
2466+class sale_order_line(orm.Model):
2467 _inherit = "sale.order.line"
2468
2469 # Method overridden to set the analytic account by default on criterion match
2470@@ -459,10 +448,9 @@
2471 inv_line_obj.write(cr, uid, [line.id], {'analytics_id': rec.analytics_id.id}, context=context)
2472 return create_ids
2473
2474-sale_order_line()
2475-
2476-
2477-class account_bank_statement(osv.osv):
2478+
2479+
2480+class account_bank_statement(orm.Model):
2481 _inherit = "account.bank.statement"
2482 _name = "account.bank.statement"
2483
2484@@ -488,15 +476,13 @@
2485 continue
2486 return True
2487
2488-account_bank_statement()
2489-
2490-
2491-class account_bank_statement_line(osv.osv):
2492+
2493+
2494+class account_bank_statement_line(orm.Model):
2495 _inherit = "account.bank.statement.line"
2496 _name = "account.bank.statement.line"
2497 _columns = {
2498 'analytics_id': fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'),
2499 }
2500-account_bank_statement_line()
2501
2502 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2503
2504=== modified file 'account_analytic_plans/wizard/account_crossovered_analytic.py'
2505--- account_analytic_plans/wizard/account_crossovered_analytic.py 2012-12-06 14:56:32 +0000
2506+++ account_analytic_plans/wizard/account_crossovered_analytic.py 2012-12-20 15:08:18 +0000
2507@@ -21,10 +21,10 @@
2508
2509 import time
2510
2511-from openerp.osv import fields, osv
2512+from openerp.osv import fields, osv, orm
2513 from openerp.tools.translate import _
2514
2515-class account_crossovered_analytic(osv.osv_memory):
2516+class account_crossovered_analytic(orm.TransientModel):
2517 _name = "account.crossovered.analytic"
2518 _description = "Print Crossovered Analytic"
2519 _columns = {
2520@@ -71,6 +71,5 @@
2521 'datas': datas,
2522 }
2523
2524-account_crossovered_analytic()
2525
2526 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2527
2528=== modified file 'account_analytic_plans/wizard/analytic_plan_create_model.py'
2529--- account_analytic_plans/wizard/analytic_plan_create_model.py 2012-12-06 14:56:32 +0000
2530+++ account_analytic_plans/wizard/analytic_plan_create_model.py 2012-12-20 15:08:18 +0000
2531@@ -19,10 +19,10 @@
2532 #
2533 ##############################################################################
2534
2535-from openerp.osv import osv
2536+from openerp.osv import osv, orm
2537 from openerp.tools.translate import _
2538
2539-class analytic_plan_create_model(osv.osv_memory):
2540+class analytic_plan_create_model(orm.TransientModel):
2541 _name = "analytic.plan.create.model"
2542 _description = "analytic.plan.create.model"
2543
2544@@ -55,6 +55,5 @@
2545 else:
2546 return {'type': 'ir.actions.act_window_close'}
2547
2548-analytic_plan_create_model()
2549
2550 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2551
2552=== modified file 'account_anglo_saxon/invoice.py'
2553--- account_anglo_saxon/invoice.py 2012-12-19 01:04:29 +0000
2554+++ account_anglo_saxon/invoice.py 2012-12-20 15:08:18 +0000
2555@@ -21,9 +21,9 @@
2556 #
2557 ##############################################################################
2558
2559-from openerp.osv import osv
2560+from openerp.osv import osv, orm
2561
2562-class account_invoice_line(osv.osv):
2563+class account_invoice_line(orm.Model):
2564 _inherit = "account.invoice.line"
2565
2566 def move_line_get(self, cr, uid, invoice_id, context=None):
2567@@ -157,7 +157,7 @@
2568 res['value'].update({'account_id':a})
2569 return res
2570
2571-class account_invoice(osv.osv):
2572+class account_invoice(orm.Model):
2573 _inherit = "account.invoice"
2574
2575 def _prepare_refund(self, cr, uid, invoice, date=None, period_id=None, description=None, journal_id=None, context=None):
2576
2577=== modified file 'account_anglo_saxon/product.py'
2578--- account_anglo_saxon/product.py 2012-12-06 14:56:32 +0000
2579+++ account_anglo_saxon/product.py 2012-12-20 15:08:18 +0000
2580@@ -18,9 +18,9 @@
2581 #
2582 ##############################################################################
2583
2584-from openerp.osv import fields, osv
2585+from openerp.osv import fields, osv, orm
2586
2587-class product_category(osv.osv):
2588+class product_category(orm.Model):
2589 _inherit = "product.category"
2590 _columns = {
2591 'property_account_creditor_price_difference_categ': fields.property(
2592@@ -48,9 +48,8 @@
2593 help="This account will be used to value outgoing stock using cost price."),
2594
2595 }
2596-product_category()
2597
2598-class product_template(osv.osv):
2599+class product_template(orm.Model):
2600 _inherit = "product.template"
2601 _columns = {
2602 'property_account_creditor_price_difference': fields.property(
2603@@ -78,7 +77,6 @@
2604 help="This account will be used to value outgoing stock using cost price."),
2605
2606 }
2607-product_template()
2608
2609
2610 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2611
2612=== modified file 'account_anglo_saxon/purchase.py'
2613--- account_anglo_saxon/purchase.py 2012-12-06 14:56:32 +0000
2614+++ account_anglo_saxon/purchase.py 2012-12-20 15:08:18 +0000
2615@@ -19,9 +19,9 @@
2616 #
2617 ##############################################################################
2618
2619-from openerp.osv import fields, osv
2620+from openerp.osv import fields, osv, orm
2621
2622-class purchase_order(osv.osv):
2623+class purchase_order(orm.Model):
2624 _name = "purchase.order"
2625 _inherit = "purchase.order"
2626 _description = "Purchase Order"
2627@@ -37,6 +37,5 @@
2628 new_account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, acc_id)
2629 line.update({'account_id': new_account_id})
2630 return line
2631-purchase_order()
2632
2633 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2634
2635=== modified file 'account_anglo_saxon/stock.py'
2636--- account_anglo_saxon/stock.py 2012-12-18 22:50:15 +0000
2637+++ account_anglo_saxon/stock.py 2012-12-20 15:08:18 +0000
2638@@ -19,12 +19,12 @@
2639 #
2640 ##############################################################################
2641
2642-from openerp.osv import osv
2643+from openerp.osv import osv, orm
2644
2645 #----------------------------------------------------------
2646 # Stock Picking
2647 #----------------------------------------------------------
2648-class stock_picking(osv.osv):
2649+class stock_picking(orm.Model):
2650 _inherit = "stock.picking"
2651 _description = "Picking List"
2652
2653@@ -57,7 +57,6 @@
2654 self.pool.get('account.invoice.line').write(cr, uid, [ol.id], {'account_id': a})
2655 return res
2656
2657-stock_picking()
2658
2659
2660 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2661
2662=== modified file 'account_asset/account_asset.py'
2663--- account_asset/account_asset.py 2012-12-17 15:23:03 +0000
2664+++ account_asset/account_asset.py 2012-12-20 15:08:18 +0000
2665@@ -23,10 +23,10 @@
2666 from datetime import datetime
2667 from dateutil.relativedelta import relativedelta
2668
2669-from openerp.osv import fields, osv
2670+from openerp.osv import fields, osv, orm
2671 import openerp.addons.decimal_precision as dp
2672
2673-class account_asset_category(osv.osv):
2674+class account_asset_category(orm.Model):
2675 _name = 'account.asset.category'
2676 _description = 'Asset category'
2677
2678@@ -69,9 +69,8 @@
2679 res['value'] = {'account_depreciation_id': account_asset_id}
2680 return res
2681
2682-account_asset_category()
2683
2684-class account_asset_asset(osv.osv):
2685+class account_asset_asset(orm.Model):
2686 _name = 'account.asset.asset'
2687 _description = 'Asset'
2688
2689@@ -351,9 +350,8 @@
2690 'context': context,
2691 }
2692
2693-account_asset_asset()
2694
2695-class account_asset_depreciation_line(osv.osv):
2696+class account_asset_depreciation_line(orm.Model):
2697 _name = 'account.asset.depreciation.line'
2698 _description = 'Asset depreciation line'
2699
2700@@ -446,18 +444,16 @@
2701 asset.write({'state': 'close'})
2702 return created_move_ids
2703
2704-account_asset_depreciation_line()
2705
2706-class account_move_line(osv.osv):
2707+class account_move_line(orm.Model):
2708 _inherit = 'account.move.line'
2709 _columns = {
2710 'asset_id': fields.many2one('account.asset.asset', 'Asset'),
2711 'entry_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),
2712
2713 }
2714-account_move_line()
2715
2716-class account_asset_history(osv.osv):
2717+class account_asset_history(orm.Model):
2718 _name = 'account.asset.history'
2719 _description = 'Asset history'
2720 _columns = {
2721@@ -480,6 +476,5 @@
2722 'user_id': lambda self, cr, uid, ctx: uid
2723 }
2724
2725-account_asset_history()
2726
2727 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2728
2729=== modified file 'account_asset/account_asset_invoice.py'
2730--- account_asset/account_asset_invoice.py 2012-12-06 14:56:32 +0000
2731+++ account_asset/account_asset_invoice.py 2012-12-20 15:08:18 +0000
2732@@ -19,9 +19,9 @@
2733 #
2734 ##############################################################################
2735
2736-from openerp.osv import fields, osv
2737+from openerp.osv import fields, osv, orm
2738
2739-class account_invoice(osv.osv):
2740+class account_invoice(orm.Model):
2741
2742 _inherit = 'account.invoice'
2743 def action_number(self, cr, uid, ids, *args):
2744@@ -35,9 +35,8 @@
2745 res['asset_id'] = x.get('asset_id', False)
2746 return res
2747
2748-account_invoice()
2749
2750-class account_invoice_line(osv.osv):
2751+class account_invoice_line(orm.Model):
2752
2753 _inherit = 'account.invoice.line'
2754 _columns = {
2755@@ -66,6 +65,5 @@
2756 asset_obj.validate(cr, uid, [asset_id], context=context)
2757 return True
2758
2759-account_invoice_line()
2760
2761 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2762
2763=== modified file 'account_asset/report/account_asset_report.py'
2764--- account_asset/report/account_asset_report.py 2012-12-06 14:56:32 +0000
2765+++ account_asset/report/account_asset_report.py 2012-12-20 15:08:18 +0000
2766@@ -20,9 +20,9 @@
2767 ##############################################################################
2768
2769 from openerp import tools
2770-from openerp.osv import fields, osv
2771+from openerp.osv import fields, osv, orm
2772
2773-class asset_asset_report(osv.osv):
2774+class asset_asset_report(orm.Model):
2775 _name = "asset.asset.report"
2776 _description = "Assets Analysis"
2777 _auto = False
2778@@ -82,6 +82,5 @@
2779 a.purchase_value, a.id, a.salvage_value
2780 )""")
2781
2782-asset_asset_report()
2783
2784 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2785
2786=== modified file 'account_asset/wizard/account_asset_change_duration.py' (properties changed: +x to -x)
2787--- account_asset/wizard/account_asset_change_duration.py 2012-12-06 14:56:32 +0000
2788+++ account_asset/wizard/account_asset_change_duration.py 2012-12-20 15:08:18 +0000
2789@@ -21,9 +21,9 @@
2790 import time
2791 from lxml import etree
2792
2793-from openerp.osv import fields, osv
2794+from openerp.osv import fields, osv, orm
2795
2796-class asset_modify(osv.osv_memory):
2797+class asset_modify(orm.TransientModel):
2798 _name = 'asset.modify'
2799 _description = 'Modify Asset'
2800
2801@@ -127,6 +127,5 @@
2802 asset_obj.compute_depreciation_board(cr, uid, [asset_id], context=context)
2803 return {'type': 'ir.actions.act_window_close'}
2804
2805-asset_modify()
2806
2807 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2808
2809=== modified file 'account_asset/wizard/wizard_asset_compute.py' (properties changed: +x to -x)
2810--- account_asset/wizard/wizard_asset_compute.py 2012-12-06 14:56:32 +0000
2811+++ account_asset/wizard/wizard_asset_compute.py 2012-12-20 15:08:18 +0000
2812@@ -19,10 +19,10 @@
2813 #
2814 ##############################################################################
2815
2816-from openerp.osv import fields, osv
2817+from openerp.osv import fields, osv, orm
2818 from openerp.tools.translate import _
2819
2820-class asset_depreciation_confirmation_wizard(osv.osv_memory):
2821+class asset_depreciation_confirmation_wizard(orm.TransientModel):
2822 _name = "asset.depreciation.confirmation.wizard"
2823 _description = "asset.depreciation.confirmation.wizard"
2824 _columns = {
2825@@ -55,6 +55,5 @@
2826 'type': 'ir.actions.act_window',
2827 }
2828
2829-asset_depreciation_confirmation_wizard()
2830
2831 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2832
2833=== modified file 'account_bank_statement_extensions/account_bank_statement.py'
2834--- account_bank_statement_extensions/account_bank_statement.py 2012-12-17 15:23:03 +0000
2835+++ account_bank_statement_extensions/account_bank_statement.py 2012-12-20 15:08:18 +0000
2836@@ -21,11 +21,11 @@
2837 ##############################################################################
2838
2839 import time
2840-from openerp.osv import fields, osv
2841+from openerp.osv import fields, osv, orm
2842 import openerp.addons.decimal_precision as dp
2843 from openerp.tools.translate import _
2844
2845-class account_bank_statement(osv.osv):
2846+class account_bank_statement(orm.Model):
2847 _inherit = 'account.bank.statement'
2848
2849 def write(self, cr, uid, ids, vals, context=None):
2850@@ -33,7 +33,7 @@
2851 context = {}
2852 # bypass obsolete statement line resequencing
2853 if vals.get('line_ids', False) or context.get('ebanking_import', False):
2854- res = super(osv.osv, self).write(cr, uid, ids, vals, context=context)
2855+ res = super(orm.Model, self).write(cr, uid, ids, vals, context=context)
2856 else:
2857 res = super(account_bank_statement, self).write(cr, uid, ids, vals, context=context)
2858 return res
2859@@ -56,9 +56,8 @@
2860 (tuple([x.id for x in st.line_ids]),))
2861 return True
2862
2863-account_bank_statement()
2864
2865-class account_bank_statement_line_global(osv.osv):
2866+class account_bank_statement_line_global(orm.Model):
2867 _name = 'account.bank.statement.line.global'
2868 _description = 'Batch Payment Info'
2869
2870@@ -100,9 +99,8 @@
2871 ids = self.search(cr, user, args, context=context, limit=limit)
2872 return self.name_get(cr, user, ids, context=context)
2873
2874-account_bank_statement_line_global()
2875
2876-class account_bank_statement_line(osv.osv):
2877+class account_bank_statement_line(orm.Model):
2878 _inherit = 'account.bank.statement.line'
2879 _columns = {
2880 'val_date': fields.date('Value Date', states={'confirm': [('readonly', True)]}),
2881@@ -130,6 +128,5 @@
2882 Please go to the associated bank statement in order to delete and/or modify bank statement line.'))
2883 return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
2884
2885-account_bank_statement_line()
2886
2887 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2888
2889=== modified file 'account_bank_statement_extensions/res_partner_bank.py'
2890--- account_bank_statement_extensions/res_partner_bank.py 2012-12-06 14:56:32 +0000
2891+++ account_bank_statement_extensions/res_partner_bank.py 2012-12-20 15:08:18 +0000
2892@@ -20,9 +20,9 @@
2893 #
2894 ##############################################################################
2895
2896-from openerp.osv import osv
2897+from openerp.osv import osv, orm
2898
2899-class res_partner_bank(osv.osv):
2900+class res_partner_bank(orm.Model):
2901 _inherit = 'res.partner.bank'
2902
2903 def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
2904@@ -35,5 +35,4 @@
2905 ids = self.search(cr, user, args, context=context, limit=limit)
2906 return self.name_get(cr, user, ids, context=context)
2907
2908-res_partner_bank()
2909 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2910
2911=== modified file 'account_bank_statement_extensions/wizard/cancel_statement_line.py'
2912--- account_bank_statement_extensions/wizard/cancel_statement_line.py 2012-12-06 14:56:32 +0000
2913+++ account_bank_statement_extensions/wizard/cancel_statement_line.py 2012-12-20 15:08:18 +0000
2914@@ -20,9 +20,9 @@
2915 #
2916 ##############################################################################
2917
2918-from openerp.osv import osv
2919+from openerp.osv import osv, orm
2920
2921-class cancel_statement_line(osv.osv_memory):
2922+class cancel_statement_line(orm.TransientModel):
2923 _name = 'cancel.statement.line'
2924 _description = 'Cancel selected statement lines'
2925
2926@@ -32,6 +32,5 @@
2927 line_obj.write(cr, uid, line_ids, {'state': 'draft'}, context=context)
2928 return {}
2929
2930-cancel_statement_line()
2931
2932 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2933
2934=== modified file 'account_bank_statement_extensions/wizard/confirm_statement_line.py'
2935--- account_bank_statement_extensions/wizard/confirm_statement_line.py 2012-12-06 14:56:32 +0000
2936+++ account_bank_statement_extensions/wizard/confirm_statement_line.py 2012-12-20 15:08:18 +0000
2937@@ -20,9 +20,9 @@
2938 #
2939 ##############################################################################
2940
2941-from openerp.osv import osv
2942+from openerp.osv import osv, orm
2943
2944-class confirm_statement_line(osv.osv_memory):
2945+class confirm_statement_line(orm.TransientModel):
2946 _name = 'confirm.statement.line'
2947 _description = 'Confirm selected statement lines'
2948
2949@@ -32,6 +32,5 @@
2950 line_obj.write(cr, uid, line_ids, {'state': 'confirm'}, context=context)
2951 return {}
2952
2953-confirm_statement_line()
2954
2955 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2956
2957=== modified file 'account_budget/account_budget.py'
2958--- account_budget/account_budget.py 2012-12-17 15:23:03 +0000
2959+++ account_budget/account_budget.py 2012-12-20 15:08:18 +0000
2960@@ -21,7 +21,7 @@
2961
2962 import datetime
2963
2964-from openerp.osv import fields, osv
2965+from openerp.osv import fields, osv, orm
2966 from openerp.tools.translate import _
2967
2968 import openerp.addons.decimal_precision as dp
2969@@ -33,7 +33,7 @@
2970 # ---------------------------------------------------------
2971 # Budgets
2972 # ---------------------------------------------------------
2973-class account_budget_post(osv.osv):
2974+class account_budget_post(orm.Model):
2975 _name = "account.budget.post"
2976 _description = "Budgetary Position"
2977 _columns = {
2978@@ -48,10 +48,9 @@
2979 }
2980 _order = "name"
2981
2982-account_budget_post()
2983-
2984-
2985-class crossovered_budget(osv.osv):
2986+
2987+
2988+class crossovered_budget(orm.Model):
2989 _name = "crossovered.budget"
2990 _description = "Budget"
2991
2992@@ -104,9 +103,8 @@
2993 })
2994 return True
2995
2996-crossovered_budget()
2997
2998-class crossovered_budget_lines(osv.osv):
2999+class crossovered_budget_lines(orm.Model):
3000
3001 def _prac_amt(self, cr, uid, ids, context=None):
3002 res = {}
3003@@ -202,15 +200,13 @@
3004 'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
3005 }
3006
3007-crossovered_budget_lines()
3008
3009-class account_analytic_account(osv.osv):
3010+class account_analytic_account(orm.Model):
3011 _inherit = "account.analytic.account"
3012
3013 _columns = {
3014 'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'analytic_account_id', 'Budget Lines'),
3015 }
3016
3017-account_analytic_account()
3018
3019 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3020
3021=== modified file 'account_budget/report/crossovered_budget_report.py'
3022--- account_budget/report/crossovered_budget_report.py 2012-12-06 15:13:16 +0000
3023+++ account_budget/report/crossovered_budget_report.py 2012-12-20 15:08:18 +0000
3024@@ -20,12 +20,8 @@
3025 ##############################################################################
3026
3027 import time
3028-import datetime
3029
3030-from openerp import pooler
3031 from openerp.report import report_sxw
3032-import operator
3033-from openerp import osv
3034
3035 class budget_report(report_sxw.rml_parse):
3036 def __init__(self, cr, uid, name, context):
3037
3038=== modified file 'account_budget/wizard/account_budget_analytic.py'
3039--- account_budget/wizard/account_budget_analytic.py 2012-12-06 14:56:32 +0000
3040+++ account_budget/wizard/account_budget_analytic.py 2012-12-20 15:08:18 +0000
3041@@ -20,9 +20,9 @@
3042 ##############################################################################
3043 import time
3044
3045-from openerp.osv import fields, osv
3046+from openerp.osv import fields, osv, orm
3047
3048-class account_budget_analytic(osv.osv_memory):
3049+class account_budget_analytic(orm.TransientModel):
3050
3051 _name = 'account.budget.analytic'
3052 _description = 'Account Budget report for analytic account'
3053@@ -50,6 +50,5 @@
3054 'datas': datas,
3055 }
3056
3057-account_budget_analytic()
3058
3059 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3060
3061=== modified file 'account_budget/wizard/account_budget_crossovered_report.py'
3062--- account_budget/wizard/account_budget_crossovered_report.py 2012-12-06 14:56:32 +0000
3063+++ account_budget/wizard/account_budget_crossovered_report.py 2012-12-20 15:08:18 +0000
3064@@ -20,9 +20,9 @@
3065 ##############################################################################
3066 import time
3067
3068-from openerp.osv import fields, osv
3069+from openerp.osv import fields, osv, orm
3070
3071-class account_budget_crossvered_report(osv.osv_memory):
3072+class account_budget_crossvered_report(orm.TransientModel):
3073
3074 _name = "account.budget.crossvered.report"
3075 _description = "Account Budget crossvered report"
3076@@ -51,6 +51,5 @@
3077 'datas': datas,
3078 }
3079
3080-account_budget_crossvered_report()
3081
3082 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3083
3084=== modified file 'account_budget/wizard/account_budget_crossovered_summary_report.py'
3085--- account_budget/wizard/account_budget_crossovered_summary_report.py 2012-12-06 14:56:32 +0000
3086+++ account_budget/wizard/account_budget_crossovered_summary_report.py 2012-12-20 15:08:18 +0000
3087@@ -20,9 +20,9 @@
3088 ##############################################################################
3089 import time
3090
3091-from openerp.osv import fields, osv
3092+from openerp.osv import fields, osv, orm
3093
3094-class account_budget_crossvered_summary_report(osv.osv_memory):
3095+class account_budget_crossvered_summary_report(orm.TransientModel):
3096 """
3097 This wizard provides the crossovered budget summary report'
3098 """
3099@@ -53,7 +53,6 @@
3100 'datas': datas,
3101 }
3102
3103-account_budget_crossvered_summary_report()
3104
3105 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3106
3107
3108=== modified file 'account_budget/wizard/account_budget_report.py'
3109--- account_budget/wizard/account_budget_report.py 2012-12-06 14:56:32 +0000
3110+++ account_budget/wizard/account_budget_report.py 2012-12-20 15:08:18 +0000
3111@@ -20,10 +20,10 @@
3112 ##############################################################################
3113 import time
3114
3115-from openerp.osv import fields, osv
3116-
3117-
3118-class account_budget_report(osv.osv_memory):
3119+from openerp.osv import fields, osv, orm
3120+
3121+
3122+class account_budget_report(orm.TransientModel):
3123
3124 _name = "account.budget.report"
3125 _description = "Account Budget report for analytic account"
3126@@ -52,6 +52,5 @@
3127 'datas': datas,
3128 }
3129
3130-account_budget_report()
3131
3132 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3133
3134=== modified file 'account_check_writing/account.py'
3135--- account_check_writing/account.py 2012-12-06 14:56:32 +0000
3136+++ account_check_writing/account.py 2012-12-20 15:08:18 +0000
3137@@ -19,9 +19,9 @@
3138 #
3139 ##############################################################################
3140
3141-from openerp.osv import osv,fields
3142+from openerp.osv import osv,fields, orm
3143
3144-class account_journal(osv.osv):
3145+class account_journal(orm.Model):
3146 _inherit = "account.journal"
3147
3148 _columns = {
3149@@ -29,9 +29,8 @@
3150 'use_preprint_check': fields.boolean('Use Preprinted Check'),
3151 }
3152
3153-account_journal()
3154
3155-class res_company(osv.osv):
3156+class res_company(orm.Model):
3157 _inherit = "res.company"
3158 _columns = {
3159 'check_layout': fields.selection([
3160@@ -46,5 +45,4 @@
3161 'check_layout' : lambda *a: 'top',
3162 }
3163
3164-res_company()
3165 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3166
3167=== modified file 'account_check_writing/account_voucher.py'
3168--- account_check_writing/account_voucher.py 2012-12-17 15:46:28 +0000
3169+++ account_check_writing/account_voucher.py 2012-12-20 15:08:18 +0000
3170@@ -19,12 +19,12 @@
3171 #
3172 ##############################################################################
3173
3174-from openerp.osv import osv,fields
3175+from openerp.osv import osv,fields, orm
3176 from openerp.tools.translate import _
3177 from openerp.tools.amount_to_text_en import amount_to_text
3178 from lxml import etree
3179
3180-class account_voucher(osv.osv):
3181+class account_voucher(orm.Model):
3182 _inherit = 'account.voucher'
3183
3184 def _make_journal_search(self, cr, uid, ttype, context=None):
3185@@ -97,4 +97,3 @@
3186 res['arch'] = etree.tostring(doc)
3187 return res
3188
3189-account_voucher()
3190
3191=== modified file 'account_check_writing/wizard/account_check_batch_printing.py'
3192--- account_check_writing/wizard/account_check_batch_printing.py 2012-12-17 15:46:28 +0000
3193+++ account_check_writing/wizard/account_check_batch_printing.py 2012-12-20 15:08:18 +0000
3194@@ -21,9 +21,9 @@
3195
3196 from openerp.tools.translate import _
3197
3198-from openerp.osv import fields, osv
3199+from openerp.osv import fields, osv, orm
3200
3201-class account_check_write(osv.osv_memory):
3202+class account_check_write(orm.TransientModel):
3203 _name = 'account.check.write'
3204 _description = 'Prin Check in Batch'
3205
3206@@ -83,5 +83,4 @@
3207 'nodestroy': True
3208 }
3209
3210-account_check_write()
3211
3212
3213=== modified file 'account_followup/account_followup.py'
3214--- account_followup/account_followup.py 2012-12-17 14:43:06 +0000
3215+++ account_followup/account_followup.py 2012-12-20 15:08:18 +0000
3216@@ -19,12 +19,12 @@
3217 #
3218 ##############################################################################
3219
3220-from openerp.osv import fields, osv
3221+from openerp.osv import fields, osv, orm
3222 from lxml import etree
3223
3224 from openerp.tools.translate import _
3225
3226-class followup(osv.osv):
3227+class followup(orm.Model):
3228 _name = 'account_followup.followup'
3229 _description = 'Account Follow-up'
3230 _rec_name = 'name'
3231@@ -39,7 +39,7 @@
3232 _sql_constraints = [('company_uniq', 'unique(company_id)', 'Only one follow-up per company is allowed')]
3233
3234
3235-class followup_line(osv.osv):
3236+class followup_line(orm.Model):
3237
3238 def _get_default_template(self, cr, uid, ids, context=None):
3239 try:
3240@@ -95,7 +95,7 @@
3241 ]
3242
3243
3244-class account_move_line(osv.osv):
3245+class account_move_line(orm.Model):
3246
3247 def _get_result(self, cr, uid, ids, name, arg, context=None):
3248 res = {}
3249@@ -113,7 +113,7 @@
3250 }
3251
3252
3253-class res_partner(osv.osv):
3254+class res_partner(orm.Model):
3255
3256 def fields_view_get(self, cr, uid, view_id=None, view_type=None, context=None, toolbar=False, submenu=False):
3257 res = super(res_partner, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context,
3258
3259=== modified file 'account_followup/report/account_followup_report.py'
3260--- account_followup/report/account_followup_report.py 2012-12-06 14:56:32 +0000
3261+++ account_followup/report/account_followup_report.py 2012-12-20 15:08:18 +0000
3262@@ -19,10 +19,10 @@
3263 #
3264 ##############################################################################
3265
3266-from openerp.osv import fields, osv
3267+from openerp.osv import fields, osv, orm
3268 from openerp import tools
3269
3270-class account_followup_stat(osv.osv):
3271+class account_followup_stat(orm.Model):
3272 _name = "account_followup.stat"
3273 _description = "Follow-up Statistics"
3274 _rec_name = 'partner_id'
3275@@ -91,6 +91,5 @@
3276 GROUP BY
3277 l.id, l.partner_id, l.company_id, l.blocked, l.period_id
3278 )""")
3279-account_followup_stat()
3280
3281 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3282
3283=== modified file 'account_followup/wizard/account_followup_print.py'
3284--- account_followup/wizard/account_followup_print.py 2012-12-10 11:16:54 +0000
3285+++ account_followup/wizard/account_followup_print.py 2012-12-20 15:08:18 +0000
3286@@ -23,10 +23,10 @@
3287 import time
3288
3289 from openerp import tools
3290-from openerp.osv import fields, osv
3291+from openerp.osv import fields, osv, orm
3292 from openerp.tools.translate import _
3293
3294-class account_followup_stat_by_partner(osv.osv):
3295+class account_followup_stat_by_partner(orm.Model):
3296 _name = "account_followup.stat.by.partner"
3297 _description = "Follow-up Statistics by Partner"
3298 _rec_name = 'partner_id'
3299@@ -72,10 +72,9 @@
3300 GROUP BY
3301 l.partner_id, l.company_id
3302 )""") #Blocked is to take into account litigation
3303-account_followup_stat_by_partner()
3304-
3305-
3306-class account_followup_sending_results(osv.osv_memory):
3307+
3308+
3309+class account_followup_sending_results(orm.TransientModel):
3310
3311 def do_report(self, cr, uid, ids, context=None):
3312 if context is None:
3313@@ -106,10 +105,9 @@
3314 'description':_get_description,
3315 }
3316
3317-account_followup_sending_results()
3318-
3319-
3320-class account_followup_print(osv.osv_memory):
3321+
3322+
3323+class account_followup_print(orm.TransientModel):
3324 _name = 'account_followup.print'
3325 _description = 'Print Follow-up & Send Mail to Customers'
3326 _columns = {
3327@@ -315,6 +313,5 @@
3328 to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id}
3329 return {'partner_ids': partner_list, 'to_update': to_update}
3330
3331-account_followup_print()
3332
3333 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3334
3335=== modified file 'account_payment/account_invoice.py'
3336--- account_payment/account_invoice.py 2012-12-06 14:56:32 +0000
3337+++ account_payment/account_invoice.py 2012-12-20 15:08:18 +0000
3338@@ -21,9 +21,9 @@
3339
3340 from datetime import datetime
3341 from openerp.tools.translate import _
3342-from openerp.osv import fields, osv
3343+from openerp.osv import fields, osv, orm
3344
3345-class Invoice(osv.osv):
3346+class Invoice(orm.Model):
3347 _inherit = 'account.invoice'
3348
3349 # Forbid to cancel an invoice if the related move lines have already been
3350@@ -65,6 +65,5 @@
3351 'minus the amount which is already in payment order'),
3352 }
3353
3354-Invoice()
3355
3356 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3357
3358=== modified file 'account_payment/account_move_line.py'
3359--- account_payment/account_move_line.py 2012-12-06 14:56:32 +0000
3360+++ account_payment/account_move_line.py 2012-12-20 15:08:18 +0000
3361@@ -20,10 +20,10 @@
3362 ##############################################################################
3363
3364 from operator import itemgetter
3365-from openerp.osv import fields, osv
3366+from openerp.osv import fields, osv, orm
3367 from openerp.tools.translate import _
3368
3369-class account_move_line(osv.osv):
3370+class account_move_line(orm.Model):
3371 _inherit = "account.move.line"
3372
3373 def amount_to_pay(self, cr, uid, ids, name, arg=None, context=None):
3374@@ -115,6 +115,5 @@
3375 type='float', string='Amount to pay', fnct_search=_to_pay_search),
3376 }
3377
3378-account_move_line()
3379
3380 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3381
3382=== modified file 'account_payment/account_payment.py'
3383--- account_payment/account_payment.py 2012-12-06 14:56:32 +0000
3384+++ account_payment/account_payment.py 2012-12-20 15:08:18 +0000
3385@@ -22,12 +22,12 @@
3386 import logging
3387 import time
3388
3389-from openerp.osv import fields, osv
3390+from openerp.osv import fields, osv, orm
3391 from openerp import netsvc
3392
3393 _logger = logging.getLogger(__name__)
3394
3395-class payment_mode(osv.osv):
3396+class payment_mode(orm.Model):
3397 _name= 'payment.mode'
3398 _description= 'Payment Mode'
3399 _columns = {
3400@@ -63,9 +63,8 @@
3401 return {'value': result}
3402
3403
3404-payment_mode()
3405
3406-class payment_order(osv.osv):
3407+class payment_order(orm.Model):
3408 _name = 'payment.order'
3409 _description = 'Payment Order'
3410 _rec_name = 'reference'
3411@@ -174,9 +173,8 @@
3412 payment_line_obj.write(cr, uid, payment_line_ids, {'date': False}, context=context)
3413 return super(payment_order, self).write(cr, uid, ids, vals, context=context)
3414
3415-payment_order()
3416
3417-class payment_line(osv.osv):
3418+class payment_line(orm.Model):
3419 _name = 'payment.line'
3420 _description = 'Payment Line'
3421
3422@@ -421,6 +419,5 @@
3423 res['communication2']['states']['normal'] = [('readonly', False)]
3424 return res
3425
3426-payment_line()
3427
3428 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3429
3430=== modified file 'account_payment/wizard/account_payment_order.py'
3431--- account_payment/wizard/account_payment_order.py 2012-12-06 14:56:32 +0000
3432+++ account_payment/wizard/account_payment_order.py 2012-12-20 15:08:18 +0000
3433@@ -22,9 +22,9 @@
3434 import time
3435 from lxml import etree
3436
3437-from openerp.osv import fields, osv
3438+from openerp.osv import fields, osv, orm
3439
3440-class payment_order_create(osv.osv_memory):
3441+class payment_order_create(orm.TransientModel):
3442 """
3443 Create a payment object with lines corresponding to the account move line
3444 to pay according to the date and the mode provided by the user.
3445@@ -118,6 +118,5 @@
3446 'target': 'new',
3447 }
3448
3449-payment_order_create()
3450
3451 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3452
3453=== modified file 'account_payment/wizard/account_payment_pay.py'
3454--- account_payment/wizard/account_payment_pay.py 2012-12-06 14:56:32 +0000
3455+++ account_payment/wizard/account_payment_pay.py 2012-12-20 15:08:18 +0000
3456@@ -19,10 +19,10 @@
3457 #
3458 ##############################################################################
3459
3460-from openerp.osv import osv
3461+from openerp.osv import osv, orm
3462
3463 #TODO:REMOVE this wizard is not used
3464-class account_payment_make_payment(osv.osv_memory):
3465+class account_payment_make_payment(orm.TransientModel):
3466 _name = "account.payment.make.payment"
3467 _description = "Account make payment"
3468
3469@@ -54,6 +54,5 @@
3470 # id = obj_model.read(cr, uid, [result], ['res_id'])[0]['res_id']
3471 # return obj_act.read(cr, uid, [id])[0]
3472
3473-account_payment_make_payment()
3474
3475 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3476
3477=== modified file 'account_payment/wizard/account_payment_populate_statement.py'
3478--- account_payment/wizard/account_payment_populate_statement.py 2012-12-18 17:55:47 +0000
3479+++ account_payment/wizard/account_payment_populate_statement.py 2012-12-20 15:08:18 +0000
3480@@ -22,9 +22,9 @@
3481 import time
3482 from lxml import etree
3483
3484-from openerp.osv import fields, osv
3485+from openerp.osv import fields, osv, orm
3486
3487-class account_payment_populate_statement(osv.osv_memory):
3488+class account_payment_populate_statement(orm.TransientModel):
3489 _name = "account.payment.populate.statement"
3490 _description = "Account Payment Populate Statement"
3491 _columns = {
3492@@ -118,6 +118,5 @@
3493 line_obj.write(cr, uid, [line.id], {'bank_statement_line_id': st_line_id})
3494 return {'type': 'ir.actions.act_window_close'}
3495
3496-account_payment_populate_statement()
3497
3498 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3499
3500=== modified file 'account_sequence/account_sequence.py'
3501--- account_sequence/account_sequence.py 2012-12-06 14:56:32 +0000
3502+++ account_sequence/account_sequence.py 2012-12-20 15:08:18 +0000
3503@@ -20,9 +20,9 @@
3504 #
3505 ##############################################################################
3506
3507-from openerp.osv import fields, osv
3508+from openerp.osv import fields, osv, orm
3509
3510-class account_move(osv.osv):
3511+class account_move(orm.Model):
3512 _inherit = 'account.move'
3513
3514 _columns = {
3515@@ -40,24 +40,21 @@
3516 self.write(cr, uid, [move.id], {'internal_sequence_number': seq_no})
3517 return res
3518
3519-account_move()
3520
3521-class account_journal(osv.osv):
3522+class account_journal(orm.Model):
3523 _inherit = "account.journal"
3524
3525 _columns = {
3526 'internal_sequence_id': fields.many2one('ir.sequence', 'Internal Sequence', help="This sequence will be used to maintain the internal number for the journal entries related to this journal."),
3527 }
3528
3529-account_journal()
3530
3531-class account_move_line(osv.osv):
3532+class account_move_line(orm.Model):
3533 _inherit = "account.move.line"
3534
3535 _columns = {
3536 'internal_sequence_number': fields.related('move_id','internal_sequence_number', type='char', relation='account.move', help='Internal Sequence Number', string='Internal Number'),
3537 }
3538
3539-account_move_line()
3540
3541 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3542
3543=== modified file 'account_sequence/account_sequence_installer.py'
3544--- account_sequence/account_sequence_installer.py 2012-12-06 14:56:32 +0000
3545+++ account_sequence/account_sequence_installer.py 2012-12-20 15:08:18 +0000
3546@@ -19,9 +19,9 @@
3547 #
3548 ##############################################################################
3549
3550-from openerp.osv import fields, osv
3551+from openerp.osv import fields, osv, orm
3552
3553-class account_sequence_installer(osv.osv_memory):
3554+class account_sequence_installer(orm.TransientModel):
3555 _name = 'account.sequence.installer'
3556 _inherit = 'res.config.installer'
3557
3558@@ -79,6 +79,5 @@
3559 ir_values_obj.set(cr, uid, key='default', key2=False, name='internal_sequence_id', models =[('account.journal', False)], value=ir_seq)
3560 return res
3561
3562-account_sequence_installer()
3563
3564 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3565
3566=== modified file 'account_test/account_test.py'
3567--- account_test/account_test.py 2012-12-17 15:46:28 +0000
3568+++ account_test/account_test.py 2012-12-20 15:08:18 +0000
3569@@ -28,7 +28,7 @@
3570 #
3571 ##############################################################################
3572
3573-from openerp.osv import fields,osv
3574+from openerp.osv import fields,osv, orm
3575 import pooler
3576 import netsvc
3577 import time
3578@@ -43,7 +43,7 @@
3579 result = res
3580 '''
3581
3582-class accounting_assert_test(osv.osv):
3583+class accounting_assert_test(orm.Model):
3584 _name = "accounting.assert.test"
3585 _order = "sequence"
3586
3587@@ -61,5 +61,4 @@
3588 'sequence': 10,
3589 }
3590
3591-accounting_assert_test()
3592
3593
3594=== modified file 'account_voucher/account_voucher.py'
3595--- account_voucher/account_voucher.py 2012-12-20 11:47:30 +0000
3596+++ account_voucher/account_voucher.py 2012-12-20 15:08:18 +0000
3597@@ -23,11 +23,11 @@
3598 from lxml import etree
3599
3600 from openerp import netsvc
3601-from openerp.osv import fields, osv
3602+from openerp.osv import fields, osv, orm
3603 import openerp.addons.decimal_precision as dp
3604 from openerp.tools.translate import _
3605
3606-class res_company(osv.osv):
3607+class res_company(orm.Model):
3608 _inherit = "res.company"
3609 _columns = {
3610 'income_currency_exchange_account_id': fields.many2one(
3611@@ -40,9 +40,8 @@
3612 domain="[('type', '=', 'other')]",),
3613 }
3614
3615-res_company()
3616
3617-class account_config_settings(osv.osv_memory):
3618+class account_config_settings(orm.TransientModel):
3619 _inherit = 'account.config.settings'
3620 _columns = {
3621 'income_currency_exchange_account_id': fields.related(
3622@@ -57,7 +56,7 @@
3623 string="Loss Exchange Rate Account"),
3624 }
3625
3626-class account_voucher(osv.osv):
3627+class account_voucher(orm.Model):
3628 def _check_paid(self, cr, uid, ids, name, args, context=None):
3629 res = {}
3630 for voucher in self.browse(cr, uid, ids, context=context):
3631@@ -1327,8 +1326,37 @@
3632 default['date'] = time.strftime('%Y-%m-%d')
3633 return super(account_voucher, self).copy(cr, uid, id, default, context)
3634
3635-
3636-class account_voucher_line(osv.osv):
3637+<<<<<<< TREE
3638+=======
3639+ # -----------------------------------------
3640+ # OpenChatter notifications and need_action
3641+ # -----------------------------------------
3642+ _document_type = {
3643+ 'sale': 'Sales Receipt',
3644+ 'purchase': 'Purchase Receipt',
3645+ 'payment': 'Supplier Payment',
3646+ 'receipt': 'Customer Payment',
3647+ False: 'Payment',
3648+ }
3649+
3650+ def create_send_note(self, cr, uid, ids, context=None):
3651+ for obj in self.browse(cr, uid, ids, context=context):
3652+ message = "%s <b>created</b>." % self._document_type[obj.type or False]
3653+ self.message_post(cr, uid, [obj.id], body=message, subtype="account_voucher.mt_voucher", context=context)
3654+
3655+ def post_send_note(self, cr, uid, ids, context=None):
3656+ for obj in self.browse(cr, uid, ids, context=context):
3657+ message = "%s '%s' is <b>posted</b>." % (self._document_type[obj.type or False], obj.move_id.name)
3658+ self.message_post(cr, uid, [obj.id], body=message, subtype="account_voucher.mt_voucher", context=context)
3659+
3660+ def reconcile_send_note(self, cr, uid, ids, context=None):
3661+ for obj in self.browse(cr, uid, ids, context=context):
3662+ message = "%s <b>reconciled</b>." % self._document_type[obj.type or False]
3663+ self.message_post(cr, uid, [obj.id], body=message, subtype="account_voucher.mt_voucher", context=context)
3664+
3665+>>>>>>> MERGE-SOURCE
3666+
3667+class account_voucher_line(orm.Model):
3668 _name = 'account.voucher.line'
3669 _description = 'Voucher Lines'
3670 _order = "move_line_id"
3671@@ -1476,9 +1504,8 @@
3672 'type':ttype
3673 })
3674 return values
3675-account_voucher_line()
3676
3677-class account_bank_statement(osv.osv):
3678+class account_bank_statement(orm.Model):
3679 _inherit = 'account.bank.statement'
3680
3681 def button_confirm_bank(self, cr, uid, ids, context=None):
3682@@ -1529,9 +1556,8 @@
3683 raise osv.except_osv(_('Unable to change journal !'), _('You can not change the journal as you already reconciled some statement lines!'))
3684 return super(account_bank_statement, self).write(cr, uid, ids, vals, context=context)
3685
3686-account_bank_statement()
3687
3688-class account_bank_statement_line(osv.osv):
3689+class account_bank_statement_line(orm.Model):
3690 _inherit = 'account.bank.statement.line'
3691
3692 def onchange_partner_id(self, cr, uid, ids, partner_id, context=None):
3693@@ -1583,7 +1609,6 @@
3694 voucher_obj.unlink(cr, uid, unlink_ids, context=context)
3695 return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
3696
3697-account_bank_statement_line()
3698
3699 def resolve_o2m_operations(cr, uid, target_osv, operations, fields, context):
3700 results = []
3701
3702=== modified file 'account_voucher/invoice.py'
3703--- account_voucher/invoice.py 2012-12-06 14:56:32 +0000
3704+++ account_voucher/invoice.py 2012-12-20 15:08:18 +0000
3705@@ -19,10 +19,10 @@
3706 #
3707 ##############################################################################
3708
3709-from openerp.osv import osv
3710+from openerp.osv import osv, orm
3711 from openerp.tools.translate import _
3712
3713-class invoice(osv.osv):
3714+class invoice(orm.Model):
3715 _inherit = 'account.invoice'
3716
3717 def invoice_pay_customer(self, cr, uid, ids, context=None):
3718@@ -51,6 +51,5 @@
3719 }
3720 }
3721
3722-invoice()
3723
3724 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3725
3726=== modified file 'account_voucher/report/account_voucher_sales_receipt.py'
3727--- account_voucher/report/account_voucher_sales_receipt.py 2012-12-06 14:56:32 +0000
3728+++ account_voucher/report/account_voucher_sales_receipt.py 2012-12-20 15:08:18 +0000
3729@@ -18,10 +18,10 @@
3730 #
3731 ##############################################################################
3732
3733-from openerp.osv import fields, osv
3734+from openerp.osv import fields, osv, orm
3735 from openerp import tools
3736
3737-class sale_receipt_report(osv.osv):
3738+class sale_receipt_report(orm.Model):
3739 _name = "sale.receipt.report"
3740 _description = "Sales Receipt Statistics"
3741 _auto = False
3742@@ -126,6 +126,5 @@
3743 )
3744 """)
3745
3746-sale_receipt_report()
3747
3748 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3749
3750=== modified file 'account_voucher/wizard/account_statement_from_invoice.py'
3751--- account_voucher/wizard/account_statement_from_invoice.py 2012-12-18 17:55:47 +0000
3752+++ account_voucher/wizard/account_statement_from_invoice.py 2012-12-20 15:08:18 +0000
3753@@ -21,10 +21,10 @@
3754
3755 import time
3756
3757-from openerp.osv import fields, osv
3758+from openerp.osv import fields, osv, orm
3759 from openerp.tools.translate import _
3760
3761-class account_statement_from_invoice_lines(osv.osv_memory):
3762+class account_statement_from_invoice_lines(orm.TransientModel):
3763 """
3764 Generate Entries by Statement from Invoices
3765 """
3766@@ -123,6 +123,5 @@
3767 }, context=context)
3768 return {'type': 'ir.actions.act_window_close'}
3769
3770-account_statement_from_invoice_lines()
3771
3772 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3773
3774=== modified file 'analytic/analytic.py'
3775--- analytic/analytic.py 2012-12-20 15:05:47 +0000
3776+++ analytic/analytic.py 2012-12-20 15:08:18 +0000
3777@@ -22,12 +22,12 @@
3778 import time
3779 from datetime import datetime
3780
3781-from openerp.osv import fields, osv
3782+from openerp.osv import fields, osv, orm
3783 from openerp import tools
3784 from openerp.tools.translate import _
3785 import openerp.addons.decimal_precision as dp
3786
3787-class account_analytic_account(osv.osv):
3788+class account_analytic_account(orm.Model):
3789 _name = 'account.analytic.account'
3790 _inherit = ['mail.thread']
3791 _description = 'Analytic Account'
3792@@ -315,7 +315,27 @@
3793 account_ids = self.search(cr, uid, args, limit=limit, context=context)
3794 return self.name_get(cr, uid, account_ids, context=context)
3795
3796+<<<<<<< TREE
3797 class account_analytic_line(osv.osv):
3798+=======
3799+ def create(self, cr, uid, vals, context=None):
3800+ contract = super(account_analytic_account, self).create(cr, uid, vals, context=context)
3801+ if contract:
3802+ self.create_send_note(cr, uid, [contract], context=context)
3803+ return contract
3804+
3805+ def create_send_note(self, cr, uid, ids, context=None):
3806+ for obj in self.browse(cr, uid, ids, context=context):
3807+ message = _("Contract <b>created</b>.")
3808+ if obj.partner_id:
3809+ message = _("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name,)
3810+ self.message_post(cr, uid, [obj.id], body=message,
3811+ subtype="analytic.mt_account_status", context=context)
3812+
3813+
3814+
3815+class account_analytic_line(orm.Model):
3816+>>>>>>> MERGE-SOURCE
3817 _name = 'account.analytic.line'
3818 _description = 'Analytic Line'
3819
3820@@ -355,6 +375,5 @@
3821 (_check_no_view, 'You cannot create analytic line on view account.', ['account_id']),
3822 ]
3823
3824-account_analytic_line()
3825
3826 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3827
3828=== modified file 'analytic_contract_hr_expense/analytic_contract_hr_expense.py'
3829--- analytic_contract_hr_expense/analytic_contract_hr_expense.py 2012-12-18 13:41:18 +0000
3830+++ analytic_contract_hr_expense/analytic_contract_hr_expense.py 2012-12-20 15:08:18 +0000
3831@@ -18,11 +18,11 @@
3832 # along with this program. If not, see <http://www.gnu.org/licenses/>.
3833 #
3834 ##############################################################################
3835-from openerp.osv import fields, osv
3836+from openerp.osv import fields, osv, orm
3837 from openerp.osv.orm import intersect
3838 from openerp.tools.translate import _
3839
3840-class account_analytic_account(osv.osv):
3841+class account_analytic_account(orm.Model):
3842 _name = "account.analytic.account"
3843 _inherit = "account.analytic.account"
3844
3845@@ -137,6 +137,5 @@
3846 'nodestroy': True,
3847 }
3848
3849-account_analytic_account()
3850
3851 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3852
3853=== modified file 'analytic_user_function/analytic_user_function.py'
3854--- analytic_user_function/analytic_user_function.py 2012-12-18 22:50:15 +0000
3855+++ analytic_user_function/analytic_user_function.py 2012-12-20 15:08:18 +0000
3856@@ -19,11 +19,11 @@
3857 #
3858 ##############################################################################
3859
3860-from openerp.osv import fields,osv
3861+from openerp.osv import fields,osv, orm
3862 from openerp.tools.translate import _
3863 import openerp.addons.decimal_precision as dp
3864
3865-class analytic_user_funct_grid(osv.osv):
3866+class analytic_user_funct_grid(orm.Model):
3867 _name="analytic.user.funct.grid"
3868 _description= "Price per User"
3869 _columns={
3870@@ -54,14 +54,14 @@
3871 return {'value': value}
3872
3873
3874-class account_analytic_account(osv.osv):
3875+class account_analytic_account(orm.Model):
3876 _inherit = "account.analytic.account"
3877 _columns = {
3878 'user_product_ids': fields.one2many('analytic.user.funct.grid', 'account_id', 'Users/Products Rel.'),
3879 }
3880
3881
3882-class hr_analytic_timesheet(osv.osv):
3883+class hr_analytic_timesheet(orm.Model):
3884 _inherit = "hr.analytic.timesheet"
3885 # Look in account, if no value for the user => look in parent until there is no more parent to look
3886 # Take the first found... if nothing found => return False
3887@@ -146,7 +146,7 @@
3888 res ['value']['general_account_id']= a
3889 return res
3890
3891-class account_analytic_line(osv.osv):
3892+class account_analytic_line(orm.Model):
3893 _inherit = "account.analytic.line"
3894 def _get_invoice_price(self, cr, uid, account, product_id, user_id, qty, context = {}):
3895 for grid in account.user_product_ids:
3896
3897=== modified file 'anonymization/anonymization.py'
3898--- anonymization/anonymization.py 2012-12-20 11:25:28 +0000
3899+++ anonymization/anonymization.py 2012-12-20 15:08:18 +0000
3900@@ -29,7 +29,7 @@
3901 import pickle
3902 import random
3903 import datetime
3904-from openerp.osv import fields, osv
3905+from openerp.osv import fields, osv, orm
3906 from openerp.tools.translate import _
3907
3908 from itertools import groupby
3909@@ -49,7 +49,7 @@
3910 return dict((k, [v for v in itr]) for k, itr in groupby(sorted(lst, key=itemgetter(*cols)), itemgetter(*cols)))
3911
3912
3913-class ir_model_fields_anonymization(osv.osv):
3914+class ir_model_fields_anonymization(orm.Model):
3915 _name = 'ir.model.fields.anonymization'
3916 _rec_name = 'field_id'
3917
3918@@ -218,7 +218,7 @@
3919 }
3920
3921
3922-class ir_model_fields_anonymization_history(osv.osv):
3923+class ir_model_fields_anonymization_history(orm.Model):
3924 _name = 'ir.model.fields.anonymization.history'
3925 _order = "date desc"
3926
3927@@ -232,7 +232,7 @@
3928 }
3929
3930
3931-class ir_model_fields_anonymize_wizard(osv.osv_memory):
3932+class ir_model_fields_anonymize_wizard(orm.TransientModel):
3933 _name = 'ir.model.fields.anonymize.wizard'
3934
3935 def _get_state(self, cr, uid, ids, name, arg, context=None):
3936@@ -619,7 +619,7 @@
3937 return res
3938
3939
3940-class ir_model_fields_anonymization_migration_fix(osv.osv):
3941+class ir_model_fields_anonymization_migration_fix(orm.Model):
3942 _name = 'ir.model.fields.anonymization.migration.fix'
3943 _order = "sequence"
3944
3945
3946=== modified file 'audittrail/audittrail.py'
3947--- audittrail/audittrail.py 2012-12-17 15:46:28 +0000
3948+++ audittrail/audittrail.py 2012-12-20 15:08:18 +0000
3949@@ -19,15 +19,14 @@
3950 #
3951 ##############################################################################
3952
3953-from openerp.osv import fields, osv
3954-from openerp.osv.osv import object_proxy
3955+import time
3956+
3957+from openerp.osv import fields, osv, orm
3958 from openerp.tools.translate import _
3959 from openerp import pooler
3960-import time
3961-from openerp import tools
3962 from openerp import SUPERUSER_ID
3963
3964-class audittrail_rule(osv.osv):
3965+class audittrail_rule(orm.Model):
3966 """
3967 For Auddittrail Rule
3968 """
3969@@ -119,7 +118,7 @@
3970 #End Loop
3971 return True
3972
3973-class audittrail_log(osv.osv):
3974+class audittrail_log(orm.Model):
3975 """
3976 For Audittrail Log
3977 """
3978@@ -154,7 +153,7 @@
3979 }
3980 _order = "timestamp desc"
3981
3982-class audittrail_log_line(osv.osv):
3983+class audittrail_log_line(orm.Model):
3984 """
3985 Audittrail Log Line.
3986 """
3987@@ -171,7 +170,7 @@
3988 'field_description': fields.char('Field Description', size=64),
3989 }
3990
3991-class audittrail_objects_proxy(object_proxy):
3992+class audittrail_objects_proxy(osv.object_proxy):
3993 """ Uses Object proxy for auditing changes on object of subscribed Rules"""
3994
3995 def get_value_text(self, cr, uid, pool, resource_pool, method, field, value):
3996@@ -519,7 +518,6 @@
3997 return self.log_fct(cr, uid, model, method, fct_src, *args, **kw)
3998 return fct_src(cr, uid, model, method, *args, **kw)
3999
4000-audittrail_objects_proxy()
4001
4002 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4003
4004
4005=== modified file 'audittrail/wizard/audittrail_view_log.py'
4006--- audittrail/wizard/audittrail_view_log.py 2012-12-06 14:56:32 +0000
4007+++ audittrail/wizard/audittrail_view_log.py 2012-12-20 15:08:18 +0000
4008@@ -19,10 +19,10 @@
4009 #
4010 ##############################################################################
4011
4012-from openerp.osv import fields, osv
4013+from openerp.osv import fields, osv, orm
4014 import time
4015
4016-class audittrail_view_log(osv.osv_memory):
4017+class audittrail_view_log(orm.TransientModel):
4018
4019 _name = "audittrail.view.log"
4020 _description = "View Log"
4021@@ -61,6 +61,5 @@
4022 #End Loop
4023 return result
4024
4025-audittrail_view_log()
4026
4027 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4028
4029=== modified file 'auth_crypt/auth_crypt.py'
4030--- auth_crypt/auth_crypt.py 2012-12-19 11:33:39 +0000
4031+++ auth_crypt/auth_crypt.py 2012-12-20 15:08:18 +0000
4032@@ -15,7 +15,7 @@
4033 from string import ascii_letters, digits
4034
4035 import openerp
4036-from openerp.osv import fields, osv
4037+from openerp.osv import fields, osv, orm
4038
4039 _logger = logging.getLogger(__name__)
4040
4041@@ -114,7 +114,7 @@
4042 result = result.encode('base64') # doesnt seem to be crypt(3) compatible
4043 return '%s%s$%s' % (magic_sha256, salt, result)
4044
4045-class res_users(osv.osv):
4046+class res_users(orm.Model):
4047 _inherit = "res.users"
4048
4049 def set_pw(self, cr, uid, id, name, value, args, context):
4050
4051=== modified file 'auth_ldap/users_ldap.py'
4052--- auth_ldap/users_ldap.py 2012-12-10 11:16:54 +0000
4053+++ auth_ldap/users_ldap.py 2012-12-20 15:08:18 +0000
4054@@ -25,11 +25,11 @@
4055 import openerp.exceptions
4056 from openerp import pooler
4057 from openerp import tools
4058-from openerp.osv import fields, osv
4059+from openerp.osv import fields, osv, orm
4060 from openerp import SUPERUSER_ID
4061 _logger = logging.getLogger(__name__)
4062
4063-class CompanyLDAP(osv.osv):
4064+class CompanyLDAP(orm.Model):
4065 _name = 'res.company.ldap'
4066 _order = 'sequence'
4067 _rec_name = 'ldap_server'
4068@@ -228,19 +228,17 @@
4069 'create_user': True,
4070 }
4071
4072-CompanyLDAP()
4073-
4074-
4075-class res_company(osv.osv):
4076+
4077+
4078+class res_company(orm.Model):
4079 _inherit = "res.company"
4080 _columns = {
4081 'ldaps': fields.one2many(
4082 'res.company.ldap', 'company', 'LDAP Parameters'),
4083 }
4084-res_company()
4085-
4086-
4087-class users(osv.osv):
4088+
4089+
4090+class users(orm.Model):
4091 _inherit = "res.users"
4092 def login(self, db, login, password):
4093 user_id = super(users, self).login(db, login, password)
4094@@ -283,5 +281,4 @@
4095 cr.close()
4096 raise openerp.exceptions.AccessDenied()
4097
4098-users()
4099 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4100
4101=== modified file 'auth_oauth/auth_oauth.py'
4102--- auth_oauth/auth_oauth.py 2012-08-18 13:04:11 +0000
4103+++ auth_oauth/auth_oauth.py 2012-12-20 15:08:18 +0000
4104@@ -1,6 +1,6 @@
4105-from openerp.osv import osv, fields
4106+from openerp.osv import orm, osv, fields
4107
4108-class auth_oauth_provider(osv.osv):
4109+class auth_oauth_provider(orm.Model):
4110 """Class defining the configuration values of an OAuth2 provider"""
4111
4112 _name = 'auth.oauth.provider'
4113
4114=== modified file 'auth_oauth/res_config.py'
4115--- auth_oauth/res_config.py 2012-08-18 13:04:11 +0000
4116+++ auth_oauth/res_config.py 2012-12-20 15:08:18 +0000
4117@@ -19,7 +19,7 @@
4118 #
4119 ##############################################################################
4120
4121-from openerp.osv import osv, fields
4122+from openerp.osv import orm, osv, fields
4123
4124 import logging
4125 _logger = logging.getLogger(__name__)
4126
4127=== modified file 'auth_oauth/res_users.py'
4128--- auth_oauth/res_users.py 2012-11-27 10:06:35 +0000
4129+++ auth_oauth/res_users.py 2012-12-20 15:08:18 +0000
4130@@ -6,7 +6,7 @@
4131 import simplejson
4132
4133 import openerp
4134-from openerp.osv import osv, fields
4135+from openerp.osv import orm, osv, fields
4136 from openerp import SUPERUSER_ID
4137
4138 _logger = logging.getLogger(__name__)
4139
4140=== modified file 'auth_oauth_signup/res_users.py'
4141--- auth_oauth_signup/res_users.py 2012-11-26 11:03:01 +0000
4142+++ auth_oauth_signup/res_users.py 2012-12-20 15:08:18 +0000
4143@@ -23,7 +23,7 @@
4144 import simplejson
4145
4146 import openerp
4147-from openerp.osv import osv, fields
4148+from openerp.osv import osv, fields, orm
4149
4150 _logger = logging.getLogger(__name__)
4151
4152
4153=== modified file 'auth_openid/res_users.py'
4154--- auth_openid/res_users.py 2012-12-10 11:16:54 +0000
4155+++ auth_openid/res_users.py 2012-12-20 15:08:18 +0000
4156@@ -19,13 +19,13 @@
4157 #
4158 ##############################################################################
4159 from openerp.modules.registry import RegistryManager
4160-from openerp.osv import osv, fields
4161+from openerp.osv import orm, fields
4162 import openerp.exceptions
4163 from openerp import tools
4164
4165 import utils
4166
4167-class res_users(osv.osv):
4168+class res_users(orm.Model):
4169 _inherit = 'res.users'
4170
4171 # TODO create helper fields for autofill openid_url and openid_email -> http://pad.openerp.com/web-openid
4172@@ -91,7 +91,6 @@
4173 raise
4174 self._uid_cache.setdefault(db, {})[uid] = passwd
4175
4176-res_users()
4177
4178
4179
4180
4181=== modified file 'auth_signup/res_config.py'
4182--- auth_signup/res_config.py 2012-12-04 10:31:46 +0000
4183+++ auth_signup/res_config.py 2012-12-20 15:08:18 +0000
4184@@ -19,7 +19,7 @@
4185 #
4186 ##############################################################################
4187
4188-from openerp.osv import osv, fields
4189+from openerp.osv import osv, fields, orm
4190 from openerp.tools.safe_eval import safe_eval
4191
4192 class base_config_settings(osv.TransientModel):
4193
4194=== modified file 'auth_signup/res_users.py'
4195--- auth_signup/res_users.py 2012-12-18 15:32:55 +0000
4196+++ auth_signup/res_users.py 2012-12-20 15:08:18 +0000
4197@@ -23,7 +23,7 @@
4198 from urllib import urlencode
4199 from urlparse import urljoin
4200
4201-from openerp.osv import osv, fields
4202+from openerp.osv import osv, fields, orm
4203 from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
4204 from openerp.tools.safe_eval import safe_eval
4205 from openerp.tools.translate import _
4206
4207=== modified file 'base_action_rule/base_action_rule.py'
4208--- base_action_rule/base_action_rule.py 2012-12-10 11:16:54 +0000
4209+++ base_action_rule/base_action_rule.py 2012-12-20 15:08:18 +0000
4210@@ -42,7 +42,7 @@
4211 return datetime.strptime(date_field[:19], '%Y-%m-%d %H:%M:%S')
4212
4213
4214-class base_action_rule(osv.osv):
4215+class base_action_rule(orm.Model):
4216 """ Base Action Rules """
4217
4218 _name = 'base.action.rule'
4219@@ -330,16 +330,14 @@
4220 context.update({'action': False})
4221 return True
4222
4223-base_action_rule()
4224
4225-class actions_server(osv.osv):
4226+class actions_server(orm.Model):
4227 _inherit = 'ir.actions.server'
4228 _columns = {
4229 'action_rule_id': fields.many2one("base.action.rule", string="Action Rule")
4230 }
4231-actions_server()
4232
4233-class ir_cron(osv.osv):
4234+class ir_cron(orm.Model):
4235 _inherit = 'ir.cron'
4236 _init_done = False
4237
4238@@ -361,7 +359,6 @@
4239
4240 super(ir_cron, self)._poolJobs(db_name, check=check)
4241
4242-ir_cron()
4243
4244
4245 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4246
4247=== modified file 'base_calendar/base_calendar.py'
4248--- base_calendar/base_calendar.py 2012-12-18 08:59:14 +0000
4249+++ base_calendar/base_calendar.py 2012-12-20 15:08:18 +0000
4250@@ -23,7 +23,7 @@
4251 from dateutil import parser
4252 from dateutil import rrule
4253 from dateutil.relativedelta import relativedelta
4254-from openerp.osv import fields, osv
4255+from openerp.osv import fields, osv, orm
4256 from openerp.service import web_services
4257 from openerp.tools.translate import _
4258 import pytz
4259@@ -216,7 +216,7 @@
4260 </html>
4261 """
4262
4263-class calendar_attendee(osv.osv):
4264+class calendar_attendee(orm.Model):
4265 """
4266 Calendar Attendee Information
4267 """
4268@@ -626,9 +626,8 @@
4269 res = super(calendar_attendee, self).create(cr, uid, vals, context)
4270 return res
4271
4272-calendar_attendee()
4273
4274-class res_alarm(osv.osv):
4275+class res_alarm(orm.Model):
4276 """Resource Alarm """
4277 _name = 'res.alarm'
4278 _description = 'Basic Alarm Information'
4279@@ -757,9 +756,8 @@
4280 where id=%%s' % model_obj._table,(data.id,))
4281 return True
4282
4283-res_alarm()
4284
4285-class calendar_alarm(osv.osv):
4286+class calendar_alarm(orm.Model):
4287 _name = 'calendar.alarm'
4288 _description = 'Event alarm information'
4289 _inherit = 'res.alarm'
4290@@ -910,10 +908,9 @@
4291 self.write(cr, uid, [alarm.id], update_vals)
4292 return True
4293
4294-calendar_alarm()
4295-
4296-
4297-class calendar_event(osv.osv):
4298+
4299+
4300+class calendar_event(orm.Model):
4301 _name = "calendar.event"
4302 _description = "Calendar Event"
4303 __attribute__ = {}
4304@@ -1602,9 +1599,8 @@
4305 """
4306 return self.write(cr, uid, ids, {'state': 'confirmed'}, context)
4307
4308-calendar_event()
4309
4310-class calendar_todo(osv.osv):
4311+class calendar_todo(orm.Model):
4312 """ Calendar Task """
4313
4314 _name = "calendar.todo"
4315@@ -1651,10 +1647,9 @@
4316 __attribute__ = {}
4317
4318
4319-calendar_todo()
4320-
4321-
4322-class ir_values(osv.osv):
4323+
4324+
4325+class ir_values(orm.Model):
4326 _inherit = 'ir.values'
4327
4328 def set(self, cr, uid, key, key2, name, models, value, replace=True, \
4329@@ -1696,9 +1691,8 @@
4330 return super(ir_values, self).get(cr, uid, key, key2, new_model, \
4331 meta, context, res_id_req, without_user, key2_req)
4332
4333-ir_values()
4334
4335-class ir_model(osv.osv):
4336+class ir_model(orm.Model):
4337
4338 _inherit = 'ir.model'
4339
4340@@ -1722,7 +1716,6 @@
4341 val['id'] = base_calendar_id2real_id(val['id'])
4342 return isinstance(ids, (str, int, long)) and data[0] or data
4343
4344-ir_model()
4345
4346 class virtual_report_spool(web_services.report_spool):
4347
4348@@ -1745,9 +1738,8 @@
4349 data['id'] = base_calendar_id2real_id(data['id'])
4350 return super(virtual_report_spool, self).exp_report(db, uid, object, new_ids, data, context)
4351
4352-virtual_report_spool()
4353
4354-class res_users(osv.osv):
4355+class res_users(orm.Model):
4356 _inherit = 'res.users'
4357
4358 def _get_user_avail(self, cr, uid, ids, context=None):
4359@@ -1798,6 +1790,5 @@
4360 string='Free/Busy'),
4361 }
4362
4363-res_users()
4364
4365 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4366
4367=== modified file 'base_calendar/crm_meeting.py'
4368--- base_calendar/crm_meeting.py 2012-12-20 12:49:27 +0000
4369+++ base_calendar/crm_meeting.py 2012-12-20 15:08:18 +0000
4370@@ -19,10 +19,15 @@
4371 #
4372 ##############################################################################
4373
4374+<<<<<<< TREE
4375 import time
4376
4377 from openerp.osv import fields, osv
4378 from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
4379+=======
4380+from openerp.osv import fields, osv, orm
4381+from openerp import tools
4382+>>>>>>> MERGE-SOURCE
4383 from openerp.tools.translate import _
4384 from base_calendar import get_real_ids, base_calendar_id2real_id
4385 from openerp.addons.base_status.base_state import base_state
4386@@ -121,7 +126,7 @@
4387 thread_id = get_real_ids(thread_id)
4388 return super(crm_meeting, self).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, **kwargs)
4389
4390-class mail_message(osv.osv):
4391+class mail_message(orm.Model):
4392 _inherit = "mail.message"
4393
4394 def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
4395@@ -139,7 +144,7 @@
4396 doc_dict.setdefault(virtual_id, doc_dict[get_real_ids(virtual_id)])
4397 return super(mail_message, self)._find_allowed_model_wise(cr, uid, doc_model, doc_dict, context=context)
4398
4399-class ir_attachment(osv.osv):
4400+class ir_attachment(orm.Model):
4401 _inherit = "ir.attachment"
4402
4403 def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
4404@@ -159,7 +164,7 @@
4405 vals['res_id'] = get_real_ids(vals.get('res_id'))
4406 return super(ir_attachment, self).write(cr, uid, ids, vals, context=context)
4407
4408-class invite_wizard(osv.osv_memory):
4409+class invite_wizard(orm.TransientModel):
4410 _inherit = 'mail.wizard.invite'
4411
4412 def default_get(self, cr, uid, fields, context=None):
4413
4414=== modified file 'base_gengo/ir_translation.py'
4415--- base_gengo/ir_translation.py 2012-12-06 14:56:32 +0000
4416+++ base_gengo/ir_translation.py 2012-12-20 15:08:18 +0000
4417@@ -19,7 +19,7 @@
4418 #
4419 ##############################################################################
4420
4421-from openerp.osv import fields, osv
4422+from openerp.osv import fields, osv, orm
4423 from openerp.tools.translate import _
4424
4425 LANG_CODE_MAPPING = {
4426
4427=== modified file 'base_gengo/res_company.py'
4428--- base_gengo/res_company.py 2012-12-06 14:56:32 +0000
4429+++ base_gengo/res_company.py 2012-12-20 15:08:18 +0000
4430@@ -19,7 +19,7 @@
4431 #
4432 ##############################################################################
4433
4434-from openerp.osv import fields, osv
4435+from openerp.osv import fields, osv, orm
4436
4437
4438 class res_company(osv.Model):
4439
4440=== modified file 'base_gengo/wizard/base_gengo_translations.py'
4441--- base_gengo/wizard/base_gengo_translations.py 2012-11-16 13:50:21 +0000
4442+++ base_gengo/wizard/base_gengo_translations.py 2012-12-20 15:08:18 +0000
4443@@ -23,7 +23,7 @@
4444 import re
4445 import time
4446
4447-from openerp.osv import osv, fields
4448+from openerp.osv import osv, fields, orm
4449 from openerp import tools
4450 from openerp.tools.translate import _
4451
4452@@ -48,7 +48,7 @@
4453 'args': "'(%s,)'" % (str(GENGO_DEFAULT_LIMIT)),
4454 }
4455
4456-class base_gengo_translations(osv.osv_memory):
4457+class base_gengo_translations(orm.TransientModel):
4458
4459 _name = 'base.gengo.translations'
4460 _columns = {
4461
4462=== modified file 'base_iban/base_iban.py'
4463--- base_iban/base_iban.py 2012-12-06 14:56:32 +0000
4464+++ base_iban/base_iban.py 2012-12-20 15:08:18 +0000
4465@@ -20,7 +20,7 @@
4466 ##############################################################################
4467 import string
4468
4469-from openerp.osv import fields, osv
4470+from openerp.osv import fields, osv, orm
4471 from openerp.tools.translate import _
4472
4473 # Reference Examples of IBAN
4474@@ -77,7 +77,7 @@
4475 iban_str = iban_str[4:]
4476 return ' '.join(res)
4477
4478-class res_partner_bank(osv.osv):
4479+class res_partner_bank(orm.Model):
4480 _inherit = "res.partner.bank"
4481
4482 def create(self, cr, uid, vals, context=None):
4483@@ -181,6 +181,5 @@
4484 (_check_bank, '\nPlease define BIC/Swift code on bank for bank type IBAN Account to make valid payments', ['bic'])
4485 ]
4486
4487-res_partner_bank()
4488
4489 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4490
4491=== modified file 'base_report_designer/base_report_designer.py'
4492--- base_report_designer/base_report_designer.py 2012-12-06 14:56:32 +0000
4493+++ base_report_designer/base_report_designer.py 2012-12-20 15:08:18 +0000
4494@@ -19,7 +19,7 @@
4495 #
4496 ##############################################################################
4497
4498-from openerp.osv import osv
4499+from openerp.osv import osv, orm
4500 from openerp_sxw2rml import sxw2rml
4501 from StringIO import StringIO
4502 import base64
4503@@ -27,7 +27,7 @@
4504 from openerp import addons
4505
4506
4507-class report_xml(osv.osv):
4508+class report_xml(orm.Model):
4509 _inherit = 'ir.actions.report.xml'
4510
4511 def sxwtorml(self, cr, uid, file_sxw, file_type):
4512@@ -76,7 +76,6 @@
4513 'report_rml_content': rml_data and base64.encodestring(rml_data) or False
4514 }
4515
4516-report_xml()
4517
4518 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4519
4520
4521=== modified file 'base_report_designer/installer.py'
4522--- base_report_designer/installer.py 2012-12-06 14:56:32 +0000
4523+++ base_report_designer/installer.py 2012-12-20 15:08:18 +0000
4524@@ -20,12 +20,12 @@
4525 ##############################################################################
4526
4527 from openerp.osv import fields
4528-from openerp.osv import osv
4529+from openerp.osv import osv, orm
4530 import base64
4531 from openerp.tools.translate import _
4532 from openerp import addons
4533
4534-class base_report_designer_installer(osv.osv_memory):
4535+class base_report_designer_installer(orm.TransientModel):
4536 _name = 'base_report_designer.installer'
4537 _inherit = 'res.config.installer'
4538
4539@@ -58,6 +58,5 @@
4540 4. if your connection success, A message appears like 'You can start creating your report in current document.'.
4541 """
4542 }
4543-base_report_designer_installer()
4544 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4545
4546
4547=== modified file 'base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py'
4548--- base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py 2012-11-29 22:26:45 +0000
4549+++ base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py 2012-12-20 15:08:18 +0000
4550@@ -32,7 +32,6 @@
4551
4552
4553 import re
4554-import string
4555 import os
4556 import zipfile
4557 import xml.dom.minidom
4558@@ -88,7 +87,7 @@
4559 def _stringToTuple(self, s):
4560 """Helper function."""
4561 try:
4562- temp = string.split(s,",")
4563+ temp = s.split(",")
4564 return int(temp[0]),int(temp[1])
4565 except:
4566 return None
4567
4568=== modified file 'base_report_designer/wizard/base_report_designer_modify.py'
4569--- base_report_designer/wizard/base_report_designer_modify.py 2012-12-10 11:16:54 +0000
4570+++ base_report_designer/wizard/base_report_designer_modify.py 2012-12-20 15:08:18 +0000
4571@@ -21,14 +21,11 @@
4572 ##############################################################################
4573
4574 import base64
4575-import time
4576-import urllib
4577-
4578-from openerp import osv, pooler, tools
4579-from openerp.osv import fields, osv
4580-from openerp.tools.translate import _
4581-
4582-class base_report_sxw(osv.osv_memory):
4583+
4584+from openerp import tools
4585+from openerp.osv import fields, orm
4586+
4587+class base_report_sxw(orm.TransientModel):
4588 """Base Report sxw """
4589 _name = 'base.report.sxw'
4590
4591@@ -54,9 +51,8 @@
4592 'target': 'new',
4593 }
4594
4595-base_report_sxw()
4596
4597-class base_report_file_sxw(osv.osv_memory):
4598+class base_report_file_sxw(orm.TransientModel):
4599 """Base Report File sxw """
4600 _name = 'base.report.file.sxw'
4601
4602@@ -116,9 +112,8 @@
4603 'type': 'ir.actions.act_window',
4604 'target': 'new',
4605 }
4606-base_report_file_sxw()
4607
4608-class base_report_rml_save(osv.osv_memory):
4609+class base_report_rml_save(orm.TransientModel):
4610 """Base Report file Save"""
4611 _name = 'base.report.rml.save'
4612 def default_get(self, cr, uid, fields, context=None):
4613@@ -133,12 +128,11 @@
4614 @return: A dictionary which of fields with values.
4615
4616 """
4617-
4618 res = super(base_report_rml_save, self).default_get(cr, uid, fields, context=context)
4619 report_id = self.pool.get('base.report.sxw').search(cr,uid,[])
4620 data = self.pool.get('base.report.file.sxw').read(cr, uid, report_id, context=context)[0]
4621 report = self.pool.get('ir.actions.report.xml').browse(cr, uid, data['report_id'], context=context)
4622-
4623+
4624 if 'file_rml' in fields:
4625 res['file_rml'] = base64.encodestring(report.report_rml_content)
4626 return res
4627@@ -146,6 +140,5 @@
4628 'file_rml':fields.binary('Save As'),
4629 }
4630
4631-base_report_rml_save()
4632
4633 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4634
4635=== modified file 'base_setup/base_setup.py'
4636--- base_setup/base_setup.py 2012-12-06 14:56:32 +0000
4637+++ base_setup/base_setup.py 2012-12-20 15:08:18 +0000
4638@@ -23,12 +23,12 @@
4639 import cgi
4640 from openerp import pooler
4641 from openerp import tools
4642-from openerp.osv import fields, osv
4643+from openerp.osv import fields, osv, orm
4644 from openerp.tools.translate import _
4645 from lxml import etree
4646
4647 # Specify Your Terminology will move to 'partner' module
4648-class specify_partner_terminology(osv.osv_memory):
4649+class specify_partner_terminology(orm.TransientModel):
4650 _name = 'base.setup.terminology'
4651 _inherit = 'res.config'
4652 _columns = {
4653
4654=== modified file 'base_setup/res_config.py'
4655--- base_setup/res_config.py 2012-12-17 14:43:06 +0000
4656+++ base_setup/res_config.py 2012-12-20 15:08:18 +0000
4657@@ -19,9 +19,9 @@
4658 #
4659 ##############################################################################
4660
4661-from openerp.osv import fields, osv
4662+from openerp.osv import fields, osv, orm
4663
4664-class base_config_settings(osv.osv_memory):
4665+class base_config_settings(orm.TransientModel):
4666 _name = 'base.config.settings'
4667 _inherit = 'res.config.settings'
4668 _columns = {
4669@@ -53,7 +53,7 @@
4670 # Preferences wizard for Sales & CRM.
4671 # It is defined here because it is inherited independently in modules sale, crm,
4672 # plugin_outlook and plugin_thunderbird.
4673-class sale_config_settings(osv.osv_memory):
4674+class sale_config_settings(orm.TransientModel):
4675 _name = 'sale.config.settings'
4676 _inherit = 'res.config.settings'
4677 _columns = {
4678
4679=== modified file 'base_status/base_stage.py'
4680--- base_status/base_stage.py 2012-12-18 13:11:42 +0000
4681+++ base_status/base_stage.py 2012-12-20 15:08:18 +0000
4682@@ -19,7 +19,7 @@
4683 #
4684 ##############################################################################
4685
4686-from openerp.osv import fields, osv
4687+from openerp.osv import fields, osv, orm
4688 from openerp.tools.translate import _
4689
4690 class base_stage(object):
4691
4692=== modified file 'base_status/base_state.py'
4693--- base_status/base_state.py 2012-12-18 13:11:42 +0000
4694+++ base_status/base_state.py 2012-12-20 15:08:18 +0000
4695@@ -19,7 +19,7 @@
4696 #
4697 ##############################################################################
4698
4699-from openerp.osv import fields, osv
4700+from openerp.osv import fields, osv, orm
4701 from openerp.tools.translate import _
4702
4703 class base_state(object):
4704
4705=== modified file 'base_vat/base_vat.py'
4706--- base_vat/base_vat.py 2012-12-18 17:55:47 +0000
4707+++ base_vat/base_vat.py 2012-12-20 15:08:18 +0000
4708@@ -32,7 +32,7 @@
4709 "Install it to support more countries, for example with `easy_install vatnumber`.")
4710 vatnumber = None
4711
4712-from openerp.osv import fields, osv
4713+from openerp.osv import fields, osv, orm
4714 from openerp.tools.misc import ustr
4715 from openerp.tools.translate import _
4716
4717@@ -71,7 +71,7 @@
4718 'sk': 'SK0012345675',
4719 }
4720
4721-class res_partner(osv.osv):
4722+class res_partner(orm.Model):
4723 _inherit = 'res.partner'
4724
4725 def _split_vat(self, vat):
4726@@ -243,6 +243,5 @@
4727 return False
4728 return check == int(vat[8])
4729
4730-res_partner()
4731
4732 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4733
4734=== modified file 'base_vat/res_company.py'
4735--- base_vat/res_company.py 2012-12-06 14:56:32 +0000
4736+++ base_vat/res_company.py 2012-12-20 15:08:18 +0000
4737@@ -19,9 +19,9 @@
4738 #
4739 ##############################################################################
4740
4741-from openerp.osv import fields, osv
4742+from openerp.osv import fields, osv, orm
4743
4744-class res_company_vat (osv.osv):
4745+class res_company_vat (orm.Model):
4746 _inherit = 'res.company'
4747 _columns = {
4748 'vat_check_vies': fields.boolean('VIES VAT Check',
4749
4750=== modified file 'board/board.py'
4751--- board/board.py 2012-12-06 14:56:32 +0000
4752+++ board/board.py 2012-12-20 15:08:18 +0000
4753@@ -24,9 +24,9 @@
4754 from textwrap import dedent
4755
4756 from openerp import tools
4757-from openerp.osv import fields, osv
4758+from openerp.osv import fields, osv, orm
4759
4760-class board_board(osv.osv):
4761+class board_board(orm.Model):
4762 _name = 'board.board'
4763 _description = "Board"
4764 _auto = False
4765@@ -98,7 +98,7 @@
4766 return etree.tostring(remove_unauthorized_children(archnode), pretty_print=True)
4767
4768
4769-class board_create(osv.osv_memory):
4770+class board_create(orm.TransientModel):
4771
4772 def board_create(self, cr, uid, ids, context=None):
4773 assert len(ids) == 1
4774
4775=== modified file 'crm/crm.py'
4776--- crm/crm.py 2012-12-18 09:32:41 +0000
4777+++ crm/crm.py 2012-12-20 15:08:18 +0000
4778@@ -23,7 +23,7 @@
4779 import time
4780 from lxml import etree
4781 from openerp.osv import fields
4782-from openerp.osv import osv
4783+from openerp.osv import osv, orm
4784 from openerp import tools
4785 from openerp.tools.translate import _
4786
4787@@ -44,7 +44,7 @@
4788 ('5', 'Lowest'),
4789 ]
4790
4791-class crm_case_channel(osv.osv):
4792+class crm_case_channel(orm.Model):
4793 _name = "crm.case.channel"
4794 _description = "Channels"
4795 _order = 'name'
4796@@ -56,7 +56,7 @@
4797 'active': lambda *a: 1,
4798 }
4799
4800-class crm_case_stage(osv.osv):
4801+class crm_case_stage(orm.Model):
4802 """ Model for case stages. This models the main stages of a document
4803 management flow. Main CRM objects (leads, opportunities, project
4804 issues, ...) will now use only stages, instead of state and stages.
4805@@ -98,7 +98,7 @@
4806 'case_default': True,
4807 }
4808
4809-class crm_case_section(osv.osv):
4810+class crm_case_section(orm.Model):
4811 """ Model for sales teams. """
4812 _name = "crm.case.section"
4813 _inherits = {'mail.alias': 'alias_id'}
4814@@ -145,7 +145,7 @@
4815 ]
4816
4817 _constraints = [
4818- (osv.osv._check_recursion, 'Error ! You cannot create recursive Sales team.', ['parent_id'])
4819+ (orm.Model._check_recursion, 'Error ! You cannot create recursive Sales team.', ['parent_id'])
4820 ]
4821
4822 def name_get(self, cr, uid, ids, context=None):
4823@@ -185,7 +185,7 @@
4824 mail_alias.unlink(cr, uid, alias_ids, context=context)
4825 return res
4826
4827-class crm_case_categ(osv.osv):
4828+class crm_case_categ(orm.Model):
4829 """ Category of Case """
4830 _name = "crm.case.categ"
4831 _description = "Category of Case"
4832@@ -204,7 +204,7 @@
4833 'object_id' : _find_object_id
4834 }
4835
4836-class crm_case_resource_type(osv.osv):
4837+class crm_case_resource_type(orm.Model):
4838 """ Resource Type of case """
4839 _name = "crm.case.resource.type"
4840 _description = "Campaign"
4841@@ -221,7 +221,7 @@
4842 res = obj.read(cr, uid, ids, ['object', 'name'], context)
4843 return [(r['object'], r['name']) for r in res]
4844
4845-class crm_payment_mode(osv.osv):
4846+class crm_payment_mode(orm.Model):
4847 """ Payment Mode for Fund """
4848 _name = "crm.payment.mode"
4849 _description = "CRM Payment Mode"
4850
4851=== modified file 'crm/crm_action_rule.py'
4852--- crm/crm_action_rule.py 2012-12-06 14:56:32 +0000
4853+++ crm/crm_action_rule.py 2012-12-20 15:08:18 +0000
4854@@ -25,11 +25,11 @@
4855 from openerp.tools.translate import _
4856 from openerp.tools import ustr
4857 from openerp.osv import fields
4858-from openerp.osv import osv
4859+from openerp.osv import osv, orm
4860
4861 import crm
4862
4863-class base_action_rule(osv.osv):
4864+class base_action_rule(orm.Model):
4865 """ Base Action Rule """
4866 _inherit = 'base.action.rule'
4867 _description = 'Action Rules'
4868
4869=== modified file 'crm/crm_lead.py'
4870--- crm/crm_lead.py 2012-12-20 11:47:30 +0000
4871+++ crm/crm_lead.py 2012-12-20 15:08:18 +0000
4872@@ -22,7 +22,7 @@
4873 from openerp.addons.base_status.base_stage import base_stage
4874 import crm
4875 from datetime import datetime
4876-from openerp.osv import fields, osv
4877+from openerp.osv import fields, osv, orm
4878 import time
4879 from openerp import tools
4880 from openerp.tools.translate import _
4881@@ -66,7 +66,7 @@
4882 crm.AVAILABLE_STATES[4][0], # Pending
4883 )
4884
4885-class crm_lead(base_stage, format_address, osv.osv):
4886+class crm_lead(base_stage, format_address, orm.Model):
4887 """ CRM Lead Case """
4888 _name = "crm.lead"
4889 _description = "Lead/Opportunity"
4890
4891=== modified file 'crm/crm_meeting.py'
4892--- crm/crm_meeting.py 2012-12-18 12:58:39 +0000
4893+++ crm/crm_meeting.py 2012-12-20 15:08:18 +0000
4894@@ -19,7 +19,13 @@
4895 #
4896 ##############################################################################
4897
4898+<<<<<<< TREE
4899 from openerp.osv import fields, osv
4900+=======
4901+from openerp.osv import fields, osv, orm
4902+from openerp import tools
4903+from openerp.tools.translate import _
4904+>>>>>>> MERGE-SOURCE
4905 import logging
4906 _logger = logging.getLogger(__name__)
4907
4908@@ -35,7 +41,7 @@
4909 }
4910
4911
4912-class calendar_attendee(osv.osv):
4913+class calendar_attendee(orm.Model):
4914 """ Calendar Attendee """
4915
4916 _inherit = 'calendar.attendee'
4917@@ -68,7 +74,7 @@
4918 relation="crm.case.categ", multi='categ_id'),
4919 }
4920
4921-class res_users(osv.osv):
4922+class res_users(orm.Model):
4923 _name = 'res.users'
4924 _inherit = 'res.users'
4925
4926
4927=== modified file 'crm/crm_phonecall.py'
4928--- crm/crm_phonecall.py 2012-12-20 11:47:30 +0000
4929+++ crm/crm_phonecall.py 2012-12-20 15:08:18 +0000
4930@@ -22,11 +22,17 @@
4931 from openerp.addons.base_status.base_state import base_state
4932 import crm
4933 from datetime import datetime
4934+<<<<<<< TREE
4935 from openerp.osv import fields, osv
4936 from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
4937+=======
4938+from openerp.osv import fields, osv, orm
4939+import time
4940+from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT, DATETIME_FORMATS_MAP
4941+>>>>>>> MERGE-SOURCE
4942 from openerp.tools.translate import _
4943
4944-class crm_phonecall(base_state, osv.osv):
4945+class crm_phonecall(base_state, orm.Model):
4946 """ Model for CRM phonecalls """
4947 _name = "crm.phonecall"
4948 _description = "Phonecall"
4949
4950=== modified file 'crm/crm_segmentation.py'
4951--- crm/crm_segmentation.py 2012-12-06 14:56:32 +0000
4952+++ crm/crm_segmentation.py 2012-12-20 15:08:18 +0000
4953@@ -21,7 +21,7 @@
4954
4955 from openerp.osv import fields,osv,orm
4956
4957-class crm_segmentation(osv.osv):
4958+class crm_segmentation(orm.Model):
4959 '''
4960 A segmentation is a tool to automatically assign categories on partners.
4961 These assignations are based on criterions.
4962@@ -108,9 +108,8 @@
4963
4964 self.write(cr, uid, ids, {'state':'running', 'partner_id':0})
4965 return self.process_continue(cr, uid, ids, start=True)
4966-crm_segmentation()
4967
4968-class crm_segmentation_line(osv.osv):
4969+class crm_segmentation_line(orm.Model):
4970 """ Segmentation line """
4971 _name = "crm.segmentation.line"
4972 _description = "Segmentation line"
4973@@ -180,7 +179,6 @@
4974 return True
4975 return True
4976
4977-crm_segmentation_line()
4978
4979 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4980
4981
4982=== modified file 'crm/report/crm_lead_report.py'
4983--- crm/report/crm_lead_report.py 2012-12-06 14:56:32 +0000
4984+++ crm/report/crm_lead_report.py 2012-12-20 15:08:18 +0000
4985@@ -19,7 +19,7 @@
4986 #
4987 ##############################################################################
4988
4989-from openerp.osv import fields,osv
4990+from openerp.osv import fields,osv, orm
4991 from openerp import tools
4992 from .. import crm
4993
4994@@ -46,7 +46,7 @@
4995 ('12', 'December')
4996 ]
4997
4998-class crm_lead_report(osv.osv):
4999+class crm_lead_report(orm.Model):
5000 """ CRM Lead Analysis """
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: