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