diff options
Diffstat (limited to 'addons')
128 files changed, 10236 insertions, 2912 deletions
diff --git a/addons/account/i18n/it.po b/addons/account/i18n/it.po index d75b4f1ab4f..6d5e5fd6f4a 100644 --- a/addons/account/i18n/it.po +++ b/addons/account/i18n/it.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-04-26 07:46+0000\n" +"PO-Revision-Date: 2010-05-10 08:37+0000\n" "Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-28 03:44+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:18+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -1187,7 +1187,7 @@ msgstr "Report tassa" #: wizard_button:account.analytic.account.chart,init,open:0 #: wizard_button:account.chart,init,open:0 msgid "Open Charts" -msgstr "Apri" +msgstr "Apri conti" #. module: account #: wizard_view:account.fiscalyear.close.state,init:0 @@ -4157,7 +4157,7 @@ msgstr "Fattura" #: wizard_button:account.open_closed_fiscalyear,init,open:0 #: wizard_button:account_use_models,create,open_move:0 msgid "Open" -msgstr "Apri" +msgstr "Aperto" #. module: account #: model:ir.ui.menu,name:account.next_id_29 diff --git a/addons/account/i18n/ug.po b/addons/account/i18n/ug.po new file mode 100644 index 00000000000..77cd0bc0552 --- /dev/null +++ b/addons/account/i18n/ug.po @@ -0,0 +1,5928 @@ +# Uyghur translation for openobject-addons +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2009-08-28 16:01+0000\n" +"PO-Revision-Date: 2010-05-11 05:21+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Uyghur <ug@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2010-05-12 04:20+0000\n" +"X-Generator: Launchpad (build Unknown)\n" + +#. module: account +#: field:account.tax.template,description:0 +msgid "Internal Name" +msgstr "ئىچكى ئىسمى" + +#. module: account +#: view:account.tax.code:0 +msgid "Account Tax Code" +msgstr "باج نۇمۇرى" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree9 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree9 +msgid "Unpaid Supplier Invoices" +msgstr "تاپشۇرۇلمىغان سېتىۋېلىش پىيوسى" + +#. module: account +#: model:ir.ui.menu,name:account.menu_finance_entries +msgid "Entries Encoding" +msgstr "كىنىشكىگە ئاساسەن تىزىملىتىپ كىرىش" + +#. module: account +#: model:ir.actions.todo,note:account.config_wizard_account_base_setup_form +msgid "Specify The Message for the Overdue Payment Report." +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_confirmstatementfromdraft0 +msgid "Confirm statement from draft" +msgstr "چورنىۋايدىن مۇقىملاش" + +#. module: account +#: model:account.account.type,name:account.account_type_asset +msgid "Asset" +msgstr "مەبلەخ" + +#. module: account +#: constraint:ir.actions.act_window:0 +msgid "Invalid model name in the action definition." +msgstr "ھەرىكەت بەلگىلەشتە قوللىنىلغان ئىسىم توغرا بولمىدى." + +#. module: account +#: help:account.journal,currency:0 +msgid "The currency used to enter statement" +msgstr "" + +#. module: account +#: wizard_view:account_use_models,init_form:0 +msgid "Select Message" +msgstr "ئۇچۇرنى تاللاڭ" + +#. module: account +#: help:product.category,property_account_income_categ:0 +msgid "" +"This account will be used to value incoming stock for the current product " +"category" +msgstr "" + +#. module: account +#: help:account.invoice,period_id:0 +msgid "Keep empty to use the period of the validation(invoice) date." +msgstr "" + +#. module: account +#: wizard_view:account.automatic.reconcile,reconcile:0 +msgid "Reconciliation result" +msgstr "ھېساباتنى توغىرىلاش نەتىجىسى" + +#. module: account +#: model:ir.actions.act_window,name:account.act_account_acount_move_line_open_unreconciled +msgid "Unreconciled entries" +msgstr "" + +#. module: account +#: field:account.invoice.tax,base_code_id:0 +#: field:account.tax,base_code_id:0 +#: field:account.tax.template,base_code_id:0 +msgid "Base Code" +msgstr "" + +#. module: account +#: view:account.account:0 +msgid "Account Statistics" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_vat_declaration +#: model:ir.ui.menu,name:account.menu_wizard_vat_declaration +msgid "Print Taxes Report" +msgstr "" + +#. module: account +#: field:account.account,parent_id:0 +msgid "Parent" +msgstr "يۇقارىقى دەرىجە" + +#. module: account +#: selection:account.move,type:0 +msgid "Journal Voucher" +msgstr "" + +#. module: account +#: field:account.invoice,residual:0 +msgid "Residual" +msgstr "ئاشقىنى" + +#. module: account +#: field:account.tax,base_sign:0 +#: field:account.tax,ref_base_sign:0 +#: field:account.tax.template,base_sign:0 +#: field:account.tax.template,ref_base_sign:0 +msgid "Base Code Sign" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_unreconcile_select +#: model:ir.ui.menu,name:account.menu_unreconcile_select +msgid "Unreconcile entries" +msgstr "" + +#. module: account +#: constraint:account.period:0 +msgid "Error ! The duration of the Period(s) is/are invalid. " +msgstr "" + +#. module: account +#: view:account.bank.statement.reconcile:0 +#: field:account.bank.statement.reconcile,line_ids:0 +#: field:account.move,line_id:0 +#: model:ir.actions.act_window,name:account.act_account_acount_move_line_open +#: model:ir.actions.act_window,name:account.action_move_line_form +#: model:ir.ui.menu,name:account.menu_action_move_line_form +msgid "Entries" +msgstr "" + +#. module: account +#: selection:account.move.line,centralisation:0 +msgid "Debit Centralisation" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_invoice_state_confirm +msgid "Confirm draft invoices" +msgstr "" + +#. module: account +#: help:account.payment.term.line,days2:0 +msgid "" +"Day of the month, set -1 for the last day of the current month. If it's " +"positive, it gives the day of the next month. Set 0 for net days (otherwise " +"it's based on the beginning of the month)." +msgstr "" + +#. module: account +#: view:account.move:0 +msgid "Total Credit" +msgstr "" + +#. module: account +#: field:account.config.wizard,charts:0 +msgid "Charts of Account" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_move_line_select +msgid "Move line select" +msgstr "" + +#. module: account +#: rml:account.journal.period.print:0 +#: rml:account.tax.code.entries:0 +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +msgid "Entry label" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_model_line +msgid "Account Model Entries" +msgstr "" + +#. module: account +#: field:account.tax.code,sum_period:0 +msgid "Period Sum" +msgstr "" + +#. module: account +#: view:account.tax:0 +#: view:account.tax.template:0 +msgid "Compute Code (if type=code)" +msgstr "" + +#. module: account +#: view:account.move:0 +#: view:account.move.line:0 +msgid "Account Entry Line" +msgstr "" + +#. module: account +#: wizard_view:account.aged.trial.balance,init:0 +msgid "Aged Trial Balance" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_finance_recurrent_entries +msgid "Recurrent Entries" +msgstr "" + +#. module: account +#: field:account.analytic.line,amount:0 +#: field:account.bank.statement.line,amount:0 +#: field:account.bank.statement.reconcile.line,amount:0 +#: rml:account.invoice:0 +#: field:account.invoice.tax,amount:0 +#: field:account.move,amount:0 +#: field:account.tax,amount:0 +#: field:account.tax.template,amount:0 +#: xsl:account.transfer:0 +msgid "Amount" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger +#: model:ir.actions.wizard,name:account.wizard_third_party_ledger +#: model:ir.ui.menu,name:account.menu_third_party_ledger +msgid "Partner Ledger" +msgstr "" + +#. module: account +#: field:product.template,supplier_taxes_id:0 +msgid "Supplier Taxes" +msgstr "" + +#. module: account +#: view:account.move:0 +msgid "Total Debit" +msgstr "" + +#. module: account +#: rml:account.tax.code.entries:0 +msgid "Accounting Entries-" +msgstr "" + +#. module: account +#: help:account.journal,view_id:0 +msgid "" +"Gives the view used when writing or browsing entries in this journal. The " +"view tell Open ERP which fields should be visible, required or readonly and " +"in which order. You can create your own view for a faster encoding in each " +"journal." +msgstr "" + +#. module: account +#: help:account.invoice,date_due:0 +#: help:account.invoice,payment_term:0 +msgid "" +"If you use payment terms, the due date will be computed automatically at the " +"generation of accounting entries. If you keep the payment term and the due " +"date empty, it means direct payment. The payment term may compute several " +"due dates, for example 50% now, 50% in one month." +msgstr "" + +#. module: account +#: selection:account.tax,type:0 +#: selection:account.tax.template,type:0 +msgid "Fixed" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_overdue +#: view:res.company:0 +msgid "Overdue Payments" +msgstr "" + +#. module: account +#: wizard_view:account.account.balance.report,checktype:0 +#: wizard_view:account.analytic.account.analytic.check.report,init:0 +#: wizard_view:account.analytic.account.balance.report,init:0 +#: wizard_view:account.analytic.account.cost_ledger.report,init:0 +#: wizard_view:account.analytic.account.inverted.balance.report,init:0 +#: wizard_view:account.analytic.account.quantity_cost_ledger.report,init:0 +#: wizard_view:account.vat.declaration,init:0 +msgid "Select period" +msgstr "" + +#. module: account +#: field:account.invoice,origin:0 +#: field:account.invoice.line,origin:0 +msgid "Origin" +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +msgid "Move Name" +msgstr "" + +#. module: account +#: xsl:account.transfer:0 +msgid "Reference" +msgstr "" + +#. module: account +#: wizard_view:account.subscription.generate,init:0 +msgid "Subscription Compute" +msgstr "" + +#. module: account +#: rml:account.central.journal:0 +msgid "Account Num." +msgstr "" + +#. module: account +#: rml:account.analytic.account.analytic.check:0 +msgid "Delta Debit" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: field:account.invoice,amount_tax:0 +#: field:account.move.line,account_tax_id:0 +msgid "Tax" +msgstr "" + +#. module: account +#: rml:account.general.journal:0 +msgid "Debit Trans." +msgstr "" + +#. module: account +#: field:account.analytic.line,account_id:0 +#: field:account.invoice.line,account_analytic_id:0 +#: field:account.move.line,analytic_account_id:0 +#: field:report.hr.timesheet.invoice.journal,account_id:0 +msgid "Analytic Account" +msgstr "" + +#. module: account +#: field:account.tax,child_depend:0 +#: field:account.tax.template,child_depend:0 +msgid "Tax on Children" +msgstr "" + +#. module: account +#: rml:account.central.journal:0 +#: rml:account.general.journal:0 +#: field:account.journal,name:0 +msgid "Journal Name" +msgstr "" + +#. module: account +#: view:account.payment.term:0 +msgid "Description on invoices" +msgstr "" + +#. module: account +#: constraint:account.analytic.account:0 +msgid "Error! You can not create recursive analytic accounts." +msgstr "" + +#. module: account +#: field:account.bank.statement.reconcile,total_entry:0 +msgid "Total entries" +msgstr "" + +#. module: account +#: field:account.fiscal.position.account,account_src_id:0 +#: field:account.fiscal.position.account.template,account_src_id:0 +msgid "Account Source" +msgstr "" + +#. module: account +#: field:account.journal,update_posted:0 +msgid "Allow Cancelling Entries" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_paymentorderbank0 +#: model:process.transition,name:account.process_transition_paymentorderreconcilation0 +msgid "Payment Reconcilation" +msgstr "" + +#. module: account +#: model:account.journal,name:account.expenses_journal +msgid "Journal de frais" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal +msgid "All Analytic Entries" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Date:" +msgstr "" + +#. module: account +#: selection:account.account.type,sign:0 +msgid "Negative" +msgstr "" + +#. module: account +#: rml:account.partner.balance:0 +msgid "(Account/Partner) Name" +msgstr "" + +#. module: account +#: selection:account.move,type:0 +msgid "Contra" +msgstr "" + +#. module: account +#: field:account.analytic.account,state:0 +#: field:account.bank.statement,state:0 +#: field:account.invoice,state:0 +#: view:account.move:0 +#: view:account.move.line:0 +#: view:account.subscription:0 +msgid "State" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree13 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree13 +msgid "Unpaid Supplier Refunds" +msgstr "" + +#. module: account +#: view:account.tax:0 +#: view:account.tax.template:0 +msgid "Special Computation" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_confirmstatementfromdraft0 +msgid "Confirm statement with/without reconciliation from draft statement" +msgstr "" + +#. module: account +#: wizard_view:account.move.bank.reconcile,init:0 +#: model:ir.actions.wizard,name:account.action_account_bank_reconcile_tree +#: model:ir.ui.menu,name:account.menu_action_account_bank_reconcile_check_tree +msgid "Bank reconciliation" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Disc.(%)" +msgstr "" + +#. module: account +#: rml:account.general.ledger:0 +#: field:account.model,ref:0 +#: field:account.move,ref:0 +#: rml:account.overdue:0 +#: field:account.subscription,ref:0 +msgid "Ref" +msgstr "" + +#. module: account +#: field:account.tax.template,type_tax_use:0 +msgid "Tax Use In" +msgstr "" + +#. module: account +#: help:account.tax.template,include_base_amount:0 +msgid "" +"Set if the amount of tax must be included in the base amount before " +"computing the next taxes." +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_finance_periodical_processing +msgid "Periodical Processing" +msgstr "" + +#. module: account +#: view:report.hr.timesheet.invoice.journal:0 +msgid "Analytic Entries Stats" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_tax_code_template_form +#: model:ir.ui.menu,name:account.menu_action_account_tax_code_template_form +msgid "Tax Code Templates" +msgstr "" + +#. module: account +#: view:account.invoice:0 +msgid "Supplier invoice" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_reconcilepaid0 +#: model:process.transition,name:account.process_transition_supplierreconcilepaid0 +msgid "Reconcile Paid" +msgstr "" + +#. module: account +#: wizard_field:account.chart,init,target_move:0 +msgid "Target Moves" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_tax_template_form +#: model:ir.ui.menu,name:account.menu_action_account_tax_template_form +msgid "Tax Templates" +msgstr "" + +#. module: account +#: field:account.invoice,reconciled:0 +msgid "Paid/Reconciled" +msgstr "" + +#. module: account +#: field:account.account.type,close_method:0 +msgid "Deferral Method" +msgstr "" + +#. module: account +#: field:account.tax.template,include_base_amount:0 +msgid "Include in Base Amount" +msgstr "" + +#. module: account +#: field:account.tax,ref_base_code_id:0 +#: field:account.tax.template,ref_base_code_id:0 +msgid "Refund Base Code" +msgstr "" + +#. module: account +#: view:account.invoice.line:0 +msgid "Line" +msgstr "" + +#. module: account +#: rml:account.analytic.account.cost_ledger:0 +msgid "J.C. or Move name" +msgstr "" + +#. module: account +#: selection:account.tax,applicable_type:0 +#: selection:account.tax.template,applicable_type:0 +msgid "True" +msgstr "" + +#. module: account +#: help:account.payment.term.line,days:0 +msgid "" +"Number of days to add before computation of the day of month.If Date=15/01, " +"Number of Days=22, Day of Month=-1, then the due date is 28/02." +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_tax +msgid "account.tax" +msgstr "" + +#. module: account +#: rml:account.central.journal:0 +msgid "Printing Date" +msgstr "" + +#. module: account +#: rml:account.general.ledger:0 +msgid "Mvt" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_aged_trial_balance +#: model:ir.ui.menu,name:account.menu_aged_trial_balance +msgid "Aged Partner Balance" +msgstr "" + +#. module: account +#: view:account.journal:0 +msgid "Entry Controls" +msgstr "" + +#. module: account +#: help:account.model.line,sequence:0 +msgid "" +"The sequence field is used to order the resources from lower sequences to " +"higher ones" +msgstr "" + +#. module: account +#: wizard_view:account.analytic.account.chart,init:0 +#: wizard_view:account.analytic.line,init:0 +msgid "(Keep empty to open the current situation)" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_fiscal_position_account +msgid "Fiscal Position Accounts Mapping" +msgstr "" + +#. module: account +#: field:account.analytic.account,contact_id:0 +msgid "Contact" +msgstr "" + +#. module: account +#: selection:account.model.line,date:0 +#: selection:account.model.line,date_maturity:0 +msgid "Partner Payment Term" +msgstr "" + +#. module: account +#: view:account.move.reconcile:0 +msgid "Account Entry Reconcile" +msgstr "" + +#. module: account +#: wizard_button:account.move.bank.reconcile,init,open:0 +msgid "Open for bank reconciliation" +msgstr "" + +#. module: account +#: field:account.invoice.line,discount:0 +msgid "Discount (%)" +msgstr "" + +#. module: account +#: wizard_field:account.move.line.reconcile,init_full,writeoff:0 +#: wizard_field:account.move.line.reconcile,init_partial,writeoff:0 +msgid "Write-Off amount" +msgstr "" + +#. module: account +#: help:account.fiscalyear,company_id:0 +msgid "Keep empty if the fiscal year belongs to several companies." +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_analytic_accounting +msgid "Analytic Accounting" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Sub-Total :" +msgstr "" + +#. module: account +#: field:account.analytic.account,line_ids:0 +#: view:account.analytic.line:0 +#: model:ir.actions.act_window,name:account.action_account_analytic_line_form +#: model:ir.ui.menu,name:account.next_id_41 +msgid "Analytic Entries" +msgstr "" + +#. module: account +#: selection:account.subscription,period_type:0 +msgid "month" +msgstr "" + +#. module: account +#: field:account.analytic.account,partner_id:0 +msgid "Associated Partner" +msgstr "" + +#. module: account +#: field:account.invoice,comment:0 +msgid "Additional Information" +msgstr "" + +#. module: account +#: selection:account.invoice,type:0 +msgid "Customer Refund" +msgstr "" + +#. module: account +#: wizard_view:account.analytic.account.chart,init:0 +msgid "Select the Period for Analysis" +msgstr "" + +#. module: account +#: field:account.tax,ref_tax_sign:0 +#: field:account.tax,tax_sign:0 +#: field:account.tax.template,ref_tax_sign:0 +#: field:account.tax.template,tax_sign:0 +msgid "Tax Code Sign" +msgstr "" + +#. module: account +#: help:res.partner,credit:0 +msgid "Total amount this customer owes you." +msgstr "" + +#. module: account +#: view:account.move.line:0 +msgid "St." +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_tax_code_line_open +msgid "account.move.line" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_supplieranalyticcost0 +msgid "Analytic Invoice" +msgstr "" + +#. module: account +#: field:account.journal.column,field:0 +msgid "Field Name" +msgstr "" + +#. module: account +#: field:account.tax.code,sign:0 +#: field:account.tax.code.template,sign:0 +msgid "Sign for parent" +msgstr "" + +#. module: account +#: field:account.fiscalyear,end_journal_period_id:0 +msgid "End of Year Entries Journal" +msgstr "" + +#. module: account +#: view:product.product:0 +#: view:product.template:0 +msgid "Purchase Properties" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_paymententries0 +msgid "Can be draft or validated" +msgstr "" + +#. module: account +#: wizard_button:account.invoice.pay,init,reconcile:0 +msgid "Partial Payment" +msgstr "" + +#. module: account +#: wizard_view:account_use_models,create:0 +msgid "Move Lines Created." +msgstr "" + +#. module: account +#: field:account.fiscalyear,state:0 +#: field:account.journal.period,state:0 +#: field:account.move,state:0 +#: field:account.move.line,state:0 +#: field:account.period,state:0 +#: field:account.subscription,state:0 +msgid "Status" +msgstr "" + +#. module: account +#: rml:account.analytic.account.cost_ledger:0 +#: rml:account.analytic.account.quantity_cost_ledger:0 +msgid "Period to" +msgstr "" + +#. module: account +#: field:account.account.type,partner_account:0 +msgid "Partner account" +msgstr "" + +#. module: account +#: wizard_view:account.subscription.generate,init:0 +msgid "Generate entries before:" +msgstr "" + +#. module: account +#: rml:account.analytic.account.cost_ledger:0 +#: rml:account.analytic.account.quantity_cost_ledger:0 +#: model:ir.actions.report.xml,name:account.account_analytic_account_cost_ledger +#: model:ir.actions.wizard,name:account.account_analytic_account_cost_ledger_report +msgid "Cost Ledger" +msgstr "" + +#. module: account +#: wizard_view:account.account.balance.report,checktype:0 +#: wizard_view:account.general.ledger.report,checktype:0 +#: wizard_view:account.partner.balance.report,init:0 +#: wizard_view:account.third_party_ledger.report,init:0 +msgid "(Keep empty for all open fiscal years)" +msgstr "" + +#. module: account +#: field:account.invoice,move_lines:0 +msgid "Move Lines" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_config_wizard +msgid "account.config.wizard" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.report_account_analytic_journal_tree +#: model:ir.ui.menu,name:account.report_account_analytic_journal_print +msgid "Account cost and revenue by journal" +msgstr "" + +#. module: account +#: help:account.account.template,user_type:0 +msgid "" +"These types are defined according to your country. The type contain more " +"information about the account and it's specificities." +msgstr "" + +#. module: account +#: selection:account.automatic.reconcile,init,power:0 +msgid "6" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.next_id_30 +msgid "Bank Reconciliation" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_account_template +msgid "Templates for Accounts" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_analytic_account_form +#: model:ir.model,name:account.model_account_analytic_account +#: model:ir.ui.menu,name:account.account_analytic_def_account +msgid "Analytic Accounts" +msgstr "" + +#. module: account +#: wizard_view:account.print.journal.report,init:0 +#: model:ir.actions.wizard,name:account.wizard_print_journal +#: model:ir.ui.menu,name:account.menu_print_journal +msgid "Print Journal" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_bank_accounts_wizard +msgid "account.bank.accounts.wizard" +msgstr "" + +#. module: account +#: field:account.move.line,date_created:0 +#: field:account.move.reconcile,create_date:0 +msgid "Creation date" +msgstr "" + +#. module: account +#: wizard_button:account.invoice.refund,init,cancel_invoice:0 +msgid "Cancel Invoice" +msgstr "" + +#. module: account +#: field:account.journal.column,required:0 +msgid "Required" +msgstr "" + +#. module: account +#: field:product.category,property_account_expense_categ:0 +#: field:product.template,property_account_expense:0 +msgid "Expense Account" +msgstr "" + +#. module: account +#: wizard_field:account.move.line.reconcile,addendum,journal_id:0 +msgid "Write-Off Journal" +msgstr "" + +#. module: account +#: field:account.model.line,amount_currency:0 +#: field:account.move.line,amount_currency:0 +msgid "Amount Currency" +msgstr "" + +#. module: account +#: field:account.chart.template,property_account_expense_categ:0 +msgid "Expense Category Account" +msgstr "" + +#. module: account +#: wizard_field:account.fiscalyear.close,init,fy2_id:0 +msgid "New Fiscal Year" +msgstr "" + +#. module: account +#: help:account.tax,tax_group:0 +msgid "" +"If a default tax is given in the partner it only overrides taxes from " +"accounts (or products) in the same group." +msgstr "" + +#. module: account +#: wizard_field:account.open_closed_fiscalyear,init,fyear_id:0 +msgid "Fiscal Year to Open" +msgstr "" + +#. module: account +#: view:account.config.wizard:0 +msgid "Select Chart of Accounts" +msgstr "" + +#. module: account +#: field:account.analytic.account,quantity:0 +#: rml:account.analytic.account.balance:0 +#: rml:account.analytic.account.inverted.balance:0 +#: rml:account.analytic.account.quantity_cost_ledger:0 +#: field:account.analytic.line,unit_amount:0 +#: rml:account.invoice:0 +#: field:account.invoice.line,quantity:0 +#: field:account.model.line,quantity:0 +#: field:account.move.line,quantity:0 +msgid "Quantity" +msgstr "" + +#. module: account +#: wizard_field:account.account.balance.report,checktype,date_to:0 +#: wizard_field:account.general.ledger.report,checktype,date_to:0 +#: wizard_field:account.partner.balance.report,init,date2:0 +#: wizard_field:account.third_party_ledger.report,init,date2:0 +msgid "End date" +msgstr "" + +#. module: account +#: field:account.invoice.tax,base_amount:0 +msgid "Base Code Amount" +msgstr "" + +#. module: account +#: help:account.journal,user_id:0 +msgid "The user responsible for this journal" +msgstr "" + +#. module: account +#: field:account.journal,default_debit_account_id:0 +msgid "Default Debit Account" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_bank_statement_tree +#: model:ir.ui.menu,name:account.menu_bank_statement_tree +msgid "Entries by Statements" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_analyticinvoice0 +msgid "analytic Invoice" +msgstr "" + +#. module: account +#: wizard_field:account.automatic.reconcile,init,period_id:0 +#: field:account.bank.statement,period_id:0 +#: wizard_field:account.central.journal.report,init,period_id:0 +#: view:account.fiscalyear:0 +#: rml:account.general.journal:0 +#: wizard_field:account.general.journal.report,init,period_id:0 +#: wizard_field:account.invoice.pay,init,period_id:0 +#: field:account.journal.period,period_id:0 +#: field:account.move,period_id:0 +#: wizard_field:account.move.journal,init,period_id:0 +#: field:account.move.line,period_id:0 +#: wizard_field:account.move.validate,init,period_id:0 +#: view:account.period:0 +#: wizard_field:account.print.journal.report,init,period_id:0 +#: field:account.subscription,period_nbr:0 +msgid "Period" +msgstr "" + +#. module: account +#: rml:account.partner.balance:0 +msgid "Grand total" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_finance_accounting +msgid "Financial Accounting" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Net Total:" +msgstr "" + +#. module: account +#: view:account.fiscal.position:0 +#: field:account.fiscal.position,name:0 +#: field:account.fiscal.position.account,position_id:0 +#: field:account.fiscal.position.account.template,position_id:0 +#: field:account.fiscal.position.tax,position_id:0 +#: field:account.fiscal.position.tax.template,position_id:0 +#: view:account.fiscal.position.template:0 +#: field:account.invoice,fiscal_position:0 +#: model:ir.model,name:account.model_account_fiscal_position +#: field:res.partner,property_account_position:0 +msgid "Fiscal Position" +msgstr "" + +#. module: account +#: field:account.analytic.line,product_uom_id:0 +#: field:account.move.line,product_uom_id:0 +msgid "UoM" +msgstr "" + +#. module: account +#: wizard_field:account.third_party_ledger.report,init,page_split:0 +msgid "One Partner Per Page" +msgstr "" + +#. module: account +#: field:account.account,child_parent_ids:0 +#: field:account.account.template,child_parent_ids:0 +msgid "Children" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_fiscal_position_tax +msgid "Fiscal Position Taxes Mapping" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree2_new +#: model:ir.ui.menu,name:account.menu_action_invoice_tree2_new +msgid "New Supplier Invoice" +msgstr "" + +#. module: account +#: wizard_field:account.invoice.pay,init,amount:0 +msgid "Amount paid" +msgstr "" + +#. module: account +#: selection:account.invoice,type:0 +#: model:process.transition,name:account.process_transition_customerinvoice0 +#: model:process.transition,name:account.process_transition_suppliercustomerinvoice0 +msgid "Customer Invoice" +msgstr "" + +#. module: account +#: wizard_view:account.open_closed_fiscalyear,init:0 +msgid "Choose Fiscal Year" +msgstr "" + +#. module: account +#: field:account.sequence.fiscalyear,sequence_main_id:0 +msgid "Main Sequence" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_analytic_journal_tree +#: model:ir.ui.menu,name:account.account_analytic_journal_print +msgid "Print Analytic Journals" +msgstr "" + +#. module: account +#: rml:account.tax.code.entries:0 +msgid "Voucher Nb" +msgstr "" + +#. module: account +#: help:account.payment.term.line,sequence:0 +msgid "" +"The sequence field is used to order the payment term lines from the lowest " +"sequences to the higher ones" +msgstr "" + +#. module: account +#: field:account.bank.statement.reconcile,total_new:0 +msgid "Total write-off" +msgstr "" + +#. module: account +#: view:account.tax.template:0 +msgid "Compute Code for Taxes included prices" +msgstr "" + +#. module: account +#: view:account.invoice.tax:0 +#: model:ir.actions.act_window,name:account.action_tax_code_list +#: model:ir.ui.menu,name:account.menu_action_tax_code_list +msgid "Tax codes" +msgstr "" + +#. module: account +#: field:account.fiscal.position.template,chart_template_id:0 +#: field:account.tax.template,chart_template_id:0 +#: field:wizard.multi.charts.accounts,chart_template_id:0 +msgid "Chart Template" +msgstr "" + +#. module: account +#: field:account.chart.template,property_account_income_categ:0 +msgid "Income Category Account" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.analytic_account_form +#: model:ir.ui.menu,name:account.account_analytic_form +msgid "New Analytic Account" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_fiscal_position_template_form +#: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form_template +msgid "Fiscal Position Templates" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: field:account.invoice.line,price_unit:0 +msgid "Unit Price" +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +msgid "Period from :" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_wizard_multi_charts_accounts +msgid "wizard.multi.charts.accounts" +msgstr "" + +#. module: account +#: model:account.journal,name:account.sales_journal +msgid "Journal de vente" +msgstr "" + +#. module: account +#: help:account.model.line,amount_currency:0 +msgid "The amount expressed in an optional other currency." +msgstr "" + +#. module: account +#: view:account.fiscal.position.template:0 +#: field:account.fiscal.position.template,name:0 +msgid "Fiscal Position Template" +msgstr "" + +#. module: account +#: field:account.payment.term,line_ids:0 +msgid "Terms" +msgstr "" + +#. module: account +#: rml:account.vat.declaration:0 +msgid "Tax Report" +msgstr "" + +#. module: account +#: wizard_button:account.analytic.account.chart,init,open:0 +#: wizard_button:account.chart,init,open:0 +msgid "Open Charts" +msgstr "" + +#. module: account +#: wizard_view:account.fiscalyear.close.state,init:0 +msgid "Are you sure you want to close the fiscal year ?" +msgstr "" + +#. module: account +#: selection:account.move,type:0 +msgid "Bank Receipt" +msgstr "" + +#. module: account +#: view:res.partner:0 +msgid "Bank account" +msgstr "" + +#. module: account +#: field:account.chart.template,tax_template_ids:0 +msgid "Tax Template List" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_invoiceimport0 +msgid "Invoice import" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.action_move_journal_line_form_select +msgid "Standard entry" +msgstr "" + +#. module: account +#: help:account.account,currency_mode:0 +msgid "" +"This will select how the current currency rate for outgoing transactions is " +"computed. In most countries the legal method is \"average\" but only a few " +"software systems are able to manage this. So if you import from another " +"software system you may have to use the rate at date. Incoming transactions " +"always use the rate at date." +msgstr "" + +#. module: account +#: field:account.account,company_currency_id:0 +msgid "Company Currency" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_fiscal_position_account_template +msgid "Fiscal Position Template Account Mapping" +msgstr "" + +#. module: account +#: field:account.analytic.account,parent_id:0 +msgid "Parent Analytic Account" +msgstr "" + +#. module: account +#: wizard_button:account.move.line.reconcile,init_partial,addendum:0 +msgid "Reconcile With Write-Off" +msgstr "" + +#. module: account +#: field:account.move.line,tax_amount:0 +msgid "Tax/Base Amount" +msgstr "" + +#. module: account +#: help:wizard.multi.charts.accounts,code_digits:0 +msgid "No. of Digits to use for account code" +msgstr "" + +#. module: account +#: field:account.bank.statement,balance_end_real:0 +msgid "Ending Balance" +msgstr "" + +#. module: account +#: view:product.product:0 +msgid "Purchase Taxes" +msgstr "" + +#. module: account +#: field:account.payment.term.line,name:0 +msgid "Line Name" +msgstr "" + +#. module: account +#: selection:account.payment.term.line,value:0 +msgid "Fixed Amount" +msgstr "" + +#. module: account +#: rml:account.analytic.account.analytic.check:0 +msgid "Analytic Credit" +msgstr "" + +#. module: account +#: field:account.move.line,reconcile_partial_id:0 +#: wizard_button:account.move.line.reconcile,init_partial,partial:0 +msgid "Partial Reconcile" +msgstr "" + +#. module: account +#: wizard_field:account.automatic.reconcile,reconcile,unreconciled:0 +msgid "Not reconciled transactions" +msgstr "" + +#. module: account +#: view:account.fiscal.position:0 +#: field:account.fiscal.position,tax_ids:0 +#: field:account.fiscal.position.template,tax_ids:0 +msgid "Tax Mapping" +msgstr "" + +#. module: account +#: view:account.config.wizard:0 +msgid "Continue" +msgstr "" + +#. module: account +#: field:account.payment.term.line,value:0 +msgid "Value" +msgstr "" + +#. module: account +#: wizard_field:account.invoice.pay,addendum,writeoff_acc_id:0 +#: wizard_field:account.move.line.reconcile,addendum,writeoff_acc_id:0 +msgid "Write-Off account" +msgstr "" + +#. module: account +#: field:account.model.line,model_id:0 +#: field:account.subscription,model_id:0 +msgid "Model" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_fiscalyear_close_state +#: model:ir.ui.menu,name:account.menu_wizard_fy_close_state +msgid "Close a Fiscal Year" +msgstr "" + +#. module: account +#: field:account.journal,centralisation:0 +msgid "Centralised counterpart" +msgstr "" + +#. module: account +#: view:wizard.company.setup:0 +msgid "Message" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_supplierpaymentorder0 +msgid "Select invoices you want to pay and manages advances" +msgstr "" + +#. module: account +#: selection:account.account,type:0 +#: selection:account.account.template,type:0 +#: model:account.account.type,name:account.account_type_root +#: selection:account.analytic.account,type:0 +#: field:account.journal,view_id:0 +msgid "View" +msgstr "" + +#. module: account +#: selection:account.account.balance.report,checktype,display_account:0 +#: selection:account.general.ledger.report,checktype,display_account:0 +#: selection:account.tax,type_tax_use:0 +#: selection:account.tax.template,type_tax_use:0 +msgid "All" +msgstr "" + +#. module: account +#: field:account.move.line,analytic_lines:0 +#: model:ir.model,name:account.model_account_analytic_line +msgid "Analytic lines" +msgstr "" + +#. module: account +#: help:account.tax,type:0 +msgid "The computation method for the tax amount." +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_accountingentries0 +#: model:process.node,note:account.process_node_supplieraccountingentries0 +msgid "Validated accounting entries." +msgstr "" + +#. module: account +#: wizard_view:account.move.line.unreconcile,init:0 +#: wizard_view:account.reconcile.unreconcile,init:0 +msgid "" +"If you unreconciliate transactions, you must also verify all the actions " +"that are linked to those transactions because they will not be disable" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_electronicfile0 +msgid "Electronic File" +msgstr "" + +#. module: account +#: view:res.partner:0 +msgid "Customer Credit" +msgstr "" + +#. module: account +#: field:account.invoice,tax_line:0 +msgid "Tax Lines" +msgstr "" + +#. module: account +#: field:ir.sequence,fiscal_ids:0 +msgid "Sequences" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_type_form +#: model:ir.ui.menu,name:account.menu_action_account_type_form +msgid "Account Types" +msgstr "" + +#. module: account +#: wizard_field:account.automatic.reconcile,init,journal_id:0 +#: field:account.bank.statement,journal_id:0 +#: wizard_field:account.central.journal.report,init,journal_id:0 +#: wizard_field:account.general.journal.report,init,journal_id:0 +#: field:account.invoice,journal_id:0 +#: field:account.journal.period,journal_id:0 +#: field:account.model,journal_id:0 +#: field:account.move,journal_id:0 +#: wizard_field:account.move.bank.reconcile,init,journal_id:0 +#: wizard_field:account.move.journal,init,journal_id:0 +#: field:account.move.line,journal_id:0 +#: wizard_field:account.move.validate,init,journal_id:0 +#: wizard_field:account.print.journal.report,init,journal_id:0 +#: field:fiscalyear.seq,journal_id:0 +#: model:ir.actions.report.xml,name:account.account_journal +#: model:ir.model,name:account.model_account_journal +#: wizard_field:populate_statement_from_inv,init,journal_id:0 +#: field:report.hr.timesheet.invoice.journal,journal_id:0 +msgid "Journal" +msgstr "" + +#. module: account +#: field:account.account,child_id:0 +#: field:account.analytic.account,child_ids:0 +msgid "Child Accounts" +msgstr "" + +#. module: account +#: field:account.account,check_history:0 +msgid "Display History" +msgstr "" + +#. module: account +#: wizard_field:account.third_party_ledger.report,init,date1:0 +msgid " Start date" +msgstr "" + +#. module: account +#: wizard_field:account.account.balance.report,checktype,display_account:0 +#: wizard_field:account.general.ledger.report,checktype,display_account:0 +msgid "Display accounts " +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_bank_statement_reconcile_line +msgid "Statement reconcile line" +msgstr "" + +#. module: account +#: view:account.tax:0 +#: view:account.tax.template:0 +msgid "Keep empty to use the income account" +msgstr "" + +#. module: account +#: view:account.bank.statement.reconcile:0 +#: field:account.bank.statement.reconcile,line_new_ids:0 +#: wizard_view:account.move.line.reconcile,init_full:0 +#: wizard_view:account.move.line.reconcile,init_partial:0 +msgid "Write-Off" +msgstr "" + +#. module: account +#: help:account.invoice,partner_bank:0 +msgid "" +"The partner bank account to pay\n" +"Keep empty to use the default" +msgstr "" + +#. module: account +#: field:res.partner,debit:0 +msgid "Total Payable" +msgstr "" + +#. module: account +#: wizard_button:account.fiscalyear.close.state,init,close:0 +msgid "Close states" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_wizard_company_setup +msgid "wizard.company.setup" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_analytic_account_line_extended_form +msgid "account.analytic.line.extended" +msgstr "" + +#. module: account +#: field:account.journal,refund_journal:0 +msgid "Refund Journal" +msgstr "" + +#. module: account +#: model:account.account.type,name:account.account_type_income +msgid "Income" +msgstr "" + +#. module: account +#: selection:account.bank.statement.line,type:0 +msgid "Supplier" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Tel. :" +msgstr "" + +#. module: account +#: field:account.invoice.tax,tax_amount:0 +msgid "Tax Code Amount" +msgstr "" + +#. module: account +#: selection:account.account.type,sign:0 +msgid "Positive" +msgstr "" + +#. module: account +#: wizard_view:account.general.journal.report,init:0 +#: model:ir.actions.wizard,name:account.wizard_general_journal +#: model:ir.ui.menu,name:account.menu_general_journal +msgid "Print General Journal" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_chart_template_form +#: model:ir.ui.menu,name:account.menu_action_account_chart_template_form +msgid "Chart of Accounts Templates" +msgstr "" + +#. module: account +#: field:account.invoice,move_id:0 +msgid "Invoice Movement" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_wizard_multi_chart +#: model:ir.ui.menu,name:account.menu_wizard +#: view:wizard.multi.charts.accounts:0 +msgid "Generate Chart of Accounts from a Chart Template" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_finance_legal_statement +msgid "Legal Statements" +msgstr "" + +#. module: account +#: field:account.tax.code,parent_id:0 +#: field:account.tax.code.template,parent_id:0 +msgid "Parent Code" +msgstr "" + +#. module: account +#: wizard_button:account.move.line.reconcile.select,init,open:0 +msgid "Open for reconciliation" +msgstr "" + +#. module: account +#: model:account.journal,name:account.bilan_journal +msgid "Journal d'ouverture" +msgstr "" + +#. module: account +#: selection:account.tax,tax_group:0 +#: selection:account.tax.template,tax_group:0 +msgid "VAT" +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +msgid "Account n°" +msgstr "" + +#. module: account +#: view:account.tax:0 +#: view:account.tax.template:0 +msgid "Keep empty to use the expense account" +msgstr "" + +#. module: account +#: wizard_field:account.automatic.reconcile,init,account_ids:0 +msgid "Account to reconcile" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: field:account.model.line,partner_id:0 +#: field:account.move.line,partner_id:0 +msgid "Partner Ref." +msgstr "" + +#. module: account +#: selection:account.partner.balance.report,init,result_selection:0 +#: selection:account.third_party_ledger.report,init,result_selection:0 +msgid "Receivable and Payable Accounts" +msgstr "" + +#. module: account +#: view:account.subscription:0 +#: field:account.subscription,lines_id:0 +msgid "Subscription Lines" +msgstr "" + +#. module: account +#: selection:account.analytic.journal,type:0 +#: selection:account.journal,type:0 +#: selection:account.tax,type_tax_use:0 +#: selection:account.tax.template,type_tax_use:0 +msgid "Purchase" +msgstr "" + +#. module: account +#: view:account.analytic.line:0 +msgid "Total quantity" +msgstr "" + +#. module: account +#: field:account.invoice,date_due:0 +msgid "Due Date" +msgstr "" + +#. module: account +#: wizard_view:account.period.close,init:0 +#: wizard_button:account.period.close,init,close:0 +msgid "Close Period" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Due" +msgstr "" + +#. module: account +#: rml:account.journal.period.print:0 +msgid "Third party" +msgstr "" + +#. module: account +#: view:account.journal:0 +msgid "Accounts Type Allowed (empty for no control)" +msgstr "" + +#. module: account +#: field:account.bank.statement,balance_start:0 +msgid "Starting Balance" +msgstr "" + +#. module: account +#: wizard_field:account.analytic.account.quantity_cost_ledger.report,init,journal:0 +#: view:account.journal.period:0 +#: model:ir.actions.act_window,name:account.action_account_journal_period_tree +#: model:ir.ui.menu,name:account.menu_action_account_journal_period_tree +msgid "Journals" +msgstr "" + +#. module: account +#: rml:account.analytic.account.quantity_cost_ledger:0 +msgid "Max Qty:" +msgstr "" + +#. module: account +#: wizard_button:account.invoice.refund,init,refund:0 +msgid "Refund Invoice" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_period_tree +#: model:ir.actions.wizard,name:account.wizard_period_close +#: model:ir.ui.menu,name:account.menu_action_account_period_close_tree +msgid "Close a Period" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.act_acc_analytic_acc_2_report_hr_timesheet_invoice_journal +msgid "Costs & Revenues" +msgstr "" + +#. module: account +#: constraint:account.account:0 +msgid "Error ! You can not create recursive accounts." +msgstr "" + +#. module: account +#: rml:account.tax.code.entries:0 +msgid "Account Number" +msgstr "" + +#. module: account +#: view:account.config.wizard:0 +msgid "Skip" +msgstr "" + +#. module: account +#: field:account.invoice,period_id:0 +msgid "Force Period" +msgstr "" + +#. module: account +#: help:account.account.type,sequence:0 +msgid "Gives the sequence order when displaying a list of account types." +msgstr "" + +#. module: account +#: view:account.invoice:0 +msgid "Re-Open" +msgstr "" + +#. module: account +#: wizard_view:account.fiscalyear.close,init:0 +msgid "Are you sure you want to create entries?" +msgstr "" + +#. module: account +#: field:account.tax,include_base_amount:0 +msgid "Include in base amount" +msgstr "" + +#. module: account +#: rml:account.analytic.account.analytic.check:0 +msgid "Delta Credit" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_reconcile_unreconcile +#: model:ir.actions.wizard,name:account.wizard_unreconcile +msgid "Unreconcile Entries" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_supplierdraftinvoices0 +msgid "Pre-generated invoice from control" +msgstr "" + +#. module: account +#: wizard_view:account.analytic.account.quantity_cost_ledger.report,init:0 +msgid "Cost Legder for period" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_bank_statement_tree2 +#: model:ir.ui.menu,name:account.menu_bank_statement_tree2 +msgid "New Statement" +msgstr "" + +#. module: account +#: wizard_field:account.analytic.account.chart,init,from_date:0 +#: wizard_field:account.analytic.line,init,from_date:0 +msgid "From" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_reconciliation0 +#: model:process.node,note:account.process_node_supplierreconciliation0 +msgid "Reconciliation of entries from invoice(s) and payment(s)" +msgstr "" + +#. module: account +#: wizard_view:account.central.journal.report,init:0 +#: model:ir.actions.wizard,name:account.wizard_central_journal +#: model:ir.ui.menu,name:account.menu_central_journal +msgid "Print Central Journal" +msgstr "" + +#. module: account +#: wizard_field:account.aged.trial.balance,init,period_length:0 +msgid "Period length (days)" +msgstr "" + +#. module: account +#: selection:account.payment.term.line,value:0 +#: selection:account.tax,type:0 +#: selection:account.tax.template,type:0 +msgid "Percent" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_finance_charts +msgid "Charts" +msgstr "" + +#. module: account +#: selection:account.analytic.journal,type:0 +#: selection:account.journal,type:0 +#: selection:account.tax,type_tax_use:0 +#: selection:account.tax.template,type_tax_use:0 +msgid "Sale" +msgstr "" + +#. module: account +#: wizard_button:account.account.balance.report,account_selection,checktype:0 +#: wizard_button:account.general.ledger.report,account_selection,checktype:0 +msgid "Next" +msgstr "" + +#. module: account +#: help:res.partner,property_account_position:0 +msgid "" +"The fiscal position will determine taxes and the accounts used for the the " +"partner." +msgstr "" + +#. module: account +#: rml:account.analytic.account.cost_ledger:0 +msgid "Date or Code" +msgstr "" + +#. module: account +#: field:account.analytic.account,user_id:0 +msgid "Account Manager" +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +msgid "to :" +msgstr "" + +#. module: account +#: wizard_field:account.move.line.reconcile,init_full,debit:0 +#: wizard_field:account.move.line.reconcile,init_partial,debit:0 +msgid "Debit amount" +msgstr "" + +#. module: account +#: selection:account.subscription,period_type:0 +msgid "year" +msgstr "" + +#. module: account +#: wizard_button:account.account.balance.report,checktype,report:0 +#: wizard_button:account.analytic.account.analytic.check.report,init,report:0 +#: wizard_button:account.analytic.account.balance.report,init,report:0 +#: wizard_button:account.analytic.account.cost_ledger.report,init,report:0 +#: wizard_button:account.analytic.account.inverted.balance.report,init,report:0 +#: wizard_button:account.analytic.account.journal.report,init,report:0 +#: wizard_button:account.analytic.account.quantity_cost_ledger.report,init,report:0 +#: wizard_button:account.central.journal.report,init,print:0 +#: wizard_button:account.general.journal.report,init,print:0 +#: wizard_button:account.general.ledger.report,checktype,checkreport:0 +#: wizard_button:account.partner.balance.report,init,report:0 +#: wizard_button:account.print.journal.report,init,print:0 +#: wizard_button:account.third_party_ledger.report,init,checkreport:0 +msgid "Print" +msgstr "" + +#. module: account +#: wizard_field:account.account.balance.report,checktype,date_from:0 +msgid "Start date" +msgstr "" + +#. module: account +#: model:account.journal,name:account.refund_expenses_journal +msgid "x Expenses Credit Notes Journal" +msgstr "" + +#. module: account +#: field:account.analytic.journal,type:0 +#: field:account.bank.statement.line,type:0 +#: field:account.invoice,type:0 +#: field:account.journal,type:0 +#: field:account.move,type:0 +#: field:account.move.reconcile,type:0 +#: xsl:account.transfer:0 +msgid "Type" +msgstr "" + +#. module: account +#: view:account.journal:0 +msgid "Accounts Allowed (empty for no control)" +msgstr "" + +#. module: account +#: view:account.invoice:0 +msgid "Untaxed amount" +msgstr "" + +#. module: account +#: field:account.tax,account_collected_id:0 +#: field:account.tax.template,account_collected_id:0 +msgid "Invoice Tax Account" +msgstr "" + +#. module: account +#: view:account.move.line:0 +msgid "Analytic Lines" +msgstr "" + +#. module: account +#: wizard_view:account.invoice.pay,init:0 +#: model:ir.actions.wizard,name:account.wizard_invoice_pay +msgid "Pay invoice" +msgstr "" + +#. module: account +#: constraint:account.invoice:0 +msgid "Error: Invalid Bvr Number (wrong checksum)." +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree5 +#: model:ir.ui.menu,name:account.menu_invoice_draft +msgid "Draft Customer Invoices" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_subscription_line +msgid "Account Subscription Line" +msgstr "" + +#. module: account +#: selection:account.account.balance.report,checktype,state:0 +#: selection:account.general.ledger.report,checktype,state:0 +#: selection:account.partner.balance.report,init,state:0 +#: selection:account.third_party_ledger.report,init,state:0 +msgid "No Filter" +msgstr "" + +#. module: account +#: field:account.payment.term.line,days:0 +msgid "Number of Days" +msgstr "" + +#. module: account +#: help:account.invoice,reference:0 +msgid "The partner reference of this invoice." +msgstr "" + +#. module: account +#: wizard_field:account.general.ledger.report,checktype,sortbydate:0 +msgid "Sort by:" +msgstr "" + +#. module: account +#: field:account.move,to_check:0 +msgid "To Be Verified" +msgstr "" + +#. module: account +#: help:res.partner,debit:0 +msgid "Total amount you have to pay to this supplier." +msgstr "" + +#. module: account +#: selection:account.automatic.reconcile,init,power:0 +msgid "7" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_transfers +msgid "Transfers" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Li." +msgstr "" + +#. module: account +#: wizard_view:account.chart,init:0 +msgid "Account charts" +msgstr "" + +#. module: account +#: help:account.tax,name:0 +msgid "This name will be displayed on reports" +msgstr "" + +#. module: account +#: rml:account.analytic.account.cost_ledger:0 +#: rml:account.analytic.account.quantity_cost_ledger:0 +msgid "Printing date" +msgstr "" + +#. module: account +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "" + +#. module: account +#: wizard_field:account.partner.balance.report,init,date1:0 +msgid " Start date" +msgstr "" + +#. module: account +#: wizard_view:account.analytic.account.journal.report,init:0 +msgid "Analytic Journal Report" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree3 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree3 +msgid "Customer Refunds" +msgstr "" + +#. module: account +#: rml:account.vat.declaration:0 +msgid "Tax Amount" +msgstr "" + +#. module: account +#: rml:account.analytic.account.quantity_cost_ledger:0 +msgid "J.C./Move name" +msgstr "" + +#. module: account +#: field:account.journal.period,name:0 +msgid "Journal-Period Name" +msgstr "" + +#. module: account +#: field:account.tax.code,name:0 +#: field:account.tax.code.template,name:0 +msgid "Tax Case Name" +msgstr "" + +#. module: account +#: help:account.journal,entry_posted:0 +msgid "" +"Check this box if you don't want new account moves to pass through the " +"'draft' state and instead goes directly to the 'posted state' without any " +"manual validation." +msgstr "" + +#. module: account +#: field:account.bank.statement.line,partner_id:0 +#: field:account.bank.statement.reconcile,partner_id:0 +#: rml:account.general.ledger:0 +#: field:account.invoice,partner_id:0 +#: field:account.move,partner_id:0 +#: wizard_field:account.partner.balance.report,init,result_selection:0 +#: wizard_field:account.third_party_ledger.report,init,result_selection:0 +#: field:wizard.company.setup,partner_id:0 +msgid "Partner" +msgstr "" + +#. module: account +#: help:account.invoice,number:0 +msgid "" +"Unique number of the invoice, computed automatically when the invoice is " +"created." +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Draft Invoice" +msgstr "" + +#. module: account +#: model:account.account.type,name:account.account_type_expense +msgid "Expense" +msgstr "" + +#. module: account +#: field:account.journal,invoice_sequence_id:0 +msgid "Invoice Sequence" +msgstr "" + +#. module: account +#: wizard_view:account.automatic.reconcile,init:0 +msgid "Options" +msgstr "" + +#. module: account +#: model:process.process,name:account.process_process_invoiceprocess0 +msgid "Customer Invoice Process" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Fiscal Position Remark :" +msgstr "" + +#. module: account +#: wizard_field:account.fiscalyear.close,init,period_id:0 +msgid "Opening Entries Period" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_validate_account_moves +#: model:ir.actions.wizard,name:account.wizard_validate_account_moves_line +#: model:ir.ui.menu,name:account.menu_validate_account_moves +msgid "Validate Account Moves" +msgstr "" + +#. module: account +#: selection:account.subscription,period_type:0 +msgid "days" +msgstr "" + +#. module: account +#: selection:account.aged.trial.balance,init,direction_selection:0 +msgid "Past" +msgstr "" + +#. module: account +#: field:account.analytic.account,company_currency_id:0 +#: field:account.bank.accounts.wizard,currency_id:0 +#: field:account.bank.statement,currency:0 +#: field:account.bank.statement.reconcile,total_currency:0 +#: field:account.bank.statement.reconcile,total_second_currency:0 +#: rml:account.general.ledger:0 +#: field:account.invoice,currency_id:0 +#: field:account.journal,currency:0 +#: field:account.model.line,currency_id:0 +#: field:account.move.line,currency_id:0 +msgid "Currency" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.act_account_journal_2_account_invoice_opened +msgid "Unpaid invoices" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_paymentreconcile0 +msgid "Payment Reconcile" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_bank_statement_reconciliation_form +#: model:ir.ui.menu,name:account.menu_action_account_bank_reconcile_tree +msgid "Statements reconciliation" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_subscription_form_new +#: model:ir.ui.menu,name:account.menu_action_subscription_form_new +msgid "New Subscription" +msgstr "" + +#. module: account +#: view:account.payment.term:0 +msgid "Computation" +msgstr "" + +#. module: account +#: view:account.analytic.line:0 +msgid "Analytic Entry" +msgstr "" + +#. module: account +#: view:res.company:0 field:res.company,overdue_msg:0 +msgid "Overdue Payments Message" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_tax_code_tree +#: model:ir.ui.menu,name:account.menu_action_tax_code_tree +msgid "Chart of Taxes" +msgstr "" + +#. module: account +#: field:account.payment.term.line,value_amount:0 +msgid "Value Amount" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.act_account_acount_move_line_reconcile_open +msgid "Reconciled entries" +msgstr "" + +#. module: account +#: field:account.invoice,address_contact_id:0 +msgid "Contact Address" +msgstr "" + +#. module: account +#: view:account.fiscalyear:0 +msgid "Create 3 Months Periods" +msgstr "" + +#. module: account +#: view:account.invoice:0 +msgid "(keep empty to use the current period)" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree8 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree8 +msgid "Draft Supplier Invoices" +msgstr "" + +#. module: account +#: wizard_field:account.invoice.refund,init,period:0 +msgid "Force period" +msgstr "" + +#. module: account +#: selection:account.account.type,close_method:0 +msgid "Detail" +msgstr "" + +#. module: account +#: selection:account.account,type:0 +#: selection:account.account.template,type:0 +msgid "Consolidation" +msgstr "" + +#. module: account +#: field:account.chart.template,account_root_id:0 +msgid "Root Account" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "" +"Exception made of a mistake of our side, it seems that the following bills " +"stay unpaid. Please, take appropriate measures in order to carry out this " +"payment in the next 8 days." +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "VAT :" +msgstr "" + +#. module: account +#: wizard_field:account.general.ledger.report,account_selection,Account_list:0 +#: model:ir.actions.act_window,name:account.action_account_tree +#: model:ir.actions.wizard,name:account.wizard_account_chart +#: model:ir.ui.menu,name:account.menu_action_account_tree +#: model:ir.ui.menu,name:account.menu_action_account_tree2 +msgid "Chart of Accounts" +msgstr "" + +#. module: account +#: model:account.journal,name:account.check_journal +msgid "x Checks Journal" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_generate_subscription +#: model:ir.ui.menu,name:account.menu_generate_subscription +msgid "Create subscription entries" +msgstr "" + +#. module: account +#: wizard_field:account.fiscalyear.close,init,journal_id:0 +msgid "Opening Entries Journal" +msgstr "" + +#. module: account +#: view:account.config.wizard:0 +msgid "Create a Fiscal Year" +msgstr "" + +#. module: account +#: field:product.template,taxes_id:0 +msgid "Customer Taxes" +msgstr "" + +#. module: account +#: field:account.invoice,date_invoice:0 +msgid "Date Invoiced" +msgstr "" + +#. module: account +#: help:account.account.balance.report,checktype,periods:0 +#: help:account.general.ledger.report,checktype,periods:0 +#: help:account.partner.balance.report,init,periods:0 +#: help:account.third_party_ledger.report,init,periods:0 +#: help:account.vat.declaration,init,periods:0 +msgid "All periods if empty" +msgstr "" + +#. module: account +#: model:account.account.type,name:account.account_type_liability +msgid "Liability" +msgstr "" + +#. module: account +#: selection:account.automatic.reconcile,init,power:0 +msgid "2" +msgstr "" + +#. module: account +#: wizard_view:account.chart,init:0 +msgid "(If you do not select Fiscal year it will take all open fiscal years)" +msgstr "" + +#. module: account +#: help:account.invoice.tax,base_code_id:0 +msgid "The account basis of the tax declaration." +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +#: field:account.analytic.line,date:0 +#: field:account.bank.statement,date:0 +#: field:account.bank.statement.line,date:0 +#: field:account.bank.statement.reconcile,name:0 +#: rml:account.general.ledger:0 +#: selection:account.general.ledger.report,checktype,sortbydate:0 +#: rml:account.journal.period.print:0 +#: field:account.move,date:0 +#: rml:account.overdue:0 +#: wizard_field:account.subscription.generate,init,date:0 +#: field:account.subscription.line,date:0 +#: rml:account.tax.code.entries:0 +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +#: xsl:account.transfer:0 +msgid "Date" +msgstr "" + +#. module: account +#: field:account.invoice,reference_type:0 +msgid "Reference Type" +msgstr "" + +#. module: account +#: wizard_button:account.move.line.unreconcile,init,unrec:0 +#: wizard_button:account.reconcile.unreconcile,init,unrec:0 +msgid "Unreconcile" +msgstr "" + +#. module: account +#: field:account.tax,type:0 +#: field:account.tax.template,type:0 +msgid "Tax Type" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_statemententries0 +msgid "Statement Entries" +msgstr "" + +#. module: account +#: field:account.analytic.line,user_id:0 +#: field:account.journal,user_id:0 +msgid "User" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_template_form +#: model:ir.ui.menu,name:account.menu_action_account_template_form +msgid "Account Templates" +msgstr "" + +#. module: account +#: view:account.chart.template:0 +msgid "Chart of Accounts Template" +msgstr "" + +#. module: account +#: model:account.journal,name:account.refund_sales_journal +msgid "Journal d'extourne" +msgstr "" + +#. module: account +#: rml:account.journal.period.print:0 +msgid "Voucher No" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_automatic_reconcile +#: model:ir.ui.menu,name:account.menu_automatic_reconcile +msgid "Automatic reconciliation" +msgstr "" + +#. module: account +#: view:account.bank.statement:0 +msgid "Import Invoice" +msgstr "" + +#. module: account +#: wizard_view:account.analytic.account.quantity_cost_ledger.report,init:0 +msgid "and Journals" +msgstr "" + +#. module: account +#: view:account.tax:0 +msgid "Account Tax" +msgstr "" + +#. module: account +#: field:account.analytic.line,move_id:0 +msgid "Move Line" +msgstr "" + +#. module: account +#: field:account.bank.accounts.wizard,acc_no:0 +msgid "Account No." +msgstr "" + +#. module: account +#: help:account.tax,child_depend:0 +msgid "" +"Set if the tax computation is based on the computation of child taxes rather " +"than on the total amount." +msgstr "" + +#. module: account +#: rml:account.central.journal:0 +msgid "Journal Code" +msgstr "" + +#. module: account +#: help:account.tax,applicable_type:0 +msgid "" +"If not applicable (computed through a Python code), the tax won't appear on " +"the invoice." +msgstr "" + +#. module: account +#: field:account.model,lines_id:0 +msgid "Model Entries" +msgstr "" + +#. module: account +#: field:account.analytic.account,date:0 +msgid "Date End" +msgstr "" + +#. module: account +#: view:account.bank.statement:0 +#: field:account.move.reconcile,line_id:0 +#: model:ir.actions.act_window,name:account.action_move_line_search +#: model:ir.actions.act_window,name:account.action_move_line_tree1 +#: model:ir.ui.menu,name:account.menu_action_move_line_search +msgid "Entry Lines" +msgstr "" + +#. module: account +#: view:account.tax:0 +#: view:account.tax.template:0 +msgid "Applicable Code (if type=code)" +msgstr "" + +#. module: account +#: wizard_button:account.move.journal,init,open:0 +msgid "Open Journal" +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +msgid "KI" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.action_account_analytic_line +#: model:ir.actions.wizard,name:account.action_move_journal_line_form +#: model:ir.ui.menu,name:account.account_entries_analytic_entries +#: model:ir.ui.menu,name:account.menu_action_move_journal_line_form +msgid "Entries Encoding by Line" +msgstr "" + +#. module: account +#: help:account.chart.template,tax_template_ids:0 +msgid "List of all the taxes that have to be installed by the wizard" +msgstr "" + +#. module: account +#: rml:account.analytic.account.cost_ledger:0 +#: rml:account.analytic.account.quantity_cost_ledger:0 +msgid "Period from" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_bank_statement +#: model:process.node,name:account.process_node_bankstatement0 +#: model:process.node,name:account.process_node_supplierbankstatement0 +msgid "Bank Statement" +msgstr "" + +#. module: account +#: wizard_view:account.invoice.pay,addendum:0 +#: wizard_view:account.move.line.reconcile,addendum:0 +msgid "Information addendum" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_entriesreconcile0 +#: model:process.transition,name:account.process_transition_supplierentriesreconcile0 +msgid "Entries Reconcile" +msgstr "" + +#. module: account +#: help:account.bank.statement.reconcile,total_second_amount:0 +msgid "The amount in the currency of the journal" +msgstr "" + +#. module: account +#: wizard_field:account.general.ledger.report,checktype,landscape:0 +msgid "Landscape Mode" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_analyticinvoice0 +#: model:process.transition,note:account.process_transition_supplieranalyticcost0 +msgid "From analytic accounts, Create invoice." +msgstr "" + +#. module: account +#: wizard_button:account.account.balance.report,account_selection,end:0 +#: wizard_button:account.account.balance.report,checktype,end:0 +#: wizard_button:account.aged.trial.balance,init,end:0 +#: wizard_button:account.analytic.account.analytic.check.report,init,end:0 +#: wizard_button:account.analytic.account.balance.report,init,end:0 +#: wizard_button:account.analytic.account.chart,init,end:0 +#: wizard_button:account.analytic.account.cost_ledger.report,init,end:0 +#: wizard_button:account.analytic.account.inverted.balance.report,init,end:0 +#: wizard_button:account.analytic.account.journal.report,init,end:0 +#: wizard_button:account.analytic.account.quantity_cost_ledger.report,init,end:0 +#: wizard_button:account.analytic.line,init,end:0 +#: wizard_button:account.automatic.reconcile,init,end:0 +#: view:account.bank.statement:0 +#: wizard_button:account.central.journal.report,init,end:0 +#: wizard_button:account.chart,init,end:0 +#: wizard_button:account.fiscalyear.close,init,end:0 +#: wizard_button:account.fiscalyear.close.state,init,end:0 +#: wizard_button:account.general.journal.report,init,end:0 +#: wizard_button:account.general.ledger.report,account_selection,end:0 +#: wizard_button:account.general.ledger.report,checktype,end:0 +#: view:account.invoice:0 +#: wizard_button:account.invoice.pay,addendum,end:0 +#: wizard_button:account.invoice.pay,init,end:0 +#: wizard_button:account.invoice.refund,init,end:0 +#: view:account.move:0 +#: wizard_button:account.move.bank.reconcile,init,end:0 +#: wizard_button:account.move.journal,init,end:0 +#: wizard_button:account.move.line.reconcile,addendum,end:0 +#: wizard_button:account.move.line.reconcile,init_full,end:0 +#: wizard_button:account.move.line.reconcile,init_partial,end:0 +#: wizard_button:account.move.line.reconcile.select,init,end:0 +#: wizard_button:account.move.line.unreconcile,init,end:0 +#: wizard_button:account.move.line.unreconcile.select,init,end:0 +#: wizard_button:account.move.validate,init,end:0 +#: wizard_button:account.open_closed_fiscalyear,init,end:0 +#: wizard_button:account.partner.balance.report,init,end:0 +#: wizard_button:account.period.close,init,end:0 +#: wizard_button:account.print.journal.report,init,end:0 +#: wizard_button:account.reconcile.unreconcile,init,end:0 +#: wizard_button:account.subscription.generate,init,end:0 +#: wizard_button:account.third_party_ledger.report,init,end:0 +#: wizard_button:account.vat.declaration,init,end:0 +#: wizard_button:account_use_models,init_form,end:0 +#: view:wizard.company.setup:0 +#: view:wizard.multi.charts.accounts:0 +msgid "Cancel" +msgstr "" + +#. module: account +#: field:account.account.type,name:0 +msgid "Acc. Type Name" +msgstr "" + +#. module: account +#: help:account.tax,base_code_id:0 +#: help:account.tax,ref_base_code_id:0 +#: help:account.tax,ref_tax_code_id:0 +#: help:account.tax,tax_code_id:0 +#: help:account.tax.template,base_code_id:0 +#: help:account.tax.template,ref_base_code_id:0 +#: help:account.tax.template,ref_tax_code_id:0 +#: help:account.tax.template,tax_code_id:0 +msgid "Use this code for the VAT declaration." +msgstr "" + +#. module: account +#: field:account.move.line,blocked:0 +msgid "Litigation" +msgstr "" + +#. module: account +#: view:account.move.line:0 +#: wizard_view:account.move.validate,init:0 +#: view:account.payment.term:0 +msgid "Information" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_tax_report +msgid "Taxes Reports" +msgstr "" + +#. module: account +#: field:res.partner,property_account_payable:0 +msgid "Account Payable" +msgstr "" + +#. module: account +#: wizard_view:populate_statement_from_inv,init:0 +msgid "Import Invoices in Statement" +msgstr "" + +#. module: account +#: view:account.invoice:0 +msgid "Other Info" +msgstr "" + +#. module: account +#: field:account.journal,default_credit_account_id:0 +msgid "Default Credit Account" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_supplierpaymentorder0 +msgid "Payment Order" +msgstr "" + +#. module: account +#: help:account.account.template,reconcile:0 +msgid "" +"Check this option if you want the user to reconcile entries in this account." +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +#: model:ir.ui.menu,name:account.next_id_40 +#: model:process.node,name:account.process_node_analytic0 +#: model:process.node,name:account.process_node_analyticcost0 +msgid "Analytic" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_invoiceinvoice0 +msgid "Create Invoice" +msgstr "" + +#. module: account +#: model:account.account.type,name:account.account_type_cash_equity +msgid "Equity" +msgstr "" + +#. module: account +#: field:wizard.company.setup,overdue_msg:0 +msgid "Overdue Payment Message" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_tax_code_template +msgid "Tax Code Template" +msgstr "" + +#. module: account +#: rml:account.partner.balance:0 +msgid "In dispute" +msgstr "" + +#. module: account +#: help:account.account.template,type:0 +msgid "" +"This type is used to differenciate types with special effects in Open ERP: " +"view can not have entries, consolidation are accounts that can have children " +"accounts for multi-company consolidations, payable/receivable are for " +"partners accounts (for debit/credit computations), closed for deprecated " +"accounts." +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_account_end_year_treatments +msgid "End of Year Treatments" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_generic_report +msgid "Generic Reports" +msgstr "" + +#. module: account +#: wizard_field:account.automatic.reconcile,init,power:0 +msgid "Power" +msgstr "" + +#. module: account +#: wizard_view:account.analytic.line,init:0 +msgid "Account Analytic Lines Analysis" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Price" +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +msgid "-" +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +msgid "asgfas" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_analytic_account_tree2 +#: model:ir.actions.wizard,name:account.wizard_analytic_account_chart +#: model:ir.ui.menu,name:account.account_analytic_chart_balance +#: model:ir.ui.menu,name:account.account_analytic_def_chart +#: model:ir.ui.menu,name:account.menu_action_analytic_account_tree2 +msgid "Analytic Chart of Accounts" +msgstr "" + +#. module: account +#: wizard_view:account.analytic.line,init:0 +msgid "View Account Analytic Lines" +msgstr "" + +#. module: account +#: wizard_view:account.move.validate,init:0 +msgid "Select Period and Journal for Validation" +msgstr "" + +#. module: account +#: field:account.invoice,number:0 +msgid "Invoice Number" +msgstr "" + +#. module: account +#: field:account.period,date_stop:0 +msgid "End of Period" +msgstr "" + +#. module: account +#: wizard_button:populate_statement_from_inv,go,finish:0 +msgid "O_k" +msgstr "" + +#. module: account +#: field:account.invoice,amount_untaxed:0 +msgid "Untaxed" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_analytic_account_inverted_balance +#: model:ir.actions.wizard,name:account.account_analytic_account_inverted_balance_report +msgid "Inverted Analytic Balance" +msgstr "" + +#. module: account +#: field:account.tax,applicable_type:0 +#: field:account.tax.template,applicable_type:0 +msgid "Applicable Type" +msgstr "" + +#. module: account +#: field:account.invoice,reference:0 +msgid "Invoice Reference" +msgstr "" + +#. module: account +#: field:account.account,name:0 +#: field:account.account.template,name:0 +#: rml:account.analytic.account.inverted.balance:0 +#: field:account.bank.statement,name:0 +#: field:account.bank.statement.line,name:0 +#: field:account.chart.template,name:0 +#: field:account.config.wizard,name:0 +#: field:account.model.line,name:0 +#: field:account.move,name:0 +#: field:account.move.line,name:0 +#: field:account.move.reconcile,name:0 +#: field:account.subscription,name:0 +msgid "Name" +msgstr "" + +#. module: account +#: wizard_view:account.move.line.reconcile,init_full:0 +#: wizard_view:account.move.line.reconcile,init_partial:0 +msgid "Reconciliation transactions" +msgstr "" + +#. module: account +#: wizard_field:account.aged.trial.balance,init,direction_selection:0 +msgid "Analysis Direction" +msgstr "" + +#. module: account +#: wizard_button:populate_statement_from_inv,init,go:0 +msgid "_Go" +msgstr "" + +#. module: account +#: field:res.partner,ref_companies:0 +msgid "Companies that refers to partner" +msgstr "" + +#. module: account +#: field:account.move.line,date:0 +msgid "Effective date" +msgstr "" + +#. module: account +#: help:account.tax.template,sequence:0 +msgid "" +"The sequence field is used to order the taxes lines from lower sequences to " +"higher ones. The order is important if you have a tax that has several tax " +"children. In this case, the evaluation order is important." +msgstr "" + +#. module: account +#: field:account.journal.column,view_id:0 +#: view:account.journal.view:0 +#: field:account.journal.view,name:0 +#: model:ir.model,name:account.model_account_journal_view +msgid "Journal View" +msgstr "" + +#. module: account +#: selection:account.move.line,centralisation:0 +msgid "Credit Centralisation" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Customer Ref:" +msgstr "" + +#. module: account +#: xsl:account.transfer:0 +msgid "Partner ID" +msgstr "" + +#. module: account +#: wizard_view:account.automatic.reconcile,init:0 +#: wizard_view:account.invoice.pay,addendum:0 +#: wizard_view:account.move.line.reconcile,addendum:0 +msgid "Write-Off Move" +msgstr "" + +#. module: account +#: view:account.move.line:0 +msgid "Total credit" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree1_new +#: model:ir.ui.menu,name:account.menu_action_invoice_tree1_new +msgid "New Customer Invoice" +msgstr "" + +#. module: account +#: field:account.account,reconcile:0 +#: wizard_button:account.automatic.reconcile,init,reconcile:0 +#: field:account.bank.statement.line,reconcile_id:0 +#: view:account.bank.statement.reconcile:0 +#: field:account.bank.statement.reconcile.line,line_id:0 +#: field:account.move.line,reconcile_id:0 +#: wizard_button:account.move.line.reconcile,addendum,reconcile:0 +#: wizard_button:account.move.line.reconcile,init_full,reconcile:0 +msgid "Reconcile" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Best regards." +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_report_hr_timesheet_invoice_journal +msgid "Analytic account costs and revenues" +msgstr "" + +#. module: account +#: wizard_view:account.invoice.refund,init:0 +msgid "Are you sure you want to refund this invoice ?" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_paid_open +msgid "Open State" +msgstr "" + +#. module: account +#: field:account.journal,entry_posted:0 +msgid "Skip 'Draft' State for Created Entries" +msgstr "" + +#. module: account +#: field:account.invoice.tax,account_id:0 +#: field:account.move.line,tax_code_id:0 +msgid "Tax Account" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_statemententries0 +msgid "From statement, create entries" +msgstr "" + +#. module: account +#: field:account.analytic.account,complete_name:0 +msgid "Full Account Name" +msgstr "" + +#. module: account +#: rml:account.account.balance:0 +#: rml:account.analytic.account.analytic.check:0 +#: rml:account.analytic.account.balance:0 +#: rml:account.general.ledger:0 +#: rml:account.journal.period.print:0 +#: rml:account.partner.balance:0 +#: rml:account.tax.code.entries:0 +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +#: rml:account.vat.declaration:0 +msgid "1cm 27.7cm 20cm 27.7cm" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree12 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree12 +msgid "Draft Supplier Refunds" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_accountingstatemententries0 +msgid "Accounting Statement" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Document: Customer account statement" +msgstr "" + +#. module: account +#: view:product.product:0 +#: view:product.template:0 +#: view:res.partner:0 +msgid "Accounting" +msgstr "" + +#. module: account +#: view:account.fiscal.position.template:0 +msgid "Taxes Mapping" +msgstr "" + +#. module: account +#: wizard_view:account.move.line.unreconcile,init:0 +#: wizard_view:account.reconcile.unreconcile,init:0 +msgid "Unreconciliation transactions" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_paymentorderbank0 +#: model:process.transition,note:account.process_transition_paymentorderreconcilation0 +msgid "Reconcilation of entries from payment order." +msgstr "" + +#. module: account +#: field:account.bank.statement,move_line_ids:0 +#: model:ir.actions.act_window,name:account.act_account_journal_2_account_move_line +#: model:ir.model,name:account.model_account_move_line +msgid "Entry lines" +msgstr "" + +#. module: account +#: wizard_view:account.automatic.reconcile,init:0 +#: wizard_view:account.move.line.reconcile,init_full:0 +#: wizard_view:account.move.line.reconcile,init_partial:0 +#: wizard_view:account.move.line.reconcile.select,init:0 +#: model:ir.ui.menu,name:account.next_id_20 +#: model:process.node,name:account.process_node_reconciliation0 +#: model:process.node,name:account.process_node_supplierreconciliation0 +msgid "Reconciliation" +msgstr "" + +#. module: account +#: field:account.move.line,centralisation:0 +msgid "Centralisation" +msgstr "" + +#. module: account +#: field:account.invoice.tax,tax_code_id:0 +#: field:account.tax,description:0 +#: field:account.tax,tax_code_id:0 +#: field:account.tax.template,tax_code_id:0 +#: model:ir.model,name:account.model_account_tax_code +msgid "Tax Code" +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +msgid "Analytic Journal -" +msgstr "" + +#. module: account +#: rml:account.analytic.account.analytic.check:0 +msgid "Analytic Debit" +msgstr "" + +#. module: account +#: field:account.account,currency_mode:0 +msgid "Outgoing Currencies Rate" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree10 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree10 +msgid "Draft Customer Refunds" +msgstr "" + +#. module: account +#: field:account.journal.column,readonly:0 +msgid "Readonly" +msgstr "" + +#. module: account +#: help:account.model.line,date_maturity:0 +msgid "" +"The maturity date of the generated entries for this model. You can chosse " +"between the date of the creation action or the the date of the creation of " +"the entries plus the partner payment terms." +msgstr "" + +#. module: account +#: selection:account.analytic.journal,type:0 +#: selection:account.journal,type:0 +msgid "Situation" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: xsl:account.transfer:0 +msgid "Document" +msgstr "" + +#. module: account +#: help:account.move.line,move_id:0 +msgid "The move of this entry line." +msgstr "" + +#. module: account +#: field:account.invoice.line,uos_id:0 +msgid "Unit of Measure" +msgstr "" + +#. module: account +#: field:account.chart.template,property_account_receivable:0 +msgid "Receivable Account" +msgstr "" + +#. module: account +#: help:account.journal,group_invoice_lines:0 +msgid "" +"If this box is checked, the system will try to group the accounting lines " +"when generating them from invoices." +msgstr "" + +#. module: account +#: wizard_field:account.move.line.reconcile,init_full,trans_nbr:0 +#: wizard_field:account.move.line.reconcile,init_partial,trans_nbr:0 +msgid "# of Transaction" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_invoice_state_cancel +msgid "Cancel selected invoices" +msgstr "" + +#. module: account +#: view:account.analytic.journal:0 +#: field:account.analytic.line,journal_id:0 +#: field:account.journal,analytic_journal_id:0 +#: model:ir.actions.report.xml,name:account.analytic_journal_print +#: model:ir.actions.wizard,name:account.account_analytic_account_journal_report +msgid "Analytic Journal" +msgstr "" + +#. module: account +#: rml:account.general.ledger:0 +msgid "Entry Label" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_paymentreconcile0 +msgid "Reconcilate the entries from payment" +msgstr "" + +#. module: account +#: rml:account.tax.code.entries:0 +msgid "(" +msgstr "" + +#. module: account +#: view:account.invoice:0 +#: view:account.period:0 +#: view:account.subscription:0 +msgid "Set to Draft" +msgstr "" + +#. module: account +#: help:account.invoice,origin:0 +#: help:account.invoice.line,origin:0 +msgid "Reference of the document that produced this invoice." +msgstr "" + +#. module: account +#: selection:account.account,type:0 +#: selection:account.account.template,type:0 +#: selection:account.aged.trial.balance,init,result_selection:0 +msgid "Payable" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: field:account.invoice.tax,base:0 +msgid "Base" +msgstr "" + +#. module: account +#: field:account.model,name:0 +msgid "Model Name" +msgstr "" + +#. module: account +#: selection:account.account,type:0 +#: selection:account.account.template,type:0 +msgid "Others" +msgstr "" + +#. module: account +#: selection:account.automatic.reconcile,init,power:0 +msgid "8" +msgstr "" + +#. module: account +#: view:account.invoice:0 +#: view:account.move:0 +#: wizard_button:account.move.validate,init,validate:0 +msgid "Validate" +msgstr "" + +#. module: account +#: view:account.model:0 +#: field:account.model,legend:0 +msgid "Legend" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_draftinvoices0 +msgid "Proposed invoice to be checked, validated and printed" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_move_line_select +msgid "account.move.line.select" +msgstr "" + +#. module: account +#: view:account.account:0 +#: rml:account.account.balance:0 +#: wizard_field:account.account.balance.report,account_selection,Account_list:0 +#: wizard_field:account.automatic.reconcile,init,writeoff_acc_id:0 +#: field:account.bank.statement.line,account_id:0 +#: field:account.bank.statement.reconcile.line,account_id:0 +#: field:account.invoice,account_id:0 +#: field:account.invoice.line,account_id:0 +#: field:account.journal,account_control_ids:0 +#: field:account.model.line,account_id:0 +#: field:account.move.line,account_id:0 +#: wizard_field:account.move.line.reconcile.select,init,account_id:0 +#: wizard_field:account.move.line.unreconcile.select,init,account_id:0 +#: model:ir.model,name:account.model_account_account +msgid "Account" +msgstr "" + +#. module: account +#: model:account.journal,name:account.bank_journal +msgid "Journal de Banque CHF" +msgstr "" + +#. module: account +#: selection:account.account.balance.report,checktype,state:0 +#: selection:account.general.ledger.report,checktype,state:0 +#: selection:account.partner.balance.report,init,state:0 +#: selection:account.third_party_ledger.report,init,state:0 +msgid "By Date and Period" +msgstr "" + +#. module: account +#: view:account.account:0 +#: view:account.account.template:0 +#: view:account.bank.statement:0 +#: field:account.bank.statement.line,note:0 +#: field:account.fiscal.position,note:0 +#: view:account.invoice.line:0 +#: field:account.invoice.line,note:0 +msgid "Notes" +msgstr "" + +#. module: account +#: help:account.invoice,reconciled:0 +msgid "" +"The account moves of the invoice have been reconciled with account moves of " +"the payment(s)." +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: view:account.invoice:0 +#: field:account.invoice.line,invoice_line_tax_id:0 +#: model:ir.actions.act_window,name:account.action_tax_form +#: model:ir.ui.menu,name:account.menu_action_tax_form +#: model:ir.ui.menu,name:account.next_id_27 +msgid "Taxes" +msgstr "" + +#. module: account +#: wizard_view:account.fiscalyear.close,init:0 +msgid "Close Fiscal Year with new entries" +msgstr "" + +#. module: account +#: selection:account.account,currency_mode:0 +msgid "Average Rate" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_bankstatement0 +#: model:process.node,note:account.process_node_supplierbankstatement0 +msgid "Statement encoding produces payment entries" +msgstr "" + +#. module: account +#: field:account.account,code:0 +#: rml:account.account.balance:0 +#: field:account.account.template,code:0 +#: field:account.account.type,code:0 +#: rml:account.analytic.account.analytic.check:0 +#: rml:account.analytic.account.balance:0 +#: rml:account.analytic.account.inverted.balance:0 +#: rml:account.analytic.account.journal:0 +#: field:account.analytic.line,code:0 +#: field:account.config.wizard,code:0 +#: field:account.fiscalyear,code:0 +#: rml:account.general.journal:0 +#: field:account.journal,code:0 +#: rml:account.partner.balance:0 +#: field:account.period,code:0 +msgid "Code" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_finance +msgid "Financial Management" +msgstr "" + +#. module: account +#: selection:account.account.type,close_method:0 +#: selection:account.tax,type:0 +#: selection:account.tax.template,type:0 +msgid "None" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_fiscalyear_close +#: model:ir.ui.menu,name:account.menu_wizard_fy_close +msgid "Generate Fiscal Year Opening Entries" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_reconcile +msgid "Reconcile Entries" +msgstr "" + +#. module: account +#: wizard_view:account.wizard_paid_open,init:0 +msgid "(Invoice should be unreconciled if you want to open it)" +msgstr "" + +#. module: account +#: view:account.invoice:0 +msgid "Additionnal Information" +msgstr "" + +#. module: account +#: field:account.tax,name:0 +#: field:account.tax.template,name:0 +#: rml:account.vat.declaration:0 +msgid "Tax Name" +msgstr "" + +#. module: account +#: wizard_view:account.fiscalyear.close.state,init:0 +msgid " Close states of Fiscal year and periods" +msgstr "" + +#. module: account +#: model:account.payment.term,name:account.account_payment_term +msgid "30 Days End of Month" +msgstr "" + +#. module: account +#: field:account.chart.template,tax_code_root_id:0 +msgid "Root Tax Code" +msgstr "" + +#. module: account +#: constraint:account.invoice:0 +msgid "Error: BVR reference is required." +msgstr "" + +#. module: account +#: field:account.tax.code,notprintable:0 +#: field:account.tax.code.template,notprintable:0 +msgid "Not Printable in Invoice" +msgstr "" + +#. module: account +#: field:account.move.line,move_id:0 +msgid "Move" +msgstr "" + +#. module: account +#: field:account.fiscal.position.tax,tax_src_id:0 +#: field:account.fiscal.position.tax.template,tax_src_id:0 +msgid "Tax Source" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_analytic_account_balance +#: model:ir.actions.wizard,name:account.account_analytic_account_balance_report +msgid "Analytic Balance" +msgstr "" + +#. module: account +#: view:account.move.line:0 +msgid "Total debit" +msgstr "" + +#. module: account +#: selection:account.analytic.account,state:0 +msgid "Pending" +msgstr "" + +#. module: account +#: view:wizard.multi.charts.accounts:0 +msgid "Bank Information" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Fax :" +msgstr "" + +#. module: account +#: rml:account.partner.balance:0 +#: model:ir.actions.report.xml,name:account.account_3rdparty_account_balance +#: model:ir.actions.wizard,name:account.wizard_partner_balance_report +#: model:ir.ui.menu,name:account.menu_partner_balance +msgid "Partner Balance" +msgstr "" + +#. module: account +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +msgid "Third Party Ledger" +msgstr "" + +#. module: account +#: help:res.partner,property_account_receivable:0 +msgid "" +"This account will be used instead of the default one as the receivable " +"account for the current partner" +msgstr "" + +#. module: account +#: selection:account.tax,applicable_type:0 +#: field:account.tax,python_applicable:0 +#: field:account.tax,python_compute:0 +#: selection:account.tax,type:0 +#: selection:account.tax.template,applicable_type:0 +#: field:account.tax.template,python_applicable:0 +#: field:account.tax.template,python_compute:0 +#: selection:account.tax.template,type:0 +msgid "Python Code" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.act_account_journal_2_account_bank_statement +msgid "Bank statements" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.next_id_22 +msgid "Partner Accounts" +msgstr "" + +#. module: account +#: help:account.tax.template,tax_group:0 +msgid "" +"If a default tax if given in the partner it only override taxes from account " +"(or product) of the same group." +msgstr "" + +#. module: account +#: view:account.bank.statement:0 +msgid "Real Entries" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_importinvoice0 +msgid "Import invoice" +msgstr "" + +#. module: account +#: view:account.invoice:0 +#: view:wizard.company.setup:0 +#: view:wizard.multi.charts.accounts:0 +msgid "Create" +msgstr "" + +#. module: account +#: model:process.transition.action,name:account.process_transition_action_createentries0 +msgid "Create entry" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_invoice_line +msgid "Invoice line" +msgstr "" + +#. module: account +#: field:account.account,shortcut:0 +#: field:account.account.template,shortcut:0 +msgid "Shortcut" +msgstr "" + +#. module: account +#: wizard_view:account.move.validate,init:0 +msgid "" +"All draft account entries in this journal and period will be validated. It " +"means you won't be able to modify their accouting fields." +msgstr "" + +#. module: account +#: selection:account.model.line,date:0 +#: selection:account.model.line,date_maturity:0 +msgid "Date of the day" +msgstr "" + +#. module: account +#: help:account.move.line,amount_currency:0 +msgid "" +"The amount expressed in an optional other currency if it is a multi-currency " +"entry." +msgstr "" + +#. module: account +#: field:account.tax,parent_id:0 +#: field:account.tax.template,parent_id:0 +msgid "Parent Tax Account" +msgstr "" + +#. module: account +#: field:account.account,user_type:0 +#: field:account.account.template,user_type:0 +#: view:account.account.type:0 +#: field:account.analytic.account,type:0 +#: model:ir.model,name:account.model_account_account_type +msgid "Account Type" +msgstr "" + +#. module: account +#: view:res.partner:0 +msgid "Bank account owner" +msgstr "" + +#. module: account +#: wizard_view:account.account.balance.report,checktype:0 +#: wizard_view:account.general.ledger.report,checktype:0 +#: wizard_view:account.partner.balance.report,init:0 +#: wizard_view:account.third_party_ledger.report,init:0 +msgid "Filter on Periods" +msgstr "" + +#. module: account +#: field:res.partner,property_account_receivable:0 +msgid "Account Receivable" +msgstr "" + +#. module: account +#: wizard_button:account.invoice.pay,addendum,reconcile:0 +msgid "Pay and reconcile" +msgstr "" + +#. module: account +#: rml:account.central.journal:0 +#: model:ir.actions.report.xml,name:account.account_central_journal +msgid "Central Journal" +msgstr "" + +#. module: account +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +msgid "Balance brought forward" +msgstr "" + +#. module: account +#: field:account.account,child_consol_ids:0 +msgid "Consolidated Children" +msgstr "" + +#. module: account +#: wizard_field:account.account.balance.report,checktype,fiscalyear:0 +#: wizard_field:account.chart,init,fiscalyear:0 +#: wizard_field:account.general.ledger.report,checktype,fiscalyear:0 +#: wizard_field:account.partner.balance.report,init,fiscalyear:0 +#: wizard_field:account.third_party_ledger.report,init,fiscalyear:0 +msgid "Fiscal year" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Balance :" +msgstr "" + +#. module: account +#: selection:account.account.balance.report,checktype,display_account:0 +#: selection:account.general.ledger.report,checktype,display_account:0 +msgid "With balance is not equal to 0" +msgstr "" + +#. module: account +#: selection:account.automatic.reconcile,init,power:0 +msgid "3" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_vat_declaration +msgid "Taxes Report" +msgstr "" + +#. module: account +#: selection:account.journal.period,state:0 +msgid "Printed" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree4_new +#: model:ir.ui.menu,name:account.menu_action_invoice_tree4_new +msgid "New Supplier Refund" +msgstr "" + +#. module: account +#: view:account.model:0 +msgid "Entry Model" +msgstr "" + +#. module: account +#: wizard_field:account.general.ledger.report,checktype,amount_currency:0 +msgid "With Currency" +msgstr "" + +#. module: account +#: view:account.account:0 +msgid "Chart of accounts" +msgstr "" + +#. module: account +#: field:account.subscription.line,subscription_id:0 +msgid "Subscription" +msgstr "" + +#. module: account +#: field:account.analytic.journal,code:0 +msgid "Journal code" +msgstr "" + +#. module: account +#: wizard_button:account.fiscalyear.close,init,close:0 +#: view:account.model:0 +msgid "Create entries" +msgstr "" + +#. module: account +#: view:account.analytic.line:0 +msgid "Project line" +msgstr "" + +#. module: account +#: wizard_field:account.automatic.reconcile,init,max_amount:0 +msgid "Maximum write-off amount" +msgstr "" + +#. module: account +#: field:account.invoice.tax,manual:0 +msgid "Manual" +msgstr "" + +#. module: account +#: view:account.invoice:0 +msgid "Compute Taxes" +msgstr "" + +#. module: account +#: field:wizard.multi.charts.accounts,code_digits:0 +msgid "# of Digits" +msgstr "" + +#. module: account +#: help:res.partner,property_payment_term:0 +msgid "" +"This payment term will be used instead of the default one for the current " +"partner" +msgstr "" + +#. module: account +#: wizard_field:account.invoice.pay,addendum,comment:0 +#: wizard_field:account.invoice.pay,init,name:0 +msgid "Entry Name" +msgstr "" + +#. module: account +#: help:account.invoice,account_id:0 +msgid "The partner account used for this invoice." +msgstr "" + +#. module: account +#: help:account.tax.code,notprintable:0 +#: help:account.tax.code.template,notprintable:0 +msgid "" +"Check this box if you don't want any VAT related to this Tax Code to appear " +"on invoices" +msgstr "" + +#. module: account +#: field:account.account.type,sequence:0 +#: field:account.invoice.tax,sequence:0 +#: field:account.journal.column,sequence:0 +#: field:account.model.line,sequence:0 +#: field:account.payment.term.line,sequence:0 +#: field:account.sequence.fiscalyear,sequence_id:0 +#: field:account.tax,sequence:0 +#: field:account.tax.template,sequence:0 +#: field:fiscalyear.seq,sequence_id:0 +msgid "Sequence" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_fiscal_position_template +msgid "Template for Fiscal Position" +msgstr "" + +#. module: account +#: view:account.bank.statement:0 +msgid "Entry encoding" +msgstr "" + +#. module: account +#: wizard_view:account.invoice.refund,init:0 +#: model:ir.actions.wizard,name:account.wizard_invoice_refund +msgid "Credit Note" +msgstr "" + +#. module: account +#: model:ir.actions.todo,note:account.config_fiscalyear +msgid "Define Fiscal Years and Select Charts of Account" +msgstr "" + +#. module: account +#: wizard_field:account.move.line.reconcile,addendum,period_id:0 +msgid "Write-Off Period" +msgstr "" + +#. module: account +#: selection:account.config.wizard,period:0 +msgid "3 Months" +msgstr "" + +#. module: account +#: wizard_view:account.move.journal,init:0 +msgid "Standard entries" +msgstr "" + +#. module: account +#: help:account.account,check_history:0 +msgid "" +"Check this box if you want to print all entries when printing the General " +"Ledger, otherwise it will only print its balance." +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_payment_term_line +msgid "Payment Term Line" +msgstr "" + +#. module: account +#: selection:account.config.wizard,period:0 +#: field:report.hr.timesheet.invoice.journal,name:0 +msgid "Month" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_subscription +msgid "Account Subscription" +msgstr "" + +#. module: account +#: field:account.model.line,date_maturity:0 +#: field:account.move.line,date_maturity:0 +#: rml:account.overdue:0 +msgid "Maturity date" +msgstr "" + +#. module: account +#: view:account.subscription:0 +msgid "Entry Subscription" +msgstr "" + +#. module: account +#: selection:account.print.journal.report,init,sort_selection:0 +msgid "By date" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_config_wizard_form +msgid "Account Configure Wizard " +msgstr "" + +#. module: account +#: field:account.config.wizard,date1:0 +#: field:account.fiscalyear,date_start:0 +#: field:account.subscription,date_start:0 +msgid "Start Date" +msgstr "" + +#. module: account +#: wizard_view:account.general.ledger.report,account_selection:0 +msgid "Select Chart" +msgstr "" + +#. module: account +#: selection:account.chart,init,target_move:0 +#: model:ir.actions.report.xml,name:account.account_move_line_list +msgid "All Entries" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_draftinvoices0 +#: model:process.node,name:account.process_node_supplierdraftinvoices0 +msgid "Draft Invoices" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_fiscal_position_tax_template +msgid "Fiscal Position Template Tax Mapping" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Invoice Date" +msgstr "" + +#. module: account +#: selection:account.account.type,close_method:0 +msgid "Unreconciled" +msgstr "" + +#. module: account +#: field:account.account,note:0 +#: field:account.account.template,note:0 +msgid "Note" +msgstr "" + +#. module: account +#: model:ir.module.module,description:account.module_meta_information +msgid "" +"Financial and accounting module that covers:\n" +" General accounting\n" +" Cost / Analytic accounting\n" +" Third party accounting\n" +" Taxes management\n" +" Budgets\n" +" Customer and Supplier Invoices\n" +" Bank statements\n" +" " +msgstr "" + +#. module: account +#: field:account.journal,sequence_id:0 +msgid "Entry Sequence" +msgstr "" + +#. module: account +#: selection:account.account,type:0 +#: selection:account.account.template,type:0 +msgid "Closed" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_paymententries0 +msgid "Payment Entries" +msgstr "" + +#. module: account +#: help:account.move.line,tax_code_id:0 +msgid "The Account can either be a base tax code or tax code account." +msgstr "" + +#. module: account +#: help:account.automatic.reconcile,init,account_ids:0 +msgid "" +"If no account is specified, the reconciliation will be made using every " +"accounts that can be reconcilied" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_wizard_company_setup_form +#: view:wizard.company.setup:0 +msgid "Overdue Payment Report Message" +msgstr "" + +#. module: account +#: selection:account.tax,tax_group:0 +#: selection:account.tax.template,tax_group:0 +msgid "Other" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_general_ledger +#: model:ir.actions.wizard,name:account.wizard_general_ledger +#: model:ir.actions.wizard,name:account.wizard_general_ledger_report +#: model:ir.ui.menu,name:account.menu_general_ledger +msgid "General Ledger" +msgstr "" + +#. module: account +#: field:account.journal.view,columns_id:0 +msgid "Columns" +msgstr "" + +#. module: account +#: selection:account.general.ledger.report,checktype,sortbydate:0 +msgid "Movement" +msgstr "" + +#. module: account +#: help:account.period,special:0 +msgid "These periods can overlap." +msgstr "" + +#. module: account +#: help:product.template,property_account_expense:0 +msgid "" +"This account will be used instead of the default one to value outgoing stock " +"for the current product" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_manually0 +msgid "Encode manually the statement" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_journal_form +#: model:ir.ui.menu,name:account.menu_action_account_journal_form +msgid "Financial Journals" +msgstr "" + +#. module: account +#: selection:account.account.balance.report,checktype,state:0 +#: selection:account.general.ledger.report,checktype,state:0 +#: selection:account.partner.balance.report,init,state:0 +#: selection:account.third_party_ledger.report,init,state:0 +msgid "By Period" +msgstr "" + +#. module: account +#: help:account.invoice,date_invoice:0 +msgid "Keep empty to use the current date" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "." +msgstr "" + +#. module: account +#: field:account.analytic.account,quantity_max:0 +msgid "Maximum Quantity" +msgstr "" + +#. module: account +#: field:account.period,name:0 +msgid "Period Name" +msgstr "" + +#. module: account +#: help:account.analytic.journal,type:0 +msgid "" +"Gives the type of the analytic journal. When a document (eg: an invoice) " +"needs to create analytic entries, Open ERP will look for a matching journal " +"of the same type." +msgstr "" + +#. module: account +#: field:account.journal,groups_id:0 +msgid "Groups" +msgstr "" + +#. module: account +#: rml:account.analytic.account.quantity_cost_ledger:0 +msgid "Code/Date" +msgstr "" + +#. module: account +#: field:account.account,active:0 +#: field:account.analytic.account,active:0 +#: field:account.analytic.journal,active:0 +#: field:account.journal,active:0 +#: field:account.journal.period,active:0 +#: field:account.payment.term,active:0 +#: field:account.tax,active:0 +msgid "Active" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_electronicfile0 +msgid "Import from your bank statements" +msgstr "" + +#. module: account +#: view:account.chart.template:0 +msgid "Properties" +msgstr "" + +#. module: account +#: view:res.partner:0 +msgid "Customer Accounting Properties" +msgstr "" + +#. module: account +#: view:account.bank.statement:0 +msgid "Select entries" +msgstr "" + +#. module: account +#: selection:account.chart,init,target_move:0 +msgid "All Posted Entries" +msgstr "" + +#. module: account +#: wizard_field:account.vat.declaration,init,based_on:0 +msgid "Base on" +msgstr "" + +#. module: account +#: selection:account.move,type:0 +msgid "Cash Payment" +msgstr "" + +#. module: account +#: field:account.chart.template,property_account_payable:0 +msgid "Payable Account" +msgstr "" + +#. module: account +#: field:account.account,currency_id:0 +#: field:account.account.template,currency_id:0 +msgid "Secondary Currency" +msgstr "" + +#. module: account +#: field:account.account,credit:0 +#: rml:account.account.balance:0 +#: field:account.analytic.account,credit:0 +#: rml:account.analytic.account.balance:0 +#: rml:account.analytic.account.cost_ledger:0 +#: rml:account.analytic.account.inverted.balance:0 +#: rml:account.central.journal:0 +#: rml:account.journal.period.print:0 +#: field:account.model.line,credit:0 +#: field:account.move.line,credit:0 +#: rml:account.partner.balance:0 +#: rml:account.tax.code.entries:0 +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +#: rml:account.vat.declaration:0 +#: field:report.hr.timesheet.invoice.journal,cost:0 +msgid "Credit" +msgstr "" + +#. module: account +#: help:account.tax.template,child_depend:0 +msgid "" +"Indicate if the tax computation is based on the value computed for the " +"computation of child taxes or based on the total amount." +msgstr "" + +#. module: account +#: field:account.tax,account_paid_id:0 +#: field:account.tax.template,account_paid_id:0 +msgid "Refund Tax Account" +msgstr "" + +#. module: account +#: field:account.tax.code,child_ids:0 +#: field:account.tax.code.template,child_ids:0 +msgid "Child Codes" +msgstr "" + +#. module: account +#: field:account.invoice,move_name:0 +msgid "Account Move" +msgstr "" + +#. module: account +#: view:account.bank.statement:0 +#: field:account.bank.statement,line_ids:0 +msgid "Statement lines" +msgstr "" + +#. module: account +#: field:account.move.line,amount_taxed:0 +msgid "Taxed Amount" +msgstr "" + +#. module: account +#: field:account.invoice.line,price_subtotal:0 +msgid "Subtotal w/o tax" +msgstr "" + +#. module: account +#: field:account.invoice.line,invoice_id:0 +msgid "Invoice Ref" +msgstr "" + +#. module: account +#: field:account.analytic.line,general_account_id:0 +msgid "General Account" +msgstr "" + +#. module: account +#: help:account.move.line,quantity:0 +msgid "" +"The optional quantity expressed by this line, eg: number of product sold. " +"The quantity is not a legal requirement but is very usefull for some reports." +msgstr "" + +#. module: account +#: wizard_field:account.third_party_ledger.report,init,reconcil:0 +msgid " Include Reconciled Entries" +msgstr "" + +#. module: account +#: help:account.move.line,blocked:0 +msgid "" +"You can check this box to mark the entry line as a litigation with the " +"associated partner" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree1 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree1 +msgid "Customer Invoices" +msgstr "" + +#. module: account +#: field:res.partner,debit_limit:0 +msgid "Payable Limit" +msgstr "" + +#. module: account +#: wizard_field:account.account.balance.report,checktype,state:0 +#: wizard_field:account.general.ledger.report,checktype,state:0 +#: wizard_field:account.partner.balance.report,init,state:0 +#: wizard_field:account.third_party_ledger.report,init,state:0 +msgid "Date/Period Filter" +msgstr "" + +#. module: account +#: rml:account.analytic.account.journal:0 +#: selection:account.analytic.journal,type:0 +#: selection:account.bank.statement.line,type:0 +#: selection:account.journal,type:0 +msgid "General" +msgstr "" + +#. module: account +#: rml:account.general.journal:0 +msgid "Credit Trans." +msgstr "" + +#. module: account +#: field:wizard.multi.charts.accounts,seq_journal:0 +msgid "Separated Journal Sequences" +msgstr "" + +#. module: account +#: help:account.bank.statement.reconcile,total_second_currency:0 +msgid "The currency of the journal" +msgstr "" + +#. module: account +#: view:account.journal.column:0 +#: model:ir.model,name:account.model_account_journal_column +msgid "Journal Column" +msgstr "" + +#. module: account +#: selection:account.fiscalyear,state:0 +#: selection:account.invoice,state:0 +#: selection:account.journal.period,state:0 +#: selection:account.period,state:0 +#: selection:account.subscription,state:0 +msgid "Done" +msgstr "" + +#. module: account +#: wizard_field:account.account.balance.report,checktype,periods:0 +#: field:account.config.wizard,period:0 +#: view:account.fiscalyear:0 +#: field:account.fiscalyear,period_ids:0 +#: wizard_field:account.general.ledger.report,checktype,periods:0 +#: wizard_field:account.partner.balance.report,init,periods:0 +#: wizard_field:account.third_party_ledger.report,init,periods:0 +#: wizard_field:account.vat.declaration,init,periods:0 +#: model:ir.actions.act_window,name:account.action_account_period_form +#: model:ir.ui.menu,name:account.menu_action_account_period_form +#: model:ir.ui.menu,name:account.next_id_23 +msgid "Periods" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: view:account.invoice:0 +#: field:account.move.line,invoice:0 +#: model:ir.model,name:account.model_account_invoice +#: model:res.request.link,name:account.req_link_invoice +msgid "Invoice" +msgstr "" + +#. module: account +#: selection:account.analytic.account,state:0 +#: selection:account.invoice,state:0 +#: wizard_button:account.open_closed_fiscalyear,init,open:0 +#: wizard_button:account_use_models,create,open_move:0 +msgid "Open" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.next_id_29 +msgid "Search Entries" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_analytic0 +#: model:process.node,note:account.process_node_analyticcost0 +msgid "Analytic costs to reinvoice purchases, timesheets, ..." +msgstr "" + +#. module: account +#: field:account.account,tax_ids:0 +#: field:account.account.template,tax_ids:0 +msgid "Default Taxes" +msgstr "" + +#. module: account +#: constraint:ir.model:0 +msgid "" +"The Object name must start with x_ and not contain any special character !" +msgstr "" + +#. module: account +#: help:account.account.type,sign:0 +msgid "" +"Allows you to change the sign of the balance amount displayed in the " +"reports, so that you can see positive figures instead of negative ones in " +"expenses accounts." +msgstr "" + +#. module: account +#: help:account.config.wizard,code:0 +msgid "Name of the fiscal year as displayed in reports." +msgstr "" + +#. module: account +#: help:account.move.line,date_maturity:0 +msgid "" +"This field is used for payable and receivable entries. You can put the limit " +"date for the payment of this entry line." +msgstr "" + +#. module: account +#: rml:account.tax.code.entries:0 +msgid "Third party (Country)" +msgstr "" + +#. module: account +#: field:account.account,parent_left:0 +msgid "Parent Left" +msgstr "" + +#. module: account +#: help:account.journal,sequence_id:0 +msgid "The sequence gives the display order for a list of journals" +msgstr "" + +#. module: account +#: field:account.journal,type_control_ids:0 +msgid "Type Controls" +msgstr "" + +#. module: account +#: field:account.analytic.account,name:0 +#: rml:account.analytic.account.analytic.check:0 +#: rml:account.analytic.account.balance:0 +#: rml:account.central.journal:0 +msgid "Account Name" +msgstr "" + +#. module: account +#: wizard_field:account.invoice.pay,init,date:0 +msgid "Payment date" +msgstr "" + +#. module: account +#: wizard_button:account_use_models,create,end:0 +msgid "Ok" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Taxes:" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree7 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree7 +msgid "Unpaid Customer Invoices" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree2 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree2 +msgid "Supplier Invoices" +msgstr "" + +#. module: account +#: field:account.analytic.line,product_id:0 +#: field:account.invoice.line,product_id:0 +#: field:account.move.line,product_id:0 +msgid "Product" +msgstr "" + +#. module: account +#: rml:account.tax.code.entries:0 +msgid ")" +msgstr "" + +#. module: account +#: field:res.partner,credit:0 +msgid "Total Receivable" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_period +msgid "Account period" +msgstr "" + +#. module: account +#: wizard_field:account.invoice.pay,init,journal_id:0 +msgid "Journal/Payment Mode" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Canceled Invoice" +msgstr "" + +#. module: account +#: view:account.subscription:0 +msgid "Remove Lines" +msgstr "" + +#. module: account +#: wizard_field:account.general.ledger.report,checktype,soldeinit:0 +#: wizard_field:account.partner.balance.report,init,soldeinit:0 +#: wizard_field:account.third_party_ledger.report,init,soldeinit:0 +msgid "Include initial balances" +msgstr "" + +#. module: account +#: view:account.account.template:0 +msgid "Account Template" +msgstr "" + +#. module: account +#: field:account.tax.code,sum:0 +msgid "Year Sum" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_filestatement0 +msgid "Import file from your bank statement" +msgstr "" + +#. module: account +#: field:account.account,type:0 +#: field:account.account.template,type:0 +msgid "Internal Type" +msgstr "" + +#. module: account +#: selection:account.automatic.reconcile,init,power:0 +msgid "9" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_subscription_form_running +#: model:ir.ui.menu,name:account.menu_action_subscription_form_running +msgid "Running Subscriptions" +msgstr "" + +#. module: account +#: selection:account.move,type:0 +msgid "Bank Payment" +msgstr "" + +#. module: account +#: selection:account.move,state:0 +msgid "Posted" +msgstr "" + +#. module: account +#: view:account.tax:0 +#: view:account.tax.template:0 +msgid "Credit Notes" +msgstr "" + +#. module: account +#: field:account.config.wizard,date2:0 +#: field:account.fiscalyear,date_stop:0 +msgid "End Date" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_open_closed_fiscalyear +#: model:ir.ui.menu,name:account.menu_wizard_open_closed_fy +msgid "Cancel Opening Entries" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_invoicemanually0 +msgid "Manually statement" +msgstr "" + +#. module: account +#: field:account.payment.term.line,days2:0 +msgid "Day of the Month" +msgstr "" + +#. module: account +#: field:account.analytic.journal,line_ids:0 +#: field:account.tax.code,line_ids:0 +msgid "Lines" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Dear Sir/Madam," +msgstr "" + +#. module: account +#: help:account.tax,sequence:0 +msgid "" +"The sequence field is used to order the tax lines from the lowest sequences " +"to the higher ones. The order is important if you have a tax with several " +"tax children. In this case, the evaluation order is important." +msgstr "" + +#. module: account +#: view:account.tax:0 +#: view:account.tax.template:0 +msgid "Tax Declaration" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_filestatement0 +msgid "File statement" +msgstr "" + +#. module: account +#: view:ir.sequence:0 +msgid "Fiscal Year Sequences" +msgstr "" + +#. module: account +#: view:account.model.line:0 +msgid "Entry Model Line" +msgstr "" + +#. module: account +#: view:account.tax.template:0 +msgid "Account Tax Template" +msgstr "" + +#. module: account +#: help:account.model,name:0 +msgid "This is a model for recurring accounting entries" +msgstr "" + +#. module: account +#: wizard_view:account.wizard_paid_open,init:0 +msgid "Open Invoice" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_draftstatement0 +msgid "Set starting and ending balance for control" +msgstr "" + +#. module: account +#: wizard_view:account.wizard_paid_open,init:0 +msgid "Are you sure you want to open this invoice ?" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger_other +msgid "Partner Other Ledger" +msgstr "" + +#. module: account +#: view:res.partner:0 +msgid "Supplier Debit" +msgstr "" + +#. module: account +#: help:account.model.line,quantity:0 +msgid "The optional quantity on entries" +msgstr "" + +#. module: account +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +msgid "JNRL" +msgstr "" + +#. module: account +#: view:account.fiscalyear:0 +#: view:account.period:0 +msgid "States" +msgstr "" + +#. module: account +#: view:account.move:0 +#: model:process.node,name:account.process_node_accountingentries0 +#: model:process.node,name:account.process_node_supplieraccountingentries0 +msgid "Accounting Entries" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.act_account_partner_account_move_unreconciled +msgid "Receivables & Payables" +msgstr "" + +#. module: account +#: rml:account.general.ledger:0 +msgid "General Ledger -" +msgstr "" + +#. module: account +#: field:report.hr.timesheet.invoice.journal,quantity:0 +msgid "Quantities" +msgstr "" + +#. module: account +#: field:account.analytic.account,date_start:0 +msgid "Date Start" +msgstr "" + +#. module: account +#: rml:account.analytic.account.analytic.check:0 +#: rml:account.analytic.account.balance:0 +#: rml:account.analytic.account.inverted.balance:0 +#: rml:account.analytic.account.quantity_cost_ledger:0 +#: field:account.invoice,amount_total:0 +#: field:account.invoice,check_total:0 +msgid "Total" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_customerinvoice0 +#: model:process.transition,note:account.process_transition_suppliercustomerinvoice0 +msgid "Number of entries are generated" +msgstr "" + +#. module: account +#: model:process.transition,name:account.process_transition_suppliervalidentries0 +#: model:process.transition,name:account.process_transition_validentries0 +msgid "Valid Entries" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_account_use_model +#: model:ir.actions.wizard,name:account.wizard_line_account_use_model +#: model:ir.ui.menu,name:account.menu_account_use_model +msgid "Create Entries From Models" +msgstr "" + +#. module: account +#: field:account.account.template,reconcile:0 +msgid "Allow Reconciliation" +msgstr "" + +#. module: account +#: selection:account.account.balance.report,checktype,state:0 +#: selection:account.general.ledger.report,checktype,state:0 +#: selection:account.partner.balance.report,init,state:0 +#: selection:account.third_party_ledger.report,init,state:0 +msgid "By Date" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree4 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree4 +msgid "Supplier Refunds" +msgstr "" + +#. module: account +#: help:account.model.line,date:0 +msgid "The date of the generated entries" +msgstr "" + +#. module: account +#: wizard_button:account.invoice.refund,init,modify_invoice:0 +msgid "Modify Invoice" +msgstr "" + +#. module: account +#: view:res.partner:0 +msgid "Supplier Accounting Properties" +msgstr "" + +#. module: account +#: view:account.analytic.account:0 +msgid "Analytic Account Statistics" +msgstr "" + +#. module: account +#: view:wizard.multi.charts.accounts:0 +msgid "" +"This will automatically configure your chart of accounts, bank accounts, " +"taxes and journals according to the selected template" +msgstr "" + +#. module: account +#: view:account.bank.statement:0 +#: field:account.bank.statement.line,statement_id:0 +#: field:account.move.line,statement_id:0 +msgid "Statement" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_move_line_form_encode_by_move +#: model:ir.ui.menu,name:account.menu_encode_entries_by_move +msgid "Entries Encoding by Move" +msgstr "" + +#. module: account +#: wizard_view:account.analytic.account.chart,init:0 +msgid "Analytic Account Charts" +msgstr "" + +#. module: account +#: wizard_field:account.aged.trial.balance,init,result_selection:0 +msgid "Filter on Partners" +msgstr "" + +#. module: account +#: field:account.tax,price_include:0 +msgid "Tax Included in Price" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_analytic_journal_tree2 +#: model:ir.ui.menu,name:account.account_analytic_journal_entries +msgid "Analytic Entries by Journal" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_suppliervalidentries0 +#: model:process.transition,note:account.process_transition_validentries0 +msgid "Valid entries from invoice" +msgstr "" + +#. module: account +#: field:account.account,company_id:0 +#: wizard_field:account.account.balance.report,checktype,company_id:0 +#: wizard_field:account.aged.trial.balance,init,company_id:0 +#: field:account.analytic.account,company_id:0 +#: field:account.fiscal.position,company_id:0 +#: field:account.fiscalyear,company_id:0 +#: wizard_field:account.general.ledger.report,checktype,company_id:0 +#: field:account.invoice,company_id:0 +#: field:account.journal,company_id:0 +#: wizard_field:account.partner.balance.report,init,company_id:0 +#: field:account.tax,company_id:0 +#: field:account.tax.code,company_id:0 +#: wizard_field:account.third_party_ledger.report,init,company_id:0 +#: wizard_field:account.vat.declaration,init,company_id:0 +#: field:wizard.company.setup,company_id:0 +#: field:wizard.multi.charts.accounts,company_id:0 +msgid "Company" +msgstr "" + +#. module: account +#: rml:account.general.ledger:0 +msgid "Crebit" +msgstr "" + +#. module: account +#: selection:account.subscription,state:0 +msgid "Running" +msgstr "" + +#. module: account +#: help:account.tax,include_base_amount:0 +msgid "" +"Indicate if the amount of tax must be included in the base amount for the " +"computation of the next taxes" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_draftstatement0 +msgid "Draft statement" +msgstr "" + +#. module: account +#: field:account.analytic.journal,name:0 +msgid "Journal name" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_invoiceimport0 +msgid "Import invoice from statement" +msgstr "" + +#. module: account +#: selection:account.automatic.reconcile,init,power:0 +msgid "4" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_fiscalyear_form +#: view:ir.sequence:0 +#: model:ir.ui.menu,name:account.menu_action_account_fiscalyear_form +msgid "Fiscal Years" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_importinvoice0 +msgid "Import from invoices or payments" +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_reconcile_select +#: model:ir.ui.menu,name:account.menu_reconcile_select +msgid "Reconcile entries" +msgstr "" + +#. module: account +#: xsl:account.transfer:0 +msgid "Change" +msgstr "" + +#. module: account +#: field:account.journal.period,icon:0 +msgid "Icon" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_journal_period +msgid "Journal - Period" +msgstr "" + +#. module: account +#: wizard_field:account.move.line.reconcile,init_full,credit:0 +#: wizard_field:account.move.line.reconcile,init_partial,credit:0 +msgid "Credit amount" +msgstr "" + +#. module: account +#: view:account.fiscalyear:0 +msgid "Create Monthly Periods" +msgstr "" + +#. module: account +#: wizard_button:account.aged.trial.balance,init,print:0 +msgid "Print Aged Trial Balance" +msgstr "" + +#. module: account +#: field:account.analytic.line,ref:0 +#: field:account.bank.statement.line,ref:0 +#: field:account.model.line,ref:0 +#: field:account.move.line,ref:0 +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +msgid "Ref." +msgstr "" + +#. module: account +#: field:account.invoice,address_invoice_id:0 +msgid "Invoice Address" +msgstr "" + +#. module: account +#: rml:account.analytic.account.analytic.check:0 +msgid "General Credit" +msgstr "" + +#. module: account +#: help:account.journal,centralisation:0 +msgid "" +"Check this box to determine that each entry of this journal won't create a " +"new counterpart but will share the same counterpart. This is used in fiscal " +"year closing." +msgstr "" + +#. module: account +#: selection:account.invoice,state:0 +msgid "Cancelled" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_bank_statement_draft_tree +#: model:ir.ui.menu,name:account.menu_bank_statement_draft_tree +msgid "Draft statements" +msgstr "" + +#. module: account +#: wizard_field:populate_statement_from_inv,init,date:0 +msgid "Date payment" +msgstr "" + +#. module: account +#: rml:account.journal.period.print:0 +msgid "A/c No." +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.report_account_analytic_journal_tree_month +#: model:ir.ui.menu,name:account.report_account_analytic_journal_print_month +msgid "Account cost and revenue by journal (This Month)" +msgstr "" + +#. module: account +#: selection:account.partner.balance.report,init,result_selection:0 +#: selection:account.third_party_ledger.report,init,result_selection:0 +msgid "Receivable Accounts" +msgstr "" + +#. module: account +#: wizard_button:account.move.line.unreconcile.select,init,open:0 +msgid "Open for unreconciliation" +msgstr "" + +#. module: account +#: field:account.bank.statement.reconcile,statement_line:0 +#: model:ir.model,name:account.model_account_bank_statement_line +msgid "Bank Statement Line" +msgstr "" + +#. module: account +#: wizard_button:account.automatic.reconcile,reconcile,end:0 +msgid "OK" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_supplierinvoiceinvoice0 +msgid "Control Invoice" +msgstr "" + +#. module: account +#: selection:account.account,type:0 +#: selection:account.account.template,type:0 +#: selection:account.aged.trial.balance,init,result_selection:0 +msgid "Receivable" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_account_balance +#: model:ir.actions.wizard,name:account.wizard_account_balance_report +#: model:ir.actions.wizard,name:account.wizard_balance_report +#: model:ir.ui.menu,name:account.menu_account_balance_report +msgid "Account Balance" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_analytic_account_analytic_check +#: model:ir.actions.wizard,name:account.account_analytic_account_analytic_check_report +msgid "Analytic Check" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "VAT:" +msgstr "" + +#. module: account +#: rml:account.analytic.account.cost_ledger:0 +#: rml:account.analytic.account.quantity_cost_ledger:0 +#: rml:account.central.journal:0 +#: rml:account.general.journal:0 +#: rml:account.invoice:0 +msgid "Total:" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_analytic_journal +msgid "account.analytic.journal" +msgstr "" + +#. module: account +#: view:account.fiscal.position:0 +#: field:account.fiscal.position,account_ids:0 +#: field:account.fiscal.position.template,account_ids:0 +msgid "Account Mapping" +msgstr "" + +#. module: account +#: view:product.product:0 +msgid "Sale Taxes" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_move_reconcile +msgid "Account Reconciliation" +msgstr "" + +#. module: account +#: view:account.bank.statement:0 +#: selection:account.bank.statement,state:0 +msgid "Confirm" +msgstr "" + +#. module: account +#: wizard_view:account.account.balance.report,account_selection:0 +msgid "Select parent account" +msgstr "" + +#. module: account +#: field:account.account.template,parent_id:0 +msgid "Parent Account Template" +msgstr "" + +#. module: account +#: help:account.tax,domain:0 +#: help:account.tax.template,domain:0 +msgid "" +"This field is only used if you develop your own module allowing developers " +"to create specific taxes in a custom domain." +msgstr "" + +#. module: account +#: field:account.bank.statement.reconcile,total_amount:0 +#: field:account.bank.statement.reconcile,total_second_amount:0 +msgid "Payment amount" +msgstr "" + +#. module: account +#: view:account.analytic.account:0 +msgid "Analytic account" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: selection:account.invoice,type:0 +msgid "Supplier Invoice" +msgstr "" + +#. module: account +#: selection:account.move.line,state:0 +msgid "Valid" +msgstr "" + +#. module: account +#: field:account.account,debit:0 +#: rml:account.account.balance:0 +#: field:account.analytic.account,debit:0 +#: rml:account.analytic.account.balance:0 +#: rml:account.analytic.account.cost_ledger:0 +#: rml:account.analytic.account.inverted.balance:0 +#: rml:account.central.journal:0 +#: rml:account.general.ledger:0 +#: rml:account.journal.period.print:0 +#: field:account.model.line,debit:0 +#: field:account.move.line,debit:0 +#: rml:account.partner.balance:0 +#: rml:account.tax.code.entries:0 +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +#: rml:account.vat.declaration:0 +#: field:report.hr.timesheet.invoice.journal,revenue:0 +msgid "Debit" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.next_id_42 +msgid "All Months" +msgstr "" + +#. module: account +#: wizard_field:account.invoice.refund,init,date:0 +msgid "Operation date" +msgstr "" + +#. module: account +#: field:account.invoice,invoice_line:0 +msgid "Invoice Lines" +msgstr "" + +#. module: account +#: field:account.period,date_start:0 +msgid "Start of Period" +msgstr "" + +#. module: account +#: wizard_field:account.fiscalyear.close,init,report_name:0 +msgid "Name of new entries" +msgstr "" + +#. module: account +#: wizard_button:account_use_models,init_form,create:0 +msgid "Create Entries" +msgstr "" + +#. module: account +#: field:account.tax,ref_tax_code_id:0 +#: field:account.tax.template,ref_tax_code_id:0 +msgid "Refund Tax Code" +msgstr "" + +#. module: account +#: field:account.invoice.tax,name:0 +msgid "Tax Description" +msgstr "" + +#. module: account +#: help:account.invoice,move_id:0 +msgid "Link to the automatically generated account moves." +msgstr "" + +#. module: account +#: wizard_field:account.automatic.reconcile,reconcile,reconciled:0 +msgid "Reconciled transactions" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_finance_reporting +msgid "Reporting" +msgstr "" + +#. module: account +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +msgid "/" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_invoiceinvoice0 +#: model:process.node,note:account.process_node_supplierinvoiceinvoice0 +msgid "Have a number and entries are generated" +msgstr "" + +#. module: account +#: rml:account.analytic.account.analytic.check:0 +msgid "Analytic Check -" +msgstr "" + +#. module: account +#: rml:account.account.balance:0 +msgid "Account Balance -" +msgstr "" + +#. module: account +#: field:account.journal,group_invoice_lines:0 +msgid "Group invoice lines" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.menu_finance_configuration +msgid "Configuration" +msgstr "" + +#. module: account +#: view:account.analytic.line:0 +#: view:account.invoice:0 +msgid "Total amount" +msgstr "" + +#. module: account +#: view:account.journal:0 +msgid "Account Journal" +msgstr "" + +#. module: account +#: view:account.subscription.line:0 +msgid "Subscription lines" +msgstr "" + +#. module: account +#: field:account.chart.template,property_account_income:0 +msgid "Income Account on Product Template" +msgstr "" + +#. module: account +#: help:account.account,currency_id:0 +#: help:account.account.template,currency_id:0 +msgid "Force all moves for this account to have this secondary currency." +msgstr "" + +#. module: account +#: wizard_button:populate_statement_from_inv,go,end:0 +#: wizard_button:populate_statement_from_inv,init,end:0 +msgid "_Cancel" +msgstr "" + +#. module: account +#: wizard_view:account.general.ledger.report,checktype:0 +#: wizard_view:account.partner.balance.report,init:0 +#: wizard_view:account.third_party_ledger.report,init:0 +msgid "Select Date-Period" +msgstr "" + +#. module: account +#: rml:account.analytic.account.inverted.balance:0 +msgid "Inverted Analytic Balance -" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_paidinvoice0 +#: model:process.node,name:account.process_node_supplierpaidinvoice0 +msgid "Paid invoice" +msgstr "" + +#. module: account +#: view:account.tax:0 +#: view:account.tax.template:0 +msgid "Tax Definition" +msgstr "" + +#. module: account +#: field:account.tax,tax_group:0 +#: field:account.tax.template,tax_group:0 +msgid "Tax Group" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree3_new +#: model:ir.ui.menu,name:account.menu_action_invoice_tree3_new +msgid "New Customer Refund" +msgstr "" + +#. module: account +#: help:wizard.multi.charts.accounts,seq_journal:0 +msgid "" +"Check this box if you want to use a different sequence for each created " +"journal. Otherwise, all will use the same sequence." +msgstr "" + +#. module: account +#: model:ir.actions.wizard,name:account.wizard_populate_statement_from_inv +msgid "Import invoices" +msgstr "" + +#. module: account +#: wizard_view:account.move.line.unreconcile,init:0 +#: wizard_view:account.move.line.unreconcile.select,init:0 +#: wizard_view:account.reconcile.unreconcile,init:0 +msgid "Unreconciliation" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_fiscalyear_seq +msgid "Maintains Invoice sequences with Fiscal Year" +msgstr "" + +#. module: account +#: selection:account.account.balance.report,checktype,display_account:0 +#: selection:account.general.ledger.report,checktype,display_account:0 +msgid "With movements" +msgstr "" + +#. module: account +#: field:account.tax,domain:0 +#: field:account.tax.template,domain:0 +msgid "Domain" +msgstr "" + +#. module: account +#: view:account.analytic.account:0 +msgid "Account Data" +msgstr "" + +#. module: account +#: view:account.tax.code.template:0 +msgid "Account Tax Code Template" +msgstr "" + +#. module: account +#: view:account.subscription:0 +msgid "Subscription Periods" +msgstr "" + +#. module: account +#: model:process.node,name:account.process_node_manually0 +msgid "Manually" +msgstr "" + +#. module: account +#: view:account.invoice:0 +#: view:account.tax:0 +#: view:account.tax.template:0 +#: selection:account.vat.declaration,init,based_on:0 +#: model:ir.actions.act_window,name:account.act_res_partner_2_account_invoice_opened +#: model:ir.actions.act_window,name:account.action_invoice_tree +#: model:ir.actions.report.xml,name:account.account_invoices +#: model:ir.ui.menu,name:account.menu_finance_invoice +#: wizard_field:populate_statement_from_inv,go,lines:0 +msgid "Invoices" +msgstr "" + +#. module: account +#: selection:account.partner.balance.report,init,result_selection:0 +#: selection:account.third_party_ledger.report,init,result_selection:0 +msgid "Payable Accounts" +msgstr "" + +#. module: account +#: view:account.invoice.line:0 +#: field:account.invoice.tax,invoice_id:0 +msgid "Invoice Line" +msgstr "" + +#. module: account +#: wizard_field:account.invoice.pay,addendum,writeoff_journal_id:0 +msgid "Write-Off journal" +msgstr "" + +#. module: account +#: wizard_button:account.invoice.pay,init,writeoff_check:0 +msgid "Full Payment" +msgstr "" + +#. module: account +#: selection:account.move,type:0 +msgid "Journal Purchase" +msgstr "" + +#. module: account +#: selection:account.move,type:0 +msgid "Cash Receipt" +msgstr "" + +#. module: account +#: field:account.fiscal.position.tax,tax_dest_id:0 +#: field:account.fiscal.position.tax.template,tax_dest_id:0 +msgid "Replacement Tax" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_invoicemanually0 +msgid "Encode manually statement comes into the draft statement" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.next_id_43 +msgid "This Month" +msgstr "" + +#. module: account +#: field:account.account.type,sign:0 +msgid "Sign on Reports" +msgstr "" + +#. module: account +#: help:account.move.line,currency_id:0 +msgid "The optional other currency if it is a multi-currency entry." +msgstr "" + +#. module: account +#: view:account.invoice:0 +#: field:account.invoice,payment_ids:0 +#: selection:account.vat.declaration,init,based_on:0 +msgid "Payments" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_accountingstatemententries0 +msgid "Accounting entries at statement's confirmation" +msgstr "" + +#. module: account +#: wizard_view:account_use_models,create:0 +msgid "Use Model" +msgstr "" + +#. module: account +#: wizard_button:account.wizard_paid_open,init,end:0 +msgid "No" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.act_account_partner_account_move +msgid "All account entries" +msgstr "" + +#. module: account +#: help:account.invoice.tax,tax_code_id:0 +msgid "The tax basis of the tax declaration." +msgstr "" + +#. module: account +#: wizard_view:account.account.balance.report,checktype:0 +#: wizard_view:account.general.ledger.report,checktype:0 +#: wizard_view:account.partner.balance.report,init:0 +#: wizard_view:account.third_party_ledger.report,init:0 +msgid "Date Filter" +msgstr "" + +#. module: account +#: wizard_view:populate_statement_from_inv,init:0 +msgid "Choose Journal and Payment Date" +msgstr "" + +#. module: account +#: selection:account.analytic.account,state:0 +#: selection:account.bank.statement,state:0 +#: selection:account.fiscalyear,state:0 +#: selection:account.invoice,state:0 +#: selection:account.journal.period,state:0 +#: selection:account.move,state:0 +#: selection:account.move.line,state:0 +#: selection:account.period,state:0 +#: selection:account.subscription,state:0 +msgid "Draft" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Paid" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree11 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree11 +msgid "Unpaid Customer Refunds" +msgstr "" + +#. module: account +#: help:account.invoice,residual:0 +msgid "Remaining amount due." +msgstr "" + +#. module: account +#: wizard_view:account.period.close,init:0 +msgid "Are you sure ?" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: view:account.invoice:0 +msgid "PRO-FORMA" +msgstr "" + +#. module: account +#: field:account.move.reconcile,line_partial_ids:0 +msgid "Partial Entry lines" +msgstr "" + +#. module: account +#: help:account.move.line,statement_id:0 +msgid "The bank statement used for bank reconciliation" +msgstr "" + +#. module: account +#: view:account.fiscalyear:0 +msgid "Fiscalyear" +msgstr "" + +#. module: account +#: wizard_button:account.analytic.line,init,open:0 +msgid "Open Entries" +msgstr "" + +#. module: account +#: selection:account.analytic.account,type:0 +#: selection:account.move.line,centralisation:0 +msgid "Normal" +msgstr "" + +#. module: account +#: model:process.process,name:account.process_process_supplierinvoiceprocess0 +msgid "Supplier Invoice Process" +msgstr "" + +#. module: account +#: rml:account.account.balance:0 +#: rml:account.analytic.account.analytic.check:0 +#: rml:account.analytic.account.balance:0 +#: rml:account.general.ledger:0 +#: rml:account.journal.period.print:0 +#: rml:account.partner.balance:0 +#: rml:account.tax.code.entries:0 +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +#: rml:account.vat.declaration:0 +msgid "Page" +msgstr "" + +#. module: account +#: view:account.move:0 +#: view:account.move.line:0 +msgid "Optional Information" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_payment_term_form +#: model:ir.ui.menu,name:account.menu_action_payment_term_form +msgid "Payment Terms" +msgstr "" + +#. module: account +#: selection:account.aged.trial.balance,init,result_selection:0 +msgid "Receivable and Payable" +msgstr "" + +#. module: account +#: rml:account.account.balance:0 +#: rml:account.general.journal:0 +msgid ":" +msgstr "" + +#. module: account +#: field:account.bank.statement.line,reconcile_amount:0 +msgid "Amount reconciled" +msgstr "" + +#. module: account +#: selection:account.account,currency_mode:0 +msgid "At Date" +msgstr "" + +#. module: account +#: help:account.move.line,tax_amount:0 +msgid "" +"If the Tax account is tax code account, this field will contain the taxed " +"amount.If the tax account is base tax code, this field " +"will contain the basic amount(without tax)." +msgstr "" + +#. module: account +#: view:account.bank.statement:0 +#: view:account.bank.statement.reconcile:0 +#: view:account.subscription:0 +msgid "Compute" +msgstr "" + +#. module: account +#: help:account.invoice.line,account_id:0 +msgid "The income or expense account related to the selected product." +msgstr "" + +#. module: account +#: field:account.tax,type_tax_use:0 +msgid "Tax Application" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_subscription_form +#: model:ir.ui.menu,name:account.menu_action_subscription_form +msgid "Subscription Entries" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_invoice_tree6 +#: model:ir.ui.menu,name:account.menu_action_invoice_tree6 +msgid "PRO-FORMA Customer Invoices" +msgstr "" + +#. module: account +#: field:account.subscription,period_total:0 +msgid "Number of Periods" +msgstr "" + +#. module: account +#: wizard_field:account.analytic.account.analytic.check.report,init,date2:0 +#: wizard_field:account.analytic.account.balance.report,init,date2:0 +#: wizard_field:account.analytic.account.cost_ledger.report,init,date2:0 +#: wizard_field:account.analytic.account.inverted.balance.report,init,date2:0 +#: wizard_field:account.analytic.account.journal.report,init,date2:0 +#: wizard_field:account.analytic.account.quantity_cost_ledger.report,init,date2:0 +#: wizard_field:account.automatic.reconcile,init,date2:0 +msgid "End of period" +msgstr "" + +#. module: account +#: view:account.move:0 +#: model:ir.model,name:account.model_account_move +msgid "Account Entry" +msgstr "" + +#. module: account +#: rml:account.general.journal:0 +#: model:ir.actions.report.xml,name:account.account_general_journal +msgid "General Journal" +msgstr "" + +#. module: account +#: field:account.account,balance:0 +#: rml:account.account.balance:0 +#: selection:account.account.type,close_method:0 +#: field:account.analytic.account,balance:0 +#: rml:account.analytic.account.balance:0 +#: rml:account.analytic.account.cost_ledger:0 +#: rml:account.analytic.account.inverted.balance:0 +#: field:account.bank.statement,balance_end:0 +#: field:account.bank.statement.reconcile,total_balance:0 +#: rml:account.general.ledger:0 +#: field:account.move.line,balance:0 +#: rml:account.partner.balance:0 +#: selection:account.payment.term.line,value:0 +#: selection:account.tax,type:0 +#: rml:account.third_party_ledger:0 +#: rml:account.third_party_ledger_other:0 +msgid "Balance" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +msgid "Refund" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_invoice_tax +msgid "Invoice Tax" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_analytic_journal_form +#: model:ir.ui.menu,name:account.account_def_analytic_journal +msgid "Analytic Journal Definition" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_tax_template +msgid "account.tax.template" +msgstr "" + +#. module: account +#: field:wizard.multi.charts.accounts,bank_accounts_id:0 +msgid "Bank Accounts" +msgstr "" + +#. module: account +#: constraint:account.period:0 +msgid "" +"Invalid period ! Some periods overlap or the date period is not in the scope " +"of the fiscal year. " +msgstr "" + +#. module: account +#: help:account.journal,invoice_sequence_id:0 +msgid "The sequence used for invoice numbers in this journal." +msgstr "" + +#. module: account +#: view:account.account:0 +#: view:account.account.template:0 +#: view:account.journal:0 +#: view:account.move:0 +#: view:account.move.line:0 +msgid "General Information" +msgstr "" + +#. module: account +#: help:populate_statement_from_inv,init,journal_id:0 +msgid "" +"This field allow you to choose the accounting journals you want for " +"filtering the invoices. If you left this field empty, it will search on all " +"sale, purchase and cash journals." +msgstr "" + +#. module: account +#: constraint:account.fiscalyear:0 +msgid "Error ! The duration of the Fiscal Year is invalid. " +msgstr "" + +#. module: account +#: selection:account.analytic.account,state:0 +msgid "Close" +msgstr "" + +#. module: account +#: field:account.bank.statement.line,move_ids:0 +msgid "Moves" +msgstr "" + +#. module: account +#: selection:account.invoice,state:0 +msgid "Pro-forma" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_form +#: model:ir.ui.menu,name:account.menu_action_account_form +msgid "List of Accounts" +msgstr "" + +#. module: account +#: view:product.product:0 +#: view:product.template:0 +msgid "Sales Properties" +msgstr "" + +#. module: account +#: rml:account.general.journal:0 +msgid "Printing Date :" +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_analytic_account_quantity_cost_ledger +#: model:ir.actions.wizard,name:account.account_analytic_account_quantity_cost_ledger_report +msgid "Cost Ledger (Only quantities)" +msgstr "" + +#. module: account +#: wizard_view:account.move.validate,init:0 +msgid "Validate Account Entries" +msgstr "" + +#. module: account +#: selection:account.print.journal.report,init,sort_selection:0 +msgid "Reference Number" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Total amount due:" +msgstr "" + +#. module: account +#: wizard_field:account.analytic.account.chart,init,to_date:0 +#: wizard_field:account.analytic.line,init,to_date:0 +msgid "To" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_analytic_journal_open_form +msgid "Entries of Open Analytic Journals" +msgstr "" + +#. module: account +#: view:account.invoice.tax:0 +msgid "Manual Invoice Taxes" +msgstr "" + +#. module: account +#: field:account.model.line,date:0 +msgid "Current Date" +msgstr "" + +#. module: account +#: selection:account.move,type:0 +msgid "Journal Sale" +msgstr "" + +#. module: account +#: wizard_field:account.fiscalyear.close,init,fy_id:0 +#: wizard_field:account.fiscalyear.close.state,init,fy_id:0 +msgid "Fiscal Year to close" +msgstr "" + +#. module: account +#: wizard_field:account.aged.trial.balance,init,date1:0 +#: wizard_field:account.analytic.account.analytic.check.report,init,date1:0 +#: wizard_field:account.analytic.account.balance.report,init,date1:0 +#: wizard_field:account.analytic.account.cost_ledger.report,init,date1:0 +#: wizard_field:account.analytic.account.inverted.balance.report,init,date1:0 +#: wizard_field:account.analytic.account.journal.report,init,date1:0 +#: wizard_field:account.analytic.account.quantity_cost_ledger.report,init,date1:0 +#: wizard_field:account.automatic.reconcile,init,date1:0 +msgid "Start of period" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.account_template_folder +msgid "Templates" +msgstr "" + +#. module: account +#: wizard_button:account.vat.declaration,init,report:0 +msgid "Print VAT Decl." +msgstr "" + +#. module: account +#: model:ir.actions.report.xml,name:account.account_intracom +msgid "IntraCom" +msgstr "" + +#. module: account +#: view:account.analytic.account:0 +#: field:account.analytic.account,description:0 +#: field:account.analytic.line,name:0 +#: field:account.bank.statement.reconcile.line,name:0 +#: rml:account.invoice:0 +#: field:account.invoice,name:0 +#: field:account.invoice.line,name:0 +#: wizard_field:account.invoice.refund,init,description:0 +#: rml:account.overdue:0 +#: field:account.payment.term,note:0 +#: field:account.tax.code,info:0 +#: field:account.tax.code.template,info:0 +msgid "Description" +msgstr "" + +#. module: account +#: help:product.template,property_account_income:0 +msgid "" +"This account will be used instead of the default one to value incoming stock " +"for the current product" +msgstr "" + +#. module: account +#: field:account.tax,child_ids:0 +msgid "Child Tax Accounts" +msgstr "" + +#. module: account +#: field:account.account,parent_right:0 +msgid "Parent Right" +msgstr "" + +#. module: account +#: model:ir.ui.menu,name:account.account_account_menu +msgid "Financial Accounts" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_chart_template +msgid "Templates for Account Chart" +msgstr "" + +#. module: account +#: view:account.config.wizard:0 +msgid "Account Configure" +msgstr "" + +#. module: account +#: help:res.partner,property_account_payable:0 +msgid "" +"This account will be used instead of the default one as the payable account " +"for the current partner" +msgstr "" + +#. module: account +#: field:account.tax.code,code:0 +#: field:account.tax.code.template,code:0 +msgid "Case Code" +msgstr "" + +#. module: account +#: selection:account.automatic.reconcile,init,power:0 +msgid "5" +msgstr "" + +#. module: account +#: field:product.category,property_account_income_categ:0 +#: field:product.template,property_account_income:0 +msgid "Income Account" +msgstr "" + +#. module: account +#: field:account.period,special:0 +msgid "Opening/Closing Period" +msgstr "" + +#. module: account +#: rml:account.analytic.account.balance:0 +msgid "Analytic Balance -" +msgstr "" + +#. module: account +#: wizard_field:account_use_models,init_form,model:0 +#: model:ir.model,name:account.model_account_model +msgid "Account Model" +msgstr "" + +#. module: account +#: view:account.invoice:0 +#: model:ir.actions.act_window,name:account.act_account_analytic_account_2_account_invoice_line +msgid "Invoice lines" +msgstr "" + +#. module: account +#: selection:account.bank.statement.line,type:0 +msgid "Customer" +msgstr "" + +#. module: account +#: field:account.subscription,period_type:0 +msgid "Period Type" +msgstr "" + +#. module: account +#: view:product.category:0 +msgid "Accounting Properties" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_sequence_fiscalyear +msgid "account.sequence.fiscalyear" +msgstr "" + +#. module: account +#: wizard_field:account.print.journal.report,init,sort_selection:0 +msgid "Entries Sorted By" +msgstr "" + +#. module: account +#: rml:account.journal.period.print:0 +msgid "Print Journal -" +msgstr "" + +#. module: account +#: field:account.bank.accounts.wizard,bank_account_id:0 +#: field:account.chart.template,bank_account_view_id:0 +#: field:account.invoice,partner_bank:0 +msgid "Bank Account" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_model_form +#: model:ir.ui.menu,name:account.menu_action_model_form +msgid "Models Definition" +msgstr "" + +#. module: account +#: model:account.account.type,name:account.account_type_cash_moves +#: selection:account.analytic.journal,type:0 +#: selection:account.journal,type:0 +msgid "Cash" +msgstr "" + +#. module: account +#: field:account.fiscal.position.account,account_dest_id:0 +#: field:account.fiscal.position.account.template,account_dest_id:0 +msgid "Account Destination" +msgstr "" + +#. module: account +#: rml:account.overdue:0 +msgid "Maturity" +msgstr "" + +#. module: account +#: field:account.fiscalyear,name:0 +#: field:account.journal.period,fiscalyear_id:0 +#: field:account.period,fiscalyear_id:0 +#: field:account.sequence.fiscalyear,fiscalyear_id:0 +#: field:fiscalyear.seq,fiscalyear_id:0 +#: model:ir.model,name:account.model_account_fiscalyear +msgid "Fiscal Year" +msgstr "" + +#. module: account +#: selection:account.aged.trial.balance,init,direction_selection:0 +msgid "Future" +msgstr "" + +#. module: account +#: help:account.account.balance.report,checktype,fiscalyear:0 +#: help:account.chart,init,fiscalyear:0 +#: help:account.general.ledger.report,checktype,fiscalyear:0 +#: help:account.partner.balance.report,init,fiscalyear:0 +#: help:account.third_party_ledger.report,init,fiscalyear:0 +msgid "Keep empty for all open fiscal year" +msgstr "" + +#. module: account +#: rml:account.invoice:0 +#: selection:account.invoice,type:0 +msgid "Supplier Refund" +msgstr "" + +#. module: account +#: model:process.transition,note:account.process_transition_entriesreconcile0 +#: model:process.transition,note:account.process_transition_supplierentriesreconcile0 +msgid "Reconcile Entries." +msgstr "" + +#. module: account +#: field:account.subscription.line,move_id:0 +msgid "Entry" +msgstr "" + +#. module: account +#: model:process.node,note:account.process_node_paidinvoice0 +#: model:process.node,note:account.process_node_supplierpaidinvoice0 +#: model:process.transition,note:account.process_transition_reconcilepaid0 +#: model:process.transition,note:account.process_transition_supplierreconcilepaid0 +msgid "Paid invoice when reconciled." +msgstr "" + +#. module: account +#: field:account.tax,python_compute_inv:0 +#: field:account.tax.template,python_compute_inv:0 +msgid "Python Code (reverse)" +msgstr "" + +#. module: account +#: model:ir.module.module,shortdesc:account.module_meta_information +msgid "Accounting and financial management" +msgstr "" + +#. module: account +#: view:account.fiscal.position.template:0 +msgid "Accounts Mapping" +msgstr "" + +#. module: account +#: help:product.category,property_account_expense_categ:0 +msgid "" +"This account will be used to value outgoing stock for the current product " +"category" +msgstr "" + +#. module: account +#: help:account.tax,base_sign:0 +#: help:account.tax,ref_base_sign:0 +#: help:account.tax,ref_tax_sign:0 +#: help:account.tax,tax_sign:0 +#: help:account.tax.template,base_sign:0 +#: help:account.tax.template,ref_base_sign:0 +#: help:account.tax.template,ref_tax_sign:0 +#: help:account.tax.template,tax_sign:0 +msgid "Usually 1 or -1." +msgstr "" + +#. module: account +#: view:res.partner:0 +msgid "Bank Details" +msgstr "" + +#. module: account +#: field:account.chart.template,property_account_expense:0 +msgid "Expense Account on Product Template" +msgstr "" + +#. module: account +#: rml:account.analytic.account.analytic.check:0 +msgid "General Debit" +msgstr "" + +#. module: account +#: field:account.analytic.account,code:0 +msgid "Account Code" +msgstr "" + +#. module: account +#: help:account.config.wizard,name:0 +msgid "Name of the fiscal year as displayed on screens." +msgstr "" + +#. module: account +#: field:account.invoice,payment_term:0 +#: view:account.payment.term:0 +#: field:account.payment.term,name:0 +#: view:account.payment.term.line:0 +#: field:account.payment.term.line,payment_id:0 +#: model:ir.model,name:account.model_account_payment_term +#: field:res.partner,property_payment_term:0 +msgid "Payment Term" +msgstr "" + +#. module: account +#: model:ir.actions.act_window,name:account.action_account_fiscal_position_form +#: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form +msgid "Fiscal Positions" +msgstr "" + +#. module: account +#: model:process.process,name:account.process_process_statementprocess0 +msgid "Statement Process" +msgstr "" + +#. module: account +#: model:ir.model,name:account.model_account_bank_statement_reconcile +msgid "Statement reconcile" +msgstr "" + +#. module: account +#: wizard_field:account.fiscalyear.close,init,sure:0 +#: wizard_field:account.fiscalyear.close.state,init,sure:0 +#: wizard_field:account.period.close,init,sure:0 +msgid "Check this box" +msgstr "" + +#. module: account +#: help:account.tax,price_include:0 +msgid "" +"Check this if the price you use on the product and invoices includes this " +"tax." +msgstr "" + +#. module: account +#: field:account.journal.column,name:0 +msgid "Column Name" +msgstr "" + +#. module: account +#: wizard_view:account.account.balance.report,checktype:0 +#: wizard_view:account.general.ledger.report,checktype:0 +#: wizard_view:account.partner.balance.report,init:0 +#: wizard_view:account.third_party_ledger.report,init:0 +msgid "Filters" +msgstr "" + +#. module: account +#: wizard_button:account.wizard_paid_open,init,yes:0 +msgid "Yes" +msgstr "" + +#. module: account +#: help:account.account,reconcile:0 +msgid "" +"Check this if the user is allowed to reconcile entries in this account." +msgstr "" + +#. module: account +#: wizard_button:account.subscription.generate,init,generate:0 +msgid "Compute Entry Dates" +msgstr "" diff --git a/addons/account_payment/i18n/sl.po b/addons/account_payment/i18n/sl.po index 3f634880e39..4638727dec2 100644 --- a/addons/account_payment/i18n/sl.po +++ b/addons/account_payment/i18n/sl.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2009-11-17 09:28+0000\n" -"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n" +"PO-Revision-Date: 2010-05-11 10:20+0000\n" +"Last-Translator: Simon Vidmar <Unknown>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n" +"X-Launchpad-Export-Date: 2010-05-12 04:20+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account_payment @@ -46,7 +46,7 @@ msgstr "Napačno ime modela v definiciji dejanja." #: field:payment.line,info_owner:0 #: view:payment.order:0 msgid "Owner Account" -msgstr "" +msgstr "Konto lastnika" #. module: account_payment #: help:account.invoice,amount_to_pay:0 @@ -54,6 +54,8 @@ msgid "" "The amount which should be paid at the current date\n" "minus the amount which is already in payment order" msgstr "" +"Znesek, ki ga je potrebno plačati na trenutni datum\n" +"zmanjšan za znesek že posredovanih plačilnih nalogov." #. module: account_payment #: help:payment.line,date:0 @@ -61,6 +63,8 @@ msgid "" "If no payment date is specified, the bank will treat this payment line " "directly" msgstr "" +"Če datum plačilnega naloga ni podan, ga bo banka takoj posredovala v " +"plačilni sistem" #. module: account_payment #: field:payment.order,date_prefered:0 @@ -147,7 +151,7 @@ msgstr "Vrstica plačila" #. module: account_payment #: field:payment.type,suitable_bank_types:0 msgid "Suitable bank types" -msgstr "" +msgstr "Primerne vrste bank" #. module: account_payment #: view:payment.line:0 @@ -182,7 +186,7 @@ msgstr "" #. module: account_payment #: field:payment.order,state:0 msgid "State" -msgstr "" +msgstr "Država" #. module: account_payment #: view:payment.line:0 diff --git a/addons/base_vat/partner.py b/addons/base_vat/partner.py index 61643781fed..c4f166fd7d5 100644 --- a/addons/base_vat/partner.py +++ b/addons/base_vat/partner.py @@ -24,6 +24,11 @@ from osv import osv from osv import fields import string from tools.func import partial +from tools.translate import _ + +_ref_vat = { + 'be': 'BE0477472701', +} def mult_add(i, j): """Sum each digits of the multiplication of i and j.""" @@ -32,6 +37,10 @@ def mult_add(i, j): class res_partner(osv.osv): _inherit = 'res.partner' + def _split_vat(self, vat): + vat_country, vat_number = vat[:2].lower(), vat[2:].replace(' ', '') + return vat_country, vat_number + def check_vat(self, cr, uid, ids): ''' Check the VAT number depending of the country. @@ -39,35 +48,37 @@ class res_partner(osv.osv): ''' for partner in self.browse(cr, uid, ids): if not partner.vat: - continue #FIXME return False? empty vat numbre is invalid? + continue - vat_country, vat_number = partner.vat[:2].lower(), partner.vat[2:].replace(' ', '') + vat_country, vat_number = self._split_vat(partner.vat) + if not hasattr(self, 'check_vat_' + vat_country): + return False check = getattr(self, 'check_vat_' + vat_country) if not check(vat_number): return False return True - def __getattr__(self, attr): - if not attr.startswith('check_vat_'): - super(res_partner, self).__getattr__(attr) - - def default_vat_check(self, cn, vn): - # by default, a VAT number is valid if: - # it starts with 2 letters - # has more than 3 characters - return len(vn) > 0 and len(cn) == 2 and cn[0] in string.ascii_lowercase and cn[1] in string.ascii_lowercase - - return partial(default_vat_check, self, attr[10:]) - - def vat_change(self, cr, uid, ids, value, context={}): return {'value': {'vat_subjected': bool(value)}} _columns = { 'vat_subjected': fields.boolean('VAT Legal Statement', help="Check this box if the partner is subjected to the VAT. It will be used for the VAT legal statement.") } - _constraints = [(check_vat, "The VAT doesn't seem to be correct.", ["vat"])] + + def _construct_constraint_msg(self, cr, uid, ids): + def default_vat_check(cn, vn): + # by default, a VAT number is valid if: + # it starts with 2 letters + # has more than 3 characters + return cn[0] in string.ascii_lowercase and cn[1] in string.ascii_lowercase + + vat_country, vat_number = self._split_vat(self.browse(cr, uid, ids)[0].vat) + if default_vat_check(vat_country, vat_number): + return _('The Vat does not seems to be correct. You should have entered something like this %s'), (_ref_vat[vat_country]) + return _('The VAT is invalid, it shoul begin with the country code'), () + + _constraints = [(check_vat, _construct_constraint_msg, ["vat"])] # code from the following methods come from Tryton (B2CK) # http://www.tryton.org/hgwebdir.cgi/modules/relationship/file/544d1de586d9/party.py diff --git a/addons/board_manufacturing/board_manufacturing_view.xml b/addons/board_manufacturing/board_manufacturing_view.xml index 17b4bc486bc..191f1818612 100644 --- a/addons/board_manufacturing/board_manufacturing_view.xml +++ b/addons/board_manufacturing/board_manufacturing_view.xml @@ -15,7 +15,7 @@ <child1> <action colspan="4" height="200" name="%(mrp.mrp_production_action2)d" string="Next production orders" width="510"/> <action colspan="4" name="%(stock.action_picking_all)d" string="Deliveries (Out picking)" domain="[('state','=','assigned'),('type','=','out')]"/> - <action colspan="4" name="%(mrp.mrp_procurement_action4)d" string="Procurements in Exception"/> + <action colspan="4" name="%(mrp_procurement.mrp_procurement_action4)d" string="Procurements in Exception"/> </child1> diff --git a/addons/board_warehouse/board_warehouse_view.xml b/addons/board_warehouse/board_warehouse_view.xml index cdc93d9a274..af797401935 100644 --- a/addons/board_warehouse/board_warehouse_view.xml +++ b/addons/board_warehouse/board_warehouse_view.xml @@ -23,7 +23,7 @@ <form string="Warehouse board"> <hpaned position="100"> <child1> - <action colspan="4" name="%(mrp.mrp_procurement_action5)d" string="Procurement Exceptions" width="510" /> + <action colspan="4" name="%(mrp_procurement.mrp_procurement_action5)d" string="Procurement Exceptions" width="510" /> <action colspan="4" name="%(action_reception_picking_move_board)d" string="Products To Receive" /> </child1> diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 91ef20be892..fd629edc745 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -315,8 +315,7 @@ class crm_case(osv.osv): _columns = { 'id': fields.integer('ID', readonly=True), 'name': fields.char('Description', size=1024, required=True), - 'active': fields.boolean('Active', help="If the active field is set to\ - true, it will allow you to hide the case without removing it."), + 'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the case without removing it."), 'description': fields.text('Description'), 'section_id': fields.many2one('crm.case.section', 'Sales Team', \ select=True, help='Sales team to which Case belongs to.\ @@ -774,7 +773,7 @@ class crm_case_history(osv.osv): """ res = {} for hist in self.browse(cursor, user, ids, context or {}): - res[hist.id] = (hist.email or '/') + ' (' + str(hist.date) + ')\n' + res[hist.id] = (hist.email_from or '/') + ' (' + str(hist.date) + ')\n' res[hist.id] += (hist.description or '') return res diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 9c4c38875c5..d6995cb6644 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -113,7 +113,7 @@ class crm_lead(osv.osv): 'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', \ domain="[('section_id','=',section_id),\ ('object_id.model', '=', 'crm.lead')]"), - 'partner_name': fields.char("Contact Name", size=64), + 'partner_name': fields.char("Company Name", size=64), 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), 'date_closed': fields.datetime('Closed', readonly=True), diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index f89c558fee4..ade89c792b1 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -69,7 +69,7 @@ <page string="Lead"> <group colspan="2" col="4"> <separator string="Contact" colspan="4" col="4"/> - <field name="partner_name" string="Contact Name" colspan="4"/> + <field name="partner_name" colspan="4"/> <newline/> <field domain="[('domain', '=', 'contact')]" name="title"/> <field name="function_name" /> @@ -141,8 +141,8 @@ <separator string="Dates" colspan="2" col="2"/> <field name="create_date"/> <field name="write_date"/> - <field name="date_closed"/> <field name="date_open"/> + <field name="date_closed"/> </group> <group colspan="2" col="2"> <separator string="Statistics" colspan="2" col="2"/> diff --git a/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py b/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py index 607b0fbd434..5775319ee0a 100755 --- a/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py +++ b/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py @@ -168,13 +168,14 @@ class email_parser(object): def _decode_header(self, s): from email.Header import decode_header - s = decode_header(s) + s = decode_header(s.replace('\r', '')) return ''.join(map(lambda x:self._to_decode(x[0], [x[1]]), s or [])) def msg_new(self, msg): message = self.msg_body_get(msg) msg_subject = self._decode_header(msg['Subject']) msg_from = self._decode_header(msg['From']) + msg_to = self._decode_header(msg['To']) msg_cc = self._decode_header(msg['Cc'] or '') data = { @@ -189,7 +190,7 @@ class email_parser(object): try: id = self.rpc(self.model, 'create', data) - self.rpc(self.model, 'history', [id], 'Receive', True, msg['From'], message['body'], False, False, {'model' : self.model}) + self.rpc(self.model, 'history', [id], 'Receive', True, msg_to, message['body'], msg_from, False, {'model' : self.model}) #self.rpc(self.model, 'case_open', [id]) except Exception, e: if getattr(e, 'faultCode', '') and 'AccessError' in e.faultCode: @@ -314,7 +315,7 @@ class email_parser(object): 'res_id': id } self.rpc('ir.attachment', 'create', data_attach) - self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], body['body']) + self.rpc(self.model, 'history', [id], 'Send', True, self._decode_header(msg['From']), body['body']) return id def msg_send(self, msg, emails, priority=None): @@ -357,7 +358,7 @@ class email_parser(object): 'res_id': id } self.rpc('ir.attachment', 'create', data_attach) - self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], message['body']) + self.rpc(self.model, 'history', [id], 'Send', True, self._decode_header(msg['From']), message['body']) return id def msg_test(self, msg, case_str): diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py index b0d20cd6e55..a3a86d4b509 100644 --- a/addons/crm/wizard/crm_send_email.py +++ b/addons/crm/wizard/crm_send_email.py @@ -29,6 +29,24 @@ from crm import crm class crm_send_new_email(osv.osv_memory): """ Sends new email for the case""" _name = "crm.send.mail" + +crm_send_new_email() + +class crm_send_new_email_attachment(osv.osv_memory): + _name = 'crm.send.mail.attachment' + + _columns = { + 'binary' : fields.binary('Attachment', required=True), + 'name' : fields.char('Name', size=128, required=True), + + 'wizard_id' : fields.many2one('crm.send.mail', 'Wizard', required=True), + } + +crm_send_new_email_attachment() + +class crm_send_new_email(osv.osv_memory): + """ Sends new email for the case""" + _name = "crm.send.mail" _description = "Send new email" _columns = { @@ -38,12 +56,8 @@ class crm_send_new_email(osv.osv_memory): 'subject': fields.char('Subject', size=128, required=True), 'text': fields.text('Message', required=True), 'state': fields.selection(crm.AVAILABLE_STATES, string='Set New State To', required=True), - 'doc1': fields.binary("Attachment1"), - 'doc1_fname': fields.char("File Name", size=64), - 'doc2': fields.binary("Attachment2"), - 'doc2_fname': fields.char("File Name", size=64), - 'doc3': fields.binary("Attachment3"), - 'doc3_fname': fields.char("File Name", size=64), + + 'attachment_ids' : fields.one2many('crm.send.mail.attachment', 'wizard_id'), } def action_cancel(self, cr, uid, ids, context=None): @@ -68,12 +82,13 @@ class crm_send_new_email(osv.osv_memory): case_pool = self.pool.get(model) res_id = context and context.get('active_id', False) or False - for data in self.read(cr, uid, ids, context=context): - attach = filter(lambda x: x, [data['doc1'], data['doc2'], data['doc3']]) - attach = map(lambda x: (data['doc' + str(attach.index(x) + 1) \ - + '_fname'], base64.decodestring(x)), attach) - message_id = None - + for obj in self.browse(cr, uid, ids, context=context): + attach = [ + (x.name, base64.decodestring(x.binary)) for x in obj.attachment_ids + ] + + message_id = None + case = case_pool.browse(cr, uid, res_id) if context.get('mail', 'new') == 'new': if len(case.history_line): @@ -84,17 +99,18 @@ class crm_send_new_email(osv.osv_memory): model = hist.log_id.model_id.model model_pool = self.pool.get(model) case = model_pool.browse(cr, uid, hist.log_id.res_id) - emails = [data['email_to']] + (data['email_cc'] or '').split(',') + emails = [obj.email_to] + (obj.email_cc or '').split(',') emails = filter(None, emails) - body = data['text'] + body = obj.text body = case_pool.format_body(body) - email_from = data.get('email_from', False) - case_pool._history(cr, uid, [case], _('Send'), history=True, email=data['email_to'], details=body, email_from=email_from, message_id=message_id) + email_from = getattr(obj, 'email_from', False) + case_pool._history(cr, uid, [case], _('Send'), history=True, email=obj.email_to, details=body, email_from=email_from, message_id=message_id) - x_headers = { - 'Reply-To':"%s" % case.section_id.reply_to, - } + x_headers = dict() + #x_headers = { + # 'Reply-To':"%s" % case.section_id.reply_to, + #} if message_id: x_headers['References'] = "%s" % (message_id) @@ -105,7 +121,7 @@ class crm_send_new_email(osv.osv_memory): uid=uid, server_id=case.section_id.server_id.id, emailto=emails, - subject=data['subject'], + subject=obj.subject, body="<pre>%s</pre>" % body, attachments=attach, headers=x_headers @@ -114,7 +130,7 @@ class crm_send_new_email(osv.osv_memory): flag = tools.email_send( email_from, emails, - data['subject'], + obj.subject, body, attach=attach, reply_to=case.section_id.reply_to, @@ -123,14 +139,14 @@ class crm_send_new_email(osv.osv_memory): ) if flag: - if data['state'] == 'unchanged': + if obj.state == 'unchanged': pass - elif data['state'] == 'done': + elif obj.state == 'done': case_pool.case_close(cr, uid, [case.id]) - elif data['state'] == 'draft': + elif obj.state == 'draft': case_pool.case_reset(cr, uid, [case.id]) - elif data['state'] in ['cancel', 'open', 'pending']: - act = 'case_' + data['state'] + elif obj.state in ['cancel', 'open', 'pending']: + act = 'case_' + obj.state getattr(case_pool, act)(cr, uid, [case.id]) cr.commit() @@ -186,6 +202,11 @@ class crm_send_new_email(osv.osv_memory): res = {} for hist in hist_obj.browse(cr, uid, res_ids): model = hist.log_id.model_id.model + + # In the case where the crm.case does not exist in the database + if not model: + return {} + model_pool = self.pool.get(model) case = model_pool.browse(cr, uid, hist.log_id.res_id) if 'email_to' in fields: @@ -201,7 +222,12 @@ class crm_send_new_email(osv.osv_memory): to = 'To: %s' % (hist.email_to or '') sentdate = 'Date: %s' % (hist.date) desc = '\n%s'%(hist.description) - original = [header, sender, to, sentdate, desc] + + signature = '' + if case.user_id.signature: + signature = '--\n' + case.user_id.signature + + original = [header, sender, to, sentdate, desc, signature] original = '\n'.join(original) res['text']=original if 'subject' in fields: diff --git a/addons/crm/wizard/crm_send_email_view.xml b/addons/crm/wizard/crm_send_email_view.xml index 49758245eb0..35d78f895fc 100644 --- a/addons/crm/wizard/crm_send_email_view.xml +++ b/addons/crm/wizard/crm_send_email_view.xml @@ -19,12 +19,15 @@ <field name="text" nolabel="1" colspan="4"/> </page> <page string="Attachments"> - <field name="doc1" filename="doc1_fname"/> - <field name="doc1_fname" invisible="1" /> - <field name="doc2" filename="doc2_fname" /> - <field name="doc2_fname" invisible="1" /> - <field name="doc3" filename="doc3_fname" /> - <field name="doc3_fname" invisible="1" /> + <field name="attachment_ids" colspan="4" nolabel="1"> + <form string="Attachment"> + <field name="binary" filename="name" /> + <field name="name" /> + </form> + <tree string="Attachments"> + <field name="name" /> + </tree> + </field> </page> </notebook> <group colspan="2" col="4" > @@ -60,9 +63,15 @@ <field name="email_to" /> <field name="email_cc" /> <field name="subject" /> - <field name="doc1" /> - <field name="doc2" /> - <field name="doc3" /> + <field name="attachment_ids" colspan="4" nolabel="1"> + <form string="Attachment"> + <field name="binary" filename="name" /> + <field name="name" /> + </form> + <tree string="Attachments"> + <field name="name" /> + </tree> + </field> <separator string="" colspan="4"/> <field name="text" nolabel="1" colspan="4"/> <separator string=" " colspan="4"/> diff --git a/addons/delivery/delivery.py b/addons/delivery/delivery.py index 7e7d31975e5..35b3ed481e9 100644 --- a/addons/delivery/delivery.py +++ b/addons/delivery/delivery.py @@ -28,6 +28,17 @@ class delivery_carrier(osv.osv): _name = "delivery.carrier" _description = "Carrier and delivery grids" + def name_get(self, cr, uid, ids, context={}): + if not len(ids): + return [] + order_id = context.get('order_id',False) + if not order_id: + res = super(delivery_carrier, self).name_get(cr, uid, ids, context=context) + else: + order = self.pool.get('sale.order').browse(cr, uid, [order_id])[0] + currency = order.pricelist_id.currency_id.name or '' + res = [(r['id'], r['name']+' ('+(str(r['price']))+' '+currency+')') for r in self.read(cr, uid, ids, ['name', 'price'], context)] + return res def get_price(self, cr, uid, ids, field_name, arg=None, context={}): res={} sale_obj=self.pool.get('sale.order') @@ -94,9 +105,7 @@ class delivery_grid(osv.osv): } _order = 'sequence' - def get_price(self, cr, uid, id, order, dt, context): - total = 0 weight = 0 volume = 0 @@ -112,7 +121,6 @@ class delivery_grid(osv.osv): def get_price_from_picking(self, cr, uid, id, total, weight, volume, context={}): grid = self.browse(cr, uid, id, context) - price = 0.0 ok = False diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index a80b8946bd5..6a8058ff8bc 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -291,5 +291,16 @@ </field> </record> + <record model="ir.ui.view" id="edit_project_multicompany"> + <field name="name">sale.order.multicompany</field> + <field name="model">sale.order</field> + <field name="inherit_id" ref="sale.view_order_form"/> + <field name="arch" type="xml"> + <xpath expr="/form/notebook/page[@string='Sale Order']/group[1]/button[@name='button_dummy']" position="after"> + <button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-execute" context="{'order_id':id}"/> + </xpath> + </field> + </record> + </data> </openerp> diff --git a/addons/delivery/wizard/delivery_sale_order.py b/addons/delivery/wizard/delivery_sale_order.py index efc82ae4141..5f066b23bb0 100644 --- a/addons/delivery/wizard/delivery_sale_order.py +++ b/addons/delivery/wizard/delivery_sale_order.py @@ -50,7 +50,11 @@ class make_delivery(osv.osv_memory): res = super(make_delivery, self).default_get(cr, uid, fields, context=context) order_obj = self.pool.get('sale.order') for order in order_obj.browse(cr, uid, context.get('active_ids', [])): - res.update({'carrier_id': order.partner_id.property_delivery_carrier.id}) + carrier = order.carrier_id.id + if not carrier: + carrier = order.partner_id.property_delivery_carrier.id + res.update({'carrier_id': carrier}) + return res def view_init(self, cr , uid , fields, context=None): diff --git a/addons/delivery/wizard/delivery_sale_order_view.xml b/addons/delivery/wizard/delivery_sale_order_view.xml index c2609bc3923..6ac0883493f 100644 --- a/addons/delivery/wizard/delivery_sale_order_view.xml +++ b/addons/delivery/wizard/delivery_sale_order_view.xml @@ -11,26 +11,28 @@ <field name="arch" type="xml"> <form string="Create Deliveries"> <separator colspan="4" string="Delivery Method" /> - <field name="carrier_id"/> + <field name="carrier_id" widget="selection"/> <newline/> + <separator colspan="4"/> <group col="2" colspan="4"> <button icon='gtk-cancel' special="cancel" - string="Cancel" /> - <button name="delivery_set" string="Add Delivery Costs" - colspan="1" type="object" icon="gtk-ok" /> + string="_Cancel" /> + <button name="delivery_set" string="_Apply" + colspan="1" type="object" icon="gtk-apply" /> </group> </form> </field> </record> + + <record id="action_delivery_cost" model="ir.actions.act_window"> + <field name="name">Delivery Costs</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">delivery.sale.order</field> + <field name="view_type">form</field> + <field name="view_mode">form</field> + <field name="view_id" ref="view_make_delivery_wizard"/> + <field name="target">new</field> + </record> - <act_window name="Delivery Costs" - res_model="delivery.sale.order" - src_model="sale.order" - view_mode="form" - target="new" - key2="client_action_multi" - id="act_delivery_cost"/> - - </data> </openerp> diff --git a/addons/event/i18n/et.po b/addons/event/i18n/et.po index d184aebb4cc..d7595209b97 100644 --- a/addons/event/i18n/et.po +++ b/addons/event/i18n/et.po @@ -7,25 +7,25 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2009-11-09 13:36+0000\n" -"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n" +"PO-Revision-Date: 2010-05-10 10:27+0000\n" +"Last-Translator: lyyser <logard.1961@gmail.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:00+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:18+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: event #: field:event.event,date_end:0 #: field:report.event.registration,date_end:0 msgid "Ending date" -msgstr "" +msgstr "Lõpu kuupäev" #. module: event #: field:event.event,register_min:0 msgid "Minimum Registrations" -msgstr "" +msgstr "Miinimum registreerimised" #. module: event #: constraint:ir.actions.act_window:0 @@ -35,17 +35,17 @@ msgstr "Vigane mudeli nimi toimingu definitsioonis." #. module: event #: field:event.event,mail_registr:0 msgid "Registration Email" -msgstr "" +msgstr "Registreerimise Email" #. module: event #: model:crm.case.section,name:event.event_0_crm_case_section msgid "Concert of Bon Jovi" -msgstr "" +msgstr "Bon Jovi kontsert" #. module: event #: field:event.event,mail_confirm:0 msgid "Confirmation Email" -msgstr "" +msgstr "Kinnitus Email" #. module: event #: constraint:crm.case.section:0 @@ -55,7 +55,7 @@ msgstr "Viga! Sa ei saa luua rekursiivseid sektsioone." #. module: event #: model:ir.model,name:event.model_event_registration msgid "Event Registration" -msgstr "" +msgstr "Sündmuse registreerimine" #. module: event #: model:ir.actions.wizard,name:event.event_reg_invoice @@ -65,52 +65,52 @@ msgstr "" #. module: event #: field:report.event.type.registration,draft_state:0 msgid "Draft Registrations" -msgstr "" +msgstr "Registreerimiste mustand" #. module: event #: view:report.event.registration:0 msgid "Event on Registration" -msgstr "" +msgstr "Registreerimise sündmus" #. module: event #: wizard_button:event.reg_make_invoice,init,end:0 msgid "Ok" -msgstr "" +msgstr "Ok" #. module: event #: field:event.event,mail_auto_confirm:0 msgid "Mail Auto Confirm" -msgstr "" +msgstr "Autokinnituse meil" #. module: event #: model:product.template,name:event.event_product_1_product_template msgid "Ticket for Opera" -msgstr "" +msgstr "Ooperi pilet" #. module: event #: wizard_field:event.reg_make_invoice,init,inv_rejected:0 msgid "Invoice Rejected" -msgstr "" +msgstr "Arve väljapraagitud" #. module: event #: view:event.event:0 msgid "Confirm Event" -msgstr "" +msgstr "Kinnita sündmus" #. module: event #: model:crm.case.section,name:event.event_1_crm_case_section msgid "Opera of Verdi" -msgstr "" +msgstr "Verdi ooper" #. module: event #: field:report.event.registration,draft_state:0 msgid "Draft Registration" -msgstr "" +msgstr "Registreerimise mustand" #. module: event #: wizard_view:event.reg_make_invoice,init:0 msgid "Create Invoices" -msgstr "" +msgstr "Loo arved" #. module: event #: model:ir.module.module,description:event.module_meta_information @@ -134,12 +134,12 @@ msgstr "" #. module: event #: view:event.registration:0 msgid "Extra Info" -msgstr "" +msgstr "Täiendav info" #. module: event #: view:event.registration:0 msgid "Registration" -msgstr "" +msgstr "Registreerimine" #. module: event #: field:event.type,name:0 diff --git a/addons/hr/i18n/tr.po b/addons/hr/i18n/tr.po index 5e4be7c5558..86e7205ef3a 100644 --- a/addons/hr/i18n/tr.po +++ b/addons/hr/i18n/tr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-02-14 21:34+0000\n" -"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n" +"PO-Revision-Date: 2010-05-10 13:18+0000\n" +"Last-Translator: Angel Spy <melissadilara@yahoo.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:16+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:19+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: hr @@ -62,7 +62,7 @@ msgstr "" #. module: hr #: view:hr.department:0 msgid "Department" -msgstr "" +msgstr "Bölüm" #. module: hr #: model:process.transition,name:hr.process_transition_contactofemployee0 @@ -340,7 +340,7 @@ msgstr "Firmalar" #. module: hr #: selection:hr.timesheet,dayofweek:0 msgid "Wednesday" -msgstr "Carsamba" +msgstr "Çarşamba" #. module: hr #: model:ir.actions.act_window,name:hr.open_view_categ_form diff --git a/addons/hr_contract/hr_contract.py b/addons/hr_contract/hr_contract.py index b8a310cc7bd..ddc29bd26a1 100644 --- a/addons/hr_contract/hr_contract.py +++ b/addons/hr_contract/hr_contract.py @@ -86,7 +86,7 @@ class hr_contract(osv.osv): 'job_id': fields.many2one('hr.job', 'Job Title'), 'date_start': fields.date('Start Date', required=True), 'date_end': fields.date('End Date'), - 'working_hours': fields.many2one('resource.calendar','Working hours'), + 'working_hours': fields.many2one('resource.calendar','Working Schedule'), 'wage_type_id': fields.many2one('hr.contract.wage.type', 'Wage Type', required=True), 'wage': fields.float('Wage', digits=(16,2), required=True), 'advantages': fields.text('Advantages'), @@ -99,4 +99,4 @@ class hr_contract(osv.osv): } hr_contract() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/idea/i18n/hr.po b/addons/idea/i18n/hr.po index 9083bd8d0aa..97112788aea 100644 --- a/addons/idea/i18n/hr.po +++ b/addons/idea/i18n/hr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-03-24 10:38+0000\n" -"Last-Translator: Drazen Bosak <Unknown>\n" +"PO-Revision-Date: 2010-05-10 06:56+0000\n" +"Last-Translator: nafterburner <nafterburner@gmail.com>\n" "Language-Team: Vinteh\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:10+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:19+0000\n" "X-Generator: Launchpad (build Unknown)\n" "Language: hr\n" @@ -336,7 +336,7 @@ msgstr "Kreator" #. module: idea #: model:ir.ui.menu,name:idea.menu_tools msgid "Tools" -msgstr "Pomagala" +msgstr "Alati" #. module: idea #: field:idea.comment,idea_id:0 diff --git a/addons/mrp/__init__.py b/addons/mrp/__init__.py index 39d97d0ba11..d23cee8d565 100644 --- a/addons/mrp/__init__.py +++ b/addons/mrp/__init__.py @@ -26,5 +26,6 @@ import installer import wizard import report import company -import schedulers +import mrp_procurement + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/__openerp__.py b/addons/mrp/__openerp__.py index a69e8ce4025..0fa66ac7bd1 100644 --- a/addons/mrp/__openerp__.py +++ b/addons/mrp/__openerp__.py @@ -26,7 +26,7 @@ "author" : "Tiny", "website" : "http://www.openerp.com", "category" : "Generic Modules/Production", - "depends" : ["stock", "resource", "purchase", "product","process"], + "depends" : ["mrp_procurement", "stock", "resource", "purchase", "product","process"], "description": """ This is the base module to manage the manufacturing process in Open ERP. @@ -61,15 +61,11 @@ 'mrp_workflow.xml', 'mrp_data.xml', 'wizard/mrp_product_produce_view.xml', - 'wizard/make_procurement_view.xml', - 'wizard/mrp_procurement_view.xml', 'wizard/change_production_qty_view.xml', - 'wizard/orderpoint_procurement_view.xml', 'wizard/mrp_price_view.xml', 'wizard/mrp_workcenter_load_view.xml', # 'wizard/mrp_track_prod_view.xml', 'mrp_view.xml', - 'wizard/schedulers_all_view.xml', 'mrp_wizard.xml', 'mrp_report.xml', 'company_view.xml', @@ -81,6 +77,7 @@ 'report/mrp_production_order_view.xml', ], 'demo_xml': ['mrp_demo.xml', 'mrp_order_point.xml'], +# 'test': ['test/mrp_phantom_bom.yml','test/mrp_production_order.yml'], 'installable': True, 'active': False, 'certificate': '0032052481373', diff --git a/addons/mrp/company.py b/addons/mrp/company.py index 1844fff47eb..22acf4fc5dd 100644 --- a/addons/mrp/company.py +++ b/addons/mrp/company.py @@ -24,22 +24,10 @@ from osv import osv,fields class company(osv.osv): _inherit = 'res.company' _columns = { - 'schedule_range': fields.float('Scheduler Range', required=True, - help="This is the time frame analysed by the scheduler when "\ - "computing procurements. All procurements that are not between "\ - "today and today+range are skipped for futur computation."), - 'po_lead': fields.float('Purchase Lead Time', required=True, - help="This is the leads/security time for each purchase order."), - 'security_lead': fields.float('Security Days', required=True, - help="This is the days added to what you promise to customers "\ - "for security purpose"), 'manufacturing_lead': fields.float('Manufacturing Lead Time', required=True, help="Security days for each manufacturing operation."), } _defaults = { - 'schedule_range': lambda *a: 80.0, - 'po_lead': lambda *a: 1.0, - 'security_lead': lambda *a: 5.0, 'manufacturing_lead': lambda *a: 1.0, } company() diff --git a/addons/mrp/company_view.xml b/addons/mrp/company_view.xml index 1975bf5bb72..e94324f8195 100644 --- a/addons/mrp/company_view.xml +++ b/addons/mrp/company_view.xml @@ -9,12 +9,7 @@ <field name="inherit_id" ref="base.view_company_form"/> <field name="arch" type="xml"> <page string="Configuration" position="inside"> - <separator string="MRP & Logistic Scheduler" colspan="4"/> - <field name="schedule_range"/> - <field name="po_lead"/> - <field name="security_lead"/> <field name="manufacturing_lead"/> - <newline/> </page> </field> </record> diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 675c4a73bb0..d5cea81933b 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -64,35 +64,6 @@ class mrp_workcenter(osv.osv): mrp_workcenter() -class mrp_property_group(osv.osv): - """ - Group of mrp properties. - """ - _name = 'mrp.property.group' - _description = 'Property Group' - _columns = { - 'name': fields.char('Property Group', size=64, required=True), - 'description': fields.text('Description'), - } -mrp_property_group() - -class mrp_property(osv.osv): - """ - Properties of mrp. - """ - _name = 'mrp.property' - _description = 'Property' - _columns = { - 'name': fields.char('Name', size=64, required=True), - 'composition': fields.selection([('min','min'),('max','max'),('plus','plus')], 'Properties composition', required=True, help="Not used in computations, for information purpose only."), - 'group_id': fields.many2one('mrp.property.group', 'Property Group', required=True), - 'description': fields.text('Description'), - } - _defaults = { - 'composition': lambda *a: 'min', - } -mrp_property() - class mrp_routing(osv.osv): """ For specifying the routings of workcenters. @@ -996,520 +967,6 @@ class mrp_production_product_line(osv.osv): } mrp_production_product_line() -# ------------------------------------------------------------------ -# Procurement -# ------------------------------------------------------------------ -# -# Produce, Buy or Find products and place a move -# then wizard for picking lists & move -# -class mrp_procurement(osv.osv): - """ - Procument Orders - """ - _name = "mrp.procurement" - _description = "Procurement" - _order = 'priority,date_planned' - - _columns = { - 'name': fields.char('Reason', size=64, required=True, help='Procurement name.'), - 'origin': fields.char('Source Document', size=64, - help="Reference of the document that created this Procurement.\n" - "This is automatically completed by Open ERP."), - 'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', required=True), - 'date_planned': fields.datetime('Scheduled date', required=True), - 'date_close': fields.datetime('Date Closed'), - 'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True), - 'product_qty': fields.float('Quantity', required=True, states={'draft':[('readonly',False)]}, readonly=True), - 'product_uom': fields.many2one('product.uom', 'Product UoM', required=True, states={'draft':[('readonly',False)]}, readonly=True), - 'product_uos_qty': fields.float('UoS Quantity', states={'draft':[('readonly',False)]}, readonly=True), - 'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True), - 'move_id': fields.many2one('stock.move', 'Reservation', ondelete='set null'), - - 'bom_id': fields.many2one('mrp.bom', 'BoM', ondelete='cascade', select=True), - - 'close_move': fields.boolean('Close Move at end', required=True), - 'location_id': fields.many2one('stock.location', 'Location', required=True, states={'draft':[('readonly',False)]}, readonly=True), - 'procure_method': fields.selection([('make_to_stock','from stock'),('make_to_order','on order')], 'Procurement Method', states={'draft':[('readonly',False)], 'confirmed':[('readonly',False)]}, - readonly=True, required=True, help="If you encode manually a Procurement, you probably want to use" \ - " a make to order method."), - - 'purchase_id': fields.many2one('purchase.order', 'Purchase Order'), - 'note': fields.text('Note'), - - 'property_ids': fields.many2many('mrp.property', 'mrp_procurement_property_rel', 'procurement_id','property_id', 'Properties'), - - 'message': fields.char('Latest error', size=64, help="Exception occurred while computing procurement orders."), - 'state': fields.selection([ - ('draft','Draft'), - ('confirmed','Confirmed'), - ('exception','Exception'), - ('running','Running'), - ('cancel','Cancel'), - ('ready','Ready'), - ('done','Done'), - ('waiting','Waiting')], 'State', required=True, - help='When a procurement is created the state is set to \'Draft\'.\n If the procurement is confirmed, the state is set to \'Confirmed\'.\ - \nAfter confirming the state is set to \'Running\'.\n If any exception arises in the order then the state is set to \'Exception\'.\n Once the exception is removed the state becomes \'Ready\'.\n It is in \'Waiting\'. state when the procurement is waiting for another one to finish.'), - 'note': fields.text('Note'), - 'company_id': fields.many2one('res.company','Company',required=True), - } - _defaults = { - 'state': lambda *a: 'draft', - 'priority': lambda *a: '1', - 'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), - 'close_move': lambda *a: 0, - 'procure_method': lambda *a: 'make_to_order', - 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.procurement', context=c) - } - - def unlink(self, cr, uid, ids, context=None): - procurements = self.read(cr, uid, ids, ['state']) - unlink_ids = [] - for s in procurements: - if s['state'] in ['draft','cancel']: - unlink_ids.append(s['id']) - else: - raise osv.except_osv(_('Invalid action !'), _('Cannot delete Procurement Order(s) which are in %s State!' % s['state'])) - return osv.osv.unlink(self, cr, uid, unlink_ids, context=context) - - def onchange_product_id(self, cr, uid, ids, product_id, context={}): - """ Finds UoM and UoS of changed product. - @param product_id: Changed id of product. - @return: Dictionary of values. - """ - if product_id: - w = self.pool.get('product.product').browse(cr, uid, product_id, context) - v = { - 'product_uom': w.uom_id.id, - 'product_uos': w.uos_id and w.uos_id.id or w.uom_id.id - } - return {'value': v} - return {} - - def check_product(self, cr, uid, ids): - """ Checks product type. - @return: True or False - """ - for procurement in self.browse(cr, uid, ids): - if procurement.product_id.type in ('product', 'consu'): - return True - return False - - def check_move_cancel(self, cr, uid, ids, context={}): - """ Checks if move is cancelled or not. - @return: True or False. - """ - res = True - ok = False - for procurement in self.browse(cr, uid, ids, context): - if procurement.move_id: - ok = True - if not procurement.move_id.state == 'cancel': - res = False - return res and ok - - def check_move_done(self, cr, uid, ids, context={}): - """ Checks if move is done or not. - @return: True or False. - """ - res = True - for proc in self.browse(cr, uid, ids, context): - if proc.move_id: - if not proc.move_id.state == 'done': - res = False - return res - - # - # This method may be overrided by objects that override mrp.procurment - # for computing their own purpose - # - def _quantity_compute_get(self, cr, uid, proc, context={}): - """ Finds sold quantity of product. - @param proc: Current procurement. - @return: Quantity or False. - """ - if proc.product_id.type == 'product': - if proc.move_id.product_uos: - return proc.move_id.product_uos_qty - return False - - def _uom_compute_get(self, cr, uid, proc, context={}): - """ Finds UoS if product is Stockable Product. - @param proc: Current procurement. - @return: UoS or False. - """ - if proc.product_id.type == 'product': - if proc.move_id.product_uos: - return proc.move_id.product_uos.id - return False - - # - # Return the quantity of product shipped/produced/served, wich may be - # different from the planned quantity - # - def quantity_get(self, cr, uid, id, context={}): - """ Finds quantity of product used in procurement. - @return: Quantity of product. - """ - proc = self.browse(cr, uid, id, context) - result = self._quantity_compute_get(cr, uid, proc, context) - if not result: - result = proc.product_qty - return result - - def uom_get(self, cr, uid, id, context=None): - """ Finds UoM of product used in procurement. - @return: UoM of product. - """ - proc = self.browse(cr, uid, id, context) - result = self._uom_compute_get(cr, uid, proc, context) - if not result: - result = proc.product_uom.id - return result - - def check_waiting(self, cr, uid, ids, context=[]): - """ Checks state of move. - @return: True or False - """ - for procurement in self.browse(cr, uid, ids, context=context): - if procurement.move_id and procurement.move_id.state == 'auto': - return True - return False - - def check_produce_service(self, cr, uid, procurement, context=[]): - return True - - def check_produce_product(self, cr, uid, procurement, context=[]): - """ Finds BoM of a product if not found writes exception message. - @param procurement: Current procurement. - @return: True or False. - """ - properties = [x.id for x in procurement.property_ids] - bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, procurement.product_id.id, procurement.product_uom.id, properties) - if not bom_id: - cr.execute('update mrp_procurement set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id)) - return False - return True - - def check_make_to_stock(self, cr, uid, ids, context={}): - """ Checks product type. - @return: True or False - """ - ok = True - for procurement in self.browse(cr, uid, ids, context=context): - if procurement.product_id.type == 'service': - ok = ok and self._check_make_to_stock_service(cr, uid, procurement, context) - else: - ok = ok and self._check_make_to_stock_product(cr, uid, procurement, context) - return ok - - def check_produce(self, cr, uid, ids, context={}): - """ Checks product type. - @return: True or Product Id. - """ - res = True - user = self.pool.get('res.users').browse(cr, uid, uid) - for procurement in self.browse(cr, uid, ids): - if procurement.product_id.product_tmpl_id.supply_method <> 'produce': - if procurement.product_id.seller_ids: - partner = procurement.product_id.seller_ids[0].name - if user.company_id and user.company_id.partner_id: - if partner.id == user.company_id.partner_id.id: - return True - return False - if procurement.product_id.product_tmpl_id.type=='service': - res = res and self.check_produce_service(cr, uid, procurement, context) - else: - res = res and self.check_produce_product(cr, uid, procurement, context) - if not res: - return False - return res - - def check_buy(self, cr, uid, ids): - """ Checks product type. - @return: True or Product Id. - """ - user = self.pool.get('res.users').browse(cr, uid, uid) - partner_obj = self.pool.get('res.partner') - for procurement in self.browse(cr, uid, ids): - if procurement.product_id.product_tmpl_id.supply_method <> 'buy': - return False - if not procurement.product_id.seller_ids: - cr.execute('update mrp_procurement set message=%s where id=%s', (_('No supplier defined for this product !'), procurement.id)) - return False - partner = procurement.product_id.seller_ids[0].name - if user.company_id and user.company_id.partner_id: - if partner.id == user.company_id.partner_id.id: - return False - address_id = partner_obj.address_get(cr, uid, [partner.id], ['delivery'])['delivery'] - if not address_id: - cr.execute('update mrp_procurement set message=%s where id=%s', (_('No address defined for the supplier'), procurement.id)) - return False - return True - - def test_cancel(self, cr, uid, ids): - """ Tests whether state of move is cancelled or not. - @return: True or False - """ - for record in self.browse(cr, uid, ids): - if record.move_id and record.move_id.state == 'cancel': - return True - return False - - def action_confirm(self, cr, uid, ids, context={}): - """ Confirms procurement and writes exception message if any. - @return: True - """ - move_obj = self.pool.get('stock.move') - for procurement in self.browse(cr, uid, ids): - if procurement.product_qty <= 0.00: - raise osv.except_osv(_('Data Insufficient !'), _('Please check the Quantity of Procurement Order(s), it should not be less than 1!')) - if procurement.product_id.type in ('product', 'consu'): - if not procurement.move_id: - source = procurement.location_id.id - if procurement.procure_method == 'make_to_order': - source = procurement.product_id.product_tmpl_id.property_stock_procurement.id - id = move_obj.create(cr, uid, { - 'name': 'PROC:' + procurement.name, - 'location_id': source, - 'location_dest_id': procurement.location_id.id, - 'product_id': procurement.product_id.id, - 'product_qty': procurement.product_qty, - 'product_uom': procurement.product_uom.id, - 'date_planned': procurement.date_planned, - 'state': 'confirmed', - 'company_id': procurement.company_id.id, - }) - self.write(cr, uid, [procurement.id], {'move_id': id, 'close_move': 1}) - else: - # TODO: check this - if procurement.procure_method == 'make_to_stock' and procurement.move_id.state in ('waiting',): - id = move_obj.write(cr, uid, [procurement.move_id.id], {'state':'confirmed'}) - self.write(cr, uid, ids, {'state': 'confirmed', 'message': ''}) - return True - - def action_move_assigned(self, cr, uid, ids, context={}): - """ Changes procurement state to Running and writes message. - @return: True - """ - self.write(cr, uid, ids, {'state': 'running', 'message': _('from stock: products assigned.')}) - return True - - def _check_make_to_stock_service(self, cr, uid, procurement, context={}): - return True - def _check_make_to_stock_product(self, cr, uid, procurement, context={}): - """ Checks procurement move state. - @param procurement: Current procurement. - @return: True or move id. - """ - ok = True - if procurement.move_id: - id = procurement.move_id.id - if not (procurement.move_id.state in ('done','assigned','cancel')): - ok = ok and self.pool.get('stock.move').action_assign(cr, uid, [id]) - cr.execute('select count(id) from stock_warehouse_orderpoint where product_id=%s', (procurement.product_id.id,)) - if not cr.fetchone()[0]: - cr.execute('update mrp_procurement set message=%s where id=%s', (_('from stock and no minimum orderpoint rule defined'), procurement.id)) - return ok - - def action_produce_assign_service(self, cr, uid, ids, context={}): - """ Changes procurement state to Running. - @return: True - """ - for procurement in self.browse(cr, uid, ids): - self.write(cr, uid, [procurement.id], {'state': 'running'}) - return True - - def action_produce_assign_product(self, cr, uid, ids, context={}): - """ This is action which call from workflow to assign production order to procurements - @return: True - """ - res = self.make_mo(cr, uid, ids, context=context) - res = res.values() - return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value - - def make_mo(self, cr, uid, ids, context={}): - """ Make Manufecturing(production) order from procurement - @return: New created Production Orders procurement wise - """ - res = {} - company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id - production_obj = self.pool.get('mrp.production') - move_obj = self.pool.get('stock.move') - wf_service = netsvc.LocalService("workflow") - for procurement in self.browse(cr, uid, ids): - res_id = procurement.move_id.id - loc_id = procurement.location_id.id - newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') - DateTime.RelativeDateTime(days=procurement.product_id.product_tmpl_id.produce_delay or 0.0) - newdate = newdate - DateTime.RelativeDateTime(days=company.manufacturing_lead) - produce_id = production_obj.create(cr, uid, { - 'origin': procurement.origin, - 'product_id': procurement.product_id.id, - 'product_qty': procurement.product_qty, - 'product_uom': procurement.product_uom.id, - 'product_uos_qty': procurement.product_uos and procurement.product_uos_qty or False, - 'product_uos': procurement.product_uos and procurement.product_uos.id or False, - 'location_src_id': procurement.location_id.id, - 'location_dest_id': procurement.location_id.id, - 'bom_id': procurement.bom_id and procurement.bom_id.id or False, - 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'), - 'move_prod_id': res_id, - 'company_id': procurement.company_id.id, - }) - res[procurement.id] = produce_id - self.write(cr, uid, [procurement.id], {'state': 'running'}) - bom_result = production_obj.action_compute(cr, uid, - [produce_id], properties=[x.id for x in procurement.property_ids]) - wf_service.trg_validate(uid, 'mrp.production', produce_id, 'button_confirm', cr) - move_obj.write(cr, uid, [res_id], - {'location_id': procurement.location_id.id}) - return res - - def action_po_assign(self, cr, uid, ids, context={}): - """ This is action which call from workflow to assign purchase order to procuments - @return: True - """ - res = self.make_po(cr, uid, ids, context=context) - res = res.values() - return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value - - def make_po(self, cr, uid, ids, context={}): - """ Make purchase order from procurement - @return: New created Purchase Orders procurement wise - """ - res = {} - company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id - partner_obj = self.pool.get('res.partner') - uom_obj = self.pool.get('product.uom') - pricelist_obj = self.pool.get('product.pricelist') - prod_obj = self.pool.get('product.product') - acc_pos_obj = self.pool.get('account.fiscal.position') - po_obj = self.pool.get('purchase.order') - for procurement in self.browse(cr, uid, ids): - res_id = procurement.move_id.id - partner = procurement.product_id.seller_ids[0].name - partner_id = partner.id - address_id = partner_obj.address_get(cr, uid, [partner_id], ['delivery'])['delivery'] - pricelist_id = partner.property_product_pricelist_purchase.id - - uom_id = procurement.product_id.uom_po_id.id - - qty = uom_obj._compute_qty(cr, uid, procurement.product_uom.id, procurement.product_qty, uom_id) - if procurement.product_id.seller_ids[0].qty: - qty = max(qty,procurement.product_id.seller_ids[0].qty) - - price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, False, {'uom': uom_id})[pricelist_id] - - newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') - newdate = newdate - DateTime.RelativeDateTime(days=company.po_lead) - newdate = newdate - procurement.product_id.seller_ids[0].delay - - #Passing partner_id to context for purchase order line integrity of Line name - context.update({'lang': partner.lang, 'partner_id': partner_id}) - - product = prod_obj.browse(cr, uid, procurement.product_id.id, context=context) - - line = { - 'name': product.partner_ref, - 'product_qty': qty, - 'product_id': procurement.product_id.id, - 'product_uom': uom_id, - 'price_unit': price, - 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'), - 'move_dest_id': res_id, - 'notes': product.description_purchase, - } - - taxes_ids = procurement.product_id.product_tmpl_id.supplier_taxes_id - taxes = acc_pos_obj.map_tax(cr, uid, partner.property_account_position, taxes_ids) - line.update({ - 'taxes_id': [(6,0,taxes)] - }) - purchase_id = po_obj.create(cr, uid, { - 'origin': procurement.origin, - 'partner_id': partner_id, - 'partner_address_id': address_id, - 'location_id': procurement.location_id.id, - 'pricelist_id': pricelist_id, - 'order_line': [(0,0,line)], - 'company_id': procurement.company_id.id, - 'fiscal_position': partner.property_account_position and partner.property_account_position.id or False - }) - res[procurement.id] = purchase_id - self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': purchase_id}) - return res - - def action_cancel(self, cr, uid, ids): - """ Cancels procurement and writes move state to Assigned. - @return: True - """ - todo = [] - todo2 = [] - move_obj = self.pool.get('stock.move') - for proc in self.browse(cr, uid, ids): - if proc.close_move: - if proc.move_id.state not in ('done', 'cancel'): - todo2.append(proc.move_id.id) - else: - if proc.move_id and proc.move_id.state == 'waiting': - todo.append(proc.move_id.id) - if len(todo2): - move_obj.action_cancel(cr, uid, todo2) - if len(todo): - move_obj.write(cr, uid, todo, {'state': 'assigned'}) - self.write(cr, uid, ids, {'state': 'cancel'}) - wf_service = netsvc.LocalService("workflow") - for id in ids: - wf_service.trg_trigger(uid, 'mrp.procurement', id, cr) - return True - - def action_check_finnished(self, cr, uid, ids): - return self.check_move_done(cr, uid, ids) - - def action_check(self, cr, uid, ids): - """ Checks procurement move state whether assigned or done. - @return: True - """ - ok = False - for procurement in self.browse(cr, uid, ids): - if procurement.move_id.state == 'assigned' or procurement.move_id.state == 'done': - self.action_done(cr, uid, [procurement.id]) - ok = True - return ok - - def action_ready(self, cr, uid, ids): - """ Changes procurement state to Ready. - @return: True - """ - res = self.write(cr, uid, ids, {'state': 'ready'}) - return res - - def action_done(self, cr, uid, ids): - """ Changes procurement state to Done and writes Closed date. - @return: True - """ - move_obj = self.pool.get('stock.move') - for procurement in self.browse(cr, uid, ids): - if procurement.move_id: - if procurement.close_move and (procurement.move_id.state <> 'done'): - move_obj.action_done(cr, uid, [procurement.move_id.id]) - res = self.write(cr, uid, ids, {'state': 'done', 'date_close': time.strftime('%Y-%m-%d')}) - wf_service = netsvc.LocalService("workflow") - for id in ids: - wf_service.trg_trigger(uid, 'mrp.procurement', id, cr) - return res - - def run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, context=None): - ''' Runs through scheduler. - @param use_new_cursor: False or the dbname - ''' - if not context: - context={} - self._procure_confirm(cr, uid, use_new_cursor=use_new_cursor, context=context) - self._procure_orderpoint_confirm(cr, uid, automatic=automatic,\ - use_new_cursor=use_new_cursor, context=context) -mrp_procurement() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/mrp_data.xml b/addons/mrp/mrp_data.xml index 2793f84b924..a7db7109e55 100644 --- a/addons/mrp/mrp_data.xml +++ b/addons/mrp/mrp_data.xml @@ -31,18 +31,5 @@ <field name="number_increment">1</field> </record> - <record forcecreate="True" id="ir_cron_scheduler_action" model="ir.cron"> - <field name="name">Run mrp scheduler</field> - <field eval="False" name="active"/> - <field name="user_id" ref="base.user_root"/> - <field name="interval_number">1</field> - <field name="interval_type">days</field> - <field name="numbercall">-1</field> - <field eval="False" name="doall"/> - <field eval="'mrp.procurement'" name="model"/> - <field eval="'run_scheduler'" name="function"/> - <field eval="'(False,)'" name="args"/> - </record> - </data> </openerp> diff --git a/addons/mrp/mrp_procurement.py b/addons/mrp/mrp_procurement.py new file mode 100644 index 00000000000..84392b329ea --- /dev/null +++ b/addons/mrp/mrp_procurement.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from mx import DateTime +from osv import fields +from osv import osv +from tools.translate import _ +import ir +import netsvc +import time + +class mrp_procurement(osv.osv): + _inherit = 'mrp.procurement' + _columns = { + 'bom_id': fields.many2one('mrp.bom', 'BoM', ondelete='cascade', select=True), + } + + def check_produce_product(self, cr, uid, procurement, context=[]): + properties = [x.id for x in procurement.property_ids] + bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, procurement.product_id.id, procurement.product_uom.id, properties) + if not bom_id: + cr.execute('update mrp_procurement set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id)) + return False + return True + + def action_produce_assign_product(self, cr, uid, ids, context={}): + """ This is action which call from workflow to assign production order to procurements + @return: True + """ + procurement_obj = self.pool.get('mrp.procurement') + res = procurement_obj.make_mo(cr, uid, ids, context=context) + res = res.values() + return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value + + def make_mo(self, cr, uid, ids, context={}): + """ Make Manufacturing(production) order from procurement + @return: New created Production Orders procurement wise + """ + res = {} + company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id + production_obj = self.pool.get('mrp.production') + move_obj = self.pool.get('stock.move') + wf_service = netsvc.LocalService("workflow") + procurement_obj = self.pool.get('mrp.procurement') + for procurement in procurement_obj.browse(cr, uid, ids): + res_id = procurement.move_id.id + loc_id = procurement.location_id.id + newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') - DateTime.RelativeDateTime(days=procurement.product_id.product_tmpl_id.produce_delay or 0.0) + newdate = newdate - DateTime.RelativeDateTime(days=company.manufacturing_lead) + produce_id = production_obj.create(cr, uid, { + 'origin': procurement.origin, + 'product_id': procurement.product_id.id, + 'product_qty': procurement.product_qty, + 'product_uom': procurement.product_uom.id, + 'product_uos_qty': procurement.product_uos and procurement.product_uos_qty or False, + 'product_uos': procurement.product_uos and procurement.product_uos.id or False, + 'location_src_id': procurement.location_id.id, + 'location_dest_id': procurement.location_id.id, + 'bom_id': procurement.bom_id and procurement.bom_id.id or False, + 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'), + 'move_prod_id': res_id, + 'company_id': procurement.company_id.id, + }) + res[procurement.id] = produce_id + self.write(cr, uid, [procurement.id], {'state': 'running'}) + bom_result = production_obj.action_compute(cr, uid, + [produce_id], properties=[x.id for x in procurement.property_ids]) + wf_service.trg_validate(uid, 'mrp.production', produce_id, 'button_confirm', cr) + move_obj.write(cr, uid, [res_id], + {'location_id': procurement.location_id.id}) + return res + +mrp_procurement() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 673332a1d3f..dcea7ac4f9e 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -12,6 +12,7 @@ id="menu_mrp_bom" parent="base.menu_mrp_root" sequence="5" /> + <!-- Property / Property Group --> @@ -257,14 +258,14 @@ <field name="type" groups="base.group_extended"/> <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/> </group> - <notebook colspan="4"> - <page string="General Information"> + <notebook colspan="4" > + <page string="General Information" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}"> <field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list" /> </page> - <page string="Revisions" groups="base.group_extended"> + <page string="Revisions" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}"> <field colspan="4" name="revision_ids" nolabel="1" widget="one2many_list"/> </page> - <page string="Properties" groups="base.group_extended"> + <page string="Properties" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}"> <field name="position"/> <field name="active"/> <field name="sequence"/> @@ -379,9 +380,26 @@ </field> </record> + <!-- + Procurement + --> + + <menuitem action="mrp_procurement.mrp_procurement_action" id="menu_mrp_procurement_action" + parent="mrp.menu_mrp_manufacturing" sequence="2" /> + <menuitem action="mrp_procurement.mrp_procurement_action5" id="menu_mrp_procurement_exception_action" + parent="mrp.menu_mrp_control" sequence="1" /> + + <menuitem id="menu_mrp_scheduler" name="Schedulers" parent="base.menu_mrp_root" sequence="4"/> + <menuitem action="mrp_procurement.action_compute_schedulers" id="mrp_Sched_all" parent="mrp.menu_mrp_scheduler" sequence="90"/> + + <!-- + Order Point + --> + <menuitem action="mrp_procurement.action_orderpoint_form" id="menu_action_orderpoint_form" parent="mrp.menu_mrp_reordering"/> + <!-- - Production Management - --> + Production Management + --> <record id="mrp_production_tree_view" model="ir.ui.view"> <field name="name">mrp.production.tree</field> @@ -767,258 +785,20 @@ </record> <!-- - Procurement + Procurements --> - <record id="mrp_procurement_tree_view" model="ir.ui.view"> - <field name="name">mrp.procurement.tree</field> - <field name="model">mrp.procurement</field> - <field name="type">tree</field> - <field name="arch" type="xml"> - <tree string="Procurement Lines" colors="red:state=='draft';black:state=='running';green:state=='confirmed';gray:state in ['done','cancel']"> - <field name="date_planned" widget="date"/> - <field name="origin"/> - <field name="product_id"/> - <field name="product_qty"/> - <field name="product_uom" string="UOM"/> - <field name="procure_method"/> - <field name="state"/> - </tree> - </field> - </record> - <record id="mrp_procurement_form_view" model="ir.ui.view"> - <field name="name">mrp.procurement.form</field> - <field name="model">mrp.procurement</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Procurement"> - <group col="2" colspan="2"> - <separator colspan="2" string="References"/> - <field name="name" select="1" string="Procurement Reason"/> - <field name="origin"/> - <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/> - </group> - <group col="2" colspan="2"> - <separator colspan="2" string="Planification"/> - <field name="date_planned" select="1"/> - <field name="procure_method"/> - <field name="priority" groups="base.group_extended"/> - </group> - <notebook colspan="4"> - <page string="Procurement Details"> - <separator colspan="4" string="Product & Location"/> - <field name="product_id" select="1" on_change="onchange_product_id(product_id)"/> - <field name="location_id" domain="[('usage','=','internal')]"/> - <field name="product_qty"/> - <field name="product_uom"/> - - <field name="product_uos_qty" groups="product.group_uos"/> - <field name="product_uos" groups="product.group_uos"/> - - <separator colspan="4" string="Status"/> - <field colspan="4" name="message" readonly="1"/> - <field name="state" readonly="1"/> - <group col="7" colspan="2"> - <button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/> - <button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/> - <button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/> - <button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/> - </group> - </page> - <page string="Extra Information"> - <separator colspan="4" string="Details"/> - <field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/> - <field name="move_id" groups="base.group_extended"/> - <field name="date_close"/> - <field name="close_move" groups="base.group_extended"/> - <field name="purchase_id"/> - <group colspan="4" groups="base.group_extended"> - <separator colspan="4" string="Properties" /> - <field colspan="4" name="property_ids" nolabel="1"/> - </group> - </page> - <page string="Notes"> - <separator colspan="4" string="Note" /> - <field name="note" colspan="4" nolabel="1"/> - </page> - </notebook> - </form> - </field> - </record> - <record id="view_mrp_procurement_filter" model="ir.ui.view"> - <field name="name">mrp.procurement.select</field> - <field name="model">mrp.procurement</field> - <field name="type">search</field> - <field name="arch" type="xml"> - <search string="Search Procurement"> - <group col='10' colspan='4'> - <filter icon="terp-mrp" string="Current" domain="[('state','in',('draft','confirmed'))]" default="1" help="Procurement Orders in draft or open state."/> - <filter icon="terp-mrp" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/> - <filter icon="terp-mrp" string="Late" - domain="['&', ('date_planned::date','<', current_date), ('state', 'in', ('draft', 'confirmed'))]" - help="Procurement started late" /> - <separator orientation="vertical"/> - <field name="name"/> - <field name="origin"/> - <field name="product_id" /> - <field name="date_planned" widget="date"/> - <field name="state" /> - </group> - <newline/> - <group expand="1" string="Group By" colspan="4" col="8"> - <filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/> - <filter string="Reason" icon="terp-mrp" domain="[]" context="{'group_by':'name'}"/> - <filter string="Scheduled Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/> - </group> - </search> - </field> - </record> - <record id="mrp_procurement_action" model="ir.actions.act_window"> - <field name="name">Procurement Orders</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">mrp.procurement</field> - <field name="view_type">form</field> - <field name="view_id" eval="False"/> - <field name="search_view_id" ref="view_mrp_procurement_filter"/> - </record> - <menuitem action="mrp_procurement_action" id="menu_mrp_procurement_action" parent="mrp.menu_mrp_manufacturing" - sequence="2" /> - - <record id="mrp_procurement_action3" model="ir.actions.act_window"> - <field name="name">Procurements</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">mrp.procurement</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - <field name="search_view_id" ref="view_mrp_procurement_filter"/> - <field name="domain">[]</field> - <field name="context">{}</field> - </record> - - <record id="mrp_procurement_action5" model="ir.actions.act_window"> - <field name="name">Procurement Exceptions</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">mrp.procurement</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - <field name="domain">[('state','=','exception')]</field> - </record> - - <menuitem action="mrp_procurement_action5" id="menu_mrp_procurement_exception_action" parent="mrp.menu_mrp_control" - sequence="1" /> - <record id="mrp_procurement_action4" model="ir.actions.act_window"> - <field name="name">Procurement Exceptions to Fix</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">mrp.procurement</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - <field name="domain">[('state','=','exception'), ('message', '<>', '')]</field> - <field name="filter" eval="True"/> - </record> - - <record id="mrp_procurement_action11" model="ir.actions.act_window"> - <field name="name">Temporary Procurement Exceptions</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">mrp.procurement</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - <field name="domain">[('state','=','exception'), ('message', '=', '')]</field> - </record> - - <!-- Order Point --> - <record id="view_warehouse_orderpoint_tree" model="ir.ui.view"> - <field name="name">stock.warehouse.orderpoint.tree</field> - <field name="model">stock.warehouse.orderpoint</field> - <field name="type">tree</field> - <field name="arch" type="xml"> - <tree string="Minimum Stock Rules"> - <field name="name"/> - <field name="warehouse_id"/> - <field name="location_id"/> - <field name="product_id"/> - <field name="product_uom"/> - <field name="product_min_qty"/> - <field name="product_max_qty"/> - </tree> - </field> - </record> - - <record model="ir.ui.view" id="warehouse_orderpoint_search"> - <field name="name">stock.warehouse.orderpoint.search</field> - <field name="model">stock.warehouse.orderpoint</field> - <field name="type">search</field> - <field name="arch" type="xml"> - <search string="Minimum Stock Rules Search"> - <group col="10" colspan="4"> - <field name="name" select="1" /> - <field name="warehouse_id" select="1" widget="selection"/> - <field name="location_id" select="1" /> -<!-- <field name="company_id" select="1" widget="selection"/>--> - <field name="product_id" select="1"/> - </group> - <newline/> - <group expand="1" string="Group By..." colspan="4" col="10"> - <filter string="Warehouse" icon="terp-stock" domain="[]" context="{'group_by':'warehouse_id'}"/> - <filter string="Location" icon="terp-stock" domain="[]" context="{'group_by':'location_id'}"/> - </group> - </search> - </field> - </record> - - <record id="view_warehouse_orderpoint_form" model="ir.ui.view"> - <field name="name">stock.warehouse.orderpoint.form</field> - <field name="model">stock.warehouse.orderpoint</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Minimum Stock Rules"> - <group col="2" colspan="2"> - <separator string="General Information" colspan="2" /> - <field name="name" /> - <field name="product_id" on_change="onchange_product_id(product_id)"/> - <field name="product_uom"/> - </group> - <group col="2" colspan="2"> - <separator string="Locations" colspan="2" /> - <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/> - <field name="location_id"/> - <field name="company_id" groups="base.group_multi_company" widget="selection"/> - </group> - <group col="2" colspan="2"> - <separator string="Quantity Rules" colspan="2" /> - <field name="product_min_qty"/> - <field name="product_max_qty"/> - <field name="qty_multiple"/> - </group> - <group col="2" colspan="2" groups="base.group_extended"> - <separator string="Misc" colspan="2" /> - <field name="procurement_id" readonly="1"/> - <field name="active" /> - </group> - </form> - </field> - </record> - - <record id="action_orderpoint_form" model="ir.actions.act_window"> - <field name="name">Minimum Stock Rules</field> - <field name="res_model">stock.warehouse.orderpoint</field> - <field name="type">ir.actions.act_window</field> - <field name="view_type">form</field> - <field name="view_id" ref="view_warehouse_orderpoint_tree"/> - <field name="search_view_id" ref="warehouse_orderpoint_search" /> + <record id="view_procurement_form_inherit" model="ir.ui.view"> + <field name="name">mrp.procurement.form.inherit</field> + <field name="model">mrp.procurement</field> + <field name="inherit_id" ref="mrp_procurement.mrp_procurement_form_view"/> + <field name="type">form</field> + <field name="arch" type="xml"> + <xpath expr="/form/notebook/page/field[@name='move_id']" position="before"> + <field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/> + </xpath> + </field> </record> - <menuitem action="action_orderpoint_form" id="menu_action_orderpoint_form" parent="menu_mrp_reordering"/> - - <act_window domain="[('warehouse_id', '=', active_id)]" id="act_stock_warehouse_2_stock_warehouse_orderpoint" name="Minimum Stock Rules" res_model="stock.warehouse.orderpoint" src_model="stock.warehouse"/> - - <!-- add product_uom to context to be the default value when adding new orderpoints --> - <act_window - context="{'product_uom': locals().has_key('uom_id') and uom_id}" - domain="[('product_id', '=', active_id)]" - id="act_product_product_2_stock_warehouse_orderpoint" - name="Minimum Stock Rules" - res_model="stock.warehouse.orderpoint" - src_model="product.product"/> - <act_window id="action_product_bom_structure" name="Product BoM Structure" diff --git a/addons/mrp/mrp_workflow.xml b/addons/mrp/mrp_workflow.xml index 8be8f97b5d9..791c376ef92 100644 --- a/addons/mrp/mrp_workflow.xml +++ b/addons/mrp/mrp_workflow.xml @@ -113,241 +113,66 @@ <field name="act_to" ref="prod_act_cancel"/> <field name="signal">button_cancel</field> </record> - + <!-- Procurement --> - - <record id="wkf" model="workflow"> - <field name="name">mrp.procurement.basic</field> - <field name="osv">mrp.procurement</field> - <field name="on_create">True</field> - </record> - - <record id="act_draft" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="flow_start">True</field> - <field name="name">draft</field> - </record> - <record id="act_cancel" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="name">cancel</field> - <field name="kind">function</field> - <field name="action">action_cancel()</field> - <field name="flow_stop">True</field> - </record> - <record id="act_confirm" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="name">confirm</field> - <field name="kind">function</field> - <field name="action">action_confirm()</field> - </record> - <record id="act_confirm_wait" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="name">confirm_wait</field> - <field name="kind">function</field> - <field name="action">write({'state':'exception'})</field> - </record> - <record id="act_confirm_mts" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="name">confirm_mts</field> - </record> - <record id="act_confirm_mto" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="name">confirm_mto</field> - </record> - <record id="act_make_to_stock" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="name">make_to_stock</field> - <field name="kind">function</field> - <field name="action">action_move_assigned()</field> - </record> <record id="act_produce" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> + <field name="wkf_id" ref="mrp_procurement.wkf_procurement"/> <field name="name">produce</field> <field name="kind">subflow</field> <field name="subflow_id" search="[('osv','=','mrp.production')]"/> <field name="action">action_produce_assign_product()</field> </record> <record id="act_produce_check" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> + <field name="wkf_id" ref="mrp_procurement.wkf_procurement"/> <field name="name">produce_check</field> </record> <record id="act_produce_service" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> + <field name="wkf_id" ref="mrp_procurement.wkf_procurement"/> <field name="name">produce_service</field> <field name="kind">function</field> <field name="action">action_produce_assign_service()</field> </record> - <record id="act_buy" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="name">buy</field> - <field name="kind">subflow</field> - <field name="subflow_id" search="[('osv','=','purchase.order')]"/> - <field name="action">action_po_assign()</field> - </record> - <record id="act_make_done" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="name">ready</field> - <field name="kind">function</field> - <field name="action">action_ready()</field> - </record> - <record id="act_wait_done" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="name">wait_done</field> - <field name="kind">function</field> - <field name="action">write({'state':'waiting'})</field> - </record> - - <record id="act_done" model="workflow.activity"> - <field name="wkf_id" ref="wkf"/> - <field name="flow_stop">True</field> - <field name="name">done</field> - <field name="kind">function</field> - <field name="action">action_done()</field> - </record> - - <record id="trans_draft_confirm" model="workflow.transition"> - <field name="act_from" ref="act_draft"/> - <field name="act_to" ref="act_confirm"/> - <field name="signal">button_confirm</field> - </record> - <record id="trans_confirm_cancel2" model="workflow.transition"> - <field name="act_from" ref="act_confirm"/> - <field name="act_to" ref="act_wait_done"/> - <field name="signal">button_wait_done</field> - <field name="condition">True</field> - </record> - <record id="trans_confirm_wait_done" model="workflow.transition"> - <field name="act_from" ref="act_wait_done"/> - <field name="act_to" ref="act_done"/> - <field name="condition">check_move_done()</field> - <field name="trigger_model">stock.move</field> - <field name="trigger_expr_id">[move_id.id]</field> - </record> - - <record id="trans_confirm_cancel" model="workflow.transition"> - <field name="act_from" ref="act_confirm"/> - <field name="act_to" ref="act_cancel"/> - <field name="signal">button_check</field> - <field name="condition">test_cancel()</field> - </record> - <record id="trans_confirm_confirm_wait" model="workflow.transition"> - <field name="act_from" ref="act_confirm"/> - <field name="act_to" ref="act_confirm_wait"/> - <field name="signal">button_check</field> - <field name="condition">not test_cancel()</field> - </record> - <record id="trans_confirm_wait_confirm_mto" model="workflow.transition"> - <field name="act_from" ref="act_confirm_wait"/> - <field name="act_to" ref="act_confirm_mto"/> - <field name="condition">procure_method=='make_to_order'</field> - </record> - <record id="trans_confirm_wait_confirm_mts" model="workflow.transition"> - <field name="act_from" ref="act_confirm_wait"/> - <field name="act_to" ref="act_confirm_mts"/> - <field name="condition">procure_method=='make_to_stock'</field> - </record> - <record id="trans_confirm_mts_cancel" model="workflow.transition"> - <field name="act_from" ref="act_confirm_mts"/> - <field name="act_to" ref="act_cancel"/> - <field name="signal">button_cancel</field> - </record> - <record id="trans_confirm_waiting_cancel" model="workflow.transition"> - <field name="act_from" ref="act_wait_done"/> - <field name="act_to" ref="act_cancel"/> - <field name="signal">button_cancel</field> - </record> - <record id="trans_confirm_mts_confirm" model="workflow.transition"> - <field name="act_from" ref="act_confirm_mts"/> - <field name="act_to" ref="act_confirm"/> - <field name="signal">button_restart</field> - </record> - <record id="trans_confirm_mto_cancel" model="workflow.transition"> - <field name="act_from" ref="act_confirm_mto"/> - <field name="act_to" ref="act_cancel"/> - <field name="signal">button_cancel</field> - </record> - <record id="trans_confirm_mto_confirm" model="workflow.transition"> - <field name="act_from" ref="act_confirm_mto"/> - <field name="act_to" ref="act_confirm"/> - <field name="signal">button_restart</field> - </record> - <record id="trans_draft_cancel" model="workflow.transition"> - <field name="act_from" ref="act_draft"/> - <field name="act_to" ref="act_cancel"/> - <field name="signal">button_cancel</field> - </record> - <record id="trans_confirm_mts_make_to_stock" model="workflow.transition"> - <field name="act_from" ref="act_confirm_mts"/> - <field name="act_to" ref="act_make_to_stock"/> - <field name="condition">check_make_to_stock()</field> - </record> + <record id="trans_confirm_mto_produce_check" model="workflow.transition"> - <field name="act_from" ref="act_confirm_mto"/> + <field name="act_from" ref="mrp_procurement.act_confirm_mto"/> <field name="act_to" ref="act_produce_check"/> <field name="condition">check_produce()</field> </record> - <record id="trans_product_check_produce" model="workflow.transition"> - <field name="act_from" ref="act_produce_check"/> - <field name="act_to" ref="act_produce"/> - <field name="condition">check_product()</field> - </record> <record id="trans_product_check_produce_service" model="workflow.transition"> <field name="act_from" ref="act_produce_check"/> <field name="act_to" ref="act_produce_service"/> <field name="condition">not check_product()</field> </record> - <record id="trans_confirm_mto_buy" model="workflow.transition"> - <field name="act_from" ref="act_confirm_mto"/> - <field name="act_to" ref="act_buy"/> - <field name="condition">check_buy()</field> - </record> - <record id="trans_make_to_stock_make_done" model="workflow.transition"> - <field name="act_from" ref="act_make_to_stock"/> - <field name="act_to" ref="act_make_done"/> - <field name="condition">True</field> - <field name="trigger_model" eval="False"/> - <field name="trigger_expr_id" eval="False"/> - </record> - <record id="trans_produce_cancel" model="workflow.transition"> - <field name="act_from" ref="act_produce"/> - <field name="act_to" ref="act_cancel"/> - <field name="signal">subflow.cancel</field> - </record> + <record id="trans_produce_service_cancel" model="workflow.transition"> <field name="act_from" ref="act_produce_service"/> - <field name="act_to" ref="act_cancel"/> + <field name="act_to" ref="mrp_procurement.act_cancel"/> <field name="signal">subflow.cancel</field> </record> - <record id="trans_buy_cancel" model="workflow.transition"> - <field name="act_from" ref="act_buy"/> - <field name="act_to" ref="act_cancel"/> - <field name="signal">subflow.cancel</field> - </record> - - <record id="trans_produce_make_done" model="workflow.transition"> - <field name="act_from" ref="act_produce"/> - <field name="act_to" ref="act_make_done"/> - <field name="signal">subflow.done</field> - </record> - + <record id="trans_produce_service_make_done" model="workflow.transition"> <field name="act_from" ref="act_produce_service"/> - <field name="act_to" ref="act_make_done"/> + <field name="act_to" ref="mrp_procurement.act_make_done"/> </record> - <record id="trans_buy_make_done" model="workflow.transition"> - <field name="act_from" ref="act_buy"/> - <field name="act_to" ref="act_make_done"/> - <field name="signal">subflow.delivery_done</field> + + <record id="trans_product_check_produce" model="workflow.transition"> + <field name="act_from" ref="act_produce_check"/> + <field name="act_to" ref="act_produce"/> + <field name="condition">check_product()</field> </record> - <record id="trans_make_done_done" model="workflow.transition"> - <field name="act_from" ref="act_make_done"/> - <field name="act_to" ref="act_done"/> - <field name="condition">action_check_finnished()</field> + + <record id="trans_produce_cancel" model="workflow.transition"> + <field name="act_from" ref="act_produce"/> + <field name="act_to" ref="mrp_procurement.act_cancel"/> + <field name="signal">subflow.cancel</field> </record> - <record id="trans_make_done_confirm" model="workflow.transition"> - <field name="act_from" ref="act_make_done"/> - <field name="act_to" ref="act_cancel"/> - <field name="condition">check_move_cancel()</field> + + <record id="trans_produce_make_done" model="workflow.transition"> + <field name="act_from" ref="act_produce"/> + <field name="act_to" ref="mrp_procurement.act_make_done"/> + <field name="signal">subflow.done</field> </record> + + </data> </openerp> diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml index 17d72a520f2..08d66570b1f 100644 --- a/addons/mrp/process/procurement_process.xml +++ b/addons/mrp/process/procurement_process.xml @@ -1,43 +1,16 @@ <?xml version="1.0" ?> <openerp> <data> - - <!-- - Process - --> - - <record id="process_process_procurementprocess0" model="process.process"> - <field eval=""""Procurement"""" name="name"/> - <field name="model_id" ref="mrp.model_mrp_procurement"/> - <field eval="1" name="active"/> - </record> - - <!-- - Process Node - --> - - <record id="process_node_stockproduct1" model="process.node"> - <field name="menu_id" ref="mrp.menu_mrp_procurement_action"/> - <field name="model_id" ref="mrp.model_mrp_procurement"/> - <field eval=""""subflow"""" name="kind"/> - <field eval=""""For stockable products and consumables"""" name="note"/> - <field eval=""""Stockable Product"""" name="name"/> - <field name="process_id" ref="mrp.process_process_stockableproductprocess0"/> - <field name="subflow_id" ref="process_process_procurementprocess0"/> - <field eval=""""object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')"""" name="model_states"/> - <field eval="1" name="flow_start"/> - </record> - - <record id="process_node_serviceproduct1" model="process.node"> + + <record id="process_node_procureproducts0" model="process.node"> <field name="menu_id" ref="mrp.menu_mrp_procurement_action"/> - <field name="model_id" ref="mrp.model_mrp_procurement"/> - <field eval=""""subflow"""" name="kind"/> - <field eval=""""For Services."""" name="note"/> - <field eval=""""Service"""" name="name"/> - <field name="process_id" ref="mrp.process_process_serviceproductprocess0"/> - <field name="subflow_id" ref="process_process_procurementprocess0"/> + <field name="model_id" ref="mrp_procurement.model_mrp_procurement"/> + <field eval=""""state"""" name="kind"/> + <field eval=""""The way to procurement depends on the product type."""" name="note"/> + <field eval=""""Procure Products"""" name="name"/> + <field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/> <field eval=""""object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')"""" name="model_states"/> - <field eval="1" name="flow_start"/> + <field eval="0" name="flow_start"/> </record> <record id="process_node_productionorder0" model="process.node"> @@ -46,31 +19,31 @@ <field eval=""""state"""" name="kind"/> <field eval=""""Drives the procurement orders for raw material."""" name="note"/> <field eval=""""Production Order"""" name="name"/> - <field name="process_id" ref="process_process_procurementprocess0"/> + <field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/> <field eval=""""object.state in ('draft', 'picking_except', 'confirmed', 'ready', 'in_production', 'cancel', 'done')"""" name="model_states"/> <field eval="1" name="flow_start"/> </record> - <record id="process_node_minimumstockrule0" model="process.node"> - <field name="menu_id" ref="mrp.menu_action_orderpoint_form"/> - <field name="model_id" ref="mrp.model_stock_warehouse_orderpoint"/> - <field eval=""""state"""" name="kind"/> - <field eval=""""Linked to the 'Minimum stock rule' supplying method."""" name="note"/> - <field eval=""""Minimum Stock"""" name="name"/> - <field name="process_id" ref="process_process_procurementprocess0"/> - <field eval="1" name="flow_start"/> - </record> - <record id="process_node_procureproducts0" model="process.node"> <field name="menu_id" ref="mrp.menu_mrp_procurement_action"/> <field name="model_id" ref="mrp.model_mrp_procurement"/> <field eval=""""state"""" name="kind"/> <field eval=""""The way to procurement depends on the product type."""" name="note"/> <field eval=""""Procure Products"""" name="name"/> - <field name="process_id" ref="process_process_procurementprocess0"/> + <field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/> <field eval=""""object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')"""" name="model_states"/> <field eval="0" name="flow_start"/> </record> + + <record id="process_node_minimumstockrule0" model="process.node"> + <field name="menu_id" ref="mrp.menu_action_orderpoint_form"/> + <field name="model_id" ref="mrp_procurement.model_stock_warehouse_orderpoint"/> + <field eval=""""state"""" name="kind"/> + <field eval=""""Linked to the 'Minimum stock rule' supplying method."""" name="note"/> + <field eval=""""Minimum Stock"""" name="name"/> + <field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/> + <field eval="1" name="flow_start"/> + </record> <record id="process_node_stockproduct0" model="process.node"> <field name="menu_id" ref="mrp.menu_mrp_procurement_action"/> @@ -79,10 +52,22 @@ <field eval=""""Product type is Stockable or Consumable."""" name="note"/> <field eval=""""Stockable Product"""" name="name"/> <field name="subflow_id" ref="process_process_stockableproductprocess0"/> - <field name="process_id" ref="process_process_procurementprocess0"/> + <field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/> <field eval=""""object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')"""" name="model_states"/> <field eval="0" name="flow_start"/> </record> + + <record id="process_node_stockproduct1" model="process.node"> + <field name="menu_id" ref="mrp.menu_mrp_procurement_action"/> + <field name="model_id" ref="mrp.model_mrp_procurement"/> + <field eval=""""subflow"""" name="kind"/> + <field eval=""""For stockable products and consumables"""" name="note"/> + <field eval=""""Stockable Product"""" name="name"/> + <field name="process_id" ref="mrp.process_process_stockableproductprocess0"/> + <field name="subflow_id" ref="mrp_procurement.process_process_procurementprocess0"/> + <field eval=""""object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')"""" name="model_states"/> + <field eval="1" name="flow_start"/> + </record> <record id="process_node_serviceproduct0" model="process.node"> <field name="menu_id" ref="mrp.menu_mrp_procurement_action"/> @@ -91,10 +76,22 @@ <field eval=""""Product type is service"""" name="note"/> <field eval=""""Service"""" name="name"/> <field name="subflow_id" ref="process_process_serviceproductprocess0"/> - <field name="process_id" ref="process_process_procurementprocess0"/> + <field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/> <field eval=""""object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')"""" name="model_states"/> <field eval="0" name="flow_start"/> </record> + + <record id="process_node_serviceproduct1" model="process.node"> + <field name="menu_id" ref="mrp.menu_mrp_procurement_action"/> + <field name="model_id" ref="mrp.model_mrp_procurement"/> + <field eval=""""subflow"""" name="kind"/> + <field eval=""""For Services."""" name="note"/> + <field eval=""""Service"""" name="name"/> + <field name="process_id" ref="mrp.process_process_serviceproductprocess0"/> + <field name="subflow_id" ref="mrp_procurement.process_process_procurementprocess0"/> + <field eval=""""object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')"""" name="model_states"/> + <field eval="1" name="flow_start"/> + </record> <record id="process_node_purchaseprocure0" model="process.node"> <field name="menu_id" ref="mrp.menu_mrp_procurement_action"/> @@ -102,14 +99,14 @@ <field eval=""""subflow"""" name="kind"/> <field eval=""""Procurement Orders"""" name="name"/> <field eval=""""For purchased material"""" name="note"/> - <field name="subflow_id" ref="process_process_procurementprocess0"/> + <field name="subflow_id" ref="mrp_procurement.process_process_procurementprocess0"/> <field name="process_id" ref="purchase.process_process_purchaseprocess0"/> <field eval="1" name="flow_start"/> </record> <record id="process_node_productminimumstockrule0" model="process.node"> <field name="menu_id" ref="mrp.menu_action_orderpoint_form"/> - <field name="model_id" ref="mrp.model_stock_warehouse_orderpoint"/> + <field name="model_id" ref="mrp_procurement.model_stock_warehouse_orderpoint"/> <field eval=""""state"""" name="kind"/> <field eval=""""Minimum Stock"""" name="name"/> <field eval=""""Automatic procurement rule"""" name="note"/> diff --git a/addons/mrp/security/ir.model.access.csv b/addons/mrp/security/ir.model.access.csv index 48f27679435..d5e00b9cbda 100644 --- a/addons/mrp/security/ir.model.access.csv +++ b/addons/mrp/security/ir.model.access.csv @@ -1,7 +1,5 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_mrp_workcenter","mrp.workcenter","model_mrp_workcenter","mrp.group_mrp_user",1,0,0,0 -"access_mrp_property_group","mrp.property.group","model_mrp_property_group","mrp.group_mrp_user",1,0,0,0 -"access_mrp_property","mrp.property","model_mrp_property","mrp.group_mrp_user",1,0,0,0 "access_mrp_routing","mrp.routing","model_mrp_routing","mrp.group_mrp_user",1,0,0,0 "access_mrp_routing_workcenter","mrp.routing.workcenter","model_mrp_routing_workcenter","mrp.group_mrp_user",1,0,0,0 "access_mrp_bom","mrp.bom","model_mrp_bom","mrp.group_mrp_user",1,0,0,0 @@ -10,11 +8,7 @@ "access_mrp_production_workcenter_line","mrp.production.workcenter.line","model_mrp_production_workcenter_line","mrp.group_mrp_user",1,1,1,1 "access_mrp_production_product_line","mrp.production.product.line","model_mrp_production_product_line","mrp.group_mrp_user",1,1,1,1 "access_mrp_procurement","mrp.procurement","model_mrp_procurement","mrp.group_mrp_user",1,1,1,1 -"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint","mrp.group_mrp_user",1,0,0,0 -"access_stock_warehouse_orderpoint_manager","stock.warehouse.orderpoint.manager","model_stock_warehouse_orderpoint","mrp.group_mrp_manager",1,1,1,1 "access_mrp_workcenter_manager","mrp.workcenter.manager","model_mrp_workcenter","mrp.group_mrp_user",1,1,1,1 -"access_mrp_property_group_manager","mrp.property.group.manager","model_mrp_property_group","mrp.group_mrp_user",1,1,1,1 -"access_mrp_property_manager","mrp.property.manager","model_mrp_property","mrp.group_mrp_user",1,1,1,1 "access_mrp_routing_manager","mrp.routing.manager","model_mrp_routing","mrp.group_mrp_manager",1,1,1,1 "access_mrp_routing_workcenter_manager","mrp.routing.workcenter.manager","model_mrp_routing_workcenter","mrp.group_mrp_manager",1,1,1,1 "access_mrp_bom_manager","mrp.bom.manager","model_mrp_bom","mrp.group_mrp_manager",1,1,1,1 @@ -32,10 +26,7 @@ "access_mrp_production_stock_worker","mrp.production stock_worker","model_mrp_production","stock.group_stock_user",1,0,0,0 "access_mrp_installer","mrp.installer","model_mrp_installer","mrp.group_mrp_user",1,0,0,0 "access_mrp_product_produce","mrp.product.produce","model_mrp_product_produce","mrp.group_mrp_user",1,0,0,0 -"access_mrp_make_procurement","make.procurement","model_make_procurement","mrp.group_mrp_user",1,0,0,0 "access_mrp_change_production_qty","change.production.qty","model_change_production_qty","mrp.group_mrp_user",1,0,0,0 -"access_mrp_procurement_compute_all","mrp.procurement.compute.all","model_mrp_procurement_compute_all","mrp.group_mrp_user",1,0,0,0 -"access_mrp_procurement_orderpoint_compute","mrp.procurement.orderpoint.compute","model_mrp_procurement_orderpoint_compute","mrp.group_mrp_user",1,0,0,0 "access_mrp_production_order","mrp.production.order","model_mrp_production_order","mrp.group_mrp_user",1,0,0,0 "access_report_workcenter_load","report.workcenter.load","model_report_workcenter_load","mrp.group_mrp_manager",1,0,0,0 "access_report_mrp_inout","report.mrp.inout","model_report_mrp_inout","mrp.group_mrp_manager",1,0,0,0 diff --git a/addons/mrp/security/mrp_security.xml b/addons/mrp/security/mrp_security.xml index 955bdad2fdd..4d47e374e02 100644 --- a/addons/mrp/security/mrp_security.xml +++ b/addons/mrp/security/mrp_security.xml @@ -16,20 +16,6 @@ </record> <!-- Multi --> - <record model="ir.rule" id="mrp_procurement_rule"> - <field name="name">mrp_procurement multi-company</field> - <field name="model_id" search="[('model','=','mrp.procurement')]" model="ir.model"/> - <field name="global" eval="True"/> - <field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field> - </record> - - <record model="ir.rule" id="stock_warehouse_orderpoint_rule"> - <field name="name">stock_warehouse.orderpoint multi-company</field> - <field name="model_id" search="[('model','=','stock.warehouse.orderpoint')]" model="ir.model"/> - <field name="global" eval="True"/> - <field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field> - </record> - <record model="ir.rule" id="mrp_production_rule"> <field name="name">mrp_production multi-company</field> <field name="model_id" search="[('model','=','mrp.production')]" model="ir.model"/> diff --git a/addons/mrp/stock.py b/addons/mrp/stock.py index 4a35d6003cf..dcb7d4573c1 100644 --- a/addons/mrp/stock.py +++ b/addons/mrp/stock.py @@ -27,74 +27,6 @@ import ir import netsvc import time - -class stock_warehouse_orderpoint(osv.osv): - """ - Defines Minimum stock rules. - """ - _name = "stock.warehouse.orderpoint" - _description = "Orderpoint minimum rule" - - _columns = { - 'name': fields.char('Name', size=32, required=True), - 'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the orderpoint without removing it."), - 'logic': fields.selection([('max','Order to Max'),('price','Best price (not yet active!)')], 'Reordering Mode', required=True), - 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True), - 'location_id': fields.many2one('stock.location', 'Location', required=True), - 'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','=','product')]), - 'product_uom': fields.many2one('product.uom', 'Product UOM', required=True ), - 'product_min_qty': fields.float('Min Quantity', required=True, - help="When the virtual stock goes belong the Min Quantity, Open ERP generates "\ - "a procurement to bring the virtual stock to the Max Quantity."), - 'product_max_qty': fields.float('Max Quantity', required=True, - help="When the virtual stock goes belong the Min Quantity, Open ERP generates "\ - "a procurement to bring the virtual stock to the Max Quantity."), - 'qty_multiple': fields.integer('Qty Multiple', required=True, - help="The procurement quantity will by rounded up to this multiple."), - 'procurement_id': fields.many2one('mrp.procurement', 'Latest procurement'), - 'company_id': fields.many2one('res.company','Company',required=True), - } - _defaults = { - 'active': lambda *a: 1, - 'logic': lambda *a: 'max', - 'qty_multiple': lambda *a: 1, - 'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'mrp.warehouse.orderpoint') or '', - 'product_uom': lambda sel, cr, uid, context: context.get('product_uom', False), - 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.warehouse.orderpoint', context=c) - } - - def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context={}): - """ Finds location id for changed warehouse. - @param warehouse_id: Changed id of warehouse. - @return: Dictionary of values. - """ - if warehouse_id: - w = self.pool.get('stock.warehouse').browse(cr, uid, warehouse_id, context) - v = {'location_id': w.lot_stock_id.id} - return {'value': v} - return {} - - def onchange_product_id(self, cr, uid, ids, product_id, context={}): - """ Finds UoM for changed product. - @param product_id: Changed id of product. - @return: Dictionary of values. - """ - if product_id: - prod = self.pool.get('product.product').browse(cr,uid,product_id) - v = {'product_uom': prod.uom_id.id} - return {'value': v} - return {} - - def copy(self, cr, uid, id, default=None,context={}): - if not default: - default = {} - default.update({ - 'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.warehouse.orderpoint') or '', - }) - return super(stock_warehouse_orderpoint, self).copy(cr, uid, id, default, context) - -stock_warehouse_orderpoint() - class StockMove(osv.osv): _inherit = 'stock.move' diff --git a/addons/mrp/test/mrp_phantom_bom.yml b/addons/mrp/test/mrp_phantom_bom.yml new file mode 100644 index 00000000000..df4ade1cb6e --- /dev/null +++ b/addons/mrp/test/mrp_phantom_bom.yml @@ -0,0 +1,234 @@ +- + In order to test the mrp phantom bom type in OpenERP, I will create products + and then I will create Phantom bom structure for those products. +- + I create the products required to produce some orange juices: Oranges, Sugar and Water. +- + !record {model: product.uom, id: product_uom_litre0}: + category_id: product.product_uom_categ_kgm + factor: 1.0 + name: Litre + rounding: 0.01 +- + !record {model: product.product, id: product_product_orangejuice0}: + categ_id: product.cat1 + name: Orange Juice + procure_method: make_to_order + supply_method: produce + type: product + uom_id: product_uom_litre0 + uom_po_id: product_uom_litre0 +- + !record {model: product.product, id: product_product_orange0}: + categ_id: product.cat1 + name: Orange + procure_method: make_to_stock + seller_ids: + - delay: 1 + name: base.res_partner_asus + qty: 1.0 + supply_method: buy + type: product + uom_id: product.product_uom_kgm + uom_po_id: product.product_uom_kgm +- + !record {model: product.product, id: product_product_sugar0}: + categ_id: product.cat1 + name: Sugar + procure_method: make_to_stock + seller_ids: + - delay: 1 + name: base.res_partner_desertic_hispafuentes + qty: 2.0 + supply_method: buy + type: product + uom_id: product.product_uom_kgm + uom_po_id: product.product_uom_kgm +- + !record {model: product.product, id: product_product_water0}: + categ_id: product.cat1 + name: Water + procure_method: make_to_stock + supply_method: buy + type: consu + uom_id: product_uom_litre0 + uom_po_id: product_uom_litre0 +- + I define the BoM to produce an orange juice +- + !record {model: mrp.bom, id: mrp_bom_orangejuice0}: + company_id: base.main_company + name: Orange Juice + product_efficiency: 1.0 + product_id: product_product_orangejuice0 + product_qty: 1.0 + product_uom: product_uom_litre0 + type: phantom +- + !record {model: mrp.bom, id: mrp_bom_orangejuice0}: + bom_lines: + - bom_id: mrp_bom_orangejuice0 + company_id: base.main_company + name: Orange + product_efficiency: 1.0 + product_id: product_product_orange0 + product_qty: 0.5 + product_uom: product.product_uom_kgm + type: normal + - bom_id: mrp_bom_orangejuice0 + company_id: base.main_company + name: Sugar + product_efficiency: 1.0 + product_id: product_product_sugar0 + product_qty: 0.02 + product_uom: product.product_uom_kgm + type: normal + - bom_id: mrp_bom_orangejuice0 + company_id: base.main_company + name: Water + product_efficiency: 1.0 + product_id: product_product_water0 + product_qty: 0.80000000000000004 + product_uom: product_uom_litre0 + type: normal +- + I define Minimum stock rules for my stockable products orange and sugar +- + !record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}: + company_id: base.main_company + location_id: stock.stock_location_stock + logic: max + name: OP/00002 + product_id: product_product_orange0 + product_max_qty: 10.0 + product_min_qty: 5.0 + product_uom: product.product_uom_kgm + qty_multiple: 1 + warehouse_id: stock.warehouse0 +- + !record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op1}: + company_id: base.main_company + location_id: stock.stock_location_stock + logic: max + name: OP/00003 + product_id: product_product_sugar0 + product_max_qty: 4.0 + product_min_qty: 2.0 + product_uom: product.product_uom_kgm + qty_multiple: 1 + warehouse_id: stock.warehouse0 +- + I want to produce 100 litres of Orange juice. I am creating a manufacturing order for this. + I want to see how much quantities of sub products I need, to produce the Orange juice. +- + I compute the data. I get the bill of material of Orange juice and list of + scheduled products according to my bom. +- + !record {model: mrp.production, id: mrp_production_mo0}: + company_id: base.main_company + date_planned: '2010-04-16 15:53:36' + location_dest_id: stock.stock_location_output + location_src_id: stock.stock_location_stock + name: MO/00002 + product_id: product_product_orangejuice0 + product_qty: 100.0 + product_uom: product_uom_litre0 +- + Creating an mrp.production record. Computing Bills of materials. +- + !record {model: mrp.production, id: mrp_production_mo0}: + bom_id: mrp.mrp_bom_orangejuice0 + company_id: base.main_company + date_planned: '2010-04-16 15:53:36' + location_dest_id: stock.stock_location_output + location_src_id: stock.stock_location_stock + name: MO/00002 + product_id: mrp.product_product_orangejuice0 + product_lines: + - name: Orange + product_id: mrp.product_product_orange0 + product_qty: 50.0 + product_uom: product.product_uom_kgm + production_id: mrp_production_mo0 + - name: Sugar + product_id: mrp.product_product_sugar0 + product_qty: 2.0 + product_uom: product.product_uom_kgm + production_id: mrp_production_mo0 + - name: Water + product_id: mrp.product_product_water0 + product_qty: 80.0 + product_uom: mrp.product_uom_litre0 + production_id: mrp_production_mo0 + product_qty: 100.0 + product_uom: mrp.product_uom_litre0 +- + I confirm the order. +- + !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0} +- + I am checking Procurement orders. There are 3 orders generated for Oranges, Sugar and Water. +- + !python {model: mrp.procurement}: | + from tools.translate import _ + proc_ids = self.search(cr, uid, [('origin','=',':MO/00002')]) + assert proc_ids, _('No Procurements!') +- + The scheduler runs. +- + !function {model: mrp.procurement, name: run_scheduler}: + - model: mrp.procurement + search: "[('origin','=',':MO/00002')]" +- + I am checking Internal picking. I see one picking for Orange juice and its + stock moves for Oranges, Sugar and Water made correctly. +- + !python {model: stock.picking}: | + from tools.translate import _ + pick_ids = self.search(cr, uid, [('origin','=',':MO/00002'),('type','=','internal')]) + assert pick_ids, _('No Internal Pickings!') +- + According to minimum stock rules. I have 2 purchase orders for + Sugar with 6 Kg from Axelor and Orange 60 Kg from ASUStek. +- + I confirm the purchase order of Sugar and Orange. +- + !python {model: purchase.order}: | + from tools.translate import _ + import netsvc + purch_ids = self.search(cr, uid, [('origin','in',['SCHEDULER','OP/00002','OP/00003'])]) + assert purch_ids, _('No Purchase Orders were made!') + wf_service = netsvc.LocalService("workflow") + for p_id in purch_ids: + wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr) +- + I get the approval from both the suppliers. So I approve my purchase orders. +- + !python {model: purchase.order}: | + from tools.translate import _ + import netsvc + purch_ids = self.search(cr, uid, [('origin','in',['SCHEDULER','OP/00002','OP/00003']),('state','=','confirmed')]) + assert purch_ids, _('No Confirmed Purchase Orders found!') + wf_service = netsvc.LocalService("workflow") + for p_id in purch_ids: + wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_approve', cr) +- + I see two incoming pickings for Orange and Sugar. +- + !python {model: stock.picking}: | + from tools.translate import _ + pick_ids = self.search(cr, uid, [('origin','in',['PO00001:SCHEDULER','PO00002:SCHEDULER','PO00003:OP/00002','PO00004:OP/00003']),('type','=','in')]) + assert pick_ids, _('No Incoming Shipments found!') +- + I receive both the products. My incoming pickings are done. +- + !record {model: stock.partial.picking, id: stock_partial_picking0}: + date: '2010-04-30 16:53:36' + partner_id: base.res_partner_asus + address_id: base.res_partner_address_tang +- + !python {model: stock.partial.picking}: | + pick_obj = self.pool.get('stock.picking') + picking_ids = pick_obj.search(cr, uid, [('origin','in',['PO00001:SCHEDULER','PO00002:SCHEDULER','PO00003:OP/00002','PO00004:OP/00003']),('type','=','in')]) + self.do_partial(cr, uid, [1],context={'active_ids': picking_ids}) +
\ No newline at end of file diff --git a/addons/mrp/test/mrp_production_order.yml b/addons/mrp/test/mrp_production_order.yml new file mode 100644 index 00000000000..023a9f22f31 --- /dev/null +++ b/addons/mrp/test/mrp_production_order.yml @@ -0,0 +1,139 @@ +- + In order to test the manufacturing order working with procurements I will use + some products with different supply method and procurement method, also check + the bills of material for the products. +- + I am creating one manufacturing order. +- + !record {model: mrp.production, id: mrp_production_mo0}: + bom_id: mrp.mrp_bom_9 + routing_id: mrp.mrp_routing_0 + company_id: base.main_company + date_planned: '2010-05-06 14:55:52' + location_dest_id: stock.stock_location_stock + location_src_id: stock.stock_location_stock + name: MO/00004 + product_id: product.product_product_pc1 + product_qty: 5.0 + product_uom: product.product_uom_unit + product_uos_qty: 0.0 +- + Creating a mrp.production.workcenter.line record +- + !record {model: mrp.production.workcenter.line, id: mrp_production_workcenter_line_assemblyline0}: + cycle: 5.0 + hour: 10.0 + name: Assembly Line 1 + production_id: mrp_production_mo0 + sequence: 0.0 + workcenter_id: mrp.mrp_workcenter_0 +- + Creating a mrp.production.product.line record +- + !record {model: mrp.production.product.line, id: mrp_production_product_line_regularprocessorconfig0}: + name: Regular processor config + product_id: product.product_product_cpu_gen + product_qty: 5.0 + product_uom: product.product_uom_unit + product_uos_qty: 0.0 + production_id: mrp_production_mo0 +- + Creating a mrp.production.product.line record +- + !record {model: mrp.production.product.line, id: mrp_production_product_line_hddseagategb0}: + name: HDD Seagate 7200.8 80GB + product_id: product.product_product_hdd1 + product_qty: 5.0 + product_uom: product.product_uom_unit + product_uos_qty: 0.0 + production_id: mrp_production_mo0 +- + Creating a mrp.production.product.line record +- + !record {model: mrp.production.product.line, id: mrp_production_product_line_atxmidsizetower0}: + name: ATX Mid-size Tower + product_id: product.product_product_tow1 + product_qty: 5.0 + product_uom: product.product_uom_unit + product_uos_qty: 0.0 + production_id: mrp_production_mo0 +- + Creating a mrp.production.product.line record +- + !record {model: mrp.production.product.line, id: mrp_production_product_line_mouse0}: + name: Mouse + product_id: product.product_product_25 + product_qty: 5.0 + product_uom: product.product_uom_unit + product_uos_qty: 0.0 + production_id: mrp_production_mo0 +- + Creating a mrp.production.product.line record +- + !record {model: mrp.production.product.line, id: mrp_production_product_line_keyboard0}: + name: Keyboard + product_id: product.product_product_24 + product_qty: 5.0 + product_uom: product.product_uom_unit + product_uos_qty: 0.0 + production_id: mrp_production_mo0 +- + I confirm the order. +- + !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0} +- + I am checking Procurement orders. +- + !python {model: mrp.procurement}: | + from tools.translate import _ + proc_ids = self.search(cr, uid, [('origin','=',':MO/00004')]) + assert proc_ids, _('No Procurements!') +- + The scheduler runs. +- + !function {model: mrp.procurement, name: run_scheduler}: + - model: mrp.procurement + search: "[('origin','=',':MO/00004')]" +- + I am checking Internal picking. +- + !python {model: stock.picking}: | + from tools.translate import _ + pick_ids = self.search(cr, uid, [('origin','=',':MO/00004'),('type','=','internal')]) + assert pick_ids, _('No Internal Pickings!') +- + I see that there is a manufacturing order for the subproduct of PC1 with ready state. +- + !python {model: mrp.production}: | + from tools.translate import _ + order_ids = self.search(cr, uid, [('origin','=',':MO/00004'),('state','=','ready')]) + assert order_ids, _('No manufacturing order!') +- + I start producing that product first. So I marked it as started. +- + !record {model: mrp.product.produce, id: mrp_product_produce0}: + product_qty: 5.00 + mode: 'consume_produce' +- + !python {model: mrp.product.produce}: | + prod_obj = self.pool.get('mrp.production') + prod_ids = prod_obj.search(cr, uid, [('origin','=',':MO/00004')]) + self.do_produce(cr, uid, [1], context={'active_ids': prod_ids}) +- + Now the manufacturing order for subproduct CPU_GEN is done. And manufacturing + order for PC1 is in ready state. +- + !python {model: mrp.production}: | + from tools.translate import _ + prod_ids = self.search(cr, uid, [('origin','=',':MO/00004'),('state','=','done')]) + assert prod_ids, _('Manufacturing order is yet not done!') +- + I start producing the product PC1. +- + !workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo0} +- + !python {model: mrp.product.produce}: | + from tools.translate import _ + prod_obj = self.pool.get('mrp.production') + prod_ids = prod_obj.search(cr, uid, [('product_id.default_code','=','PC1')]) + self.do_produce(cr, uid, [1], context={'active_ids': prod_ids}) diff --git a/addons/mrp/wizard/__init__.py b/addons/mrp/wizard/__init__.py index 045d7f1bd71..aa4408e543e 100644 --- a/addons/mrp/wizard/__init__.py +++ b/addons/mrp/wizard/__init__.py @@ -20,14 +20,10 @@ ############################################################################## import mrp_product_produce -import orderpoint_procurement -import mrp_procurement -import schedulers_all import mrp_price import mrp_workcenter_load #import mrp_track_prod import change_production_qty -import make_procurement_product # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/wizard/mrp_track_prod.py b/addons/mrp/wizard/mrp_track_prod.py index 11e1ec32ec6..43929b47dc7 100644 --- a/addons/mrp/wizard/mrp_track_prod.py +++ b/addons/mrp/wizard/mrp_track_prod.py @@ -56,33 +56,35 @@ class mrp_track_move(osv.osv_memory): """ res = super(mrp_track_move, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) record_id = context and context.get('active_id', False) or False - if record_id: - prod_obj = self.pool.get('mrp.production') - prod = prod_obj.browse(cr, uid, record_id) - try: - if prod.state != 'done': - res['arch'] = '''<form string="Track lines"> - <label colspan="4" string="You can not split an unfinished production Output." /> - <group col="2" colspan="4"> - <button icon='gtk-cancel' special="cancel" - string="Exit" /> - </group> - </form> - ''' - else: - arch_lst = ['<form string="Track lines">', '<label colspan="4" string="The field on each line says whether this lot should be tracked or not." />'] - for m in [line for line in prod.move_created_ids]: - quantity = m.product_qty - res['fields']['track%s' %m.id] = {'string' : m.product_id.name, 'type' : 'boolean', 'default' : lambda x,y,z: False} - arch_lst.append('<field name="track%s" />\n<newline />' %m.id) - arch_lst.append('<group col="2" colspan="4">') - arch_lst.append('<button icon=\'gtk-cancel\' special="cancel" string="Cancel" />') - arch_lst.append('<button name="track_lines" string="Track" colspan="1" type="object" icon="gtk-ok" />') - arch_lst.append('</group>') - arch_lst.append('</form>') - res['arch'] = '\n'.join(arch_lst) - except Exception,e: - return res + active_model = context.get('active_model') + + if not record_id or (active_model and active_model != 'mrp.production'): + return res + + prod_obj = self.pool.get('mrp.production') + prod = prod_obj.browse(cr, uid, record_id) + if prod.state != 'done': + res['arch'] = '''<form string="Track lines"> + <label colspan="4" string="You can not split an unfinished production Output." /> + <group col="2" colspan="4"> + <button icon='gtk-cancel' special="cancel" + string="Exit" /> + </group> + </form> + ''' + else: + arch_lst = ['<form string="Track lines">', '<label colspan="4" string="The field on each line says whether this lot should be tracked or not." />'] + for m in [line for line in prod.move_created_ids]: + quantity = m.product_qty + res['fields']['track%s' %m.id] = {'string' : m.product_id.name, 'type' : 'boolean', 'default' : lambda x,y,z: False} + arch_lst.append('<field name="track%s" />\n<newline />' %m.id) + arch_lst.append('<group col="2" colspan="4">') + arch_lst.append('<button icon=\'gtk-cancel\' special="cancel" string="Cancel" />') + arch_lst.append('<button name="track_lines" string="Track" colspan="1" type="object" icon="gtk-ok" />') + arch_lst.append('</group>') + arch_lst.append('</form>') + res['arch'] = '\n'.join(arch_lst) + return res def track_lines(self, cr, uid, ids, context): diff --git a/addons/mrp_procurement/__init__.py b/addons/mrp_procurement/__init__.py new file mode 100644 index 00000000000..6cb8ad4027b --- /dev/null +++ b/addons/mrp_procurement/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +import mrp_procurement +import wizard +import schedulers +import company
\ No newline at end of file diff --git a/addons/mrp_procurement/__openerp__.py b/addons/mrp_procurement/__openerp__.py new file mode 100644 index 00000000000..82c611c6c78 --- /dev/null +++ b/addons/mrp_procurement/__openerp__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + + +{ + "name" : "Procurements", + "version" : "1.0", + "author" : "Tiny", + "website" : "http://www.openerp.com", + "category" : "Generic Modules/Production", + "depends" : ["base","process", "product", "stock"], + "description": """ + This is the module for computing Procurements. + """, + 'init_xml': [], + 'update_xml': [ + 'security/ir.model.access.csv', + 'security/mrp_procurement_security.xml', + 'mrp_procurement_data.xml', + 'wizard/make_procurement_view.xml', + 'wizard/mrp_procurement_view.xml', + 'wizard/orderpoint_procurement_view.xml', + 'mrp_procurement_view.xml', + 'wizard/schedulers_all_view.xml', + 'mrp_procurement_workflow.xml', + 'process/procurement_process.xml', + "company_view.xml", + ], +# 'demo_xml': [], + 'installable': True, + 'active': False, + 'certificate': '', +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_procurement/company.py b/addons/mrp_procurement/company.py new file mode 100644 index 00000000000..ce39ca9a684 --- /dev/null +++ b/addons/mrp_procurement/company.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from osv import osv,fields + +class company(osv.osv): + _inherit = 'res.company' + _columns = { + 'schedule_range': fields.float('Scheduler Range', required=True, + help="This is the time frame analysed by the scheduler when "\ + "computing procurements. All procurements that are not between "\ + "today and today+range are skipped for futur computation."), + } + _defaults = { + 'schedule_range': lambda *a: 80.0, + } +company() + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_procurement/company_view.xml b/addons/mrp_procurement/company_view.xml new file mode 100644 index 00000000000..543e36fe02f --- /dev/null +++ b/addons/mrp_procurement/company_view.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" ?> +<openerp> + <data> + + <record id="mrp_company" model="ir.ui.view"> + <field name="name">res.company.mrp.config</field> + <field name="model">res.company</field> + <field name="type">form</field> + <field name="inherit_id" ref="base.view_company_form"/> + <field name="arch" type="xml"> + <page string="Configuration" position="inside"> + <separator string="MRP & Logistic Scheduler" colspan="4"/> + <field name="schedule_range"/> + </page> + </field> + </record> + + </data> +</openerp>
\ No newline at end of file diff --git a/addons/mrp_procurement/mrp_procurement.py b/addons/mrp_procurement/mrp_procurement.py new file mode 100644 index 00000000000..bd5b223779f --- /dev/null +++ b/addons/mrp_procurement/mrp_procurement.py @@ -0,0 +1,527 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from mx import DateTime +from osv import osv, fields +from tools.translate import _ +import netsvc +import time + + +class mrp_property_group(osv.osv): + """ + Group of mrp properties. + """ + _name = 'mrp.property.group' + _description = 'Property Group' + _columns = { + 'name': fields.char('Property Group', size=64, required=True), + 'description': fields.text('Description'), + } +mrp_property_group() + +class mrp_property(osv.osv): + """ + Properties of mrp. + """ + _name = 'mrp.property' + _description = 'Property' + _columns = { + 'name': fields.char('Name', size=64, required=True), + 'composition': fields.selection([('min','min'),('max','max'),('plus','plus')], 'Properties composition', required=True, help="Not used in computations, for information purpose only."), + 'group_id': fields.many2one('mrp.property.group', 'Property Group', required=True), + 'description': fields.text('Description'), + } + _defaults = { + 'composition': lambda *a: 'min', + } +mrp_property() + +# ------------------------------------------------------------------ +# Procurement +# ------------------------------------------------------------------ +# +# Produce, Buy or Find products and place a move +# then wizard for picking lists & move +# +class mrp_procurement(osv.osv): + """ + Procurement Orders + """ + _name = "mrp.procurement" + _description = "Procurement" + _order = 'priority,date_planned' + + _columns = { + 'name': fields.char('Reason', size=64, required=True, help='Procurement name.'), + 'origin': fields.char('Source Document', size=64, + help="Reference of the document that created this Procurement.\n" + "This is automatically completed by Open ERP."), + 'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', required=True), + 'date_planned': fields.datetime('Scheduled date', required=True), + 'date_close': fields.datetime('Date Closed'), + 'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True), + 'product_qty': fields.float('Quantity', required=True, states={'draft':[('readonly',False)]}, readonly=True), + 'product_uom': fields.many2one('product.uom', 'Product UoM', required=True, states={'draft':[('readonly',False)]}, readonly=True), + 'product_uos_qty': fields.float('UoS Quantity', states={'draft':[('readonly',False)]}, readonly=True), + 'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True), + 'move_id': fields.many2one('stock.move', 'Reservation', ondelete='set null'), + 'close_move': fields.boolean('Close Move at end', required=True), + 'location_id': fields.many2one('stock.location', 'Location', required=True, states={'draft':[('readonly',False)]}, readonly=True), + 'procure_method': fields.selection([('make_to_stock','from stock'),('make_to_order','on order')], 'Procurement Method', states={'draft':[('readonly',False)], 'confirmed':[('readonly',False)]}, + readonly=True, required=True, help="If you encode manually a Procurement, you probably want to use" \ + " a make to order method."), + + 'note': fields.text('Note'), + + 'property_ids': fields.many2many('mrp.property', 'mrp_procurement_property_rel', 'procurement_id','property_id', 'Properties'), + + 'message': fields.char('Latest error', size=64, help="Exception occurred while computing procurement orders."), + 'state': fields.selection([ + ('draft','Draft'), + ('confirmed','Confirmed'), + ('exception','Exception'), + ('running','Running'), + ('cancel','Cancel'), + ('ready','Ready'), + ('done','Done'), + ('waiting','Waiting')], 'State', required=True, + help='When a procurement is created the state is set to \'Draft\'.\n If the procurement is confirmed, the state is set to \'Confirmed\'.\ + \nAfter confirming the state is set to \'Running\'.\n If any exception arises in the order then the state is set to \'Exception\'.\n Once the exception is removed the state becomes \'Ready\'.\n It is in \'Waiting\'. state when the procurement is waiting for another one to finish.'), + 'note': fields.text('Note'), + 'company_id': fields.many2one('res.company','Company',required=True), + } + _defaults = { + 'state': lambda *a: 'draft', + 'priority': lambda *a: '1', + 'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), + 'close_move': lambda *a: 0, + 'procure_method': lambda *a: 'make_to_order', + 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.procurement', context=c) + } + + def unlink(self, cr, uid, ids, context=None): + procurements = self.read(cr, uid, ids, ['state']) + unlink_ids = [] + for s in procurements: + if s['state'] in ['draft','cancel']: + unlink_ids.append(s['id']) + else: + raise osv.except_osv(_('Invalid action !'), _('Cannot delete Procurement Order(s) which are in %s State!' % s['state'])) + return osv.osv.unlink(self, cr, uid, unlink_ids, context=context) + + def onchange_product_id(self, cr, uid, ids, product_id, context={}): + """ Finds UoM and UoS of changed product. + @param product_id: Changed id of product. + @return: Dictionary of values. + """ + if product_id: + w = self.pool.get('product.product').browse(cr, uid, product_id, context) + v = { + 'product_uom': w.uom_id.id, + 'product_uos': w.uos_id and w.uos_id.id or w.uom_id.id + } + return {'value': v} + return {} + + def check_product(self, cr, uid, ids): + """ Checks product type. + @return: True or False + """ + for procurement in self.browse(cr, uid, ids): + if procurement.product_id.type in ('product', 'consu'): + return True + return False + + def check_move_cancel(self, cr, uid, ids, context={}): + """ Checks if move is cancelled or not. + @return: True or False. + """ + res = True + ok = False + for procurement in self.browse(cr, uid, ids, context): + if procurement.move_id: + ok = True + if not procurement.move_id.state == 'cancel': + res = False + return res and ok + + def check_move_done(self, cr, uid, ids, context={}): + """ Checks if move is done or not. + @return: True or False. + """ + res = True + for proc in self.browse(cr, uid, ids, context): + if proc.move_id: + if not proc.move_id.state == 'done': + res = False + return res + + # + # This method may be overrided by objects that override mrp.procurment + # for computing their own purpose + # + def _quantity_compute_get(self, cr, uid, proc, context={}): + """ Finds sold quantity of product. + @param proc: Current procurement. + @return: Quantity or False. + """ + if proc.product_id.type == 'product': + if proc.move_id.product_uos: + return proc.move_id.product_uos_qty + return False + + def _uom_compute_get(self, cr, uid, proc, context={}): + """ Finds UoS if product is Stockable Product. + @param proc: Current procurement. + @return: UoS or False. + """ + if proc.product_id.type == 'product': + if proc.move_id.product_uos: + return proc.move_id.product_uos.id + return False + + # + # Return the quantity of product shipped/produced/served, wich may be + # different from the planned quantity + # + def quantity_get(self, cr, uid, id, context={}): + """ Finds quantity of product used in procurement. + @return: Quantity of product. + """ + proc = self.browse(cr, uid, id, context) + result = self._quantity_compute_get(cr, uid, proc, context) + if not result: + result = proc.product_qty + return result + + def uom_get(self, cr, uid, id, context=None): + """ Finds UoM of product used in procurement. + @return: UoM of product. + """ + proc = self.browse(cr, uid, id, context) + result = self._uom_compute_get(cr, uid, proc, context) + if not result: + result = proc.product_uom.id + return result + + def check_waiting(self, cr, uid, ids, context=[]): + """ Checks state of move. + @return: True or False + """ + for procurement in self.browse(cr, uid, ids, context=context): + if procurement.move_id and procurement.move_id.state == 'auto': + return True + return False + + def check_produce_service(self, cr, uid, procurement, context=[]): + return True + + def check_produce_product(self, cr, uid, procurement, context=[]): + """ Finds BoM of a product if not found writes exception message. + @param procurement: Current procurement. + @return: True or False. + """ + return True + + def check_make_to_stock(self, cr, uid, ids, context={}): + """ Checks product type. + @return: True or False + """ + ok = True + for procurement in self.browse(cr, uid, ids, context=context): + if procurement.product_id.type == 'service': + ok = ok and self._check_make_to_stock_service(cr, uid, procurement, context) + else: + ok = ok and self._check_make_to_stock_product(cr, uid, procurement, context) + return ok + + def check_produce(self, cr, uid, ids, context={}): + """ Checks product type. + @return: True or Product Id. + """ + res = True + user = self.pool.get('res.users').browse(cr, uid, uid) + for procurement in self.browse(cr, uid, ids): + if procurement.product_id.product_tmpl_id.supply_method <> 'produce': + if procurement.product_id.seller_ids: + partner = procurement.product_id.seller_ids[0].name + if user.company_id and user.company_id.partner_id: + if partner.id == user.company_id.partner_id.id: + return True + return False + if procurement.product_id.product_tmpl_id.type=='service': + res = res and self.check_produce_service(cr, uid, procurement, context) + else: + res = res and self.check_produce_product(cr, uid, procurement, context) + if not res: + return False + return res + + def check_buy(self, cr, uid, ids): + """ Checks product type. + @return: True or Product Id. + """ + user = self.pool.get('res.users').browse(cr, uid, uid) + partner_obj = self.pool.get('res.partner') + for procurement in self.browse(cr, uid, ids): + if procurement.product_id.product_tmpl_id.supply_method <> 'buy': + return False + if not procurement.product_id.seller_ids: + cr.execute('update mrp_procurement set message=%s where id=%s', (_('No supplier defined for this product !'), procurement.id)) + return False + partner = procurement.product_id.seller_ids[0].name + if user.company_id and user.company_id.partner_id: + if partner.id == user.company_id.partner_id.id: + return False + address_id = partner_obj.address_get(cr, uid, [partner.id], ['delivery'])['delivery'] + if not address_id: + cr.execute('update mrp_procurement set message=%s where id=%s', (_('No address defined for the supplier'), procurement.id)) + return False + return True + + def test_cancel(self, cr, uid, ids): + """ Tests whether state of move is cancelled or not. + @return: True or False + """ + for record in self.browse(cr, uid, ids): + if record.move_id and record.move_id.state == 'cancel': + return True + return False + + def action_confirm(self, cr, uid, ids, context={}): + """ Confirms procurement and writes exception message if any. + @return: True + """ + move_obj = self.pool.get('stock.move') + for procurement in self.browse(cr, uid, ids): + if procurement.product_qty <= 0.00: + raise osv.except_osv(_('Data Insufficient !'), _('Please check the Quantity of Procurement Order(s), it should not be less than 1!')) + if procurement.product_id.type in ('product', 'consu'): + if not procurement.move_id: + source = procurement.location_id.id + if procurement.procure_method == 'make_to_order': + source = procurement.product_id.product_tmpl_id.property_stock_procurement.id + id = move_obj.create(cr, uid, { + 'name': 'PROC:' + procurement.name, + 'location_id': source, + 'location_dest_id': procurement.location_id.id, + 'product_id': procurement.product_id.id, + 'product_qty': procurement.product_qty, + 'product_uom': procurement.product_uom.id, + 'date_planned': procurement.date_planned, + 'state': 'confirmed', + 'company_id': procurement.company_id.id, + }) + self.write(cr, uid, [procurement.id], {'move_id': id, 'close_move': 1}) + else: + # TODO: check this + if procurement.procure_method == 'make_to_stock' and procurement.move_id.state in ('waiting',): + id = move_obj.write(cr, uid, [procurement.move_id.id], {'state':'confirmed'}) + self.write(cr, uid, ids, {'state': 'confirmed', 'message': ''}) + return True + + def action_move_assigned(self, cr, uid, ids, context={}): + """ Changes procurement state to Running and writes message. + @return: True + """ + self.write(cr, uid, ids, {'state': 'running', 'message': _('from stock: products assigned.')}) + return True + + def _check_make_to_stock_service(self, cr, uid, procurement, context={}): + return True + + def _check_make_to_stock_product(self, cr, uid, procurement, context={}): + """ Checks procurement move state. + @param procurement: Current procurement. + @return: True or move id. + """ + ok = True + if procurement.move_id: + id = procurement.move_id.id + if not (procurement.move_id.state in ('done','assigned','cancel')): + ok = ok and self.pool.get('stock.move').action_assign(cr, uid, [id]) + cr.execute('select count(id) from stock_warehouse_orderpoint where product_id=%s', (procurement.product_id.id,)) + if not cr.fetchone()[0]: + cr.execute('update mrp_procurement set message=%s where id=%s', (_('from stock and no minimum orderpoint rule defined'), procurement.id)) + return ok + + def action_produce_assign_service(self, cr, uid, ids, context={}): + """ Changes procurement state to Running. + @return: True + """ + for procurement in self.browse(cr, uid, ids): + self.write(cr, uid, [procurement.id], {'state': 'running'}) + return True + + def action_produce_assign_product(self, cr, uid, ids, context={}): + """ This is action which call from workflow to assign production order to procurements + @return: True + """ + return 0 + + + def action_po_assign(self, cr, uid, ids, context={}): + """ This is action which call from workflow to assign purchase order to procurements + @return: True + """ + return 0 + + def action_cancel(self, cr, uid, ids): + """ Cancels procurement and writes move state to Assigned. + @return: True + """ + todo = [] + todo2 = [] + move_obj = self.pool.get('stock.move') + for proc in self.browse(cr, uid, ids): + if proc.close_move: + if proc.move_id.state not in ('done', 'cancel'): + todo2.append(proc.move_id.id) + else: + if proc.move_id and proc.move_id.state == 'waiting': + todo.append(proc.move_id.id) + if len(todo2): + move_obj.action_cancel(cr, uid, todo2) + if len(todo): + move_obj.write(cr, uid, todo, {'state': 'assigned'}) + self.write(cr, uid, ids, {'state': 'cancel'}) + wf_service = netsvc.LocalService("workflow") + for id in ids: + wf_service.trg_trigger(uid, 'mrp.procurement', id, cr) + return True + + def action_check_finnished(self, cr, uid, ids): + return self.check_move_done(cr, uid, ids) + + def action_check(self, cr, uid, ids): + """ Checks procurement move state whether assigned or done. + @return: True + """ + ok = False + for procurement in self.browse(cr, uid, ids): + if procurement.move_id.state == 'assigned' or procurement.move_id.state == 'done': + self.action_done(cr, uid, [procurement.id]) + ok = True + return ok + + def action_ready(self, cr, uid, ids): + """ Changes procurement state to Ready. + @return: True + """ + res = self.write(cr, uid, ids, {'state': 'ready'}) + return res + + def action_done(self, cr, uid, ids): + """ Changes procurement state to Done and writes Closed date. + @return: True + """ + move_obj = self.pool.get('stock.move') + for procurement in self.browse(cr, uid, ids): + if procurement.move_id: + if procurement.close_move and (procurement.move_id.state <> 'done'): + move_obj.action_done(cr, uid, [procurement.move_id.id]) + res = self.write(cr, uid, ids, {'state': 'done', 'date_close': time.strftime('%Y-%m-%d')}) + wf_service = netsvc.LocalService("workflow") + for id in ids: + wf_service.trg_trigger(uid, 'mrp.procurement', id, cr) + return res + + def run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, context=None): + ''' Runs through scheduler. + @param use_new_cursor: False or the dbname + ''' + if not context: + context={} + self._procure_confirm(cr, uid, use_new_cursor=use_new_cursor, context=context) + self._procure_orderpoint_confirm(cr, uid, automatic=automatic,\ + use_new_cursor=use_new_cursor, context=context) + +mrp_procurement() + + +class stock_warehouse_orderpoint(osv.osv): + """ + Defines Minimum stock rules. + """ + _name = "stock.warehouse.orderpoint" + _description = "Orderpoint minimum rule" + + _columns = { + 'name': fields.char('Name', size=32, required=True), + 'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the orderpoint without removing it."), + 'logic': fields.selection([('max','Order to Max'),('price','Best price (not yet active!)')], 'Reordering Mode', required=True), + 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True), + 'location_id': fields.many2one('stock.location', 'Location', required=True), + 'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','=','product')]), + 'product_uom': fields.many2one('product.uom', 'Product UOM', required=True ), + 'product_min_qty': fields.float('Min Quantity', required=True, + help="When the virtual stock goes belong the Min Quantity, Open ERP generates "\ + "a procurement to bring the virtual stock to the Max Quantity."), + 'product_max_qty': fields.float('Max Quantity', required=True, + help="When the virtual stock goes belong the Min Quantity, Open ERP generates "\ + "a procurement to bring the virtual stock to the Max Quantity."), + 'qty_multiple': fields.integer('Qty Multiple', required=True, + help="The procurement quantity will by rounded up to this multiple."), + 'procurement_id': fields.many2one('mrp.procurement', 'Latest procurement'), + 'company_id': fields.many2one('res.company','Company',required=True), + } + _defaults = { + 'active': lambda *a: 1, + 'logic': lambda *a: 'max', + 'qty_multiple': lambda *a: 1, + 'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'mrp.warehouse.orderpoint') or '', + 'product_uom': lambda sel, cr, uid, context: context.get('product_uom', False), + 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.warehouse.orderpoint', context=c) + } + + def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context={}): + """ Finds location id for changed warehouse. + @param warehouse_id: Changed id of warehouse. + @return: Dictionary of values. + """ + if warehouse_id: + w = self.pool.get('stock.warehouse').browse(cr, uid, warehouse_id, context) + v = {'location_id': w.lot_stock_id.id} + return {'value': v} + return {} + + def onchange_product_id(self, cr, uid, ids, product_id, context={}): + """ Finds UoM for changed product. + @param product_id: Changed id of product. + @return: Dictionary of values. + """ + if product_id: + prod = self.pool.get('product.product').browse(cr,uid,product_id) + v = {'product_uom': prod.uom_id.id} + return {'value': v} + return {} + + def copy(self, cr, uid, id, default=None,context={}): + if not default: + default = {} + default.update({ + 'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.warehouse.orderpoint') or '', + }) + return super(stock_warehouse_orderpoint, self).copy(cr, uid, id, default, context) + +stock_warehouse_orderpoint() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_procurement/mrp_procurement_data.xml b/addons/mrp_procurement/mrp_procurement_data.xml new file mode 100644 index 00000000000..256472bd2fd --- /dev/null +++ b/addons/mrp_procurement/mrp_procurement_data.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data noupdate="1"> + + <record forcecreate="True" id="ir_cron_scheduler_action" model="ir.cron"> + <field name="name">Run mrp scheduler</field> + <field eval="False" name="active"/> + <field name="user_id" ref="base.user_root"/> + <field name="interval_number">1</field> + <field name="interval_type">days</field> + <field name="numbercall">-1</field> + <field eval="False" name="doall"/> + <field eval="'mrp.procurement'" name="model"/> + <field eval="'run_scheduler'" name="function"/> + <field eval="'(False,)'" name="args"/> + </record> + + </data> +</openerp>
\ No newline at end of file diff --git a/addons/mrp_procurement/mrp_procurement_view.xml b/addons/mrp_procurement/mrp_procurement_view.xml new file mode 100644 index 00000000000..84b47ee516d --- /dev/null +++ b/addons/mrp_procurement/mrp_procurement_view.xml @@ -0,0 +1,251 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + <!-- + Procurement + --> + + <record id="mrp_procurement_tree_view" model="ir.ui.view"> + <field name="name">mrp.procurement.tree</field> + <field name="model">mrp.procurement</field> + <field name="type">tree</field> + <field name="arch" type="xml"> + <tree string="Procurement Lines" colors="red:state=='draft';black:state=='running';green:state=='confirmed';gray:state in ['done','cancel']"> + <field name="date_planned" widget="date"/> + <field name="origin"/> + <field name="product_id"/> + <field name="product_qty"/> + <field name="product_uom" string="UOM"/> + <field name="procure_method"/> + <field name="state"/> + </tree> + </field> + </record> + <record id="mrp_procurement_form_view" model="ir.ui.view"> + <field name="name">mrp.procurement.form</field> + <field name="model">mrp.procurement</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="Procurement"> + <group col="2" colspan="2"> + <separator colspan="2" string="References"/> + <field name="name" select="1" string="Procurement Reason"/> + <field name="origin"/> + <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/> + </group> + <group col="2" colspan="2"> + <separator colspan="2" string="Planification"/> + <field name="date_planned" select="1"/> + <field name="procure_method"/> + <field name="priority" groups="base.group_extended"/> + </group> + <notebook colspan="4"> + <page string="Procurement Details"> + <separator colspan="4" string="Product & Location"/> + <field name="product_id" select="1" on_change="onchange_product_id(product_id)"/> + <field name="location_id" domain="[('usage','=','internal')]"/> + <field name="product_qty"/> + <field name="product_uom"/> + + <field name="product_uos_qty" groups="product.group_uos"/> + <field name="product_uos" groups="product.group_uos"/> + + <separator colspan="4" string="Status"/> + <field colspan="4" name="message" readonly="1"/> + <field name="state" readonly="1"/> + <group col="7" colspan="2"> + <button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/> + <button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/> + <button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/> + <button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/> + </group> + </page> + <page string="Extra Information"> + <separator colspan="4" string="Details"/> + <field name="move_id" groups="base.group_extended"/> + <field name="date_close"/> + <field name="close_move" groups="base.group_extended"/> + <group colspan="4" groups="base.group_extended"> + <separator colspan="4" string="Properties" /> + <field colspan="4" name="property_ids" nolabel="1"/> + </group> + </page> + <page string="Notes"> + <separator colspan="4" string="Note" /> + <field name="note" colspan="4" nolabel="1"/> + </page> + </notebook> + </form> + </field> + </record> + <record id="view_mrp_procurement_filter" model="ir.ui.view"> + <field name="name">mrp.procurement.select</field> + <field name="model">mrp.procurement</field> + <field name="type">search</field> + <field name="arch" type="xml"> + <search string="Search Procurement"> + <group col='10' colspan='4'> + <filter icon="terp-mrp" string="Current" domain="[('state','in',('draft','confirmed'))]" default="1" help="Procurement Orders in draft or open state."/> + <filter icon="terp-mrp" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/> + <filter icon="terp-mrp" string="Late" + domain="['&', ('date_planned::date','<', current_date), ('state', 'in', ('draft', 'confirmed'))]" + help="Procurement started late" /> + <separator orientation="vertical"/> + <field name="name"/> + <field name="origin"/> + <field name="product_id" /> + <field name="date_planned" widget="date"/> + <field name="state" /> + </group> + <newline/> + <group expand="1" string="Group By" colspan="4" col="8"> + <filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/> + <filter string="Reason" icon="terp-mrp" domain="[]" context="{'group_by':'name'}"/> + <filter string="Scheduled Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/> + </group> + </search> + </field> + </record> + <record id="mrp_procurement_action" model="ir.actions.act_window"> + <field name="name">Procurement Orders</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">mrp.procurement</field> + <field name="view_type">form</field> + <field name="view_id" eval="False"/> + <field name="search_view_id" ref="view_mrp_procurement_filter"/> + </record> + + <record id="mrp_procurement_action3" model="ir.actions.act_window"> + <field name="name">Procurements</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">mrp.procurement</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + <field name="search_view_id" ref="view_mrp_procurement_filter"/> + <field name="domain">[]</field> + <field name="context">{}</field> + </record> + + <record id="mrp_procurement_action5" model="ir.actions.act_window"> + <field name="name">Procurement Exceptions</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">mrp.procurement</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + <field name="domain">[('state','=','exception')]</field> + </record> + + <record id="mrp_procurement_action4" model="ir.actions.act_window"> + <field name="name">Procurement Exceptions to Fix</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">mrp.procurement</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + <field name="domain">[('state','=','exception'), ('message', '<>', '')]</field> + <field name="filter" eval="True"/> + </record> + + <record id="mrp_procurement_action11" model="ir.actions.act_window"> + <field name="name">Temporary Procurement Exceptions</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">mrp.procurement</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + <field name="domain">[('state','=','exception'), ('message', '=', '')]</field> + </record> + + <!-- Order Point --> + <record id="view_warehouse_orderpoint_tree" model="ir.ui.view"> + <field name="name">stock.warehouse.orderpoint.tree</field> + <field name="model">stock.warehouse.orderpoint</field> + <field name="type">tree</field> + <field name="arch" type="xml"> + <tree string="Minimum Stock Rules"> + <field name="name"/> + <field name="warehouse_id"/> + <field name="location_id"/> + <field name="product_id"/> + <field name="product_uom"/> + <field name="product_min_qty"/> + <field name="product_max_qty"/> + </tree> + </field> + </record> + + <record model="ir.ui.view" id="warehouse_orderpoint_search"> + <field name="name">stock.warehouse.orderpoint.search</field> + <field name="model">stock.warehouse.orderpoint</field> + <field name="type">search</field> + <field name="arch" type="xml"> + <search string="Minimum Stock Rules Search"> + <group col="10" colspan="4"> + <field name="name" select="1" /> + <field name="warehouse_id" select="1" widget="selection"/> + <field name="location_id" select="1" /> + <field name="company_id" select="1" widget="selection"/> + <field name="product_id" select="1"/> + </group> + <newline/> + <group expand="1" string="Group By..." colspan="4" col="10"> + <filter string="Warehouse" icon="terp-stock" domain="[]" context="{'group_by':'warehouse_id'}"/> + <filter string="Location" icon="terp-stock" domain="[]" context="{'group_by':'location_id'}"/> + </group> + </search> + </field> + </record> + + <record id="view_warehouse_orderpoint_form" model="ir.ui.view"> + <field name="name">stock.warehouse.orderpoint.form</field> + <field name="model">stock.warehouse.orderpoint</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="Minimum Stock Rules"> + <group col="2" colspan="2"> + <separator string="General Information" colspan="2" /> + <field name="name" /> + <field name="product_id" on_change="onchange_product_id(product_id)"/> + <field name="product_uom"/> + </group> + <group col="2" colspan="2"> + <separator string="Locations" colspan="2" /> + <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/> + <field name="location_id"/> + <field name="company_id" groups="base.group_multi_company" widget="selection"/> + </group> + <group col="2" colspan="2"> + <separator string="Quantity Rules" colspan="2" /> + <field name="product_min_qty"/> + <field name="product_max_qty"/> + <field name="qty_multiple"/> + </group> + <group col="2" colspan="2" groups="base.group_extended"> + <separator string="Misc" colspan="2" /> + <field name="procurement_id" readonly="1"/> + <field name="active" /> + </group> + </form> + </field> + </record> + + <record id="action_orderpoint_form" model="ir.actions.act_window"> + <field name="name">Minimum Stock Rules</field> + <field name="res_model">stock.warehouse.orderpoint</field> + <field name="type">ir.actions.act_window</field> + <field name="view_type">form</field> + <field name="view_id" ref="view_warehouse_orderpoint_tree"/> + <field name="search_view_id" ref="warehouse_orderpoint_search" /> + </record> + + <act_window domain="[('warehouse_id', '=', active_id)]" id="act_stock_warehouse_2_stock_warehouse_orderpoint" name="Minimum Stock Rules" res_model="stock.warehouse.orderpoint" src_model="stock.warehouse"/> + + <!-- add product_uom to context to be the default value when adding new orderpoints --> + <act_window + context="{'product_uom': locals().has_key('uom_id') and uom_id}" + domain="[('product_id', '=', active_id)]" + id="act_product_product_2_stock_warehouse_orderpoint" + name="Minimum Stock Rules" + res_model="stock.warehouse.orderpoint" + src_model="product.product"/> + + </data> +</openerp>
\ No newline at end of file diff --git a/addons/mrp_procurement/mrp_procurement_workflow.xml b/addons/mrp_procurement/mrp_procurement_workflow.xml new file mode 100644 index 00000000000..46c4a10fffc --- /dev/null +++ b/addons/mrp_procurement/mrp_procurement_workflow.xml @@ -0,0 +1,196 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + + <!-- Procurement --> + + <record id="wkf_procurement" model="workflow"> + <field name="name">mrp.procurement.basic</field> + <field name="osv">mrp.procurement</field> + <field name="on_create">True</field> + </record> + + <record id="act_draft" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="flow_start">True</field> + <field name="name">draft</field> + </record> + <record id="act_cancel" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="name">cancel</field> + <field name="kind">function</field> + <field name="action">action_cancel()</field> + <field name="flow_stop">True</field> + </record> + <record id="act_confirm" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="name">confirm</field> + <field name="kind">function</field> + <field name="action">action_confirm()</field> + </record> + <record id="act_confirm_wait" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="name">confirm_wait</field> + <field name="kind">function</field> + <field name="action">write({'state':'exception'})</field> + </record> + <record id="act_confirm_mts" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="name">confirm_mts</field> + </record> + <record id="act_confirm_mto" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="name">confirm_mto</field> + </record> + <record id="act_make_to_stock" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="name">make_to_stock</field> + <field name="kind">function</field> + <field name="action">action_move_assigned()</field> + </record> +<!-- <record id="act_produce_check" model="workflow.activity">--> +<!-- <field name="wkf_id" ref="wkf_procurement"/>--> +<!-- <field name="name">produce_check</field>--> +<!-- </record>--> +<!-- <record id="act_produce_service" model="workflow.activity">--> +<!-- <field name="wkf_id" ref="wkf_procurement"/>--> +<!-- <field name="name">produce_service</field>--> +<!-- <field name="kind">function</field>--> +<!-- <field name="action">action_produce_assign_service()</field>--> +<!-- </record>--> + <record id="act_make_done" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="name">ready</field> + <field name="kind">function</field> + <field name="action">action_ready()</field> + </record> + <record id="act_wait_done" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="name">wait_done</field> + <field name="kind">function</field> + <field name="action">write({'state':'waiting'})</field> + </record> + + <record id="act_done" model="workflow.activity"> + <field name="wkf_id" ref="wkf_procurement"/> + <field name="flow_stop">True</field> + <field name="name">done</field> + <field name="kind">function</field> + <field name="action">action_done()</field> + </record> + + <record id="trans_draft_confirm" model="workflow.transition"> + <field name="act_from" ref="act_draft"/> + <field name="act_to" ref="act_confirm"/> + <field name="signal">button_confirm</field> + </record> + <record id="trans_confirm_cancel2" model="workflow.transition"> + <field name="act_from" ref="act_confirm"/> + <field name="act_to" ref="act_wait_done"/> + <field name="signal">button_wait_done</field> + <field name="condition">True</field> + </record> + <record id="trans_confirm_wait_done" model="workflow.transition"> + <field name="act_from" ref="act_wait_done"/> + <field name="act_to" ref="act_done"/> + <field name="condition">check_move_done()</field> + <field name="trigger_model">stock.move</field> + <field name="trigger_expr_id">[move_id.id]</field> + </record> + + <record id="trans_confirm_cancel" model="workflow.transition"> + <field name="act_from" ref="act_confirm"/> + <field name="act_to" ref="act_cancel"/> + <field name="signal">button_check</field> + <field name="condition">test_cancel()</field> + </record> + <record id="trans_confirm_confirm_wait" model="workflow.transition"> + <field name="act_from" ref="act_confirm"/> + <field name="act_to" ref="act_confirm_wait"/> + <field name="signal">button_check</field> + <field name="condition">not test_cancel()</field> + </record> + <record id="trans_confirm_wait_confirm_mto" model="workflow.transition"> + <field name="act_from" ref="act_confirm_wait"/> + <field name="act_to" ref="act_confirm_mto"/> + <field name="condition">procure_method=='make_to_order'</field> + </record> + <record id="trans_confirm_wait_confirm_mts" model="workflow.transition"> + <field name="act_from" ref="act_confirm_wait"/> + <field name="act_to" ref="act_confirm_mts"/> + <field name="condition">procure_method=='make_to_stock'</field> + </record> + <record id="trans_confirm_mts_cancel" model="workflow.transition"> + <field name="act_from" ref="act_confirm_mts"/> + <field name="act_to" ref="act_cancel"/> + <field name="signal">button_cancel</field> + </record> + <record id="trans_confirm_waiting_cancel" model="workflow.transition"> + <field name="act_from" ref="act_wait_done"/> + <field name="act_to" ref="act_cancel"/> + <field name="signal">button_cancel</field> + </record> + <record id="trans_confirm_mts_confirm" model="workflow.transition"> + <field name="act_from" ref="act_confirm_mts"/> + <field name="act_to" ref="act_confirm"/> + <field name="signal">button_restart</field> + </record> + <record id="trans_confirm_mto_cancel" model="workflow.transition"> + <field name="act_from" ref="act_confirm_mto"/> + <field name="act_to" ref="act_cancel"/> + <field name="signal">button_cancel</field> + </record> + <record id="trans_confirm_mto_confirm" model="workflow.transition"> + <field name="act_from" ref="act_confirm_mto"/> + <field name="act_to" ref="act_confirm"/> + <field name="signal">button_restart</field> + </record> + <record id="trans_draft_cancel" model="workflow.transition"> + <field name="act_from" ref="act_draft"/> + <field name="act_to" ref="act_cancel"/> + <field name="signal">button_cancel</field> + </record> + <record id="trans_confirm_mts_make_to_stock" model="workflow.transition"> + <field name="act_from" ref="act_confirm_mts"/> + <field name="act_to" ref="act_make_to_stock"/> + <field name="condition">check_make_to_stock()</field> + </record> +<!-- <record id="trans_confirm_mto_produce_check" model="workflow.transition">--> +<!-- <field name="act_from" ref="act_confirm_mto"/>--> +<!-- <field name="act_to" ref="act_produce_check"/>--> +<!-- <field name="condition">check_produce()</field>--> +<!-- </record>--> +<!-- <record id="trans_product_check_produce_service" model="workflow.transition">--> +<!-- <field name="act_from" ref="act_produce_check"/>--> +<!-- <field name="act_to" ref="act_produce_service"/>--> +<!-- <field name="condition">not check_product()</field>--> +<!-- </record>--> + <record id="trans_make_to_stock_make_done" model="workflow.transition"> + <field name="act_from" ref="act_make_to_stock"/> + <field name="act_to" ref="act_make_done"/> + <field name="condition">True</field> + <field name="trigger_model" eval="False"/> + <field name="trigger_expr_id" eval="False"/> + </record> +<!-- <record id="trans_produce_service_cancel" model="workflow.transition">--> +<!-- <field name="act_from" ref="act_produce_service"/>--> +<!-- <field name="act_to" ref="act_cancel"/>--> +<!-- <field name="signal">subflow.cancel</field>--> +<!-- </record>--> +<!-- <record id="trans_produce_service_make_done" model="workflow.transition">--> +<!-- <field name="act_from" ref="act_produce_service"/>--> +<!-- <field name="act_to" ref="act_make_done"/>--> +<!-- </record>--> + <record id="trans_make_done_done" model="workflow.transition"> + <field name="act_from" ref="act_make_done"/> + <field name="act_to" ref="act_done"/> + <field name="condition">action_check_finnished()</field> + </record> + <record id="trans_make_done_confirm" model="workflow.transition"> + <field name="act_from" ref="act_make_done"/> + <field name="act_to" ref="act_cancel"/> + <field name="condition">check_move_cancel()</field> + </record> + + </data> +</openerp> diff --git a/addons/mrp_procurement/process/procurement_process.xml b/addons/mrp_procurement/process/procurement_process.xml new file mode 100644 index 00000000000..21f953c6a6f --- /dev/null +++ b/addons/mrp_procurement/process/procurement_process.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" ?> +<openerp> + <data> + + <!-- + Process + --> + + <record id="process_process_procurementprocess0" model="process.process"> + <field eval=""""Procurement"""" name="name"/> + <field name="model_id" ref="mrp_procurement.model_mrp_procurement"/> + <field eval="1" name="active"/> + </record> + + <!-- + Process Node + --> + + + </data> +</openerp> diff --git a/addons/mrp/schedulers.py b/addons/mrp_procurement/schedulers.py index cc482d95c52..7a89723e5ca 100644 --- a/addons/mrp/schedulers.py +++ b/addons/mrp_procurement/schedulers.py @@ -238,4 +238,5 @@ class mrp_procurement(osv.osv): cr.close() return {} mrp_procurement() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/scripts/scheduler.py b/addons/mrp_procurement/scripts/scheduler.py index d95e8246c70..d95e8246c70 100644 --- a/addons/mrp/scripts/scheduler.py +++ b/addons/mrp_procurement/scripts/scheduler.py diff --git a/addons/mrp_procurement/security/ir.model.access.csv b/addons/mrp_procurement/security/ir.model.access.csv new file mode 100644 index 00000000000..ce022a730b0 --- /dev/null +++ b/addons/mrp_procurement/security/ir.model.access.csv @@ -0,0 +1,9 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_mrp_property_group","mrp.property.group","model_mrp_property_group",,1,0,0,0 +"access_mrp_property","mrp.property","model_mrp_property",,1,0,0,0 +"access_mrp_procurement","mrp.procurement","model_mrp_procurement",,1,0,0,0 +"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint",,1,0,0,0 +"access_mrp_procurement_compute_all","mrp.procurement.compute.all","model_mrp_procurement_compute_all",,1,0,0,0 +"access_mrp_procurement_orderpoint_compute","mrp.procurement.orderpoint.compute","model_mrp_procurement_orderpoint_compute",,1,0,0,0 +"access_mrp_make_procurement","make.procurement","model_make_procurement",,1,0,0,0 +"access_mrp_make_procurement","mrp.procurement.compute","model_mrp_procurement_compute",,1,0,0,0 diff --git a/addons/mrp_procurement/security/mrp_procurement_security.xml b/addons/mrp_procurement/security/mrp_procurement_security.xml new file mode 100644 index 00000000000..a0f2ef431bf --- /dev/null +++ b/addons/mrp_procurement/security/mrp_procurement_security.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data noupdate="0"> + + <record model="ir.rule" id="mrp_procurement_rule"> + <field name="name">mrp_procurement multi-company</field> + <field name="model_id" search="[('model','=','mrp.procurement')]" model="ir.model"/> + <field name="global" eval="True"/> + <field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field> + </record> + + <record model="ir.rule" id="stock_warehouse_orderpoint_rule"> + <field name="name">stock_warehouse.orderpoint multi-company</field> + <field name="model_id" search="[('model','=','stock.warehouse.orderpoint')]" model="ir.model"/> + <field name="global" eval="True"/> + <field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field> + </record> + + </data> +</openerp>
\ No newline at end of file diff --git a/addons/mrp_procurement/wizard/__init__.py b/addons/mrp_procurement/wizard/__init__.py new file mode 100644 index 00000000000..ae70ffbf941 --- /dev/null +++ b/addons/mrp_procurement/wizard/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +import orderpoint_procurement +import mrp_procurement +import schedulers_all +import make_procurement_product + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/wizard/make_procurement_product.py b/addons/mrp_procurement/wizard/make_procurement_product.py index a2dd62327bb..96f00b89eb4 100644 --- a/addons/mrp/wizard/make_procurement_product.py +++ b/addons/mrp_procurement/wizard/make_procurement_product.py @@ -83,8 +83,8 @@ class make_procurement(osv.osv_memory): wf_service.trg_validate(uid, 'mrp.procurement', procure_id, 'button_confirm', cr) - id2 = data_obj._get_id(cr, uid, 'mrp', 'mrp_procurement_tree_view') - id3 = data_obj._get_id(cr, uid, 'mrp', 'mrp_procurement_form_view') + id2 = data_obj._get_id(cr, uid, 'mrp_procurement', 'mrp_procurement_tree_view') + id3 = data_obj._get_id(cr, uid, 'mrp_procurement', 'mrp_procurement_form_view') if id2: id2 = data_obj.browse(cr, uid, id2, context=context).res_id diff --git a/addons/mrp/wizard/make_procurement_view.xml b/addons/mrp_procurement/wizard/make_procurement_view.xml index e98f1c013a0..e98f1c013a0 100644 --- a/addons/mrp/wizard/make_procurement_view.xml +++ b/addons/mrp_procurement/wizard/make_procurement_view.xml diff --git a/addons/mrp/wizard/mrp_procurement.py b/addons/mrp_procurement/wizard/mrp_procurement.py index 1c3f3dd5c8a..1c3f3dd5c8a 100644 --- a/addons/mrp/wizard/mrp_procurement.py +++ b/addons/mrp_procurement/wizard/mrp_procurement.py diff --git a/addons/mrp/wizard/mrp_procurement_view.xml b/addons/mrp_procurement/wizard/mrp_procurement_view.xml index 817f7011e0c..817f7011e0c 100644 --- a/addons/mrp/wizard/mrp_procurement_view.xml +++ b/addons/mrp_procurement/wizard/mrp_procurement_view.xml diff --git a/addons/mrp/wizard/orderpoint_procurement.py b/addons/mrp_procurement/wizard/orderpoint_procurement.py index 56302660939..56302660939 100644 --- a/addons/mrp/wizard/orderpoint_procurement.py +++ b/addons/mrp_procurement/wizard/orderpoint_procurement.py diff --git a/addons/mrp/wizard/orderpoint_procurement_view.xml b/addons/mrp_procurement/wizard/orderpoint_procurement_view.xml index c17bedae84f..c17bedae84f 100644 --- a/addons/mrp/wizard/orderpoint_procurement_view.xml +++ b/addons/mrp_procurement/wizard/orderpoint_procurement_view.xml diff --git a/addons/mrp/wizard/schedulers_all.py b/addons/mrp_procurement/wizard/schedulers_all.py index ad67b1330d0..ad67b1330d0 100644 --- a/addons/mrp/wizard/schedulers_all.py +++ b/addons/mrp_procurement/wizard/schedulers_all.py diff --git a/addons/mrp/wizard/schedulers_all_view.xml b/addons/mrp_procurement/wizard/schedulers_all_view.xml index b8b465e03e9..33861287278 100644 --- a/addons/mrp/wizard/schedulers_all_view.xml +++ b/addons/mrp_procurement/wizard/schedulers_all_view.xml @@ -30,8 +30,5 @@ key2="client_action_multi" id="action_compute_schedulers"/> - <menuitem id="menu_mrp_scheduler" name="Schedulers" parent="base.menu_mrp_root" sequence="4"/> - <menuitem action="action_compute_schedulers" id="mrp_Sched_all" parent="mrp.menu_mrp_scheduler" sequence="90"/> - </data> </openerp> diff --git a/addons/mrp_repair/mrp_repair_view.xml b/addons/mrp_repair/mrp_repair_view.xml index 9f629ad8a46..667e9763827 100644 --- a/addons/mrp_repair/mrp_repair_view.xml +++ b/addons/mrp_repair/mrp_repair_view.xml @@ -115,7 +115,7 @@ <field name="invoiced"/> </group> <newline/> - <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','>>','purchase')]"/> + <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/> </page> <page string="History" groups="base.group_extended"> <field colspan="4" name="invoice_line_id" /> diff --git a/addons/mrp_repair/wizard/cancel_repair.py b/addons/mrp_repair/wizard/cancel_repair.py index 371b7ba82e3..ecc88ef6aae 100644 --- a/addons/mrp_repair/wizard/cancel_repair.py +++ b/addons/mrp_repair/wizard/cancel_repair.py @@ -57,23 +57,24 @@ class repair_cancel(osv.osv_memory): @param context: A standard dictionary @return: New arch of view. """ - record_id = context and context.get('active_id', False) or False res = super(repair_cancel, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) - if record_id: - try: - repair_order = self.pool.get('mrp.repair').browse(cr, uid, record_id) - if not repair_order.invoiced: - res['arch'] = """ <form string="Cancel Repair" colspan="4"> - <group col="2" colspan="2"> - <label string="Do you want to continue?" colspan="4"/> - <separator colspan="4"/> - <button icon="gtk-cancel" special="cancel" string="No" readonly="0"/> - <button name="cancel_repair" string="Yes" type="object" icon="gtk-ok"/> - </group> - </form> - """ - except: - return res + record_id = context and context.get('active_id', False) or False + active_model = context.get('active_model') + + if not record_id or (active_model and active_model != 'mrp.repair'): + return res + + repair_order = self.pool.get('mrp.repair').browse(cr, uid, record_id) + if not repair_order.invoiced: + res['arch'] = """ <form string="Cancel Repair" colspan="4"> + <group col="2" colspan="2"> + <label string="Do you want to continue?" colspan="4"/> + <separator colspan="4"/> + <button icon="gtk-cancel" special="cancel" string="No" readonly="0"/> + <button name="cancel_repair" string="Yes" type="object" icon="gtk-ok"/> + </group> + </form> + """ return res repair_cancel() diff --git a/addons/point_of_sale/__init__.py b/addons/point_of_sale/__init__.py index 1a83d3f3b44..0baf4639019 100644 --- a/addons/point_of_sale/__init__.py +++ b/addons/point_of_sale/__init__.py @@ -21,11 +21,11 @@ ############################################################################## import pos +import account_bank_statement +import pos_account_bank_statement import stock import wizard import report -import pos_account_bank_statement -import account_bank_statement # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index 95228bb044c..111702c2e74 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -37,7 +37,6 @@ Main features : """, 'author': 'Tiny', 'depends': ['sale', 'delivery'], -# 'depends': ['sale', 'purchase', 'account', 'account_tax_include','board','mrp','board_manufacturing','delivery','profile_manufacturing','account','multi_company'], 'init_xml': [], 'update_xml': [ @@ -63,8 +62,9 @@ Main features : 'wizard/pos_payment_report.xml', 'wizard/pos_payment.xml', 'wizard/pos_scan_product_view.xml', + 'wizard/pos_return_view.xml', 'pos_report.xml', - 'pos_wizard.xml', + # 'pos_wizard.xml', 'pos_view.xml', 'pos_sequence.xml', 'posrule_data.xml', @@ -73,7 +73,6 @@ Main features : 'statement_view.xml', 'statement_report.xml', 'statement_data.xml', - 'statement_wizard.xml', ], 'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml'], 'installable': True, diff --git a/addons/point_of_sale/multi_company_demo.xml b/addons/point_of_sale/multi_company_demo.xml index dfc59cc09c8..e0e58ad75d7 100644 --- a/addons/point_of_sale/multi_company_demo.xml +++ b/addons/point_of_sale/multi_company_demo.xml @@ -2,11 +2,10 @@ <openerp> <data noupdate="0"> <record id="second_partner" model="res.partner"> - <field name="name">Tiny Editor</field> + <field name="name">OpenERP Editor</field> </record> - <record id="second_company" model="res.company"> - <field name="name">Tiny Editor</field> + <field name="name">OpenERP Editor</field> <field name="partner_id" ref="base.main_partner"/> <field name="parent_id" ref="base.main_company"/> <field name="rml_header1">Free Business Solutions</field> @@ -15,24 +14,19 @@ <field name="currency_id" ref="base.EUR"/> </record> - <record id="ter_partner" model="res.partner"> - <field name="name">Tiny Integrator</field> + <field name="name">OpenERP Integrator</field> </record> <record id="ter_company" model="res.company"> - <field name="name">Tiny Integrator</field> + <field name="name">OpenERP Integrator</field> <field name="partner_id" ref="base.main_partner"/> <field name="parent_id" ref="base.main_company"/> <field name="rml_header1">Free Business Solutions</field> <field name="rml_footer1">Web: http://tiny.be - Tel: (+32).81.81.37.00 - Bank: CPH 126-2013269-07</field> <field name="rml_footer2">IBAN: BE74 1262 0132 6907 - SWIFT: GKCCBEBB - VAT: BE0477.472.701</field> <field name="currency_id" ref="base.EUR"/> - </record> - - - </data> </openerp> diff --git a/addons/point_of_sale/multi_company_stock_data.xml b/addons/point_of_sale/multi_company_stock_data.xml index 539a27ff1a2..a74ea0a56e9 100644 --- a/addons/point_of_sale/multi_company_stock_data.xml +++ b/addons/point_of_sale/multi_company_stock_data.xml @@ -2,104 +2,6 @@ <openerp> <data> - <!-- <record id="res_partner_tinyshop0" model="res.partner"> - <field eval="0" name="customer"/> - <field eval="0" name="supplier"/> - <field eval="1" name="active"/> - <field eval=""""Tiny Shop 1"""" name="name"/> - </record> - <record id="res_partner_address_fabien0" model="res.partner.address"> - <field eval=""""Fabien"""" name="name"/> - <field eval=""""92000"""" name="zip"/> - <field eval=""""M."""" name="title"/> - <field name="partner_id" ref="res_partner_tinyshop0"/> - <field name="country_id" ref="base.fr"/> - <field eval=""""Avenue de Paris"""" name="street"/> - <field eval="1" name="active"/> - <field eval=""""default"""" name="type"/> - </record> - <record id="res_company_shop0" model="res.company"> - <field eval="5.0" name="security_lead"/> - <field name="currency_id" ref="base.EUR"/> - <field eval="1.0" name="po_lead"/> - <field name="partner_id" ref="res_partner_tinyshop0"/> - <field eval="1.0" name="manufacturing_lead"/> - <field name="parent_id" ref="base.main_company"/> - <field eval="80.0" name="schedule_range"/> - <field eval=""""Shop 1"""" name="name"/> - - </record> - <record id="res_partner_tinyshop1" model="res.partner"> - <field eval="1" name="customer"/> - <field eval="0" name="supplier"/> - <field eval="1" name="active"/> - <field eval=""""Tiny Shop 2"""" name="name"/> - </record> - <record id="res_partner_address_eric0" model="res.partner.address"> - <field eval=""""Eric"""" name="name"/> - <field eval=""""1500"""" name="zip"/> - <field eval=""""M."""" name="title"/> - <field name="partner_id" ref="res_partner_tinyshop1"/> - <field name="country_id" ref="base.fr"/> - <field eval=""""Avenue de la Resistance"""" name="street"/> - <field eval="1" name="active"/> - <field eval=""""default"""" name="type"/> - <field name="partner_id" ref="res_partner_tinyshop1"/> - <field eval="1" name="active"/> - </record> - <record id="res_company_tinyshop0" model="res.company"> - <field name="currency_id" ref="base.EUR"/> - <field eval="1.0" name="po_lead"/> - <field name="partner_id" ref="res_partner_tinyshop1"/> - <field eval="1.0" name="manufacturing_lead"/> - <field name="parent_id" ref="base.main_company"/> - <field eval="80.0" name="schedule_range"/> - <field eval=""""Shop 2"""" name="name"/> - </record> - - - <record id="res_users_shopuser0" model="res.users"> - <field model="ir.actions.actions" name="menu_id" search="[('name','=','Menu')]"/> - <field eval="[(6,0,[ref('base.group_partner_manager')])]" name="groups_id"/> - <field model="res.partner.address" name="address_id" search="[('name','=','Fabien')]"/> - <field eval="[(6,0,[ref('purchase.res_roles_purchase0'),ref('sale.res_roles_salesman0')])]" name="roles_id"/> - <field eval="1" name="active"/> - <field eval=""""shop1"""" name="password"/> - <field eval=""""en_US"""" name="context_lang"/> - <field eval=""""Shop 1 User"""" name="name"/> - <field name="company_id" ref="res_company_shop0"/> - <field eval=""""shop1"""" name="login"/> - <field model="ir.actions.actions" name="action_id" search="[('name','=','Menu')]"/> - </record> - <record id="res_users_shopuser1" model="res.users"> - <field model="ir.actions.actions" name="menu_id" search="[('name','=','Menu')]"/> - <field eval="[(6,0,[ref('base.group_partner_manager')])]" name="groups_id"/> - <field model="res.partner.address" name="address_id" search="[('name','=','Eric')]"/> - <field eval=""""shop2"""" name="password"/> - <field eval=""""Shop 2 User"""" name="name"/> - <field name="company_id" ref="res_company_tinyshop0"/> - <field eval=""""shop2"""" name="login"/> - <field model="ir.actions.actions" name="action_id" search="[('name','=','Menu')]"/> - </record> - - <record id="res_groups_posuserposline0" model="res.groups"> - <field eval="[(6,0,[ref('res_users_shopuser0'),ref('res_users_shopuser1')])]" name="users"/> - <field eval=""""POS_user_pos_line"""" name="name"/> - </record> - - <record id="res_groups_posuser0" model="res.groups"> - <field eval="[(6,0,[ref('res_users_shopuser0'),ref('res_users_shopuser1')])]" name="users"/> - <field eval=""""POS_user"""" name="name"/> - </record>--> - - <record forcecreate="True" id="property_product_pricelist_multi" model="ir.property"> - <field name="name">property_product_pricelist</field> - <field name="fields_id" search="[('model','=','res.partner'),('name','=','property_product_pricelist')]"/> - <field eval="'product.pricelist,'+str(ref('product.list0'))" name="value"/> - <field name="company_id" ref="res_company_shop0"/> - </record> - - <record forcecreate="True" id="property_stock_account_output_prd_multi" model="ir.property"> <field name="name">property_stock_account_output</field> <field name="fields_id" search="[('model','=','product.template'),('name','=','property_stock_account_output')]"/> diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index c87efa486b3..ede0f7bd15c 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -28,7 +28,7 @@ from tools.translate import _ from decimal import Decimal import tools import re - +import decimal_precision as dp class pos_config_journal(osv.osv): @@ -43,40 +43,14 @@ class pos_config_journal(osv.osv): } pos_config_journal() - -class res_mode_contact(osv.osv): - - """ Contact mode for Partner """ - - _name = "res.mode.contact" - _description = "Contact mode" - - _columns={ - 'name': fields.char('Mode', size=64, select=1), - 'active': fields.boolean('Active', select=2), - } -res_mode_contact() - -class contact_mode_partner(osv.osv): - - - _inherit = 'res.partner' - _columns = { - 'contact_mode_id': fields.many2one('res.mode.contact','Contact Mode'), - } -contact_mode_partner() - - class pos_company_discount(osv.osv): """ Company Discount and Cashboxes """ _inherit = 'res.company' _columns = { - 'company_discount': fields.float('Max Discount(%)', digits=(16,2)), - 'max_diff': fields.float('Max Difference for Cashboxes', digits=(16,2)), - 'account_receivable': fields.many2one('account.account', - 'Default Receivable', states={'draft': [('readonly', False)]}), + 'company_discount': fields.float('Max Discount(%)', digits_compute= dp.get_precision('Point Of Sale')), + 'max_diff': fields.float('Max Difference for Cashboxes', digits_compute= dp.get_precision('Point Of Sale Discount')), } pos_company_discount() @@ -149,7 +123,7 @@ class pos_order(osv.osv): tot =0.0 val=None for order in self.browse(cr, uid, ids): - cr.execute("select date_payment2 from pos_order where id=%d"%(order.id)) + cr.execute("select date_payment from pos_order where id=%d"%(order.id)) date_p=cr.fetchone() date_p=date_p and date_p[0] or None if date_p: @@ -176,7 +150,7 @@ class pos_order(osv.osv): tot =0.0 val=None for order in self.browse(cr, uid, ids): - cr.execute("select date_payment from pos_order where id=%d"%(order.id)) + cr.execute("select date_validation from pos_order where id=%d"%(order.id)) date_p=cr.fetchone() date_p=date_p and date_p[0] or None if date_p: @@ -199,65 +173,35 @@ class pos_order(osv.osv): res[order.id]=val return res - def _amount_tax(self, cr, uid, ids, field_name, arg, context): - - """ Calculates Taxes of order - @return: Dictionary of values """ - - res = {} - tax_obj = self.pool.get('account.tax') + def _amount_all(self, cr, uid, ids, name, args, context=None): + tax_obj = self.pool.get('account.tax') + res={} for order in self.browse(cr, uid, ids): - val = 0.0 + res[order.id] = { + 'amount_paid': 0.0, + 'amount_return':0.0, + 'amount_tax':0.0, + } + for payment in order.statement_ids: + res[order.id]['amount_paid'] += payment.amount + for payment in order.payments: + res[order.id]['amount_return'] += (payment.amount < 0 and payment.amount or 0) for line in order.lines: if order.price_type!='tax_excluded': - val = reduce(lambda x, y: x+round(y['amount'], 2), + res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2), tax_obj.compute_inv(cr, uid, line.product_id.taxes_id, line.price_unit * \ (1-(line.discount or 0.0)/100.0), line.qty), - val) + res[order.id]['amount_tax']) else: - val = reduce(lambda x, y: x+round(y['amount'], 2), + res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2), tax_obj.compute(cr, uid, line.product_id.taxes_id, line.price_unit * \ (1-(line.discount or 0.0)/100.0), line.qty), - val) - - res[order.id] = val + res[order.id]['amount_tax']) return res - - def _total_payment(self, cr, uid, ids, field_name, arg, context): - - """ Calculates Total payment of order - @return: Dictionary of values """ - - res = {} - i=0 - for order in self.browse(cr, uid, ids): - val = 0.0 - for payment in order.statement_ids: - val += payment.amount - res[order.id] = val - return res - return {order.id:val} - - def _total_return(self, cr, uid, ids, field_name, arg, context): - """ Calculates Total Returned from the order - @return: Dictionary of values """ - - res = {} - for order in self.browse(cr, uid, ids): - val = 0.0 - for payment in order.payments: - val += (payment.amount < 0 and payment.amount or 0) - res[order.id] = val - return res -# def payment_get(self, cr, uid, ids, context=None): -# """ Calculates Total Returned from the order -# @return: Dictionary of values """ -# cr.execute("select id from pos_payment where order_id =ANY(%s)",(ids,)) -# return [i[0] for i in cr.fetchall()] def _sale_journal_get(self, cr, uid, context): @@ -279,13 +223,10 @@ class pos_order(osv.osv): company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id res = self.pool.get('sale.shop').search(cr, uid, []) - # res = self.pool.get('sale.shop').search(cr, uid, [('company_id', '=', company.id)]) if res: return res[0] else: return False - - def copy(self, cr, uid, id, default=None, context={}): if not default: @@ -342,16 +283,16 @@ class pos_order(osv.osv): 'shop_id': fields.many2one('sale.shop', 'Shop', required=True, states={'draft': [('readonly', False)]}, readonly=True), 'date_order': fields.datetime('Date Ordered', readonly=True), - 'date_payment': fields.function(_get_date_payment, method=True, string='Validation Date', type='date', store=True), - 'date_payment2': fields.function(_get_date_payment2, method=True, string='Payment Date', type='date', store=True), + 'date_validation': fields.function(_get_date_payment, method=True, string='Validation Date', type='date', store=True), + 'date_payment': fields.function(_get_date_payment2, method=True, string='Payment Date', type='date', store=True), 'date_validity': fields.date('Validity Date', required=True), 'user_id': fields.many2one('res.users', 'Connected Salesman', readonly=True), - 'user_id1': fields.many2one('res.users', 'Salesman', required=True), - 'user_id2': fields.many2one('res.users', 'Salesman Manager'), - 'amount_tax': fields.function(_amount_tax, method=True, string='Taxes'), + 'user_salesman_id': fields.many2one('res.users', 'Salesman', required=True), + 'sale_manager': fields.many2one('res.users', 'Salesman Manager'), + 'amount_tax': fields.function(_amount_all, method=True, string='Taxes',digits_compute=dp.get_precision('Point Of Sale'), multi='all'), 'amount_total': fields.function(_amount_total, method=True, string='Total'), - 'amount_paid': fields.function(_total_payment, 'Paid', states={'draft': [('readonly', False)]}, readonly=True, method=True), - 'amount_return': fields.function(_total_return, 'Returned', method=True), + 'amount_paid': fields.function(_amount_all, 'Paid', states={'draft': [('readonly', False)]}, readonly=True, method=True,digits_compute=dp.get_precision('Point Of Sale'), multi='all'), + 'amount_return': fields.function(_amount_all, 'Returned', method=True,digits_compute=dp.get_precision('Point Of Sale'), multi='all'), 'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True), 'price_type': fields.selection([ ('tax_excluded','Tax excluded') @@ -371,19 +312,9 @@ class pos_order(osv.osv): 'first_name': fields.char('First Name', size=64), 'state_2': fields.function(_get_v,type='selection',selection=[('to_verify', 'To Verify'), ('accepted', 'Accepted'), ('refused', 'Refused')], string='State', readonly=True, method=True, store=True), - - # 'last_name': fields.char('Last Name', size=64), - # 'street': fields.char('Street', size=64), - # 'zip2': fields.char('Zip', size=64), - # 'city': fields.char('City', size=64), - # 'mobile': fields.char('Mobile', size=64), - # 'email': fields.char('Email', size=64), 'note': fields.text('Internal Notes'), 'nb_print': fields.integer('Number of Print', readonly=True), 'sale_journal': fields.many2one('account.journal', 'Journal', required=True, states={'draft': [('readonly', False)]}, readonly=True, ), - # 'account_receivable': fields.many2one('account.account', - # 'Default Receivable', required=True, states={'draft': [('readonly', False)]}, - # readonly=True, ), 'invoice_wanted': fields.boolean('Create Invoice'), 'note_2': fields.char('Customer Note',size=64), 'type_rec': fields.char('Type of Receipt',size=64), @@ -419,7 +350,7 @@ class pos_order(osv.osv): _defaults = { 'user_id': lambda self, cr, uid, context: uid, - 'user_id2': lambda self, cr, uid, context: uid, + 'sale_manager': lambda self, cr, uid, context: uid, 'state': lambda *a: 'draft', 'price_type': lambda *a: 'tax_excluded', 'state_2': lambda *a: 'to_verify', @@ -565,12 +496,12 @@ class pos_order(osv.osv): if line.product_id and line.product_id.type=='service': continue prop_ids = self.pool.get("ir.property").search(cr, uid, [('name', '=', 'property_stock_customer')]) - val = self.pool.get("ir.property").browse(cr, uid, prop_ids[0]).value + val = self.pool.get("ir.property").browse(cr, uid, prop_ids[0]).value_reference cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order.shop_id.warehouse_id.id)) res=cr.fetchone() location_id=res and res[0] or None # location_id = order and order.shop_id and order.shop_id.warehouse_id and order.shop_id.warehouse_id.lot_stock_id.id or None - stock_dest_id = int(val.split(',')[1]) + stock_dest_id = val.id if line.qty < 0: location_id, stock_dest_id = stock_dest_id, location_id @@ -626,7 +557,7 @@ class pos_order(osv.osv): def button_validate(self, cr, uid, ids, *args): - """ Check the access for the sale order and update the date_payment + """ Check the access for the sale order and update the date_validation @return: True """ res_obj = self.pool.get('res.company') @@ -637,12 +568,12 @@ class pos_order(osv.osv): if part_company: raise osv.except_osv(_('Error'), _('You don\'t have enough access to validate this sale!')) for order in self.browse(cr, uid, ids): - if not order.date_payment: + if not order.date_validation: cr.execute("select max(date) from account_bank_statement_line where pos_statement_id=%d"%(order.id)) val=cr.fetchone() val=val and val[0] or None if val: - cr.execute("Update pos_order set date_payment='%s' where id = %d"%(val, order.id)) + cr.execute("Update pos_order set date_validation='%s' where id = %d"%(val, order.id)) return True @@ -679,7 +610,7 @@ class pos_order(osv.osv): if 'payment_name' in data.keys(): args['name'] = data['payment_name'] + ' ' +order.name account_def = self.pool.get('ir.property').get(cr, uid, 'property_account_receivable', 'res.partner', context=context) - args['account_id'] = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def or curr_c.account_receivable.id + args['account_id'] = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def.id or curr_c.account_receivable.id if data.get('is_acc',False): args['is_acc']=data['is_acc'] args['account_id']= prod_obj.browse(cr,uid, data['product_id']).property_account_income and prod_obj.browse(cr,uid, data['product_id']).property_account_income.id @@ -772,7 +703,7 @@ class pos_order(osv.osv): inv_ids = [] for order in self.browse(cr, uid, ids, context): - curr_c = order.user_id1.company_id + curr_c = order.user_salesman_id.company_id if order.invoice_id: inv_ids.append(order.invoice_id.id) continue @@ -780,9 +711,7 @@ class pos_order(osv.osv): if not order.partner_id: raise osv.except_osv(_('Error'), _('Please provide a partner for the sale.')) - cr.execute('select a.id from account_account a, res_company p where p.account_receivable=a.id and p.id=%s', (curr_c.id, )) - res=cr.fetchone() - acc=res and res[0] or None + acc= order.partner_id.property_account_receivable.id inv = { 'name': 'Invoice from POS: '+order.name, 'origin': order.name, @@ -834,15 +763,17 @@ class pos_order(osv.osv): account_move_line_obj = self.pool.get('account.move.line') account_period_obj = self.pool.get('account.period') account_tax_obj = self.pool.get('account.tax') + res_obj=self.pool.get('res.users') + property_obj=self.pool.get('ir.property') period = account_period_obj.find(cr, uid, context=context)[0] for order in self.browse(cr, uid, ids, context=context): - curr_c = self.pool.get('res.users').browse(cr, uid, uid).company_id - comp_id = self.pool.get('res.users').browse(cr, order.user_id.id, order.user_id.id).company_id + curr_c =res_obj.browse(cr, uid, uid).company_id + comp_id = res_obj.browse(cr, order.user_id.id, order.user_id.id).company_id comp_id=comp_id and comp_id.id or False to_reconcile = [] group_tax = {} - account_def = self.pool.get('ir.property').get(cr, uid, 'property_account_receivable', 'res.partner', context=context) + account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context) order_account = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def or curr_c.account_receivable.id # Create an entry for the sale @@ -1028,9 +959,8 @@ class pos_order(osv.osv): 'statement_id': False, 'account_id':order_account }) - # account_move_obj.button_validate(cr, uid, [move_id, payment_move_id], context=context) + self.write(cr,uid,order.id,{'state':'done'}) - # account_move_line_obj.reconcile(cr, uid, to_reconcile, type='manual', context=context) return True def cancel_picking(self, cr, uid, ids, context=None): @@ -1042,6 +972,7 @@ class pos_order(osv.osv): def action_payment(self, cr, uid, ids, context=None): vals = {'state': 'payment'} + sequence_obj=self.pool.get('ir.sequence') for pos in self.browse(cr, uid, ids): create_contract_nb = False for line in pos.lines: @@ -1049,8 +980,8 @@ class pos_order(osv.osv): create_contract_nb = True break if create_contract_nb: - seq = self.pool.get('ir.sequence').get(cr, uid, 'pos.user_%s' % pos.user_id1.login) - vals['contract_number'] ='%s-%s' % (pos.user_id1.login, seq) + seq = sequence_obj.get(cr, uid, 'pos.user_%s' % pos.user_salesman_id.login) + vals['contract_number'] ='%s-%s' % (pos.user_salesman_id.login, seq) self.write(cr, uid, ids, vals) def action_paid(self, cr, uid, ids, context=None): @@ -1071,7 +1002,6 @@ class pos_order(osv.osv): for order in self.browse(cr, uid, ids, context=context): if not order.journal_entry: self.create_account_move(cr, uid, ids, context={}) - #self.write(cr, uid, ids, {'state': 'done'}) return True def compute_state(self, cr, uid, id): @@ -1145,7 +1075,6 @@ class pos_order_line(osv.osv): price = self.price_by_product(cr, uid, ids, line.order_id.pricelist_id.id, line.product_id.id, line.qty, line.order_id.partner_id.id) if line.discount!=0.0: res[line.id] = line.price_unit * line.qty * (1 - (line.discount or 0.0) / 100.0) -# res[line.id] = price * line.qty * (1 - (line.discount or 0.0) / 100.0) else: res[line.id]=line.price_unit*line.qty return res @@ -1181,7 +1110,7 @@ class pos_order_line(osv.osv): disc=0.0 if (disc != 0.0 or prod_id) and price_f>0: disc=100-(price/price_f*100) - return {'value':{'discount':disc, 'price_unit':price_f}}#,'notice':''}}#, 'price_subtotal':(price_f*qty*(1-disc))}} + return {'value':{'discount':disc, 'price_unit':price_f}} return {} def onchange_ded(self, cr, uid,ids, val_ded,price_u,*a): @@ -1218,11 +1147,9 @@ class pos_order_line(osv.osv): 'company_id':fields.many2one('res.company', 'Company', required=True), 'notice': fields.char('Discount Notice', size=128, required=True), 'serial_number': fields.char('Serial Number', size=128), -# 'contract_number': fields.char('Contract Number', size=512), 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True), -# 'price_unit': fields.float('Unit Price'), 'price_unit': fields.function(_get_amount, method=True, string='Unit Price', store=True), - 'price_ded': fields.float('Discount(Amount)'), + 'price_ded': fields.float('Discount(Amount)',digits_compute=dp.get_precision('Point Of Sale')), 'qty': fields.float('Quantity'), 'qty_rfd': fields.float('Refunded Quantity'), 'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal w/o Tax'), @@ -1283,7 +1210,7 @@ class pos_order_line(osv.osv): } line_id = self.create(cr, uid, vals) if not line_id: - raise wizard.except_wizard(_('Error'), _('Create line failed !')) + raise osv.except_osv(_('Error'), _('Create line failed !')) else: vals = { 'qty': qty, @@ -1348,226 +1275,8 @@ class pos_payment(osv.osv): pos_payment() - -class report_transaction_pos(osv.osv): - _name = "report.transaction.pos" - _description = "transaction for the pos" - _auto = False - _columns = { - 'date_create': fields.char('Date', size=16, readonly=True), - 'journal_id': fields.many2one('account.journal', 'Sales Journal', readonly=True), - 'jl_id': fields.many2one('account.journal', 'Cash Journals', readonly=True), - 'user_id': fields.many2one('res.users', 'User', readonly=True), - 'no_trans': fields.float('Number of Transaction', readonly=True), - 'amount': fields.float('Amount', readonly=True), - 'invoice_id': fields.float('Nbr Invoice', readonly=True), - 'invoice_am': fields.float('Invoice Amount', readonly=True), - 'product_nb': fields.float('Product Nb.', readonly=True), - 'disc': fields.float('Disc.', readonly=True), - } - - def init(self, cr): - tools.drop_view_if_exists(cr, 'report_transaction_pos') - cr.execute(""" - create or replace view report_transaction_pos as ( - select - min(absl.id) as id, - count(absl.id) as no_trans, - sum(absl.amount) as amount, - sum(line.price_ded) as disc, - to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text as date_create, - po.user_id as user_id, - po.sale_journal as journal_id, - abs.journal_id as jl_id, - count(po.invoice_id) as invoice_id, - count(p.id) as product_nb - from - account_bank_statement_line as absl, - account_bank_statement as abs, - product_product as p, - pos_order_line as line, - pos_order as po - where - absl.pos_statement_id = po.id and - line.order_id=po.id and - line.product_id=p.id and - absl.statement_id=abs.id - - group by - po.user_id,po.sale_journal, abs.journal_id, - to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text - ) - """) - #to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD') - #to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text as date_create, -report_transaction_pos() - -class report_sales_by_user_pos(osv.osv): - _name = "report.sales.by.user.pos" - _description = "Sales by user" - _auto = False - _columns = { - 'date_order': fields.date('Order Date',required=True, select=True), - 'amount': fields.float('Total', readonly=True, select=True), - 'qty': fields.float('Quantity', readonly=True, select=True), - 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True), - } - - def init(self, cr): - tools.drop_view_if_exists(cr, 'report_sales_by_user_pos') - cr.execute(""" - create or replace view report_sales_by_user_pos as ( - select - min(po.id) as id, - to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text as date_order, - po.user_id as user_id, - sum(pol.qty)as qty, - sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as amount - from - pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt - where - pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id - group by - to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text, - po.user_id - - ) - """) -report_sales_by_user_pos() - -class report_sales_by_user_pos_month(osv.osv): - _name = "report.sales.by.user.pos.month" - _description = "Sales by user monthly" - _auto = False - _columns = { - 'date_order': fields.date('Order Date',required=True, select=True), - 'amount': fields.float('Total', readonly=True, select=True), - 'qty': fields.float('Quantity', readonly=True, select=True), - 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True), - } - - def init(self, cr): - tools.drop_view_if_exists(cr, 'report_sales_by_user_pos_month') - cr.execute(""" - create or replace view report_sales_by_user_pos_month as ( - select - min(po.id) as id, - to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text as date_order, - po.user_id as user_id, - sum(pol.qty)as qty, - sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as amount - from - pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt - where - pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id - group by - to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text, - po.user_id - - ) - """) -report_sales_by_user_pos_month() - -class report_sales_by_margin_pos(osv.osv): - _name = "report.sales.by.margin.pos" - _description = "Sales by margin" - _auto = False - _columns = { -# 'pos_name': fields.char('POS Order', size=64, readonly=True), - 'product_name':fields.char('Product Name', size=64, readonly=True), - 'date_order': fields.date('Order Date',required=True, select=True), - # 'amount': fields.float('Total', readonly=True, select=True), - 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True), - 'qty': fields.float('Qty', readonly=True, select=True), - 'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True), - 'total':fields.float('Margin', readonly=True, select=True), - - } - - def init(self, cr): - tools.drop_view_if_exists(cr, 'report_sales_by_margin_pos') - cr.execute(""" - create or replace view report_sales_by_margin_pos as ( - select - min(pol.id) as id, - po.user_id as user_id, - pt.name as product_name, - to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text as date_order, - sum(pol.qty) as qty, - pt.list_price-pt.standard_price as net_margin_per_qty, - (pt.list_price-pt.standard_price) *sum(pol.qty) as total - from - product_template as pt, - product_product as pp, - pos_order_line as pol, - pos_order as po - where - pol.product_id = pp.product_tmpl_id and - pp.product_tmpl_id = pt.id and - po.id = pol.order_id - - group by - pt.name, - pt.list_price, - pt.standard_price, - po.user_id, - to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text - - ) - """) -report_sales_by_margin_pos() - -class report_sales_by_margin_pos_month(osv.osv): - _name = "report.sales.by.margin.pos.month" - _description = "Sales by margin monthly" - _auto = False - _columns = { -# 'pos_name': fields.char('POS Order', size=64, readonly=True), - 'product_name':fields.char('Product Name', size=64, readonly=True), - 'date_order': fields.date('Order Date',required=True, select=True), - #'amount': fields.float('Total', readonly=True, select=True), - 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True), - 'qty': fields.float('Qty', readonly=True, select=True), - 'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True), - 'total':fields.float('Margin', readonly=True, select=True), - - } - - def init(self, cr): - tools.drop_view_if_exists(cr, 'report_sales_by_margin_pos_month') - cr.execute(""" - create or replace view report_sales_by_margin_pos_month as ( - select - min(pol.id) as id, - po.user_id as user_id, - pt.name as product_name, - to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text as date_order, - sum(pol.qty) as qty, - pt.list_price-pt.standard_price as net_margin_per_qty, - (pt.list_price-pt.standard_price) *sum(pol.qty) as total - from - product_template as pt, - product_product as pp, - pos_order_line as pol, - pos_order as po - where - pol.product_id = pp.product_tmpl_id and - pp.product_tmpl_id = pt.id and - po.id = pol.order_id - - group by - pt.name, - pt.list_price, - pt.standard_price, - po.user_id, - to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text - - ) - """) -report_sales_by_margin_pos_month() - - class account_move_line(osv.osv): + _inherit = 'account.move.line' def create(self, cr, user, vals, context={}): pos_obj = self.pool.get('pos.order') @@ -1587,7 +1296,9 @@ account_move_line() class account_move(osv.osv): + _inherit = 'account.move' + def create(self, cr, user, vals, context={}): pos_obj = self.pool.get('pos.order') val_name = vals.get('name', '') diff --git a/addons/point_of_sale/pos_account_bank_statement.py b/addons/point_of_sale/pos_account_bank_statement.py index ccce315fe36..60924350014 100644 --- a/addons/point_of_sale/pos_account_bank_statement.py +++ b/addons/point_of_sale/pos_account_bank_statement.py @@ -65,4 +65,3 @@ class account_bank_statement_line(osv.osv): account_bank_statement_line() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/point_of_sale/pos_data.xml b/addons/point_of_sale/pos_data.xml index 8ff4697804e..b36bd0827c2 100644 --- a/addons/point_of_sale/pos_data.xml +++ b/addons/point_of_sale/pos_data.xml @@ -11,7 +11,6 @@ <field name="list_price">0.0</field> <field name="standard_price">0.0</field> <field name="uom_id" ref="product.product_uom_unit"/> - <!-- <field name="company_id" ref="base.main_company"/> --> <field name="uom_po_id" ref="product.product_uom_unit"/> </record> @@ -22,7 +21,6 @@ <field name="list_price">100.0</field> <field name="standard_price">100.0</field> <field name="uom_id" ref="product.product_uom_unit"/> - <!-- <field name="company_id" ref="multi_company_stock.res_company_tinyshop0"/> --> <field name="uom_po_id" ref="product.product_uom_unit"/> </record> diff --git a/addons/point_of_sale/pos_demo.xml b/addons/point_of_sale/pos_demo.xml index 789d96b897d..b75f4362578 100644 --- a/addons/point_of_sale/pos_demo.xml +++ b/addons/point_of_sale/pos_demo.xml @@ -57,8 +57,8 @@ <field name="shop_id" ref="sale.shop"/> <field eval=""""2009-05-29"""" name="date_order"/> <field name="partner_id" ref="base.res_partner_5"/> - <field name="user_id" ref="base.user_root"/> - <field name="user_id1" ref="base.user_root"/> + <field name="user_salesman_id" ref="base.user_root"/> + <field name="sale_manager" ref="base.user_root"/> <field eval=""""POS/001"""" name="name"/> <field name="company_id" ref="res_company_tinyshop0"/> <field eval="0" name="invoice_wanted"/> @@ -93,8 +93,8 @@ <field name="shop_id" ref="sale.shop"/> <field eval=""""2009-05-29"""" name="date_order"/> <field name="partner_id" ref="base.res_partner_3"/> - <field name="user_id" ref="res_users_sofia0"/> - <field name="user_id1" ref="base.user_root"/> + <field name="user_salesman_id" ref="res_users_sofia0"/> + <field name="sale_manager" ref="base.user_root"/> <field eval=""""POS/002"""" name="name"/> <field name="company_id" ref="res_company_shop0"/> <field eval=""""tax_excluded"""" name="price_type"/> @@ -135,8 +135,8 @@ <field eval=""""2009-11-29"""" name="date_validity"/> <field eval=""""2009-05-29"""" name="date_order"/> <field name="partner_id" ref="base.res_partner_3"/> - <field name="user_id" ref="res_users_sofia0"/> - <field name="user_id1" ref="base.user_root"/> + <field name="user_salesman_id" ref="res_users_sofia0"/> + <field name="sale_manager" ref="base.user_root"/> <field eval=""""POS/0012"""" name="name"/> <field name="company_id" ref="res_company_shop0"/> <field eval="0" name="invoice_wanted"/> @@ -144,16 +144,6 @@ <field name="pricelist_id" ref="product.list0"/> <field name="shop_id" ref="sale.shop"/> </record> - -<!-- <record id="pos_order_line_orderlineadv" model="pos.order.line"> - <field eval="0.0" name="discount"/> - <field name="product_id" ref="advance_product_pos"/> - <field eval=""""Order Line/Advance"""" name="name"/> - <field name="order_id" ref="pos_order_posadvance"/> - <field eval="50.0" name="price_unit"/> - <field name="company_id" ref="res_company_shop0"/> - <field eval="-1.0" name="qty"/> - </record--> <record id="data_fiscalyear" model="account.fiscalyear"> <field eval="'Fiscal Year Shop '+time.strftime('%Y')" name="name"/> <field eval="'FY'+time.strftime('%Y')" name="code"/> @@ -194,12 +184,6 @@ do black box testing on entries on this chart of account, without modifying your own chart of account. </field> </record> -<!-- <record id="stock_location.product_pulled_flow_d1" model="product.pulled.flow"> - <field name="partner_addr_id" ref="multi_company_stock.res_partner_address_fabien0"/> - </record> - <record id="stock_location.product_pulled_flow_d2" model="product.pulled.flow"> - <field name="partner_addr_id" ref="multi_company_stock.res_partner_address_eric0"/> - </record--> </data> </openerp> diff --git a/addons/point_of_sale/pos_report.xml b/addons/point_of_sale/pos_report.xml index 2e9ff5e6107..9123502d288 100644 --- a/addons/point_of_sale/pos_report.xml +++ b/addons/point_of_sale/pos_report.xml @@ -1,39 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <openerp> <data> - <!--report - id="pos_receipt" - string="Receipt" - model="pos.order" - name="pos.receipt" - rml="point_of_sale/report/pos_receipt.rml" - auto="False" - header="False" - multi="True" - /--> - - -<!-- - <report - id="pos_receipt_with_remboursment" - string="Refund Receipt" - model="pos.order" - name="pos.receipt.with.remboursment" - rml="point_of_sale/report/pos_receipt_with_remboursment.rml" - auto="False" - header="False" - multi="True" - /> - <report - id="pos_receipt_without_remboursment" - string="Voucher Receipt" - model="pos.order" - name="pos.receipt.without.remboursment" - rml="point_of_sale/report/pos_receipt_without_remboursment.rml" - auto="False" - header="False" - multi="True" - /--> <report id="pos_invoice_report" diff --git a/addons/point_of_sale/pos_view.xml b/addons/point_of_sale/pos_view.xml index c0fc20de128..c36420da08a 100644 --- a/addons/point_of_sale/pos_view.xml +++ b/addons/point_of_sale/pos_view.xml @@ -11,7 +11,7 @@ <notebook > <page string="Order lines"> <group colspan="4" col="6"> - <field name="user_id1" /> + <field name="user_salesman_id" /> <field name="partner_id" on_change="onchange_partner_pricelist(partner_id)"/> <field name="contract_number" select="1" groups="base.group_extended"/> </group> @@ -58,28 +58,14 @@ states="paid, draft" attrs="{'invisible':[('state_2','=','accepted')]}"/> </group> - <separator colspan="4" string="Actions"/> <group colspan="4" col="6"> - <field name="state" select="1"/> - - <!-- - <button name="%(pos_add_product)d" string="_Add product" type="action" states="draft"/> - --> - - <button name="%(action_pos_payment)d" string="Ma_ke Payment" icon="gtk-ok" type="action" states="draft,advance" context="{'record_id':'active_id'}" /> + <button name="%(action_pos_payment)d" string="Ma_ke Payment" icon="gtk-ok" type="action" states="draft,advance" /> <button name="%(action_report_pos_receipt)d" string="_Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/> - - - <!-- - <button name="action_cancel" string="Cancel" type="object" states="paid" /> - --> <button name="set_to_draft" string="Set to draft" states="paid" icon="gtk-execute" type="object" /> - - <button name="%(pos_return_picking)d" string="Return Picking" type="action" icon="gtk-ok" states="paid" - attrs="{'invisible':[('state','!=','paid'),('state','!=','invoiced')]}"/> - + <button name="%(action_view_pos_return)d" string="Return Picking" type="action" icon="gtk-ok" states="paid" + attrs="{'invisible':[('state','!=','paid'),('state','!=','invoiced')]}"/> </group> </page> @@ -90,14 +76,14 @@ <field name="shop_id" widget="selection" /> <field name="name" select="1"/> <field name="user_id" /> - <field name="user_id2" /> + <field name="sale_manager" /> <field name="price_type" /> </group> <group colspan="2" col="2" name="Type"> <separator string="Dates" colspan="4"/> <field name="date_order" select="1" /> - <field name="date_payment" select="1" /> - <field name="date_payment2" select="1" groups="base.group_extended"/> + <field name="date_validation" select="1" /> + <field name="date_payment" select="1" groups="base.group_extended"/> </group> <group colspan="4"> <separator string="Invoicing" colspan="4"/> @@ -122,7 +108,6 @@ </form> </field> </page> - <page string="Notes" > <separator string="Notes" colspan="4" /> <group colspan="4"> @@ -135,8 +120,6 @@ </form> </field> </record> - - <record model="ir.actions.act_window" id="action_pos_pos_form"> <field name="name">Point of Sale</field> <field name="type">ir.actions.act_window</field> @@ -145,8 +128,6 @@ <field name="view_id" ref="view_pos_pos_form"/> <field name="domain">[['date_order','>=',time.strftime('%Y-%m-%d')]]</field> </record> - - <record model="ir.ui.view" id="view_pos_order_tree"> <field name="name">Sales</field> <field name="model">pos.order</field> @@ -155,8 +136,8 @@ <tree string="POS Orders"> <field name="name"/> <field name="date_order" select="1"/> + <field name="date_validation"/> <field name="date_payment"/> - <field name="date_payment2"/> <field name="user_id"/> <field name="invoice_id"/> <field name="state" select="1"/> @@ -165,10 +146,38 @@ </tree> </field> </record> + <record id="view_pos_order_filter" model="ir.ui.view"> + <field name="name">pos.order.list.select</field> + <field name="model">pos.order</field> + <field name="type">search</field> + <field name="arch" type="xml"> + <search string="Search Sales Order"> + <filter icon="terp-sale" string="Quotations" domain="[('state','=','draft')]"/> + <filter icon="terp-sale" string="Running" domain="[('state','in',('payment','advance'))]"/> + <separator orientation="vertical"/> + <field name="name" select="1"/> + <field name="partner_id" select="1"/> + <field name="user_id" select="1" widget="selection"> + <filter icon="terp-partner" string="My Sale" domain="[('user_id','=',uid)]" help="My Sale Orders" /> + </field> + <field name="date_order" select="1" string="Order date" /> + <newline/> + <group expand="1" string="Group By..." colspan="11" col="11"> + <filter string="Customer" icon="terp-sale" domain="[]" context="{'group_by':'partner_id'}"/> + <filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/> + <filter string="Order Date" icon="terp-sale" domain="[]" context="{'group_by':'date_order'}"/> + <filter string="Salesman" icon="terp-sale" domain="[]" context="{'group_by':'user_id'}"/> + </group> + </search> + </field> + </record> + <menuitem name="Point of Sale" id="menu_point_root" sequence="10"/> <menuitem name="Point of Sale" id="menu_point_of_sale" parent="menu_point_root" sequence="1" /> <menuitem name="Sales Order" parent="menu_point_of_sale" id="menu_point_ofsale" action="action_pos_pos_form" sequence="1"/> - <menuitem action="product.product_normal_action" id="menu_pos_products" parent="menu_point_of_sale" sequence="2" name="Products"/> + <menuitem name="Products" id="menu_point_of_sale_product" parent="menu_point_root" sequence="2" /> + + <menuitem action="product.product_normal_action" id="menu_pos_products" parent="menu_point_of_sale_product" sequence="2" name="Products"/> <!-- POS Order view (date_payment) --> <record model="ir.actions.act_window" id="action_pos_pos_form_user"> @@ -176,10 +185,12 @@ <field name="type">ir.actions.act_window</field> <field name="res_model">pos.order</field> <field name="view_type">form</field> + <field name="view_mode">tree,form</field> <field name="view_id" ref="view_pos_order_tree"/> <field name="domain">['|',('state_2','=','to_verify'),('state','=','advance')]</field> + <field name="search_view_id" ref="view_pos_order_filter"/> + </record> -invoiced <record model="ir.actions.act_window" id="action_pos_order_tobinvoiced"> <field name="name">Sales to Invoice</field> @@ -189,6 +200,8 @@ invoiced <field name="view_mode">tree,form</field> <field name="view_id" ref="view_pos_order_tree"/> <field name="domain">[('state','!=', 'invoiced')]</field> + <field name="search_view_id" ref="view_pos_order_filter"/> + </record> <menuitem name="Invoicing" id="menu_point_of_sale_invoicing" parent="menu_point_root" sequence="4" /> <menuitem name="Sales to Invoice" action="action_pos_order_tobinvoiced" id="menu_point_of_sale_tobinvoiced" parent="menu_point_of_sale_invoicing"/> @@ -198,8 +211,8 @@ invoiced <field name="res_model">pos.order</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> - <field name="view_id" ref="view_pos_order_tree"/> <field name="domain">[('state','=', 'paid')]</field> + <field name="search_view_id" ref="view_pos_order_filter"/> </record> <record model="ir.actions.act_window" id="action_pos_order_tree2"> <field name="name">Point of Sale</field> @@ -207,29 +220,25 @@ invoiced <field name="res_model">pos.order</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> - <field name="view_id" ref="view_pos_order_tree"/> <field name="domain">[('date_order','<=', time.strftime('%Y-%m-%d 23:59:59'))]</field> + <field name="search_view_id" ref="view_pos_order_filter"/> </record> -<!-- <menuitem name="Orders of the day" parent="menu_point_ofsale" id="menu_action_pos_order_tree2" action="action_pos_order_tree2"/--> - <record model="ir.actions.act_window" id="action_pos_order_tree3"> <field name="name">Point of Sale</field> <field name="type">ir.actions.act_window</field> <field name="res_model">pos.order</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> - <field name="view_id" ref="view_pos_order_tree"/> + <field name="search_view_id" ref="view_pos_order_filter"/> </record> -<!-- <menuitem name="All orders" parent="menu_point_ofsale" id="menu_action_pos_order_tree3" action="action_pos_order_tree3"/--> - <record model="ir.actions.act_window" id="action_pos_order_tree_open"> <field name="name">Opened Sales</field> <field name="type">ir.actions.act_window</field> <field name="res_model">pos.order</field> <field name="view_type">form</field> <field name="view_mode">form,tree</field> - <field name="view_id" ref="view_pos_pos_form"/> + <field name="search_view_id" ref="view_pos_order_filter"/> </record> <record model="ir.ui.view" id="view_pos_order_line"> @@ -663,59 +672,11 @@ invoiced <page string="Other"> <field name="company_discount" colspan="4"/> <field name="max_diff" colspan="4"/> - <field name="account_receivable" required="1" colspan="4"/> </page> </notebook> </field> </record> - - <record model="ir.ui.view" id="form_mode_p_contact"> - <field name="name">Contact Mode</field> - <field name="model">res.mode.contact</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Contact Mode"> - <field name="name" select="1"/> - <field name="active"/> - </form> - </field> - </record> - - <record model="ir.ui.view" id="tree_mode_p_contact"> - <field name="name">Contact Mode</field> - <field name="model">res.mode.contact</field> - <field name="type">tree</field> - <field name="arch" type="xml"> - <tree string="Contact Mode"> - <field name="name"/> - <field name="active"/> - </tree> - </field> - </record> - - <record model="ir.actions.act_window" id="action_mode_p"> - <field name="name">Contact Mode</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">res.mode.contact</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - </record> - - <menuitem name="Contact Mode" parent="base.menu_base_config" action="action_mode_p" id="menu_mode_po"/> - - <record model="ir.ui.view" id="view_partner_contact"> - <field name="name">view.partner.contact</field> - <field name="model">res.partner</field> - <field name="type">form</field> - <field name="inherit_id" ref="base.view_partner_form"/> - <field name="arch" type="xml"> - <field name="website" position="after"> - <field name="contact_mode_id"/> - </field> - </field> - </record> - <record id="product_normal_form_view" model="ir.ui.view"> <field name="name">product.normal.form.inherit</field> <field name="model">product.product</field> @@ -748,7 +709,6 @@ invoiced <field name="default_code" select="1"/> <field groups="base.group_extended" name="ean13"/> </group> - </group> <notebook colspan="4"> <page string="Information"> @@ -829,13 +789,6 @@ invoiced parent="menu_point_config_product" action="action_product_output" id="products_for_output_operations"/> - -<!-- <wizard - string="Refloat Box entries" - model="account.bank.statement" - name="pos.entry" - menu="False" - id="pos_entries"/>--> <menuitem name="Register Management" parent="menu_point_root" id="menu_point_config" sequence="3"/> @@ -845,22 +798,12 @@ invoiced action="action_box_entries" id="menu_wizard_enter_jrnl" sequence="3" /> - <!-- <wizard - string="Enter negative operations" - model="account.bank.statement" - name="pos.out" - menu="False" - id="pos_entries2"/>--> <menuitem name="Output Operations" parent="menu_point_config" string="Refloat" action="action_box_out" id="menu_wizard_enter_jrnl2" sequence="3" /> -<!-- <menuitem name="Sales Waiting Validation" parent="menu_point_config" id="menu_point_ofsale_date_payment"--> -<!-- action="action_pos_pos_form_user" sequence="4"/>--> - - <record model="ir.ui.view" id="view_pos_order_tree_all_sales"> <field name="name">POS Sales</field> <field name="model">pos.order</field> @@ -870,8 +813,8 @@ invoiced <field name="name"/> <field name="date_order" select="1"/> <field name="partner_id" /> + <field name="date_validation"/> <field name="date_payment"/> - <field name="date_payment2"/> <field name="user_id"/> <field name="invoice_id"/> <field name="note" select="1" /> @@ -888,8 +831,6 @@ invoiced <field name="view_type">form</field> <field name="view_id" ref="view_pos_order_tree_all_sales" /> </record> -<!-- <menuitem name="All Sales" parent="menu_point_of_sale" id="menu_pos_all_sales" action="action_pos_all_sales" sequence="5" />--> - <record model="ir.ui.view" id="view_pos_order_tree_all_sales_lines"> <field name="name">POS Sales Lines</field> <field name="model">pos.order.line</field> @@ -912,7 +853,6 @@ invoiced <field name="view_type">form</field> <field name="view_id" ref="view_pos_order_tree_all_sales_lines" /> </record> -<!-- <menuitem name="Toutes les lignes de ventes" parent="menu_point_root" id="menu_pos_all_sales_lines" action="action_pos_all_sales_lines" sequence="5" />--> <!-- Miscelleanous Operations/Reporting --> <menuitem name="Reporting" parent="menu_point_root" id="menu_point_rep" sequence="5"/> @@ -926,8 +866,6 @@ invoiced id="menu_action_sale_of_day_tree2" action="action_trans_pos_tree_today"/> <menuitem name="Accepted Sales" parent="menu_action_all_sales_tree3" id="menu_action_sale_of_day_accept" action="action_pos_order_accepted"/> -<!-- <menuitem name="Open Sales" parent="menu_action_all_sales_tree3" - id="menu_action_open_sales_treeop" action="action_pos_order_tree_open"/--> <menuitem name="Sales Reports" parent="menu_point_report_sale" id="menu_sales_report" sequence="2"/> @@ -975,11 +913,6 @@ invoiced <menuitem name="Sales Lines of the day" parent="menu_action_pos_order_line" id="menu_action_pos_order_line_day" action="action_pos_order_line_day"/> -<!-- <menuitem name="Open Sales Line" parent="menu_action_pos_order_line" - id="menu_action_open_sales_line" action="action_pos_order_line_form"/--> - -<!-- <menuitem icon="STOCK_PRINT" action="wizard_pos_payment_report" - id="menu_pos_payment_report" parent="menu_cashboxes_by_day" type="wizard" sequence="4"/--> <menuitem icon="STOCK_PRINT" action="action_report_pos_sale_user" id="menu_pos_sales_user" parent="menu_trans_pos_tree" sequence="3" groups="base.group_extended" /> diff --git a/addons/point_of_sale/pos_wizard.xml b/addons/point_of_sale/pos_wizard.xml index 50e3630c4d7..4a321d7787f 100644 --- a/addons/point_of_sale/pos_wizard.xml +++ b/addons/point_of_sale/pos_wizard.xml @@ -1,74 +1,3 @@ <?xml version="1.0"?> <openerp> - <data> - <wizard - id="pos_return_picking" - model="pos.order" - menu="False" - name="pos.return.picking" - string="Return Goods"/> - - - -<!-- <wizard string="Box Entries" model="account.bank.statement" - name="pos.entry" id="pos_entry" menu="False"/>--> - -<!-- <wizard string="Payment" model="pos.order" - name="pos.payment" id="pos_payment" menu="False"/>--> - - <!--<wizard string="Create Invoices" model="pos.order" - name="pos.create_invoice" id="pos_invoice" multi="True"/>--> - - <wizard string="Add products" model="pos.order" - name="pos.add_product" id="pos_add_product" menu="False"/> - - <!--<wizard string="Cancel" model="pos.order" - name="pos.cancel" id="pos_cancel" multi="True"/>--> - -<!-- - <wizard string="Discount" model="pos.order" - name="pos.discount" id="pos_discount" menu="False"/>--> - -<!-- <wizard id="wizard_pos_payment_report" menu="False" - model="pos.order" name="pos.payment.report" string="All paid lines for the current User"/--> -<!-- - <wizard id="wizard_pos_sales_user" menu="False" - model="pos.order" name="pos.sales.user" string="Sales Report"/>--> - -<!-- - <wizard id="wizard_pos_payment_report_date" menu="False" - model="pos.order" name="pos.payment.report.date" string="Sales lines Report"/> - - <wizard id="wizard_pos_payment_report_user" menu="False" - model="pos.order" name="pos.payment.report.user" string="Sales lines by Users"/> ---> - - <wizard id="wizard_pos_sales_user_today_current_user" menu="False" - model="pos.order" name="pos.sales.user.today.current.user" string="Sales for Current User"/> - -<!-- <wizard id="wizard_pos_details" menu="False" - model="pos.order" name="pos.details" string="Sales Details"/>--> - -<!-- <wizard string="Get From Order" model="pos.order" - name="pos.sale.get" id="pos_sale_get"/> - - <wizard string="Scan Product" model="pos.order" - name="pos.scan_product" id="pos_scan_product"/--> -<!-- <wizard - id="close_statement" - model="account.bank.statement" - menu="True" - name="statement.close" - string="Close Statements"/>--> - - - <wizard - id="wizard_all_closed_cashbox_of_the_day" - model="account.bank.statement" - menu="False" - name="all.closed.cashbox.of.the.day" - string="All Cashboxes Of the day"/> - - - </data> </openerp> diff --git a/addons/point_of_sale/pos_workflow.xml b/addons/point_of_sale/pos_workflow.xml index d3f1313c13f..11cd9481343 100644 --- a/addons/point_of_sale/pos_workflow.xml +++ b/addons/point_of_sale/pos_workflow.xml @@ -66,7 +66,6 @@ <field name="act_from" ref="act_paid"/> <field name="act_to" ref="act_done"/> <field name="signal">done</field> - <!-- <field name="role_id" ref="role_pos"/--> </record> <record model="workflow.transition" id="trans_paid_invoice"> diff --git a/addons/point_of_sale/posrule_data.xml b/addons/point_of_sale/posrule_data.xml index 1c58c50b43e..5fa46ad43a8 100644 --- a/addons/point_of_sale/posrule_data.xml +++ b/addons/point_of_sale/posrule_data.xml @@ -1,61 +1,6 @@ <?xml version="1.0" ?> <openerp> <data> - <!-- <record id="res_partner_tinyshop0" model="res.partner"> - <field eval="0" name="customer"/> - <field eval="0" name="supplier"/> - <field eval="1" name="active"/> - <field eval=""""Tiny Shop 1"""" name="name"/> - </record> - <record id="res_partner_address_fabien0" model="res.partner.address"> - <field eval=""""Fabien"""" name="name"/> - <field eval=""""92000"""" name="zip"/> - <field eval=""""M."""" name="title"/> - <field name="partner_id" ref="stock.res_partner_tinyshop0"/> - <field name="country_id" ref="base.fr"/> - <field eval=""""Avenue de Paris"""" name="street"/> - <field eval="1" name="active"/> - <field eval=""""default"""" name="type"/> - </record> - <record id="res_company_shop0" model="res.company"> - <field eval="5.0" name="security_lead"/> - <field name="currency_id" ref="base.EUR"/> - <field eval="1.0" name="po_lead"/> - <field name="partner_id" ref="res_partner_tinyshop0"/> - <field eval="1.0" name="manufacturing_lead"/> - <field name="parent_id" ref="base.main_company"/> - <field eval="80.0" name="schedule_range"/> - <field eval=""""Shop 1"""" name="name"/> - - </record> - <record id="res_partner_tinyshop1" model="res.partner"> - <field eval="1" name="customer"/> - <field eval="0" name="supplier"/> - <field eval="1" name="active"/> - <field eval=""""Tiny Shop 2"""" name="name"/> - </record> - <record id="res_partner_address_eric0" model="res.partner.address"> - <field eval=""""Eric"""" name="name"/> - <field eval=""""1500"""" name="zip"/> - <field eval=""""M."""" name="title"/> - <field name="partner_id" ref="res_partner_tinyshop1"/> - <field name="country_id" ref="base.fr"/> - <field eval=""""Avenue de la Resistance"""" name="street"/> - <field eval="1" name="active"/> - <field eval=""""default"""" name="type"/> - <field name="partner_id" ref="res_partner_tinyshop1"/> - <field eval="1" name="active"/> - </record>--> -<!-- <record id="res_company_tinyshop0" model="res.company">--> -<!-- <field name="currency_id" ref="base.EUR"/>--> -<!-- <field eval="1.0" name="po_lead"/>--> -<!-- <field name="partner_id" ref="res_partner_tinyshop1"/>--> -<!-- <field eval="1.0" name="manufacturing_lead"/>--> -<!-- <field name="parent_id" ref="base.main_company"/>--> -<!-- <field eval="80.0" name="schedule_range"/>--> -<!-- <field eval=""""Shop 2"""" name="name"/>--> -<!-- </record>--> - <record id="res_users_shopuser0" model="res.users"> <field model="ir.actions.actions" name="menu_id" search="[('name','=','Menu')]"/> @@ -82,23 +27,18 @@ <field eval=""""shop2"""" name="login"/> <field model="ir.actions.actions" name="action_id" search="[('name','=','Menu')]"/> </record> - <record id="ir_rule_group_posline0" model="ir.rule.group"> - <field name="model_id" ref="point_of_sale.model_pos_order_line"/> - <field eval=""""POS line"""" name="name"/> - <field eval="1" name="global"/> - </record> <record id="ir_rule_0" model="ir.rule"> - <field eval=""""child_of"""" name="operator"/> - <field eval=""""user.company_id.id"""" name="operand"/> - <field name="field_id" ref="point_of_sale.field_pos_order_line_company_id"/> - <field name="rule_group" ref="ir_rule_group_posline0"/> + <field name="name">POS line</field> + <field name="model_id" ref="model_pos_order_line"/> + <field name="global" eval="True"/> + <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> </record> </data> <data> <record id="res_groups_posuserposline0" model="res.groups"> <field eval="[(6,0,[ref('point_of_sale.menu_action_pos_order_line'),ref('point_of_sale.menu_action_pos_order_line_day')])]" name="menu_access"/> - <field eval="[(6,0,[ref('ir_rule_group_posline0')])]" name="rule_groups"/> + <field eval="[(6,0,[ref('ir_rule_0')])]" name="rule_groups"/> <field eval="[(6,0,[ref('res_users_shopuser0'),ref('res_users_shopuser1')])]" name="users"/> <field eval=""""POS_user_pos_line"""" name="name"/> </record> @@ -123,42 +63,21 @@ </data> <data> - <record id="ir_rule_group_point0" model="ir.rule.group"> - <field name="model_id" ref="point_of_sale.model_pos_order"/> - <field eval=""""point"""" name="name"/> - <field eval="1" name="global"/> - </record> - <record id="ir_rule_0" model="ir.rule"> - <field eval=""""child_of"""" name="operator"/> - <field eval=""""user.company_id.id"""" name="operand"/> - <field name="field_id" ref="point_of_sale.field_pos_order_company_id"/> - <field name="rule_group" ref="ir_rule_group_point0"/> - </record> - - - <record id="ir_rule_group_poslinecompany0" model="ir.rule.group"> - <field name="model_id" ref="point_of_sale.model_pos_order_line"/> - <field eval=""""POS line company"""" name="name"/> - <field eval="1" name="global"/> - </record> - <record id="ir_rule_4" model="ir.rule"> - <field eval=""""child_of"""" name="operator"/> - <field eval=""""user.company_id.id"""" name="operand"/> - <field name="field_id" ref="point_of_sale.field_pos_order_line_company_id"/> - <field name="rule_group" ref="ir_rule_group_poslinecompany0"/> - </record> - - <record id="ir_rule_group_posreporting0" model="ir.rule.group"> + <record id="ir_rule_0" model="ir.rule"> + <field eval=""""point"""" name="name"/> + <field name="model_id" ref="model_pos_order"/> + <field name="global" eval="True"/> + <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> + </record> + <record id="ir_rule_group_posreporting0" model="ir.rule"> <field name="model_id" ref="point_of_sale.model_report_transaction_pos"/> <field eval=""""POS Reporting"""" name="name"/> - <field eval="1" name="global"/> + <field name="global" eval="True"/> </record> <record id="ir_rule_5" model="ir.rule"> - <field eval=""""="""" name="operator"/> - <field eval=""""user.id"""" name="operand"/> - <field name="field_id" ref="point_of_sale.field_report_transaction_pos_user_id"/> - <field name="rule_group" ref="ir_rule_group_posreporting0"/> + <field name="model_id" ref="point_of_sale.model_report_transaction_pos"/> + <field name="domain_force">['|',('user_id','=',False),('user_id','=',[user.id])]</field> </record> </data> @@ -176,7 +95,7 @@ ref('stock.menu_action_picking_tree7'), ref('stock.menu_action_picking_tree8'), ref('stock.menu_action_picking_tree9'), - ref('mrp.menu_mrp_procurement_action3'), + ref('mrp_procurement.menu_mrp_procurement_action3'), ref('point_of_sale.menu_point_root')])]" name="menu_access"/> <field eval="[(6,0,[ref('res_users_shopuser0'),ref('res_users_shopuser1')])]" name="users"/> <field eval="[(6,0,[ref('point_of_sale.ir_rule_group_point0'),ref('point_of_sale.ir_rule_group_poslinecompany0'),ref('point_of_sale.ir_rule_group_posreporting0')])]" name="rule_groups"/> @@ -213,7 +132,7 @@ </record> <record id="ir_modelsmrp_pdt0" model="ir.model.access"> - <field name="model_id" ref="mrp.model_mrp_procurement"/> + <field name="model_id" ref="mrp_procurement.model_mrp_procurement"/> <field eval="1" name="perm_read"/> <field eval=""""MRP - Procurement"""" name="name"/> <field eval="0" name="perm_unlink"/> @@ -287,7 +206,7 @@ <field name="group_id" ref="res_groups_posuser0"/> </record> <record id="ir_model_access_stockwarehouseorderpoint0" model="ir.model.access"> - <field name="model_id" ref="mrp.model_stock_warehouse_orderpoint"/> + <field name="model_id" ref="mrp_procurement.model_stock_warehouse_orderpoint"/> <field eval="1" name="perm_read"/> <field eval=""""stock.warehouse.orderpoint"""" name="name"/> <field eval="0" name="perm_unlink"/> @@ -555,7 +474,7 @@ <field name="group_id" ref="res_groups_posuser0"/> </record> <record id="ir_model_access_procurement0" model="ir.model.access"> - <field name="model_id" ref="mrp.model_mrp_procurement" /> + <field name="model_id" ref="mrp_procurement.model_mrp_procurement" /> <field eval="1" name="perm_read" /> <field eval="1" name="perm_write" /> <field eval="1" name="perm_create" /> @@ -577,13 +496,8 @@ id="stock.next_id_61" name="Reporting" parent="stock.menu_stock_root" groups="base.group_user"/> -<!-- <menuitem--> -<!-- id="stock.next_id_62"--> -<!-- name="Traceability"--> -<!-- parent="stock.next_id_61" groups="base.group_user"/>--> -<!-- <menuitem id="stock.menu_traceability_low" name="Low Level" parent="stock.menu_traceability" groups="base.group_user"/>--> <menuitem action="stock.action_picking_tree" id="stock.menu_action_picking_tree" parent="stock.menu_stock_root" sequence="19" groups="res_groups_posuser0"/> - <menuitem id="mrp.menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="4" groups="base.group_user"/> + <menuitem id="mrp_procurement.menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="4" groups="base.group_user"/> <menuitem parent="stock.next_id_61" action="stock.action_stock_line_date" id="stock.menu_report_stock_line_date" groups="base.group_user"/> </data> diff --git a/addons/point_of_sale/posrule_data2.xml b/addons/point_of_sale/posrule_data2.xml index 680ae25d7b7..927584e92ce 100644 --- a/addons/point_of_sale/posrule_data2.xml +++ b/addons/point_of_sale/posrule_data2.xml @@ -177,7 +177,7 @@ ref('stock.menu_action_picking_tree7'), ref('stock.menu_action_picking_tree8'), ref('stock.menu_action_picking_tree9'), - ref('mrp.menu_mrp_procurement_action3'), + ref('mrp_procurement.menu_mrp_procurement_action3'), ref('point_of_sale.menu_point_root')])]" name="menu_access"/> <field eval="[(6,0,[ref('point_of_sale.ir_rule_group_point0'),ref('point_of_sale.ir_rule_group_poslinecompany0'),ref('point_of_sale.ir_rule_group_posreporting0')])]" name="rule_groups"/> <field eva="[(6,0,[ref('res_users_shopuser0'),ref('res_users_shopuser1')])]" name="users"/> @@ -214,7 +214,7 @@ </record> <record id="ir_modelsmrp_pdt0" model="ir.model.access"> - <field name="model_id" ref="mrp.model_mrp_procurement"/> + <field name="model_id" ref="mrp_procurement.model_mrp_procurement"/> <field eval="1" name="perm_read"/> <field eval=""""MRP - Procurement"""" name="name"/> <field eval="0" name="perm_unlink"/> @@ -557,7 +557,7 @@ <field name="group_id" ref="res_groups_posuser0"/> </record> <record id="ir_model_access_procurement0" model="ir.model.access"> - <field name="model_id" ref="mrp.model_mrp_procurement" /> + <field name="model_id" ref="mrp_procurement.model_mrp_procurement" /> <field eval="1" name="perm_read" /> <field eval="1" name="perm_write" /> <field eval="1" name="perm_create" /> diff --git a/addons/point_of_sale/report/__init__.py b/addons/point_of_sale/report/__init__.py index a5798add7b4..4af503ff9da 100644 --- a/addons/point_of_sale/report/__init__.py +++ b/addons/point_of_sale/report/__init__.py @@ -36,5 +36,6 @@ import pos_payment_report_user import pos_sales_user_today_current_user import pos_receipt_with_remboursment import pos_receipt_without_remboursment +import point_of_sale_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/report/point_of_sale_report.py b/addons/point_of_sale/report/point_of_sale_report.py new file mode 100644 index 00000000000..10ba94662a2 --- /dev/null +++ b/addons/point_of_sale/report/point_of_sale_report.py @@ -0,0 +1,242 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from osv import osv, fields +import time +import netsvc +import tools + +class report_transaction_pos(osv.osv): + _name = "report.transaction.pos" + _description = "transaction for the pos" + _auto = False + _columns = { + 'date_create': fields.char('Date', size=16, readonly=True), + 'journal_id': fields.many2one('account.journal', 'Sales Journal', readonly=True), + 'jl_id': fields.many2one('account.journal', 'Cash Journals', readonly=True), + 'user_id': fields.many2one('res.users', 'User', readonly=True), + 'no_trans': fields.float('Number of Transaction', readonly=True), + 'amount': fields.float('Amount', readonly=True), + 'invoice_id': fields.float('Nbr Invoice', readonly=True), + 'invoice_am': fields.float('Invoice Amount', readonly=True), + 'product_nb': fields.float('Product Nb.', readonly=True), + 'disc': fields.float('Disc.', readonly=True), + } + + def init(self, cr): + tools.drop_view_if_exists(cr, 'report_transaction_pos') + cr.execute(""" + create or replace view report_transaction_pos as ( + select + min(absl.id) as id, + count(absl.id) as no_trans, + sum(absl.amount) as amount, + sum(line.price_ded) as disc, + to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text as date_create, + po.user_id as user_id, + po.sale_journal as journal_id, + abs.journal_id as jl_id, + count(po.invoice_id) as invoice_id, + count(p.id) as product_nb + from + account_bank_statement_line as absl, + account_bank_statement as abs, + product_product as p, + pos_order_line as line, + pos_order as po + where + absl.pos_statement_id = po.id and + line.order_id=po.id and + line.product_id=p.id and + absl.statement_id=abs.id + + group by + po.user_id,po.sale_journal, abs.journal_id, + to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text + ) + """) + #to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD') + #to_char(date_trunc('day',absl.create_date),'YYYY-MM-DD')::text as date_create, +report_transaction_pos() + +class report_sales_by_user_pos(osv.osv): + _name = "report.sales.by.user.pos" + _description = "Sales by user" + _auto = False + _columns = { + 'date_order': fields.date('Order Date',required=True, select=True), + 'amount': fields.float('Total', readonly=True, select=True), + 'qty': fields.float('Quantity', readonly=True, select=True), + 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True), + } + + def init(self, cr): + tools.drop_view_if_exists(cr, 'report_sales_by_user_pos') + cr.execute(""" + create or replace view report_sales_by_user_pos as ( + select + min(po.id) as id, + to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text as date_order, + po.user_id as user_id, + sum(pol.qty)as qty, + sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as amount + from + pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt + where + pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id + group by + to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text, + po.user_id + + ) + """) +report_sales_by_user_pos() + +class report_sales_by_user_pos_month(osv.osv): + _name = "report.sales.by.user.pos.month" + _description = "Sales by user monthly" + _auto = False + _columns = { + 'date_order': fields.date('Order Date',required=True, select=True), + 'amount': fields.float('Total', readonly=True, select=True), + 'qty': fields.float('Quantity', readonly=True, select=True), + 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True), + } + + def init(self, cr): + tools.drop_view_if_exists(cr, 'report_sales_by_user_pos_month') + cr.execute(""" + create or replace view report_sales_by_user_pos_month as ( + select + min(po.id) as id, + to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text as date_order, + po.user_id as user_id, + sum(pol.qty)as qty, + sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as amount + from + pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt + where + pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id + group by + to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text, + po.user_id + + ) + """) +report_sales_by_user_pos_month() + +class report_sales_by_margin_pos(osv.osv): + _name = "report.sales.by.margin.pos" + _description = "Sales by margin" + _auto = False + _columns = { +# 'pos_name': fields.char('POS Order', size=64, readonly=True), + 'product_name':fields.char('Product Name', size=64, readonly=True), + 'date_order': fields.date('Order Date',required=True, select=True), + # 'amount': fields.float('Total', readonly=True, select=True), + 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True), + 'qty': fields.float('Qty', readonly=True, select=True), + 'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True), + 'total':fields.float('Margin', readonly=True, select=True), + + } + + def init(self, cr): + tools.drop_view_if_exists(cr, 'report_sales_by_margin_pos') + cr.execute(""" + create or replace view report_sales_by_margin_pos as ( + select + min(pol.id) as id, + po.user_id as user_id, + pt.name as product_name, + to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text as date_order, + sum(pol.qty) as qty, + pt.list_price-pt.standard_price as net_margin_per_qty, + (pt.list_price-pt.standard_price) *sum(pol.qty) as total + from + product_template as pt, + product_product as pp, + pos_order_line as pol, + pos_order as po + where + pol.product_id = pp.product_tmpl_id and + pp.product_tmpl_id = pt.id and + po.id = pol.order_id + + group by + pt.name, + pt.list_price, + pt.standard_price, + po.user_id, + to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text + + ) + """) +report_sales_by_margin_pos() + +class report_sales_by_margin_pos_month(osv.osv): + _name = "report.sales.by.margin.pos.month" + _description = "Sales by margin monthly" + _auto = False + _columns = { + + 'product_name':fields.char('Product Name', size=64, readonly=True), + 'date_order': fields.date('Order Date',required=True, select=True), + 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True), + 'qty': fields.float('Qty', readonly=True, select=True), + 'net_margin_per_qty':fields.float('Net margin per Qty', readonly=True, select=True), + 'total':fields.float('Margin', readonly=True, select=True), + + } + + def init(self, cr): + tools.drop_view_if_exists(cr, 'report_sales_by_margin_pos_month') + cr.execute(""" + create or replace view report_sales_by_margin_pos_month as ( + select + min(pol.id) as id, + po.user_id as user_id, + pt.name as product_name, + to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text as date_order, + sum(pol.qty) as qty, + pt.list_price-pt.standard_price as net_margin_per_qty, + (pt.list_price-pt.standard_price) *sum(pol.qty) as total + from + product_template as pt, + product_product as pp, + pos_order_line as pol, + pos_order as po + where + pol.product_id = pp.product_tmpl_id and + pp.product_tmpl_id = pt.id and + po.id = pol.order_id + + group by + pt.name, + pt.list_price, + pt.standard_price, + po.user_id, + to_char(date_trunc('month',po.date_order),'YYYY-MM-DD')::text + + ) + """) +report_sales_by_margin_pos_month() + diff --git a/addons/point_of_sale/report/pos_receipt.rml b/addons/point_of_sale/report/pos_receipt.rml index 1d2e6edc9d0..d615fc74534 100644 --- a/addons/point_of_sale/report/pos_receipt.rml +++ b/addons/point_of_sale/report/pos_receipt.rml @@ -103,7 +103,7 @@ <para style="terp_default_Centre_9">Tel : [[ address and address.phone ]]</para> <para style="terp_default_Centre_9">E-mail : [[ address and address.email ]]</para> <para style="terp_default_Centre_9">Shop : [[ o.shop_id.name ]]</para> - <para style="terp_default_Centre_9">Vendeur : [[ o.user_id1.name ]]</para> + <para style="terp_default_Centre_9">Vendeur : [[ o.user_salesman_id.name ]]</para> <para style="terp_default_Centre_9">Date : [[ formatLang(o.date_order,date = True) ]]</para> <para style="P4"> <font color="white"> </font> diff --git a/addons/point_of_sale/sale_wizard.xml b/addons/point_of_sale/sale_wizard.xml deleted file mode 100644 index ca741e2c808..00000000000 --- a/addons/point_of_sale/sale_wizard.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0"?> -<openerp> - <data> - <wizard string="Pos payment" model="sale.order" name="sale.pos_payment" id="pos_payment" /> - </data> -</openerp> diff --git a/addons/point_of_sale/security/ir.model.access.csv b/addons/point_of_sale/security/ir.model.access.csv index 0cfc0fae9b7..599df9581ee 100644 --- a/addons/point_of_sale/security/ir.model.access.csv +++ b/addons/point_of_sale/security/ir.model.access.csv @@ -13,7 +13,6 @@ "access_sale_shop_pos_user","sale.shop pos_user","sale.model_sale_shop","point_of_sale.group_pos_user",1,0,0,0 "access_pos_order_stock_worker","pos.order stock_worker","model_pos_order","stock.group_stock_user",1,0,0,0 "access_stock_move_pos_user","stock.move pos_user","stock.model_stock_move","point_of_sale.group_pos_user",1,1,1,1 -"access_res_mode_contact","res.mode.contact","model_res_mode_contact","point_of_sale.group_pos_user",1,0,0,0 "access_report_sales_by_user_pos","report.sales.by.user.pos","model_report_sales_by_user_pos","point_of_sale.group_pos_user",1,0,0,0 "access_report_sales_by_user_pos_month","report.sales.by.user.pos.month","model_report_sales_by_user_pos_month","point_of_sale.group_pos_user",1,0,0,0 "access_report_sales_by_margin_pos","report.sales.by.margin.pos","model_report_sales_by_margin_pos","point_of_sale.group_pos_user",1,0,0,0 diff --git a/addons/point_of_sale/singer_statement_demo.xml b/addons/point_of_sale/singer_statement_demo.xml index edc8299c609..68f889cddee 100644 --- a/addons/point_of_sale/singer_statement_demo.xml +++ b/addons/point_of_sale/singer_statement_demo.xml @@ -316,17 +316,6 @@ <field name="company_id" ref="base.main_company"/> </record> - <record id="base.main_company" model="res.company"> - <field name="account_receivable" ref="account.a_recv"/> - </record> - <record id="point_of_sale.pos_order_posadvance" model="pos.order"> - <field name="sale_journal" ref="sales_journal_comp2"/> - </record> - - - <record id="base.main_company" model="res.company"> - <field name="account_receivable" ref="account.a_recv"/> - </record> <record id="point_of_sale.pos_order_posadvance" model="pos.order"> <field name="sale_journal" ref="sales_journal_comp2"/> </record> diff --git a/addons/point_of_sale/statement_data.xml b/addons/point_of_sale/statement_data.xml index 947348a990d..67c94170666 100644 --- a/addons/point_of_sale/statement_data.xml +++ b/addons/point_of_sale/statement_data.xml @@ -21,19 +21,19 @@ <field eval="1" name="perm_create"/> <field name="group_id" ref="point_of_sale.res_groups_posuser0"/> </record> - <record id="ir_rule_group_bankstatementcompany0" model="ir.rule.group"> + <record id="ir_rule_group_bankstatementcompany0" model="ir.rule"> <field name="model_id" ref="account.model_account_bank_statement"/> <field eval=""""Bank Statement company"""" name="name"/> <field eval="1" name="global"/> </record> - <record id="ir_rule_group_bankstatementlinecompany0" model="ir.rule.group"> + <record id="ir_rule_group_bankstatementlinecompany0" model="ir.rule"> <field name="model_id" ref="account.model_account_bank_statement_line"/> <field eval=""""Bank Statement line Company"""" name="name"/> <field eval="1" name="global"/> </record> <record id="point_of_sale.res_groups_posuser0" model="res.groups"> - <field eval="[(6,0,[ref('product.menu_config_product'),ref('product.menu_product_category_action_form'),ref('point_of_sale.menu_point_ofsale'),ref('point_of_sale.menu_point_config'),ref('point_of_sale.menu_statement_tree_all'),ref('stock.menu_stock_root'),ref('stock.menu_action_location_form'),ref('stock.menu_action_location_tree'),ref('stock.menu_picking_waiting'),ref('stock.menu_action_picking_tree3'),ref('stock.menu_action_picking_tree5'),ref('stock.menu_action_picking_form'),ref('stock.menu_action_picking_tree7'),ref('stock.menu_action_picking_tree8'),ref('stock.menu_action_picking_tree9'),ref('mrp.menu_mrp_procurement_action3'),ref('mrp.menu_mrp_procurement_new'),ref('mrp.next_id_77'),ref('mrp.menu_report_workcenter_load'),ref('mrp.menu_report_in_out_picking'),ref('base.menu_sales'),ref('sale.menu_action_shop_form'),ref('sale.menu_sale_order'),ref('sale.menu_action_order_tree'),ref('sale.menu_action_order_tree_all'),ref('sale.menu_action_order_tree2'),ref('sale.menu_action_order_tree3'),ref('sale.menu_action_order_tree7'),ref('sale.menu_action_order_tree8'),ref('sale.menu_action_order_line_tree1'),ref('delivery.menu_action_delivery_carrier_form'),ref('delivery.menu_action_delivery_grid_form'),ref('point_of_sale.menu_point_root')])]" name="menu_access"/> + <field eval="[(6,0,[ref('product.menu_config_product'),ref('product.menu_product_category_action_form'),ref('point_of_sale.menu_point_ofsale'),ref('point_of_sale.menu_point_config'),ref('point_of_sale.menu_statement_tree_all'),ref('stock.menu_stock_root'),ref('stock.menu_action_location_form'),ref('stock.menu_action_location_tree'),ref('stock.menu_picking_waiting'),ref('stock.menu_action_picking_tree3'),ref('stock.menu_action_picking_tree5'),ref('stock.menu_action_picking_form'),ref('stock.menu_action_picking_tree7'),ref('stock.menu_action_picking_tree8'),ref('stock.menu_action_picking_tree9'),ref('mrp_procurement.menu_mrp_procurement_action3'),ref('mrp_procurement.menu_mrp_procurement_new'),ref('mrp.next_id_77'),ref('mrp.menu_report_workcenter_load'),ref('mrp.menu_report_in_out_picking'),ref('base.menu_sales'),ref('sale.menu_action_shop_form'),ref('sale.menu_sale_order'),ref('sale.menu_action_order_tree'),ref('sale.menu_action_order_tree_all'),ref('sale.menu_action_order_tree2'),ref('sale.menu_action_order_tree3'),ref('sale.menu_action_order_tree7'),ref('sale.menu_action_order_tree8'),ref('sale.menu_action_order_line_tree1'),ref('delivery.menu_action_delivery_carrier_form'),ref('delivery.menu_action_delivery_grid_form'),ref('point_of_sale.menu_point_root')])]" name="menu_access"/> <field eval="[(6,0,[ref('ir_rule_group_bankstatementcompany0'),ref('ir_rule_group_bankstatementlinecompany0'),ref('point_of_sale.ir_rule_group_point0'),ref('point_of_sale.ir_rule_group_poslinecompany0'),ref('point_of_sale.ir_rule_group_posreporting0')])]" name="rule_groups"/> <field eval=""""POS_user"""" name="name"/> </record> diff --git a/addons/point_of_sale/statement_view.xml b/addons/point_of_sale/statement_view.xml index 80b2b1ec756..cef2748b5e4 100644 --- a/addons/point_of_sale/statement_view.xml +++ b/addons/point_of_sale/statement_view.xml @@ -434,7 +434,11 @@ string="Close Register" action="action_pos_close_statement" id="menu_close_statement" sequence="2" /> - + + <menuitem icon="STOCK_PRINT" + action="action_report_all_closed_cashbox_of_the_day" + id="menu_all_closed_cashbox_of_the_day" + parent="menu_point_report_register"/> </data> </openerp> diff --git a/addons/point_of_sale/stock.py b/addons/point_of_sale/stock.py index 95630569a7c..9d2b24d69b8 100644 --- a/addons/point_of_sale/stock.py +++ b/addons/point_of_sale/stock.py @@ -30,7 +30,6 @@ class stock_picking(osv.osv): _inherit = 'stock.picking' _columns = { 'pos_order': fields.many2one('pos.order', 'Pos order'), - # 'company_id':fields.many2one('res.company', 'Company', required=True), } stock_picking() diff --git a/addons/point_of_sale/wizard/__init__.py b/addons/point_of_sale/wizard/__init__.py index cdfd3f9fb20..d8a4b93e3a2 100644 --- a/addons/point_of_sale/wizard/__init__.py +++ b/addons/point_of_sale/wizard/__init__.py @@ -19,7 +19,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## -import wizard_return + import pos_add_product import pos_confirm import pos_discount @@ -39,6 +39,7 @@ import pos_payment_report_date import pos_payment_report import pos_payment import pos_scan_product +import pos_return # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/wizard/pos_add_product.py b/addons/point_of_sale/wizard/pos_add_product.py index 34769be78e9..5d88b75d7ff 100644 --- a/addons/point_of_sale/wizard/pos_add_product.py +++ b/addons/point_of_sale/wizard/pos_add_product.py @@ -61,7 +61,27 @@ class add_product(osv.osv_memory): 'views': False, 'type': 'ir.actions.act_window', } + def close_action(self, cr, uid, ids, context): + record_id = context and context.get('active_id', False) + order_obj= self.pool.get('pos.order') + order_line_obj= self.pool.get('pos.order.line') + obj=order_obj.browse(cr,uid, record_id) + order_obj.write(cr,uid,[record_id],{'state':'done'}) + if obj.amount_total != obj.amount_paid: + return { + 'name': _('Make Payment'), + 'context ':context and context.get('active_id', False), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'pos.make.payment', + 'view_id': False, + 'target': 'new', + 'views': False, + 'type': 'ir.actions.act_window', + + } + return {} add_product() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/wizard/pos_add_product.xml b/addons/point_of_sale/wizard/pos_add_product.xml index 5d380624f0d..f465f97f097 100644 --- a/addons/point_of_sale/wizard/pos_add_product.xml +++ b/addons/point_of_sale/wizard/pos_add_product.xml @@ -12,8 +12,8 @@ <group col="2" colspan="4"> <field name="product_id"/> <field name="quantity"/> - <button icon='gtk-cancel' special="cancel" - string="Close" /> + <button icon='gtk-cancel' name="close_action" + string="Close" type="object" /> <button name="select_product" string="Contiue" colspan="1" type="object" icon="gtk-ok" /> </group> diff --git a/addons/point_of_sale/wizard/pos_details.xml b/addons/point_of_sale/wizard/pos_details.xml index 077e2ed89dc..bb62b94fb75 100644 --- a/addons/point_of_sale/wizard/pos_details.xml +++ b/addons/point_of_sale/wizard/pos_details.xml @@ -29,7 +29,6 @@ <field name="view_type">form</field> <field name="view_mode">form</field> <field name="target">new</field> - <field name="context">{'record_id' : active_id}</field> </record> diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py index 8e25f3f0797..f59d814522c 100644 --- a/addons/point_of_sale/wizard/pos_payment.py +++ b/addons/point_of_sale/wizard/pos_payment.py @@ -43,7 +43,8 @@ class pos_make_payment(osv.osv_memory): @return: A dictionary which of fields with values. """ res = super(pos_make_payment, self).default_get(cr, uid, fields, context=context) - record_id = context and context.get('active_id',False) + + active_id = context and context.get('active_id',False) j_obj = self.pool.get('account.journal') company_id = self.pool.get('res.users').browse(cr,uid,uid).company_id.id journal = j_obj.search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', company_id)]) @@ -55,14 +56,14 @@ class pos_make_payment(osv.osv_memory): wf_service = netsvc.LocalService("workflow") order_obj=self.pool.get('pos.order') - order = order_obj.browse(cr, uid, record_id, context) + order = order_obj.browse(cr, uid, active_id, context) #get amount to pay amount = order.amount_total - order.amount_paid if amount <= 0.0: context.update({'flag': True}) - order_obj.action_paid(cr, uid, [record_id], context) + order_obj.action_paid(cr, uid, [active_id], context) elif order.amount_paid > 0.0: - order_obj.write(cr, uid, [record_id], {'state': 'advance'}) + order_obj.write(cr, uid, [active_id], {'state': 'advance'}) invoice_wanted_checked = False current_date = time.strftime('%Y-%m-%d') @@ -81,11 +82,11 @@ class pos_make_payment(osv.osv_memory): def view_init(self, cr, uid, fields_list, context=None): res = super(pos_make_payment, self).view_init(cr, uid, fields_list, context=context) - record_id = context and context.get('active_id', False) or False - order = self.pool.get('pos.order').browse(cr, uid, record_id) + active_id = context and context.get('active_id', False) or False + order = self.pool.get('pos.order').browse(cr, uid, active_id) if not order.lines: - raise osv.except_osv('Error!','No order lines defined for this sale ') - True + raise osv.except_osv('Error!','No order lines defined for this sale ') + return True def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ @@ -99,22 +100,26 @@ class pos_make_payment(osv.osv_memory): @return: New arch of view. """ - record_id = context and context.get('record_id', False) or False - res = super(pos_make_payment, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) - if record_id: - order = self.pool.get('pos.order').browse(cr, uid, record_id) - amount = order.amount_total - order.amount_paid - if amount==0.0: - res['arch'] = """ <form string="Make Payment" colspan="4"> - <group col="2" colspan="2"> - <label string="Do you want to print the Receipt?" colspan="4"/> - <separator colspan="4"/> - <button icon="gtk-cancel" special="cancel" string="No" readonly="0"/> - <button name="print_report" string="Print Receipt" type="object" icon="gtk-print"/> - </group> - </form> - """ - return res + + + result = super(pos_make_payment, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) + active_model = context.get('active_model') + active_id = context.get('active_id', False) + if not active_id or (active_model and active_model != 'pos.order'): + return result + + order = self.pool.get('pos.order').browse(cr, uid, active_id) + if order.amount_total == order.amount_paid: + res['arch'] = """ <form string="Make Payment" colspan="4"> + <group col="2" colspan="2"> + <label string="Do you want to print the Receipt?" colspan="4"/> + <separator colspan="4"/> + <button icon="gtk-cancel" special="cancel" string="No" readonly="0"/> + <button name="print_report" string="Print Receipt" type="object" icon="gtk-print"/> + </group> + </form> + """ + return result def check(self, cr, uid, ids, context=None): @@ -122,47 +127,48 @@ class pos_make_payment(osv.osv_memory): if the order is not paid: continue payment, if the order is paid print invoice (if wanted) or ticket. """ - record_id = context and context.get('active_id',False) + active_id = context and context.get('active_id',False) order_obj = self.pool.get('pos.order') jrnl_obj = self.pool.get('account.journal') - order = order_obj.browse(cr, uid, record_id, context) + order = order_obj.browse(cr, uid, active_id, context) amount = order.amount_total - order.amount_paid data = self.read(cr, uid, ids)[0] - + # Todo need to check ... if amount !=0.0: invoice_wanted = data['invoice_wanted'] jrnl_used=False if data.get('journal',False): jrnl_used=jrnl_obj.browse(cr,uid,data['journal']) - order_obj.write(cr, uid, [record_id], {'invoice_wanted': invoice_wanted}) - order_obj.add_payment(cr, uid, record_id, data, context=context) + order_obj.write(cr, uid, [active_id], {'invoice_wanted': invoice_wanted}) + order_obj.add_payment(cr, uid, active_id, data, context=context) # Todo need to check # if amount<=0.0: # context.update({'flag':True}) -# order_obj.action_paid(cr,uid,[record_id],context) - if order_obj.test_paid(cr, uid, [record_id]): +# order_obj.action_paid(cr,uid,[active_id],context) + if order_obj.test_paid(cr, uid, [active_id]): if order.partner_id and order.invoice_wanted: return self.create_invoice(cr,uid,ids,context) else: - order_obj.action_paid(cr,uid,[record_id],context) - order_obj.write(cr, uid, [record_id],{'state':'paid'}) + context.update({'flag': True}) + order_obj.action_paid(cr,uid,[active_id],context) + order_obj.write(cr, uid, [active_id],{'state':'paid'}) return self.print_report(cr, uid, ids, context) if order.amount_paid > 0.0: context.update({'flag': True}) # Todo need to check - order_obj.action_paid(cr, uid, [record_id], context) - self.pool.get('pos.order').write(cr, uid, [record_id],{'state':'advance'}) + order_obj.action_paid(cr, uid, [active_id], context) + self.pool.get('pos.order').write(cr, uid, [active_id],{'state':'advance'}) return self.print_report(cr, uid, ids, context) return {} def create_invoice(self, cr, uid, ids, context): wf_service = netsvc.LocalService("workflow") - record_ids = context and context.get('active_ids',False) - for i in record_ids: + active_ids = [context and context.get('active_id',False)] + for i in active_ids: wf_service.trg_validate(uid, 'pos.order', i, 'invoice', cr) - datas = {'ids' : context.get('active_ids', [])} + datas = {'ids' : context.get('active_id', [])} return { 'type' : 'ir.actions.report.xml', 'report_name':'pos.invoice', @@ -180,7 +186,8 @@ class pos_make_payment(osv.osv_memory): @param context: A standard dictionary @return : retrun report """ - datas = {'ids' : context.get('active_ids',[])} + active_id=context.get('active_id',[]) + datas = {'ids' : [active_id]} res = {} datas['form'] = res diff --git a/addons/point_of_sale/wizard/pos_return.py b/addons/point_of_sale/wizard/pos_return.py new file mode 100644 index 00000000000..bdb6f46e71e --- /dev/null +++ b/addons/point_of_sale/wizard/pos_return.py @@ -0,0 +1,351 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +import netsvc +from osv import osv,fields +from tools.translate import _ +from mx import DateTime +import time +import pos_box_entries +import pos_add_product +import pos_payment + +class pos_return(osv.osv_memory): + _name = 'pos.return' + _description = 'Point of sale return' + + _columns = { + + } + + def default_get(self, cr, uid, fields, context=None): + """ + To get default values for the object. + + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param fields: List of fields for which we want default values + @param context: A standard dictionary + + @return: A dictionary which of fields with values. + + """ + + res = super(pos_return, self).default_get(cr, uid, fields, context=context) + order_obj = self.pool.get('pos.order') + active_ids = context.get('active_ids') + if not context: + context={} + for order in order_obj.browse(cr, uid, active_ids): + for line in order.lines: + if 'return%s'%(line.id) in fields: + res['return%s'%(line.id)] = line.qty + return res + + def view_init(self, cr, uid, fields_list, context=None): + res = super(pos_return, self).view_init(cr, uid, fields_list, context=context) + order_obj=self.pool.get('pos.order') + if not context: + context={} + + active_ids=context.get('active_ids') + for order in order_obj.browse(cr, uid, active_ids): + for line in order.lines: + if 'return%s'%(line.id) not in self._columns: + self._columns['return%s'%(line.id)] = fields.float("Quantity") + + return res + + def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): + result = super(pos_return, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) + if not context: + context={} + active_model = context.get('active_model') + if not active_model and active_model != 'pos.order': + return result + order_obj = self.pool.get('pos.order') + active_id = context.get('active_id', False) + if active_id: + _moves_arch_lst="""<?xml version="1.0"?> + <form string="Return lines"> + <label string="Quantities you enter, match to products that will return to the stock." colspan="4"/>""" + _line_fields = result['fields'] + order=order_obj.browse(cr, uid, active_id) + for line in order.lines: + quantity=line.qty + _line_fields.update({ + 'return%s'%(line.id) : { + 'string': line.product_id.name, + 'type' : 'float', + 'required': True, + 'default':quantity + }, + }) + _moves_arch_lst += """ + <field name="return%s"/> + <newline/> + """%(line.id) + + _moves_arch_lst+=""" + <newline/> + <separator colspan="4"/> + <button icon='gtk-cancel' special="cancel" + string="Cancel" /> + <button icon='gtk-ok' name= "create_returns" + string="Return goods and Exchange" type="object"/> + <button icon='gtk-ok' name="create_returns2" + string="Return without Refund" type="object"/> + </form>""" + + result['arch'] = _moves_arch_lst + result['fields'] = _line_fields + return result + + + def create_returns(self, cr, uid, data, context): + return { + 'name': _('Add Product'), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'pos.add.product', + 'view_id': False, + 'target':'new', + 'views': False, + 'context': context, + 'type': 'ir.actions.act_window', + } + def create_returns2(self, cr, uid, ids, context): + active_id = context.get('active_id', False) + order_obj =self.pool.get('pos.order') + line_obj = self.pool.get('pos.order.line') + picking_obj = self.pool.get('stock.picking') + stock_move_obj = self.pool.get('stock.move') + property_obj= self.pool.get("ir.property") + uom_obj =self. pool.get('product.uom') + wf_service = netsvc.LocalService("workflow") + #Todo :Need to clean the code + if active_id: + picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in',[active_id]), ('state', '=', 'done')]) + data=self.read(cr,uid,ids)[0] + clone_list = [] + date_cur=time.strftime('%Y-%m-%d') + + for order_id in order_obj.browse(cr, uid, [active_id], context=context): + prop_ids = property_obj.search(cr, uid,[('name', '=', 'property_stock_customer')]) + val = property_obj.browse(cr, uid,prop_ids[0]).value_reference + cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order_id.shop_id.warehouse_id.id)) + res=cr.fetchone() + location_id=res and res[0] or None + stock_dest_id = val.id + + new_picking=picking_obj.copy(cr, uid, order_id.last_out_picking.id, {'name':'%s (return)' % order_id.name, + 'move_lines':[], 'state':'draft', 'type':'in', + 'type':'in', + 'date':date_cur}) + new_order=order_obj.copy(cr,uid,order_id.id, {'name': 'Refund %s'%order_id.name, + 'lines':[], + 'statement_ids':[], + 'last_out_picking':[]}) + for line in order_id.lines: + if line.id and (data['return%s' %line.id]!=0.0): + new_move=stock_move_obj.create(cr, uid,{ + 'product_qty': data['return%s' %line.id], + 'product_uos_qty': uom_obj._compute_qty(cr, uid,data['return%s' %line.id] ,line.product_id.uom_id.id), + 'picking_id':new_picking, + 'product_uom':line.product_id.uom_id.id, + 'location_id':location_id, + 'product_id':line.product_id.id, + 'location_dest_id':stock_dest_id, + 'name':'%s (return)' %order_id.name, + 'date':date_cur, + 'date_planned':date_cur,}) + line_obj.copy(cr,uid,line.id,{'qty':-data['return%s' %line.id], + 'order_id': new_order, + }) + order_obj.write(cr,uid, new_order, {'state':'done'}) + wf_service.trg_validate(uid, 'stock.picking',new_picking,'button_confirm', cr) + picking_obj.force_assign(cr, uid, [new_picking], context) + act = { + 'domain': "[('id', 'in', ["+str(new_order)+"])]", + 'name': 'Refunded Orders', + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'pos.order', + 'auto_refresh':0, + 'res_id':new_order, + 'view_id': False, + 'context':context, + 'type': 'ir.actions.act_window' + } + return act + +pos_return() +class add_product(osv.osv_memory): + _inherit = 'pos.add.product' + def select_product(self, cr, uid, ids, context): + """ + To get the product and quantity and add in order . + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param context: A standard dictionary + @return : Retrun the add product form again for adding more product + """ + + active_id=context.get('active_id', False) + data = self.read(cr, uid, ids)[0] + if active_id: + order_obj = self.pool.get('pos.order') + lines_obj = self.pool.get('pos.order.line') + picking_obj = self.pool.get('stock.picking') + stock_move_obj = self.pool.get('stock.move') + move_obj = self.pool.get('stock.move') + property_obj= self.pool.get("ir.property") + invoice_obj= self.pool.get('account.invoice') + picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in',[active_id]), ('state', '=', 'done')]) + clone_list = [] + date_cur=time.strftime('%Y-%m-%d') + uom_obj = self.pool.get('product.uom') + prod_obj=self.pool.get('product.product') + wf_service = netsvc.LocalService("workflow") + return_boj=self.pool.get('pos.return') + order_obj.add_product(cr, uid, active_id,data['product_id'],data['quantity'], context=context) + + for order_id in order_obj.browse(cr, uid, [active_id], context=context): + prod=data['product_id'] + qty=data['quantity'] + prop_ids = property_obj.search(cr, uid,[('name', '=', 'property_stock_customer')]) + val = property_obj.browse(cr, uid,prop_ids[0]).value_reference + cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order_id.shop_id.warehouse_id.id)) + res=cr.fetchone() + location_id=res and res[0] or None + stock_dest_id = val.id + + prod_id=prod_obj.browse(cr,uid,prod) + new_picking=picking_obj.create(cr,uid,{ + 'name':'%s (Added)' %order_id.name, + 'move_lines':[], + 'state':'draft', + 'type':'out', + 'date':date_cur, }) + new_move=stock_move_obj.create(cr, uid,{ + 'product_qty': qty, + 'product_uos_qty': uom_obj._compute_qty(cr, uid,prod_id.uom_id.id, qty, prod_id.uom_id.id), + 'picking_id':new_picking, + 'product_uom':prod_id.uom_id.id, + 'location_id':location_id, + 'product_id':prod_id.id, + 'location_dest_id':stock_dest_id, + 'name':'%s (return)' %order_id.name, + 'date':date_cur, + 'date_planned':date_cur,}) + + wf_service.trg_validate(uid, 'stock.picking',new_picking,'button_confirm', cr) + picking_obj.force_assign(cr, uid, [new_picking], context) + order_obj.write(cr,uid,active_id,{'last_out_picking':new_picking}) + + + return { + 'name': _('Add Product'), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'pos.add.product', + 'view_id': False, + 'target':'new', + 'context':context, + 'views': False, + 'type': 'ir.actions.act_window', + } + + def close_action(self, cr, uid, ids, context): + active_ids=context.get('active_ids', False) + order_obj = self.pool.get('pos.order') + lines_obj = self.pool.get('pos.order.line') + picking_obj = self.pool.get('stock.picking') + stock_move_obj = self.pool.get('stock.move') + move_obj = self.pool.get('stock.move') + property_obj= self.pool.get("ir.property") + invoice_obj=self.pool.get('account.invoice') + picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in', active_ids), ('state', '=', 'done')]) + clone_list = [] + date_cur=time.strftime('%Y-%m-%d') + uom_obj = self.pool.get('product.uom') + return_boj=self.pool.get('pos.return') + return_id=return_boj.search(cr,uid,[]) + data=return_boj.read(cr,uid,return_id,[])[0] + + wf_service = netsvc.LocalService("workflow") + for order_id in order_obj.browse(cr, uid, active_ids, context=context): + prop_ids =property_obj.search(cr, uid,[('name', '=', 'property_stock_customer')]) + val = property_obj.browse(cr, uid,prop_ids[0]).value_reference + cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order_id.shop_id.warehouse_id.id)) + res=cr.fetchone() + location_id=res and res[0] or None + stock_dest_id = val.id + + order_obj.write(cr,uid,[order_id.id],{'type_rec':'Exchange'}) + if order_id.invoice_id: + invoice_obj.refund(cr, uid, [order_id.invoice_id.id],time.strftime('%Y-%m-%d'), False, order_id.name) + new_picking=picking_obj.create(cr,uid,{ + 'name':'%s (return)' %order_id.name, + 'move_lines':[], 'state':'draft', + 'type':'in', + 'date':date_cur}) + for line in order_id.lines: + key=('return%s') %line.id + if line.id and data.has_key(key): + new_move=stock_move_obj.create(cr, uid,{ + 'product_qty': data['return%s' %line.id ], + 'product_uos_qty': uom_obj._compute_qty(cr, uid,data['return%s' %line.id] ,line.product_id.uom_id.id), + 'picking_id':new_picking, + 'product_uom':line.product_id.uom_id.id, + 'location_id':location_id, + 'product_id':line.product_id.id, + 'location_dest_id':stock_dest_id, + 'name':'%s (return)' %order_id.name, + 'date':date_cur, + 'date_planned':date_cur,}) + lines_obj.write(cr,uid,[line.id],{'qty_rfd':(line.qty or 0.0) + data['return%s' %line.id], + 'qty':line.qty-(data['return%s' %line.id] or 0.0) + }) + wf_service.trg_validate(uid, 'stock.picking',new_picking,'button_confirm', cr) + picking_obj.force_assign(cr, uid, [new_picking], context) + obj=order_obj.browse(cr,uid, active_ids[0]) + + if obj.amount_total != obj.amount_paid: + return { + 'name': _('Make Payment'), + 'context ':context, + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'pos.make.payment', + 'view_id': False, + 'target': 'new', + 'views': False, + 'type': 'ir.actions.act_window', + + } + return True + +add_product() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/wizard/pos_return_view.xml b/addons/point_of_sale/wizard/pos_return_view.xml new file mode 100644 index 00000000000..0d01b3c6666 --- /dev/null +++ b/addons/point_of_sale/wizard/pos_return_view.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + <record id="action_view_pos_return" model="ir.actions.act_window"> + <field name="name">Return lines</field> + <field name="res_model">pos.return</field> + <field name="view_type">form</field> + <field name="view_mode">form</field> + <field name="target">new</field> + </record> + + </data> +</openerp> diff --git a/addons/point_of_sale/wizard/wizard_return.py b/addons/point_of_sale/wizard/wizard_return.py deleted file mode 100644 index 673610e8c2c..00000000000 --- a/addons/point_of_sale/wizard/wizard_return.py +++ /dev/null @@ -1,550 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved -# $Id$ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -############################################################################## - -import wizard -import pooler -from tools.misc import UpdateableStr - -import netsvc -import time - -from tools.translate import _ -from decimal import Decimal - - -arch=UpdateableStr() -fields={} - - -def _get_journal(self, cr, uid, context): - pool = pooler.get_pool(cr.dbname) - obj = pool.get('account.journal') - c=pool.get('res.users').browse(cr,uid,uid).company_id.id - ids = obj.search(cr, uid, [('type', '=', 'cash'), ('company_id','=',c)]) - res = obj.read(cr, uid, ids, ['id', 'name'], context) - res = [(r['id'], r['name']) for r in res] - return res - - -payment_form = """<?xml version="1.0"?> -<form string="Add payment :"> - <field name="amount" /> - <field name="journal"/> - <field name="payment_date" /> - <field name="payment_name" /> - <field name="invoice_wanted" /> - <field name="num_sale" /> -</form> -""" - -payment_fields = { - 'amount': {'string': 'Amount', 'type': 'float', 'required': True}, - 'invoice_wanted': {'string': 'Invoice', 'type': 'boolean'}, - 'journal': {'string': 'Journal', - 'type': 'selection', - 'selection': _get_journal, - 'required': True, - }, - 'payment_date': {'string': 'Payment date', 'type': 'date', 'required': True}, - 'payment_name': {'string': 'Payment name', 'type': 'char', 'size': '32', 'required':True, 'default':'Payment'}, - 'num_sale': {'string': 'Num.Cof', 'type': 'char', 'size': '32'}, - } - - -def _pre_init(self, cr, uid, data, context): - def _get_journal(pool, order): - j_obj = pool.get('account.journal') - - journal_to_fetch = 'DEFAULT' - if order.amount_total < 0: - journal_to_fetch = 'GIFT' - else: - if order.amount_paid > 0: - journal_to_fetch = 'REBATE' - - pos_config_journal = pool.get('pos.config.journal') - ids = pos_config_journal.search(cr, uid, [('code', '=', journal_to_fetch)]) - objs = pos_config_journal.browse(cr, uid, ids) - journal='' - if objs: - journal = objs[0].journal_id.id - else: - existing = [payment.journal_id.id for payment in order.payments] - ids = j_obj.search(cr, uid, [('type', '=', 'cash')]) - for i in ids: - if i not in existing: - journal = i - break - if not journal: - journal = ids and ids[0] - return journal - pool = pooler.get_pool(cr.dbname) - order = pool.get('pos.order').browse(cr, uid, data['id'], context) - # get amount to pay: -# amount = Decimal(str(order.amount_total)) - Decimal(str(order.amount_paid)) - amount = order.amount_total - order.amount_paid - if amount <= 0: - pool.get('pos.order').action_paid(cr, uid, data['ids'], context) - - # get journal: - journal = _get_journal(pool, order) - - # check if an invoice is wanted: - #invoice_wanted_checked = not not order.partner_id # not not -> boolean - invoice_wanted_checked = False - - # select the current date - current_date = time.strftime('%Y-%m-%d') - - return {'journal': journal, 'amount': amount, 'invoice_wanted': invoice_wanted_checked, 'payment_date': current_date} - - -def _add_pay(self, cr, uid, data, context): - pool = pooler.get_pool(cr.dbname) - order_obj = pool.get('pos.order') - jrnl_obj = pool.get('account.journal') - result = data['form'] - invoice_wanted = data['form']['invoice_wanted'] - jrnl_used=False - if data['form'] and data['form'].get('journal',False): - jrnl_used=jrnl_obj.browse(cr,uid,data['form']['journal']) - - # add 'invoice_wanted' in 'pos.order' - order_obj.write(cr, uid, [data['id']], {'invoice_wanted': invoice_wanted}) - - order_obj.add_payment(cr, uid, data['id'], result, context=context) - return {} - - -def _check(self, cr, uid, data, context): - """Check the order: - if the order is not paid: continue payment, - if the order is paid print invoice (if wanted) or ticket. - """ - pool = pooler.get_pool(cr.dbname) - order_obj = pool.get('pos.order') - order = order_obj.browse(cr, uid, data['id'], context) - order_obj.test_order_lines(cr, uid, order, context=context) - - action = 'ask_pay' - if order.state == 'paid': - if order.partner_id: - if order.invoice_wanted: - action = 'invoice' - else: - action = 'paid' - elif order.date_payment: - action = 'receipt' - else: - action='paid' - - if order.amount_total == order.amount_paid: - order_obj.write(cr,uid,data['ids'],{'state':'done'}) - action = 'receipt' - - return action - - -def create_invoice(self, cr, uid, data, context): - wf_service = netsvc.LocalService("workflow") - for i in data['ids']: - wf_service.trg_validate(uid, 'pos.order', i, 'invoice', cr) - return {} - - - -_form = """<?xml version="1.0"?> -<form string="Add product :"> -<field name="product"/> -<field name="quantity"/> -</form> -""" -_fields = { - 'product': { - 'string': 'Product', - 'type': 'many2one', - 'relation': 'product.product', - 'required': True, - 'default': False - }, - - 'quantity': { - 'string': 'Quantity', - 'type': 'integer', - 'required': True, - 'default': 1}, - } - -def make_default(val): - def fct(obj, cr, uid): - return val - return fct - -def _get_returns(self, cr, uid, data, context): - - pool = pooler.get_pool(cr.dbname) - order_obj=pool.get('pos.order') - order=order_obj.browse(cr, uid, [data['id']])[0] - res={} - fields.clear() - arch_lst=['<?xml version="1.0"?>', '<form string="%s">' % _('Return lines'), '<label string="%s" colspan="4"/>' % _('Quantities you enter, match to products that will return to the stock.')] - for m in [line for line in order.lines]: - quantity=m.qty - arch_lst.append('<field name="return%s"/>\n<newline/>' % (m.id,)) - fields['return%s' % m.id]={'string':m.product_id.name, 'type':'float', 'required':True, 'default':quantity} - res.setdefault('returns', []).append(m.id) - arch_lst.append('</form>') - arch.string='\n'.join(arch_lst) - return res - -def _create_returns(self, cr, uid, data, context): - pool = pooler.get_pool(cr.dbname) - order_obj = pool.get('pos.order') - lines_obj = pool.get('pos.order.line') - picking_obj = pool.get('stock.picking') - stock_move_obj = pool.get('stock.move') - move_obj = pool.get('stock.move') - picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in', data['ids']), ('state', '=', 'done')]) - clone_list = [] - date_cur=time.strftime('%Y-%m-%d') - uom_obj = pool.get('product.uom') - wf_service = netsvc.LocalService("workflow") - for order_id in order_obj.browse(cr, uid, data['ids'], context=context): - prop_ids = pool.get("ir.property").search(cr, uid,[('name', '=', 'property_stock_customer')]) - val = pool.get("ir.property").browse(cr, uid,prop_ids[0]).value - cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order_id.shop_id.warehouse_id.id)) - res=cr.fetchone() - location_id=res and res[0] or None - stock_dest_id = int(val.split(',')[1]) - - order_obj.write(cr,uid,[order_id.id],{'type_rec':'Exchange'}) - if order_id.invoice_id: - pool.get('account.invoice').refund(cr, uid, [order_id.invoice_id.id],time.strftime('%Y-%m-%d'), False, order_id.name) - new_picking=picking_obj.create(cr,uid,{ - 'name':'%s (return)' %order_id.name, - 'move_lines':[], 'state':'draft', - 'type':'in', - 'date':date_cur, }) - for line in order_id.lines: - for r in data['form'].get('returns',[]): - if line.id==r and (data['form']['return%s' %r]!=0.0): - new_move=stock_move_obj.create(cr, uid,{ - 'product_qty': data['form']['return%s' %r], - 'product_uos_qty': uom_obj._compute_qty(cr, uid,data['form']['return%s' %r] ,line.product_id.uom_id.id), - 'picking_id':new_picking, - 'product_uom':line.product_id.uom_id.id, - 'location_id':location_id, - 'product_id':line.product_id.id, - 'location_dest_id':stock_dest_id, - 'name':'%s (return)' %order_id.name, - 'date':date_cur, - 'date_planned':date_cur,}) - lines_obj.write(cr,uid,[line.id],{'qty_rfd':(line.qty or 0.0) + data['form']['return%s' %r], - 'qty':line.qty-(data['form']['return%s' %r] or 0.0) - }) - wf_service.trg_validate(uid, 'stock.picking',new_picking,'button_confirm', cr) - picking_obj.force_assign(cr, uid, [new_picking], context) - return res - -def _create_returns2(self, cr, uid, data, context): - act={} - pool = pooler.get_pool(cr.dbname) - order_obj = pool.get('pos.order') - line_obj = pool.get('pos.order.line') - picking_obj = pool.get('stock.picking') - stock_move_obj = pool.get('stock.move') - picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in', data['ids']), ('state', '=', 'done')]) - clone_list = [] - date_cur=time.strftime('%Y-%m-%d') - uom_obj = pool.get('product.uom') - wf_service = netsvc.LocalService("workflow") - for order_id in order_obj.browse(cr, uid, data['ids'], context=context): - prop_ids = pool.get("ir.property").search(cr, uid,[('name', '=', 'property_stock_customer')]) - val = pool.get("ir.property").browse(cr, uid,prop_ids[0]).value - cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order_id.shop_id.warehouse_id.id)) - res=cr.fetchone() - location_id=res and res[0] or None - stock_dest_id = int(val.split(',')[1]) - if order_id.last_out_picking.id: - new_picking=picking_obj.copy(cr, uid, order_id.last_out_picking.id, {'name':'%s (return)' % order_id.name, - 'move_lines':[], 'state':'draft', 'type':'in', - 'type':'in', - 'date':date_cur, }) - new_order=order_obj.copy(cr,uid,order_id.id, {'name': 'Refund %s'%order_id.name, - 'lines':[], - 'statement_ids':[], - 'last_out_picking':[]}) - for line in order_id.lines: - for r in data['form'].get('returns',[]): - if line.id==r and (data['form']['return%s' %r]!=0.0): - new_move=stock_move_obj.create(cr, uid,{ - 'product_qty': data['form']['return%s' %r], - 'product_uos_qty': uom_obj._compute_qty(cr, uid,data['form']['return%s' %r] ,line.product_id.uom_id.id), - 'picking_id':new_picking, - 'product_uom':line.product_id.uom_id.id, - 'location_id':location_id, - 'product_id':line.product_id.id, - 'location_dest_id':stock_dest_id, - 'name':'%s (return)' %order_id.name, - 'date':date_cur, - 'date_planned':date_cur,}) - line_obj.copy(cr,uid,line.id,{'qty':-data['form']['return%s' %r], - 'order_id': new_order, - }) - order_obj.write(cr,uid, new_order, {'state':'done'}) - wf_service.trg_validate(uid, 'stock.picking',new_picking,'button_confirm', cr) - picking_obj.force_assign(cr, uid, [new_picking], context) - act = { - 'domain': "[('id', 'in', ["+str(new_order)+"])]", - 'name': 'Refunded Orders', - 'view_type': 'form', - 'view_mode': 'form,tree', - 'res_model': 'pos.order', - 'auto_refresh':0, - 'res_id':new_order, - 'view_id': False, - 'type': 'ir.actions.act_window' - } - else: - raise wizard.except_wizard(_('Error'), _('Last out picking No find!')) - - return act -def test(self,cr,uid,data,context={}): - # import pdb; pdb.set_trace() - data['id']=data['res_id'] - return {'id':data['res_id']} - -#def _raise(self,cr,uid,data,context={}): -# return datas -# raise wizard.except_wizard(_('Message'),_('You can not exchange products more than total paid amount.')) - - -#def _test_exist1(self,cr,uid,data,context={}): -# return 'choice' - -def _test_exist(self,cr,uid,data,context={}): -# order_obj= pooler.get_pool(cr.dbname).get('pos.order') -# order_line_obj= pooler.get_pool(cr.dbname).get('pos.order.line') -# obj=order_obj.browse(cr,uid, data['ids'])[0] -# am_tot=obj._amount_total(cr, uid, data['ids']) -# order_obj.write(cr,uid,data['ids'],{'state':'done'}) -# if obj.amount_total == obj.amount_paid: -# return 'receipt' -# elif obj.amount_total > obj.amount_paid: -# sql = """select max(id) from pos_order_line where order_id = %d """%(obj.id) -# cr.execute(sql) -# res = cr.fetchone() -# cr.execute("delete from pos_order_line where id = %d"%(res[0])) -# cr.commit() -# return 'choice_raise' -# else: - return 'add_p' - -def _close(self,cr,uid,data,context={}): - order_obj= pooler.get_pool(cr.dbname).get('pos.order') - order_line_obj= pooler.get_pool(cr.dbname).get('pos.order.line') - obj=order_obj.browse(cr,uid, data['ids'])[0] - order_obj.write(cr,uid,data['ids'],{'state':'done'}) - if obj.amount_total != obj.amount_paid: - return 'ask_pay' - else : - return 'receipt' - - - - -def _add_pdct(self, cr, uid, data, context): - pool = pooler.get_pool(cr.dbname) - order_obj = pool.get('pos.order') - line_obj = pool.get('pos.order.line') - picking_obj = pool.get('stock.picking') - wf_service = netsvc.LocalService("workflow") - prod_obj = pool.get('product.product') - stock_move_obj = pool.get('stock.move') - uom_obj = pool.get('product.uom') - date_cur=time.strftime('%Y-%m-%d') - order_obj.add_product(cr, uid, data['id'], data['form']['product'], - data['form']['quantity'], context=context) - cr.commit() - for order_id in order_obj.browse(cr, uid, data['ids'], context=context): - prod=data['form']['product'] - qty=data['form']['quantity'] - prop_ids = pool.get("ir.property").search(cr, uid,[('name', '=', 'property_stock_customer')]) - val = pool.get("ir.property").browse(cr, uid,prop_ids[0]).value - cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order_id.shop_id.warehouse_id.id)) - res=cr.fetchone() - location_id=res and res[0] or None - stock_dest_id = int(val.split(',')[1]) - - prod_id=prod_obj.browse(cr,uid,prod) - new_picking=picking_obj.create(cr,uid,{ - 'name':'%s (Added)' %order_id.name, - 'move_lines':[], - 'state':'draft', - 'type':'out', - 'date':date_cur, }) - new_move=stock_move_obj.create(cr, uid,{ - 'product_qty': qty, - 'product_uos_qty': uom_obj._compute_qty(cr, uid,prod_id.uom_id.id, qty, prod_id.uom_id.id), - 'picking_id':new_picking, - 'product_uom':prod_id.uom_id.id, - 'location_id':location_id, - 'product_id':prod_id.id, - 'location_dest_id':stock_dest_id, - 'name':'%s (return)' %order_id.name, - 'date':date_cur, - 'date_planned':date_cur,}) - - wf_service.trg_validate(uid, 'stock.picking',new_picking,'button_confirm', cr) - picking_obj.force_assign(cr, uid, [new_picking], context) - # order_obj.write(cr,uid,data['id'],{'state':'done','last_out_picking':new_picking}) - order_obj.write(cr,uid,data['id'],{'last_out_picking':new_picking}) - return {} - - - - -class wizard_return_picking(wizard.interface): - states={ - 'init':{ - 'actions':[_get_returns], - 'result':{'type':'form', - 'arch':arch, - 'fields':fields, - 'state':[('end','Cancel', 'gtk-cancel'),('return','Return goods and Exchange', 'gtk-ok'),('return_w','Return without Refund','gtk-ok')] - } - }, - 'return':{ - 'actions':[], - 'result':{ 'type': 'action', - 'action' : _create_returns, - 'state':'prod'} - }, - 'prod':{ - 'actions':[], - 'result': { - 'type': 'form', - 'arch': _form, - 'fields':_fields, - 'state': [('close','Close'),('choice','Continue')] - } - }, -# 'choice1' : { -# 'actions' : [_add_pdct], -# 'result' : {'type' : 'choice', 'next_state': _test_exist1 } -# }, - 'choice' : { - 'actions' : [], - 'result' : {'type' : 'choice', 'next_state': _test_exist } - }, -# 'choice_raise':{ -# 'actions':[], -# 'result':{ 'type': 'action', -# 'action' : _raise, -# 'state':'end'} -# }, - 'add_p' :{ - 'actions':[], - 'result':{ - 'type':'action', - 'action': _add_pdct, - 'state': 'prod'} - }, -# 'add_pp' :{ -# 'actions':[], -# 'result':{ -# 'type':'action', -# 'action': _add_pdct, -# 'state': 'end'} -# }, - 'receipt':{ - 'result': { - 'type': 'print', - 'report': 'pos.receipt', - 'state': 'end' - } - }, - 'return_w':{ - 'actions':[], - 'result':{'type':'action', 'action':_create_returns2, 'state':'end'} - }, - - 'close':{ - 'actions' : [], - 'result' : {'type' : 'choice', 'next_state': _close } - }, - - 'check': { - 'actions': [], - 'result': { - 'type': 'choice', - 'next_state': _check, - } - }, - - 'ask_pay': { - 'actions': [_pre_init], - 'result': { - 'type': 'form', - 'arch': payment_form, - 'fields': payment_fields, - 'state': (('end', 'Cancel'), ('add_pay', 'Ma_ke payment', 'gtk-ok', True) - ) - } - }, - 'add_pay': { - 'actions': [_add_pay], - 'result': { - 'type': 'state', - 'state': "check", - } - }, - - - 'invoice': { - 'actions': [create_invoice], - 'result': { - 'type': 'print', - 'report': 'pos.invoice', - 'state': 'end' - } - }, - 'receipt': { - 'actions': [], - 'result': { - 'type': 'print', - 'report': 'pos.receipt', - 'state': 'end' - } - }, - 'paid': { - 'actions': [], - 'result': { - 'type': 'state', - 'state': 'end' - } - }, - - } -wizard_return_picking('pos.return.picking') - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py index 4128e992c82..b3e18ced10a 100644 --- a/addons/product/__openerp__.py +++ b/addons/product/__openerp__.py @@ -49,13 +49,13 @@ 'update_xml': [ 'security/product_security.xml', 'security/ir.model.access.csv', + 'wizard/product_price_view.xml', 'product_data.xml', 'product_report.xml', 'product_view.xml', 'pricelist_view.xml', 'partner_view.xml', 'company_view.xml', - 'product_wizard.xml', 'process/product_process.xml' ], 'installable': True, diff --git a/addons/product/i18n/tr.po b/addons/product/i18n/tr.po index bb924db644c..62e52d410d2 100644 --- a/addons/product/i18n/tr.po +++ b/addons/product/i18n/tr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0_rc3\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-02-27 08:20+0000\n" -"Last-Translator: Oktay Altunergil <Unknown>\n" +"PO-Revision-Date: 2010-05-10 16:32+0000\n" +"Last-Translator: Angel Spy <melissadilara@yahoo.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:10+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:19+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: product @@ -90,7 +90,7 @@ msgstr "" #. module: product #: field:product.packaging,width:0 msgid "Width" -msgstr "En/Genişlik" +msgstr "Genişlik" #. module: product #: help:product.pricelist.item,product_tmpl_id:0 diff --git a/addons/product/partner_view.xml b/addons/product/partner_view.xml index 66e4ba84c37..6b756eb8d7f 100644 --- a/addons/product/partner_view.xml +++ b/addons/product/partner_view.xml @@ -9,7 +9,7 @@ <field name="arch" type="xml"> <page string="Sales & Purchases" position="inside"> <newline/> - <group col="2" colspan="2" name="sale_list"> + <group col="2" colspan="2"> <separator string="Sales Properties" colspan="2"/> <field name="property_product_pricelist"/> </group> diff --git a/addons/product/product_wizard.xml b/addons/product/product_wizard.xml deleted file mode 100644 index bd1567fb1d1..00000000000 --- a/addons/product/product_wizard.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" ?> -<openerp> - <data> - <wizard - id="report_wizard_price" - string="Price List" - model="product.product" - name="product.price_list" - keyword="client_print_multi" - groups="base.group_extended"/> - </data> -</openerp> diff --git a/addons/product/wizard/__init__.py b/addons/product/wizard/__init__.py index fed1bcf3783..47f5f2641fc 100644 --- a/addons/product/wizard/__init__.py +++ b/addons/product/wizard/__init__.py @@ -18,7 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## -import wizard_price +import product_price # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product/wizard/product_price.py b/addons/product/wizard/product_price.py new file mode 100644 index 00000000000..e5d73945c13 --- /dev/null +++ b/addons/product/wizard/product_price.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from osv import osv, fields +from tools.translate import _ + + +class product_price_list(osv.osv_memory): + _name = 'product.price_list' + _description = 'Product Price List' + + _columns = { + 'price_list': fields.many2one('product.pricelist', 'PriceList', required=True), + 'qty1': fields.integer('Quantity-1'), + 'qty2': fields.integer('Quantity-2'), + 'qty3': fields.integer('Quantity-3'), + 'qty4': fields.integer('Quantity-4'), + 'qty5': fields.integer('Quantity-5'), + } + _defaults = { + 'qty1': lambda *a: 0, + 'qty2': lambda *a: 0, + 'qty3': lambda *a: 0, + 'qty4': lambda *a: 0, + 'qty5': lambda *a: 0, + } + + def print_report(self, cr, uid, ids, context=None): + + """ + To get the date and print the report + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param context: A standard dictionary + @return : return report + """ + datas = {'ids': context.get('active_ids', [])} + res = self.read(cr, uid, ids, ['price_list','qty1', 'qty2','qty3','qty4','qty5'], context) + res = res and res[0] or {} + datas['form'] = res + return { + 'type': 'ir.actions.report.xml', + 'report_name': 'product.pricelist', + 'datas': datas, + } +product_price_list() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/product/wizard/product_price_view.xml b/addons/product/wizard/product_price_view.xml new file mode 100644 index 00000000000..17d9010ed43 --- /dev/null +++ b/addons/product/wizard/product_price_view.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> +<data> + + <!-- Product Price List --> + + <record id="view_product_price_list" model="ir.ui.view"> + <field name="name">Price List</field> + <field name="model">product.price_list</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="Price list"> + <field name="price_list" /> + <field name="qty1" colspan="2" /> + <field name="qty2" colspan="2" /> + <field name="qty3" colspan="2" /> + <field name="qty4" colspan="2" /> + <field name="qty5" colspan="2" /> + <button icon='gtk-cancel' special="cancel" + string="Close" /> + <button name="print_report" string="Print Report" + colspan="1" type="object" icon="gtk-print" /> + </form> + </field> + </record> + + <act_window id="action_product_price_list" + key2="client_action_multi" name="Price List" + res_model="product.price_list" src_model="product.product" + view_mode="form" target="new" view_type="form" /> + +</data> +</openerp> diff --git a/addons/product/wizard/wizard_price.py b/addons/product/wizard/wizard_price.py deleted file mode 100644 index 12c810b802d..00000000000 --- a/addons/product/wizard/wizard_price.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -############################################################################## - -import wizard - -qty1_form = '''<?xml version="1.0"?> -<form string="Price list"> - <field name="price_list" /> - <field name="qty1" colspan="2" /> - <field name="qty2" colspan="2" /> - <field name="qty3" colspan="2" /> - <field name="qty4" colspan="2" /> - <field name="qty5" colspan="2" /> - -</form>''' -qty1_fields = { - 'price_list' : {'string' : 'PriceList', 'type' : 'many2one', 'relation' : 'product.pricelist', 'required':True }, - 'qty1': {'string':'Quantity-1', 'type':'integer', 'default':0}, - 'qty2': {'string':'Quantity-2', 'type':'integer', 'default':0}, - 'qty3': {'string':'Quantity-3', 'type':'integer', 'default':0}, - 'qty4': {'string':'Quantity-4', 'type':'integer', 'default':0}, - 'qty5': {'string':'Quantity-5', 'type':'integer', 'default':0}, -} - - -class wizard_qty(wizard.interface): - - states = { - 'init': { - 'actions': [], - 'result': {'type':'form', 'arch':qty1_form, 'fields':qty1_fields, 'state':[('end','Cancel'),('price','Print')]} - }, - 'price': { - 'actions': [], - 'result': {'type':'print', 'report':'product.pricelist', 'state':'end'} - } - - } -wizard_qty('product.price_list') -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/purchase/__init__.py b/addons/purchase/__init__.py index 41c673c0104..301e32ebca9 100644 --- a/addons/purchase/__init__.py +++ b/addons/purchase/__init__.py @@ -25,6 +25,7 @@ import stock import wizard import report import stock +import company # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/__openerp__.py b/addons/purchase/__openerp__.py index 6687b330b2c..909b785fe72 100644 --- a/addons/purchase/__openerp__.py +++ b/addons/purchase/__openerp__.py @@ -31,7 +31,7 @@ """, 'author': 'Tiny', 'website': 'http://www.openerp.com', - 'depends': ['base', 'account', 'stock', 'process'], + 'depends': ['base', 'account', 'stock', 'process', 'mrp_procurement'], 'init_xml': [], 'update_xml': [ @@ -39,6 +39,7 @@ 'security/ir.model.access.csv', 'purchase_workflow.xml', 'purchase_sequence.xml', + 'company_view.xml', 'purchase_data.xml', 'wizard/purchase_order_group_view.xml', 'wizard/purchase_installer.xml', diff --git a/addons/purchase/company.py b/addons/purchase/company.py new file mode 100644 index 00000000000..2a01605782c --- /dev/null +++ b/addons/purchase/company.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from osv import osv,fields + +class company(osv.osv): + _inherit = 'res.company' + _columns = { + 'po_lead': fields.float('Purchase Lead Time', required=True, + help="This is the leads/security time for each purchase order."), + } + _defaults = { + 'po_lead': lambda *a: 1.0, + } +company() + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/company_view.xml b/addons/purchase/company_view.xml new file mode 100644 index 00000000000..d7707fe32c7 --- /dev/null +++ b/addons/purchase/company_view.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" ?> +<openerp> + <data> + + <record id="mrp_company" model="ir.ui.view"> + <field name="name">res.company.mrp.config</field> + <field name="model">res.company</field> + <field name="type">form</field> + <field name="inherit_id" ref="base.view_company_form"/> + <field name="arch" type="xml"> + <page string="Configuration" position="inside"> + <field name="po_lead"/> + </page> + </field> + </record> + + </data> +</openerp> diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 2bcc62c06ac..a7d69159873 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -19,6 +19,7 @@ # ############################################################################## +from mx import DateTime from osv import fields from osv import osv import time @@ -692,5 +693,86 @@ class purchase_order_line(osv.osv): return True purchase_order_line() +class mrp_procurement(osv.osv): + _inherit = 'mrp.procurement' + _columns = { + 'purchase_id': fields.many2one('purchase.order', 'Purchase Order'), + } + + def action_po_assign(self, cr, uid, ids, context={}): + """ This is action which call from workflow to assign purchase order to procurements + @return: True + """ + res = self.make_po(cr, uid, ids, context=context) + res = res.values() + return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value + + def make_po(self, cr, uid, ids, context={}): + """ Make purchase order from procurement + @return: New created Purchase Orders procurement wise + """ + res = {} + company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id + partner_obj = self.pool.get('res.partner') + uom_obj = self.pool.get('product.uom') + pricelist_obj = self.pool.get('product.pricelist') + prod_obj = self.pool.get('product.product') + acc_pos_obj = self.pool.get('account.fiscal.position') + po_obj = self.pool.get('purchase.order') + for procurement in self.browse(cr, uid, ids): + res_id = procurement.move_id.id + partner = procurement.product_id.seller_ids[0].name + partner_id = partner.id + address_id = partner_obj.address_get(cr, uid, [partner_id], ['delivery'])['delivery'] + pricelist_id = partner.property_product_pricelist_purchase.id + + uom_id = procurement.product_id.uom_po_id.id + + qty = uom_obj._compute_qty(cr, uid, procurement.product_uom.id, procurement.product_qty, uom_id) + if procurement.product_id.seller_ids[0].qty: + qty = max(qty,procurement.product_id.seller_ids[0].qty) + + price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, False, {'uom': uom_id})[pricelist_id] + + newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') + newdate = newdate - DateTime.RelativeDateTime(days=company.po_lead) + newdate = newdate - procurement.product_id.seller_ids[0].delay + + #Passing partner_id to context for purchase order line integrity of Line name + context.update({'lang': partner.lang, 'partner_id': partner_id}) + + product = prod_obj.browse(cr, uid, procurement.product_id.id, context=context) + + line = { + 'name': product.partner_ref, + 'product_qty': qty, + 'product_id': procurement.product_id.id, + 'product_uom': uom_id, + 'price_unit': price, + 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'), + 'move_dest_id': res_id, + 'notes': product.description_purchase, + } + + taxes_ids = procurement.product_id.product_tmpl_id.supplier_taxes_id + taxes = acc_pos_obj.map_tax(cr, uid, partner.property_account_position, taxes_ids) + line.update({ + 'taxes_id': [(6,0,taxes)] + }) + purchase_id = po_obj.create(cr, uid, { + 'origin': procurement.origin, + 'partner_id': partner_id, + 'partner_address_id': address_id, + 'location_id': procurement.location_id.id, + 'pricelist_id': pricelist_id, + 'order_line': [(0,0,line)], + 'company_id': procurement.company_id.id, + 'fiscal_position': partner.property_account_position and partner.property_account_position.id or False + }) + res[procurement.id] = purchase_id + self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': purchase_id}) + return res +mrp_procurement() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 839dc4306fa..555d1fb085c 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -323,7 +323,22 @@ <field name="act_window_id" ref="purchase_line_form_action2"/> </record> <menuitem action="purchase_line_form_action2" id="menu_purchase_line_order_draft" parent="menu_procurement_management_invoice"/> - + + <!-- + Procurements + --> + + <record id="view_procurement_form_inherit" model="ir.ui.view"> + <field name="name">mrp.procurement.form.inherit</field> + <field name="model">mrp.procurement</field> + <field name="inherit_id" ref="mrp_procurement.mrp_procurement_form_view"/> + <field name="type">form</field> + <field name="arch" type="xml"> + <xpath expr="/form/notebook/page/field[@name='close_move']" position="before"> + <field name="purchase_id"/> + </xpath> + </field> + </record> </data> </openerp> diff --git a/addons/purchase/purchase_workflow.xml b/addons/purchase/purchase_workflow.xml index 26f83d5a554..d7684be1875 100644 --- a/addons/purchase/purchase_workflow.xml +++ b/addons/purchase/purchase_workflow.xml @@ -177,6 +177,33 @@ <field name="act_from" ref="act_invoice_end"/> <field name="act_to" ref="act_done"/> </record> + + <!-- Procurement --> + <record id="act_buy" model="workflow.activity"> + <field name="wkf_id" ref="mrp_procurement.wkf_procurement"/> + <field name="name">buy</field> + <field name="kind">subflow</field> + <field name="subflow_id" search="[('osv','=','purchase.order')]"/> + <field name="action">action_po_assign()</field> + </record> + + <record id="trans_confirm_mto_buy" model="workflow.transition"> + <field name="act_from" ref="mrp_procurement.act_confirm_mto"/> + <field name="act_to" ref="act_buy"/> + <field name="condition">check_buy()</field> + </record> + + <record id="trans_buy_make_done" model="workflow.transition"> + <field name="act_from" ref="act_buy"/> + <field name="act_to" ref="mrp_procurement.act_make_done"/> + <field name="signal">subflow.delivery_done</field> + </record> + + <record id="trans_buy_cancel" model="workflow.transition"> + <field name="act_from" ref="act_buy"/> + <field name="act_to" ref="mrp_procurement.act_cancel"/> + <field name="signal">subflow.cancel</field> + </record> </data> </openerp> diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py index 8e4b4bc194c..14ff085a4c4 100644 --- a/addons/purchase_requisition/purchase_requisition.py +++ b/addons/purchase_requisition/purchase_requisition.py @@ -122,7 +122,7 @@ class purchase_order(osv.osv): if order.id<>po.id: wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'purchase.order', order.id, 'purchase_cancel', cr) - self.pool.get('purchase.requisition').write(cr, uid, [po.requisition_id.id], {'state':'close','date_end':time.strftime('%Y-%m-%d %H:%M:%S')}) + self.pool.get('purchase.requisition').write(cr, uid, [po.requisition_id.id], {'state':'done','date_end':time.strftime('%Y-%m-%d %H:%M:%S')}) return res diff --git a/addons/sale/__init__.py b/addons/sale/__init__.py index ebc12a1089e..71f33623c55 100644 --- a/addons/sale/__init__.py +++ b/addons/sale/__init__.py @@ -26,9 +26,10 @@ import sale import stock import product -import mrp +#import mrp import wizard import report +import company # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py index a6ff79b38cd..23e72c60775 100644 --- a/addons/sale/__openerp__.py +++ b/addons/sale/__openerp__.py @@ -42,13 +42,14 @@ """, 'author': 'Tiny', 'website': 'http://www.openerp.com', - 'depends': ['product', 'stock', 'mrp', 'process'], + 'depends': ['product', 'stock', 'mrp_procurement', 'process'], 'init_xml': [], 'update_xml': [ 'wizard/sale_make_invoice_advance.xml', 'wizard/sale_line_invoice.xml', 'security/sale_security.xml', 'security/ir.model.access.csv', + 'company_view.xml', 'sale_workflow.xml', 'sale_sequence.xml', 'sale_data.xml', @@ -56,7 +57,7 @@ 'report/sale_report_view.xml', 'sale_report.xml', 'stock_view.xml', - 'process/sale_process.xml', +# 'process/sale_process.xml', ], 'demo_xml': ['sale_demo.xml'], 'installable': True, diff --git a/addons/sale/company.py b/addons/sale/company.py new file mode 100644 index 00000000000..401a1a9c1d8 --- /dev/null +++ b/addons/sale/company.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from osv import osv,fields + +class company(osv.osv): + _inherit = 'res.company' + _columns = { + 'security_lead': fields.float('Security Days', required=True, + help="This is the days added to what you promise to customers "\ + "for security purpose"), + } + _defaults = { + 'security_lead': lambda *a: 5.0, + } +company() + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/company_view.xml b/addons/sale/company_view.xml new file mode 100644 index 00000000000..ead9128d6f3 --- /dev/null +++ b/addons/sale/company_view.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" ?> +<openerp> + <data> + + <record id="mrp_company" model="ir.ui.view"> + <field name="name">res.company.mrp.config</field> + <field name="model">res.company</field> + <field name="type">form</field> + <field name="inherit_id" ref="base.view_company_form"/> + <field name="arch" type="xml"> + <page string="Configuration" position="inside"> + <field name="security_lead"/> + </page> + </field> + </record> + + </data> +</openerp> diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml index 5da1a96f8d4..58e4be14d84 100644 --- a/addons/sale/process/sale_process.xml +++ b/addons/sale/process/sale_process.xml @@ -35,7 +35,7 @@ <field eval=""""Sale Order Requisition"""" name="name"/> <field eval=""""Drives procurement orders for every sale order line."""" name="note"/> <field name="subflow_id" ref="process_process_salesprocess0"/> - <field name="process_id" ref="mrp.process_process_procurementprocess0"/> + <field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/> <field eval=""""object.state in ('draft', 'waiting_date', 'manual', 'progress', 'shipping_except', 'invoice_except', 'done', 'cancel')"""" name="model_states"/> <field eval="1" name="flow_start"/> </record> @@ -63,12 +63,12 @@ </record> <record id="process_node_saleprocurement0" model="process.node"> - <field name="menu_id" ref="mrp.menu_mrp_procurement_action"/> - <field name="model_id" ref="mrp.model_mrp_procurement"/> + <field name="menu_id" ref="mrp_procurement.menu_mrp_procurement_action"/> + <field name="model_id" ref="mrp_procurement.model_mrp_procurement"/> <field eval=""""subflow"""" name="kind"/> <field eval=""""Procurement Order"""" name="name"/> <field eval=""""One Procurement order for each sale order line and for each of the components."""" name="note"/> - <field name="subflow_id" ref="mrp.process_process_procurementprocess0"/> + <field name="subflow_id" ref="mrp_procurement.process_process_procurementprocess0"/> <field name="process_id" ref="process_process_salesprocess0"/> <field eval=""""object.state=='confirmed'"""" name="model_states"/> <field eval="1" name="flow_start"/> @@ -202,7 +202,7 @@ <field eval="[(6,0,[])]" name="transition_ids"/> <field eval=""""Procurement of sold material"""" name="name"/> <field eval=""""For every sale order line, a procurement order is created to supply the sold product."""" name="note"/> - <field model="process.node" name="target_node_id" ref="mrp.process_node_procureproducts0"/> + <field model="process.node" name="target_node_id" ref="mrp_procurement.process_node_procureproducts0"/> <field model="process.node" name="source_node_id" ref="process_node_saleorderprocurement0"/> </record> diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index 259b5d75e39..d6ab6a7bc0c 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -1,6 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data noupdate="1"> + + <!-- + Resource: res.company + --> + <record id="res_company_shop_sale0" model="res.company"> + <field eval="5.0" name="security_lead"/> + <field name="partner_id" ref="stock.res_partner_tinyshop0"/> + <field name="parent_id" ref="stock.res_company_shop0"/> + <field eval=""""Shop 1"""" name="name"/> + </record> <!-- Resource: sale.order diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 5bf5967d58b..d9edb989b1f 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -163,8 +163,8 @@ <field groups="product.group_uos" name="product_uos"/> <field name="th_weight"/> <field name="address_allotment_id"/> - <separator colspan="4" string="Properties"/> - <field colspan="4" name="property_ids" nolabel="1"/> +<!-- <separator colspan="4" string="Properties"/>--> +<!-- <field colspan="4" name="property_ids" nolabel="1"/>--> </page> <page string="Notes"> <field colspan="4" name="notes" nolabel="1"/> @@ -188,7 +188,7 @@ </tree> </field> <newline/> - <group col="7" colspan="4"> + <group col="8" colspan="5"> <field name="amount_untaxed" sum="Untaxed amount"/> <field name="amount_tax"/> <field name="amount_total" sum="Total amount"/> @@ -395,9 +395,9 @@ icon="gtk-cancel" /> </group> </page> - <page string="Properties" groups="base.group_extended"> - <field name="property_ids" nolabel="1"/> - </page> +<!-- <page string="Properties" groups="base.group_extended">--> +<!-- <field name="property_ids" nolabel="1"/>--> +<!-- </page>--> <page string="Notes"> <field colspan="4" name="notes" nolabel="1"/> </page> diff --git a/addons/sale/security/ir.model.access.csv b/addons/sale/security/ir.model.access.csv index 44ce9f7d1fa..7af8c1e74a7 100644 --- a/addons/sale/security/ir.model.access.csv +++ b/addons/sale/security/ir.model.access.csv @@ -11,10 +11,7 @@ "access_account_analytic_account_salesman","account_analytic_account salesman","analytic.model_account_analytic_account","group_sale_user",1,1,1,1 "access_stock_picking_salesman","stock_picking salesman","stock.model_stock_picking","group_sale_user",1,1,1,1 "access_stock_move_salesman","stock_move salesman","stock.model_stock_move","group_sale_user",1,1,1,0 -"access_mrp_property_salesman","mrp.property salesman","mrp.model_mrp_property","group_sale_user",1,0,0,0 -"access_mrp_procurement_salesman","mrp.procurement salesman","mrp.model_mrp_procurement","group_sale_user",1,1,1,1 -"access_sale_order_mrp_user","sale.order mrp worker","model_sale_order","mrp.group_mrp_user",1,0,0,0 -"access_sale_order_line_mrp_user","sale.order.line mrp worker","model_sale_order_line","mrp.group_mrp_user",1,0,0,0 +"access_mrp_procurement_salesman","mrp.procurement salesman","mrp_procurement.model_mrp_procurement","group_sale_user",1,1,1,1 "access_sale_order_stock_worker","sale.order stock worker","model_sale_order","stock.group_stock_user",1,1,0,0 "access_sale_order_line_stock_worker","sale.order.line stock worker","model_sale_order_line","stock.group_stock_user",1,1,0,0 "access_sale_order_manager","sale.order.manager","model_sale_order","group_sale_manager",1,1,1,1 diff --git a/addons/smtpclient/i18n/de.po b/addons/smtpclient/i18n/de.po new file mode 100644 index 00000000000..4c97548e515 --- /dev/null +++ b/addons/smtpclient/i18n/de.po @@ -0,0 +1,840 @@ +# German translation for openobject-addons +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2009-11-26 06:00+0000\n" +"PO-Revision-Date: 2010-05-11 11:19+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: German <de@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2010-05-12 04:20+0000\n" +"X-Generator: Launchpad (build Unknown)\n" + +#. module: smtpclient +#: field:email.smtpclient.queue,bcc:0 +msgid "BCC to" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "__number__ for Invoice / Sales Number" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,ssl:0 +msgid "Use SSL?" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Start Server" +msgstr "" + +#. module: smtpclient +#: model:ir.actions.wizard,name:smtpclient.wizard_email_verifycode +msgid "Verify Server" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,priority:0 +msgid "Server Priority" +msgstr "" + +#. module: smtpclient +#: help:email.sendcode,init,emailto:0 +msgid "Enter the address Email where you want to get the Verification Code" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,auth_type:0 +msgid "Other Mail Servers" +msgstr "" + +#. module: smtpclient +#: constraint:ir.actions.act_window:0 +msgid "Invalid model name in the action definition." +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.queue,to:0 +msgid "Mail to" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "Message Error!" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,name:0 +msgid "Server Name" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,header_ids:0 +msgid "Default Headers" +msgstr "" + +#. module: smtpclient +#: wizard_button:email.testemail,init,send:0 +msgid "Send Email" +msgstr "" + +#. module: smtpclient +#: field:res.company.address,company_id:0 +msgid "Company" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Set to Draft" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/wizard/verifycode.py:0 +#, python-format +msgid "Server already verified!" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/wizard/sendcode.py:0 +#: code:addons/smtpclient/wizard/testemail.py:0 +#, python-format +msgid "Verification Failed. Please check the Server Configuration!" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "SMTP Server Error!" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,auth_type:0 +#: field:email.smtpclient,type:0 +msgid "Server Type" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,from_email:0 +msgid "Email From" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "User Information" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "OpenERP SMTP server Email Registration Code!" +msgstr "" + +#. module: smtpclient +#: model:ir.model,name:smtpclient.model_report_smtp_server +#: view:report.smtp.server:0 +msgid "Server Statistics" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Messages" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,type:0 +#: selection:res.company.address,name:0 +msgid "Sale" +msgstr "" + +#. module: smtpclient +#: field:email.headers,value:0 +msgid "Value" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Access Permission" +msgstr "" + +#. module: smtpclient +#: model:ir.model,name:smtpclient.model_email_headers +msgid "Email Headers" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,delete_queue:0 +msgid "Queue Option" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "Please configure Email Server Messages [Verification / Test]" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/wizard/verifycode.py:0 +#, python-format +msgid "Verification failed. Invalid Verification Code!" +msgstr "" + +#. module: smtpclient +#: model:ir.actions.act_window,name:smtpclient.act_mail_server_2_mail_history +msgid "Email History" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient.history:0 +msgid "Server History" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,auth_type:0 +msgid "Yahoo!!! Server" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +#: field:email.smtpclient,test_email:0 +msgid "Test Message" +msgstr "" + +#. module: smtpclient +#: field:report.smtp.server,server_id:0 +msgid "Server ID" +msgstr "" + +#. module: smtpclient +#: help:email.smtpclient,delete_queue_period:0 +msgid "delete emails/contents from email queue after specified no of days" +msgstr "" + +#. module: smtpclient +#: field:report.smtp.server,no:0 +msgid "Total No." +msgstr "" + +#. module: smtpclient +#: help:email.smtpclient,process_id:0 +msgid "Mail Transport Agent Process" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "__user__ for User Name" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,date_create:0 +msgid "Date Create" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,state:0 +msgid "Server Status" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.queue,error:0 +msgid "Last Error" +msgstr "" + +#. module: smtpclient +#: wizard_view:email.sendcode,init:0 +#: wizard_button:email.sendcode,init,send:0 +msgid "Send Code" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.queue,name:0 +msgid "Subject" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "Read Error!" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "Unable to read Server Settings" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,server_statistics:0 +msgid "Statistics" +msgstr "" + +#. module: smtpclient +#: wizard_view:email.testemail,init:0 +msgid "Test Email" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.history,server_id:0 +msgid "Smtp Server" +msgstr "" + +#. module: smtpclient +#: field:res.company,addresses:0 +msgid "Email Addresses" +msgstr "" + +#. module: smtpclient +#: model:ir.actions.act_window,name:smtpclient.action_email_smtpclient_history_tree +#: model:ir.ui.menu,name:smtpclient.menu_smtpclient_administration_server_history +msgid "Email Server History" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient.queue,state:0 +msgid "Waiting" +msgstr "" + +#. module: smtpclient +#: help:email.testemail,init,emailto:0 +msgid "Enter the address Email where you want to get the Test Email" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,state:0 +msgid "Not Verified" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.history,email:0 +msgid "Email" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient.queue,state:0 +msgid "Sent" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.history,user_id:0 +msgid "Username" +msgstr "" + +#. module: smtpclient +#: field:res.company.address,name:0 +msgid "Address Type" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Permission" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient.queue:0 +msgid "Message with All Headers" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Message Headers" +msgstr "" + +#. module: smtpclient +#: field:ir.actions.server,report_id:0 +msgid "Report" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Other Information" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Configuration" +msgstr "" + +#. module: smtpclient +#: constraint:ir.cron:0 +msgid "Invalid arguments" +msgstr "" + +#. module: smtpclient +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +#: field:email.smtpclient,disclaimers:0 +msgid "Disclaimers" +msgstr "" + +#. module: smtpclient +#: field:report.smtp.server,name:0 +msgid "Server" +msgstr "" + +#. module: smtpclient +#: view:res.company:0 +msgid "SMTP Settings" +msgstr "" + +#. module: smtpclient +#: help:email.smtpclient,body:0 +msgid "" +"The message text that will be send along with the email which is send " +"through this server" +msgstr "" + +#. module: smtpclient +#: model:ir.actions.wizard,name:smtpclient.wizard_email_testemail +msgid "Send Test Email" +msgstr "" + +#. module: smtpclient +#: model:ir.model,name:smtpclient.model_email_smtpclient_queue +msgid "Email Queue" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Server Information" +msgstr "" + +#. module: smtpclient +#: help:email.verifycode,init,code:0 +msgid "Enter the verification code thay you get in your verification Email" +msgstr "" + +#. module: smtpclient +#: model:ir.model,name:smtpclient.model_email_smtpclient_history +msgid "Email Client History" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,delete_queue:0 +msgid "Never Delete Message" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "OpenERP Test Email!" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +#: field:email.smtpclient,body:0 +#: view:email.smtpclient.queue:0 +#: field:email.smtpclient.queue,serialized_message:0 +msgid "Message" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,process_id:0 +msgid "MTA Process" +msgstr "" + +#. module: smtpclient +#: field:email.headers,server_id:0 +#: view:email.smtpclient:0 +#: field:email.smtpclient,server:0 +#: field:email.smtpclient.queue,server_id:0 +#: model:ir.ui.menu,name:smtpclient.menu_smtpclient_administration_smtp_server +msgid "SMTP Server" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,auth_type:0 +msgid "Google Server" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,state:0 +msgid "Verified" +msgstr "" + +#. module: smtpclient +#: help:email.smtpclient,priority:0 +msgid "" +"Priority between 0 to 10, will be used to define the MTA process priotiry" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,port:0 +msgid "SMTP Port" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "Email TO Address not Defined !" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "SMTP Server Error !" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,auth:0 +msgid "Use Auth" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,pstate:0 +msgid "Server Statue" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,user:0 +msgid "User Name" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,verify_email:0 +msgid "Verify Message" +msgstr "" + +#. module: smtpclient +#: model:ir.model,name:smtpclient.model_email_smtpclient +#: model:ir.module.module,shortdesc:smtpclient.module_meta_information +msgid "Email Client" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Disclaimers Message" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "__code__ for Verification Code" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient.queue,state:0 +msgid "Queued" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.history,date_create:0 +#: field:email.smtpclient.queue,date_create:0 +msgid "Date" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.queue,cc:0 +msgid "CC to" +msgstr "" + +#. module: smtpclient +#: model:email.smtpclient,verify_email:smtpclient.email_smtpclient_sendmailserver0 +msgid "" +"Verification Message. This is the code\n" +"__code__ \n" +"you must copy in the OpenERP Email Server (Verify Server wizard).\n" +"Created by user __user__" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient.queue:0 +#: model:ir.actions.act_window,name:smtpclient.action_email_smtpclient_queue_tree +#: model:ir.ui.menu,name:smtpclient.menu_smtpclient_administration_smtp_server_queue +msgid "Message Queue" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,type:0 +#: selection:res.company.address,name:0 +msgid "Default" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,delete_queue:0 +msgid "Delete Content After" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "You have no permission to access SMTP Server : %s " +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,active:0 +msgid "Active" +msgstr "" + +#. module: smtpclient +#: model:ir.actions.act_window,name:smtpclient.act_mail_server_2_mail_queue +msgid "Message Queus" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/wizard/sendcode.py:0 +#: code:addons/smtpclient/wizard/testemail.py:0 +#: code:addons/smtpclient/wizard/verifycode.py:0 +#: view:email.smtpclient.queue:0 +#: selection:email.smtpclient.queue,state:0 +#, python-format +msgid "Error" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "Server Error!" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,delete_queue:0 +msgid "Clear All After" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "" +"Please verify Email Server, without verification you can not send Email(s)." +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,history_line:0 +#: field:report.smtp.server,history:0 +msgid "History" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.queue,priority:0 +msgid "Message Priority" +msgstr "" + +#. module: smtpclient +#: field:ir.actions.server,file_ids:0 +msgid "Attachments" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "__name__ for Customer Name" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient.queue:0 +msgid "General" +msgstr "" + +#. module: smtpclient +#: field:email.headers,key:0 +msgid "Header" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "" +"Verification Message. This is the code\n" +"\n" +"__code__\n" +"\n" +"you must copy in the OpenERP Email Server (Verify Server wizard).\n" +"\n" +"Created by user __user__" +msgstr "" + +#. module: smtpclient +#: selection:res.company.address,name:0 +msgid "Invoice" +msgstr "" + +#. module: smtpclient +#: wizard_view:email.verifycode,init:0 +#: wizard_button:email.verifycode,init,check:0 +msgid "Verify Code" +msgstr "" + +#. module: smtpclient +#: wizard_button:email.sendcode,init,end:0 +#: wizard_button:email.testemail,init,end:0 +#: wizard_button:email.verifycode,init,end:0 +msgid "Cancel" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,delete_queue_period:0 +msgid "Delete after" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "Server is not Verified, Please Verify the Server !" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.history,resource_id:0 +msgid "Resource ID" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "SMTP Data Error !" +msgstr "" + +#. module: smtpclient +#: constraint:ir.model:0 +msgid "" +"The Object name must start with x_ and not contain any special character !" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,delete_queue:0 +msgid "Delete when Email Sent" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,type:0 +msgid "Account" +msgstr "" + +#. module: smtpclient +#: model:ir.module.module,description:smtpclient.module_meta_information +msgid "" +"Email Client module that provides:\n" +" Sending Email\n" +" Use Multiple Server\n" +" Multi Threading\n" +" Multi Attachment\n" +" " +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,type:0 +msgid "Stock" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.history,name:0 +msgid "Description" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,code:0 +#: wizard_field:email.verifycode,init,code:0 +msgid "Verification Code" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,pstate:0 +msgid "Stop" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.queue,body:0 +msgid "Email Text" +msgstr "" + +#. module: smtpclient +#: selection:res.company.address,name:0 +msgid "Delivery" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,pstate:0 +msgid "Running" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient.queue:0 +msgid "Last Error occured" +msgstr "" + +#. module: smtpclient +#: selection:email.smtpclient,state:0 +msgid "Waiting for Verification" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,password:0 +msgid "Password" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient,users_id:0 +msgid "Users Allowed" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/wizard/sendcode.py:0 +#, python-format +msgid "Verification Code Already Generated !" +msgstr "" + +#. module: smtpclient +#: wizard_field:email.sendcode,init,emailto:0 +#: field:email.smtpclient,email:0 +#: wizard_field:email.testemail,init,emailto:0 +#: view:res.company:0 +#: field:res.company.address,email:0 +msgid "Email Address" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Verification Message" +msgstr "" + +#. module: smtpclient +#: view:email.smtpclient:0 +msgid "Stop Server" +msgstr "" + +#. module: smtpclient +#: model:ir.ui.menu,name:smtpclient.menu_smtpclient_administration_server +msgid "Email Servers" +msgstr "" + +#. module: smtpclient +#: model:ir.actions.wizard,name:smtpclient.wizard_email_sendcode +msgid "Send Verification Code" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.history,model:0 +msgid "Model" +msgstr "" + +#. module: smtpclient +#: model:ir.actions.act_window,name:smtpclient.action_email_smtpclient_tree +#: field:ir.actions.server,email_server:0 +msgid "Email Server" +msgstr "" + +#. module: smtpclient +#: code:addons/smtpclient/smtpclient.py:0 +#, python-format +msgid "Permission Error!" +msgstr "" + +#. module: smtpclient +#: model:ir.model,name:smtpclient.model_res_company_address +msgid "res.company.address" +msgstr "" + +#. module: smtpclient +#: field:email.smtpclient.queue,state:0 +msgid "Message Status" +msgstr "" diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index d1ab1f2b577..20e0d30d8fb 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -62,6 +62,7 @@ Thanks to the double entry management, the inventory controlling is powerful and "product_data.xml", "product_view.xml", "partner_view.xml", + "report/report_stock_move_view.xml", "report/report_stock_view.xml", "report/report_stock_picking_view.xml", "security/stock_security.xml", diff --git a/addons/stock/report/__init__.py b/addons/stock/report/__init__.py index 6e0bc044d3e..a0a4bcb8ea5 100644 --- a/addons/stock/report/__init__.py +++ b/addons/stock/report/__init__.py @@ -27,6 +27,7 @@ import picking import lot_overview import lot_overview_all import report_stock +import report_stock_move import report_stock_picking # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py new file mode 100755 index 00000000000..b5388b336e6 --- /dev/null +++ b/addons/stock/report/report_stock_move.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +import tools +from osv import fields,osv + + +class report_stock_move(osv.osv): + _name = "report.stock.move" + _description = "Stock Statistics" + _auto = False + _columns = { + 'date': fields.date('Date', readonly=True), + 'year': fields.char('Year', size=4, readonly=True), + 'day': fields.char('Day', size=128, readonly=True), + 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), + ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), + ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), + 'product_id':fields.many2one('product.product', 'Product', readonly=True), + 'location_id':fields.many2one('stock.location', 'Location', readonly=True), + 'product_qty':fields.integer('Qty',readonly=True), + 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True, + help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Avaiable\'.\n When the picking it done the state is \'Done\'.\ + \nThe state is \'Waiting\' if the move is waiting for another one.'), + + } + + def init(self, cr): + tools.drop_view_if_exists(cr, 'report_stock_move') + cr.execute(""" + create or replace view report_stock_move as ( + select min(m.id) as id, + m.date as date, + to_char(date_trunc('day',m.date), 'YYYY') as year, + to_char(date_trunc('day',m.date), 'MM') as month, + to_char(date_trunc('day',m.date), 'YYYY-MM-DD') as day, + m.location_id as location_id, + m.product_id as product_id, + m.state as state, + sum(m.product_qty) as product_qty + from stock_move as m group by m.product_id, m.location_id, m.id, m.date, m.state + ) + """) +report_stock_move() diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml new file mode 100755 index 00000000000..79657da0fc7 --- /dev/null +++ b/addons/stock/report/report_stock_move_view.xml @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> +<data> + <record id="view_stock_tree" model="ir.ui.view"> + <field name="name">report.stock.move.tree</field> + <field name="model">report.stock.move</field> + <field name="type">tree</field> + <field name="arch" type="xml"> + <tree string="Stock Orders Statistics"> + <field name="date"/> + <field name="year" invisible="1" /> + <field name="month" invisible="1"/> + <field name="day" invisible="1"/> + <field name="product_id"/> + <field name="product_qty"/> + <field name="location_id"/> + <field name="state"/> + </tree> + </field> + </record> + + <record id="view_stock_graph" model="ir.ui.view"> + <field name="name">report.stock.move.graph</field> + <field name="model">report.stock.move</field> + <field name="type">graph</field> + <field name="arch" type="xml"> + <graph string="Stock Moves Statistics" type="bar"> + <field name="product_id"/> + <field name="product_qty"/> + </graph> + </field> + </record> + + <record id="view_stock_search" model="ir.ui.view"> + <field name="name">report.stock.move.search</field> + <field name="model">report.stock.move</field> + <field name="type">search</field> + <field name="arch" type="xml"> + <search string="Stock Move"> + <group> + <filter icon="terp-stock" + string="This Year" + domain="[('year','=',time.strftime('%%Y'))]" + help="Stock Moves of the year"/> + <filter icon="terp-stock" + string="This Month" + domain="[('month','=',time.strftime('%%m'))]" + help="Stock Moves of this month"/> + <filter icon="terp-stock" + string="Current Stock" + separator="1" + domain="[('date', '=', time.strftime('%%Y-%%m-%%d')]" + help="Stock Moves of today"/> + <separator orientation="vertical"/> + + <filter string="Waiting" + icon="terp-stock" + domain="[('state','=','waiting')]" + help = "Confirmed Stock-Moves"/> + + <filter string="Available" + icon="terp-stock" + domain="[('state','=','assigned')]" + help = "Available Stock-Moves"/> + + <filter string="Done" + icon="terp-stock" + domain="[('state','=','done')]" + help = "Completed Stock-Moves"/> + + <separator orientation="vertical"/> + <field name="product_id" select="1" widget="selection"/> + <field name="location_id" select="1" widget="selection"/> + </group> + <newline/> + <group expand="1" string="Group By..." > + <filter string="Product" icon="terp-stock" context="{'group_by':'product_id'}"/> + <filter string="Location" icon="terp-stock" context="{'group_by':'location_id'}"/> + <filter string="State" icon="terp-stock" context="{'group_by':'state'}"/> + <separator orientation="vertical"/> + <filter string="Day" icon="terp-stock" context="{'group_by':'day'}"/> + <filter string="Month" icon="terp-stock" context="{'group_by':'date'}"/> + <filter string="Year" icon="terp-stock" context="{'group_by':'year'}"/> + </group> + </search> + </field> + </record> + + <record id="action_stock_move_report" model="ir.actions.act_window"> + <field name="name">Stock Moves</field> + <field name="res_model">report.stock.move</field> + <field name="view_type">form</field> + <field name="view_mode">tree,graph</field> + <field name="search_view_id" ref="view_stock_search"/> + + </record> + + <menuitem + id="stock.next_id_61" + name="Reporting" + parent="stock.menu_stock_root" groups="base.group_user"/> + + <menuitem action="action_stock_move_report" id="menu_action_stock_move_report" parent="next_id_61" sequence="5"/> + +</data> +</openerp>
\ No newline at end of file diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 94b56079527..a569a9dcbea 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -182,6 +182,7 @@ class stock_location(osv.osv): 'stock_real_value': fields.function(_product_value, method=True, type='float', string='Real Stock Value', multi="stock"), 'stock_virtual_value': fields.function(_product_value, method=True, type='float', string='Virtual Stock Value', multi="stock"), 'company_id': fields.many2one('res.company', 'Company', required=True,select=1), + 'scrap_location': fields.boolean('Scrap Location', help='Check this box if the current location is a place for destroyed items'), } _defaults = { 'active': lambda *a: 1, @@ -194,6 +195,7 @@ class stock_location(osv.osv): 'posy': lambda *a: 0, 'posz': lambda *a: 0, 'icon': lambda *a: False, + 'scrap_location': lambda *a: False, } def chained_location_get(self, cr, uid, location, partner=None, product=None, context={}): @@ -488,7 +490,7 @@ class stock_picking(osv.osv): 'min_date': fields.function(get_min_max_date, fnct_inv=_set_minimum_date, multi="min_max_date", method=True, store=True, type='datetime', string='Expected Date', select=1, help="Expected date for Picking. Default it takes current date"), 'date': fields.datetime('Order Date', help="Date of Order"), - 'date_done': fields.datetime('Date Done', help="Date of completion"), + 'date_done': fields.datetime('Date Done', help="Date of Completion"), 'max_date': fields.function(get_min_max_date, fnct_inv=_set_maximum_date, multi="min_max_date", method=True, store=True, type='datetime', string='Max. Expected Date', select=2), 'move_lines': fields.one2many('stock.move', 'picking_id', 'Internal Moves', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}), @@ -1212,7 +1214,7 @@ class stock_move(osv.osv): 'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin"), 'move_stock_return_history': fields.many2many('stock.move', 'stock_move_return_history', 'move_id', 'return_move_id', 'Move Return History',readonly=True), 'delivered_id': fields.many2one('stock.delivery', 'Product delivered'), - 'scraped': fields.boolean('Scraped'), + 'scraped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scraped'), } _constraints = [ (_check_tracking, @@ -1249,8 +1251,8 @@ class stock_move(osv.osv): 'location_dest_id': _default_location_destination, 'state': lambda *a: 'draft', 'priority': lambda *a: '1', - 'scraped' : lambda *a:False, 'product_qty': lambda *a: 1.0, + 'scraped' : lambda *a: False, 'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.move', context=c) diff --git a/addons/stock/stock_data.xml b/addons/stock/stock_data.xml index 704782eddd8..9b3bf1fb9d5 100644 --- a/addons/stock/stock_data.xml +++ b/addons/stock/stock_data.xml @@ -37,6 +37,11 @@ <field name="usage">view</field> <field name="icon">terp-mrp</field> </record> + <record id="stock_location_scraped" model="stock.location"> + <field name="name">Scraped</field> + <field name="location_id" ref="stock_location_locations_virtual"/> + <field name="scrap_location">True</field> + </record> <record id="location_inventory" model="stock.location"> <field name="name">Inventory loss</field> diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index 4f14834a648..10a24cb7a15 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -198,13 +198,9 @@ <field eval="1" name="active"/> </record> <record id="res_company_shop0" model="res.company"> - <field eval="5.0" name="security_lead"/> <field name="currency_id" ref="base.EUR"/> - <field eval="1.0" name="po_lead"/> <field name="partner_id" ref="res_partner_tinyshop0"/> - <field eval="1.0" name="manufacturing_lead"/> <field name="parent_id" ref="base.main_company"/> - <field eval="80.0" name="schedule_range"/> <field eval=""""Shop 1"""" name="name"/> </record> <record id="res_partner_tinyshop1" model="res.partner"> diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 5081491c6d2..b7a865e3d8f 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -409,6 +409,7 @@ <field name="location_id"/> <field name="address_id" context="{'contact_display':'partner'}"/> <field name="icon" groups="base.group_extended"/> + <field name="scrap_location"/> <newline/> <group col="2" colspan="2" groups="base.group_extended"> <separator string="Chained Locations" colspan="2"/> @@ -610,7 +611,7 @@ <notebook colspan="4"> <page string="General Information"> <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}"> - <tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Stock Moves"> + <tree colors="grey:state in ('done','cancel');black:state not in ('cancel','done')" string="Stock Moves"> <field name="name" string="Move Name"/> <field name="product_id"/> <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/> @@ -760,7 +761,7 @@ <notebook colspan="4"> <page string="General Information"> <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}"> - <tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Stock Moves"> + <tree colors="grey:state in ('done','cancel');black:state not in ('cancel','done')" string="Stock Moves"> <field name="name" string="Move Name"/> <field name="product_id"/> <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/> @@ -938,7 +939,7 @@ <notebook colspan="4"> <page string="General Information"> <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}"> - <tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Stock Moves"> + <tree colors="grey:state in ('done','cancel');black:state not in ('cancel','done')" string="Stock Moves"> <field name="name" string="Move Name"/> <field name="product_id"/> <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/> @@ -956,7 +957,7 @@ states="draft,waiting,confirmed,assigned" /> <button name="%(stock.move_scrap)d" - string="D" type="action" + string="Scrap Products" type="action" icon="gtk-convert" states="draft,waiting,confirmed,assigned" /> </tree> @@ -1115,7 +1116,7 @@ <notebook colspan="4"> <page string="General Information"> <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_in_id': address_id}"> - <tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Stock Moves"> + <tree colors="grey:state in ('done','cancel');black:state not in ('cancel','done')" string="Stock Moves"> <field name="product_id"/> <field name="product_qty"/> <field name="product_uom" string="Product Unit of Measure"/> diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py index 500b0bdc372..00b7b616aa5 100644 --- a/addons/stock/wizard/stock_move.py +++ b/addons/stock/wizard/stock_move.py @@ -86,9 +86,10 @@ class stock_move_consume(osv.osv_memory): if 'product_uom' in fields: res.update({'product_uom': move.product_uom.id}) if 'product_qty' in fields: - res.update({'product_qty': move.product_qty}) + res.update({'product_qty': move.product_qty}) if 'location_id' in fields: res.update({'location_id': move.location_id.id}) + return res def do_move_consume(self, cr, uid, ids, context={}): @@ -121,9 +122,41 @@ class stock_move_scrap(osv.osv_memory): _inherit = "stock.move.consume" _defaults = { - 'location_id': lambda *x: False + 'location_id': lambda *x: False } + def default_get(self, cr, uid, fields, context=None): + """ + Get default values + + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param fields: List of fields for default value + @param context: A standard dictionary + + @return: default values of fields + + """ + res = super(stock_move_consume, self).default_get(cr, uid, fields, context=context) + move = self.pool.get('stock.move').browse(cr, uid, context['active_id'], context=context) + location_obj = self.pool.get('stock.location') + scrpaed_location_ids = location_obj.search(cr, uid, [('scrap_location','=',True)]) + + if 'product_id' in fields: + res.update({'product_id': move.product_id.id}) + if 'product_uom' in fields: + res.update({'product_uom': move.product_uom.id}) + if 'product_qty' in fields: + res.update({'product_qty': move.product_qty}) + if 'location_id' in fields: + if scrpaed_location_ids: + res.update({'location_id': scrpaed_location_ids[0]}) + else: + res.update({'location_id': False}) + + return res + def move_scrap(self, cr, uid, ids, context={}): """ To move scraped products diff --git a/addons/stock/wizard/stock_move_view.xml b/addons/stock/wizard/stock_move_view.xml index 55fc8a6d8a7..5f58072f17a 100644 --- a/addons/stock/wizard/stock_move_view.xml +++ b/addons/stock/wizard/stock_move_view.xml @@ -40,7 +40,7 @@ <form string="Consume Move"> <separator string="Consume Products" colspan="4"/> <field name="product_id" colspan="4" readonly="1"/> - <field name="location_id" colspan="4"/> + <field name="location_id" colspan="4" widget="selection"/> <field name="product_qty" colspan="2"/> <field name="product_uom" nolabel="1" readonly="1"/> <newline/> @@ -73,7 +73,7 @@ <form string="Scrap Move"> <separator string="Scrap Products" colspan="4"/> <field name="product_id" colspan="4" readonly="1"/> - <field name="location_id" colspan="4" string="Dest. Location" domain="[('usage','<>','view')]"/> + <field name="location_id" colspan="4" string="Dest. Location" domain="[('usage','<>','view'),('scrap_location','=',True)]" widget="selection"/> <field name="product_qty" colspan="2"/> <field name="product_uom" nolabel="1" readonly="1"/> <newline/> diff --git a/addons/wiki/i18n/tr.po b/addons/wiki/i18n/tr.po index 0fd7250c93c..3d518e67a0d 100644 --- a/addons/wiki/i18n/tr.po +++ b/addons/wiki/i18n/tr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-02-14 21:39+0000\n" -"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n" +"PO-Revision-Date: 2010-05-10 17:37+0000\n" +"Last-Translator: Nurettin Ayarcı <nurettinx@gmail.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:18+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:19+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: wiki @@ -25,7 +25,7 @@ msgstr "" #: constraint:ir.model:0 msgid "" "The Object name must start with x_ and not contain any special character !" -msgstr "" +msgstr "Nesne adı x_ ile başlamalı ve özel karakter içermemelidir!" #. module: wiki #: model:ir.model,name:wiki.model_wiki_groups_link @@ -78,7 +78,7 @@ msgstr "" #. module: wiki #: field:wiki.wiki,text_area:0 msgid "Content" -msgstr "" +msgstr "İçerik" #. module: wiki #: model:ir.ui.menu,name:wiki.menu_document_configuration @@ -119,7 +119,7 @@ msgstr "" #. module: wiki #: view:wiki.groups:0 msgid "Create a Menu" -msgstr "" +msgstr "Menü Oluştur" #. module: wiki #: field:wiki.groups,notes:0 @@ -195,7 +195,7 @@ msgstr "Görüntüleme mimarisi için Geçersiz XML" #. module: wiki #: field:wiki.wiki.history,text_area:0 msgid "Text area" -msgstr "" +msgstr "Metin alanı" #. module: wiki #: wizard_field:wiki.create.menu,init,menu_parent_id:0 @@ -216,7 +216,7 @@ msgstr "" #: wizard_view:wiki.create.menu,init:0 #: wizard_view:wiki.make.index,init:0 msgid "Menu Information" -msgstr "" +msgstr "Menü Bilgisi" #. module: wiki #: field:wiki.groups,parent_id:0 @@ -228,12 +228,12 @@ msgstr "" #: field:wiki.wiki,summary:0 #: field:wiki.wiki.history,summary:0 msgid "Summary" -msgstr "" +msgstr "Özet" #. module: wiki #: field:wiki.groups,create_date:0 msgid "Created Date" -msgstr "" +msgstr "Oluşturulma Tarihi" #. module: wiki #: model:ir.actions.act_window,name:wiki.action_history @@ -259,12 +259,12 @@ msgstr "" #. module: wiki #: wizard_field:wiki.create.menu,init,menu_name:0 msgid "Menu Name" -msgstr "" +msgstr "Menu İsmi" #. module: wiki #: view:wiki.wiki:0 msgid "Modifications" -msgstr "" +msgstr "Değişiklikler" #. module: wiki #: model:ir.actions.act_window,name:wiki.act_wiki_wiki_history @@ -275,18 +275,18 @@ msgstr "" #: model:ir.ui.menu,name:wiki.menu_document #: view:wiki.wiki:0 msgid "Wiki" -msgstr "" +msgstr "Wiki" #. module: wiki #: field:wiki.wiki,write_date:0 msgid "Modification Date" -msgstr "" +msgstr "Değiştirilme Tarihi" #. module: wiki #: model:ir.actions.wizard,name:wiki.wizard_make_index #: wizard_button:wiki.make.index,init,yes:0 msgid "Create Index" -msgstr "" +msgstr "dizin yarat" #. module: wiki #: field:wiki.wiki.history,minor_edit:0 @@ -299,12 +299,12 @@ msgstr "" #: wizard_button:wiki.create.menu,init,create_menu:0 #: wizard_view:wiki.make.index,init:0 msgid "Create Menu" -msgstr "" +msgstr "Menü Oluştur" #. module: wiki #: field:wiki.wiki,tags:0 msgid "Tags" -msgstr "" +msgstr "Etiketler" #. module: wiki #: model:ir.actions.act_window,name:wiki.action_wiki_groups @@ -330,12 +330,12 @@ msgstr "" #: wizard_button:wiki.create.menu,init,end:0 #: wizard_button:wiki.make.index,init,end:0 msgid "Cancel" -msgstr "" +msgstr "Vazgeç" #. module: wiki #: field:wizard.wiki.history.show_diff,diff:0 msgid "Diff" -msgstr "" +msgstr "Farklar" #. module: wiki #: field:wiki.wiki,review:0 |
