diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 8ae66ba34b7..3ae70200ffb 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -266,14 +266,7 @@
form
- Define Recurring
+ Recurring Models
account.model
form
tree,form
@@ -1916,11 +1909,11 @@
-
+
-
+
-
+
Create Account
diff --git a/addons/account/data/account_data2.xml b/addons/account/data/account_data2.xml
index 10303dd8cbf..235716e4c94 100644
--- a/addons/account/data/account_data2.xml
+++ b/addons/account/data/account_data2.xml
@@ -74,12 +74,6 @@
credit
-
-
- Analytic Account
- analytic_account_id
-
-
Ref
diff --git a/addons/account/i18n/it.po b/addons/account/i18n/it.po
index 62a2d826964..ff71f9efc36 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-07-08 08:56+0000\n"
+"PO-Revision-Date: 2010-07-28 12:08+0000\n"
"Last-Translator: eLBati - 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-07-09 03:56+0000\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:33+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -193,8 +193,6 @@ msgstr "Seleziona la riga del movimento"
#. 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 "Inserisci etichetta"
@@ -239,7 +237,6 @@ msgstr "Voci ricorrenti"
#: field:account.move,amount:0
#: field:account.tax,amount:0
#: field:account.tax.template,amount:0
-#: xsl:account.transfer:0
msgid "Amount"
msgstr "Importo"
@@ -309,7 +306,6 @@ msgstr "Ritardo Pagamenti"
#. 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
@@ -349,11 +345,12 @@ msgid "Delta Debit"
msgstr "Delta di Debito"
#. module: account
+#: model:account.account.type,name:account.account_type_tax
#: rml:account.invoice:0
#: field:account.invoice,amount_tax:0
#: field:account.move.line,account_tax_id:0
msgid "Tax"
-msgstr "Tassa"
+msgstr "Imposte"
#. module: account
#: rml:account.general.journal:0
@@ -363,7 +360,9 @@ msgstr "Debito Trans."
#. module: account
#: field:account.analytic.line,account_id:0
#: field:account.invoice.line,account_analytic_id:0
+#: wizard_field:account.invoice.pay,addendum,analytic_id:0
#: field:account.move.line,analytic_account_id:0
+#: wizard_field:account.move.line.reconcile,addendum,analytic_id:0
#: field:report.hr.timesheet.invoice.journal,account_id:0
msgid "Analytic Account"
msgstr "Contabilità Analitica"
@@ -684,8 +683,11 @@ msgstr "Sub-totale"
#. module: account
#: field:account.analytic.account,line_ids:0
#: view:account.analytic.line:0
+#: code:addons/account/project/wizard/wizard_account_analytic_line.py:0
#: model:ir.actions.act_window,name:account.action_account_analytic_line_form
+#: model:ir.actions.act_window,name:account.action_account_tree1
#: model:ir.ui.menu,name:account.next_id_41
+#, python-format
msgid "Analytic Entries"
msgstr "Voci analitiche"
@@ -700,6 +702,7 @@ msgid "Associated Partner"
msgstr "Partner associato"
#. module: account
+#: view:account.invoice:0
#: field:account.invoice,comment:0
msgid "Additional Information"
msgstr "Informazioni Aggiuntive"
@@ -1473,6 +1476,9 @@ msgstr "Lasciare vuoto per usare il conto di ricavo"
#: 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
+#: code:addons/account/wizard/wizard_pay_invoice.py:0
+#: code:addons/account/wizard/wizard_reconcile.py:0
+#, python-format
msgid "Write-Off"
msgstr ""
@@ -1879,7 +1885,6 @@ msgstr ""
#: field:account.journal,type:0
#: field:account.move,type:0
#: field:account.move.reconcile,type:0
-#: xsl:account.transfer:0
msgid "Type"
msgstr "Tipo"
@@ -2315,13 +2320,13 @@ msgstr ""
#: selection:account.general.ledger.report,checktype,sortbydate:0
#: rml:account.journal.period.print:0
#: field:account.move,date:0
+#: wizard_field:account.move.line.reconcile,addendum,date_p: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 "Data"
@@ -2438,6 +2443,7 @@ msgstr "Data fine"
#: 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_select
#: 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"
@@ -2629,6 +2635,8 @@ msgstr ""
#. module: account
#: rml:account.analytic.account.journal:0
+#: wizard_view:account.invoice.pay,addendum:0
+#: wizard_view:account.move.line.reconcile,addendum: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
@@ -2732,6 +2740,7 @@ msgid "Invoice Number"
msgstr "Numero fattura"
#. module: account
+#: wizard_field:account.analytic.account.balance.report,init,date2:0
#: field:account.period,date_stop:0
msgid "End of Period"
msgstr ""
@@ -2915,8 +2924,6 @@ msgstr ""
#: 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 ""
@@ -2973,9 +2980,11 @@ msgstr "Righe movimento"
#: 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
+#: code:addons/account/wizard/wizard_reconcile_select.py: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
+#, python-format
msgid "Reconciliation"
msgstr "Riconciliazione"
@@ -3035,7 +3044,6 @@ msgstr "Situazione"
#. module: account
#: rml:account.invoice:0
-#: xsl:account.transfer:0
msgid "Document"
msgstr "Documento"
@@ -3083,6 +3091,8 @@ msgstr "Libro Giornale analitico"
#. module: account
#: rml:account.general.ledger:0
+#: rml:account.third_party_ledger:0
+#: rml:account.third_party_ledger_other:0
msgid "Entry Label"
msgstr ""
@@ -3276,6 +3286,7 @@ msgid "Generate Fiscal Year Opening Entries"
msgstr ""
#. module: account
+#: view:account.move.reconcile:0
#: model:ir.actions.wizard,name:account.wizard_reconcile
msgid "Reconcile Entries"
msgstr "Riconcilia registrazioni"
@@ -3625,7 +3636,6 @@ msgid ""
msgstr ""
#. module: account
-#: wizard_field:account.invoice.pay,addendum,comment:0
#: wizard_field:account.invoice.pay,init,name:0
msgid "Entry Name"
msgstr ""
@@ -4940,6 +4950,7 @@ msgid "Invoice Lines"
msgstr ""
#. module: account
+#: wizard_field:account.analytic.account.balance.report,init,date1:0
#: field:account.period,date_start:0
msgid "Start of Period"
msgstr ""
@@ -5213,7 +5224,7 @@ msgstr ""
#: field:account.invoice,payment_ids:0
#: selection:account.vat.declaration,init,based_on:0
msgid "Payments"
-msgstr ""
+msgstr "Pagamenti"
#. module: account
#: model:process.node,note:account.process_node_accountingstatemententries0
@@ -5332,8 +5343,6 @@ msgstr ""
#: 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 ""
@@ -5342,7 +5351,7 @@ msgstr ""
#: view:account.move:0
#: view:account.move.line:0
msgid "Optional Information"
-msgstr ""
+msgstr "Informazioni aggiuntive"
#. module: account
#: model:ir.actions.act_window,name:account.action_payment_term_form
@@ -5415,7 +5424,6 @@ 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
@@ -5501,7 +5509,7 @@ msgstr ""
#: view:account.move:0
#: view:account.move.line:0
msgid "General Information"
-msgstr ""
+msgstr "Informazioni Generali"
#. module: account
#: help:populate_statement_from_inv,init,journal_id:0
@@ -5604,7 +5612,6 @@ msgstr "Anno fiscale da chiudere"
#. 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
@@ -6126,7 +6133,7 @@ msgid "Show Comparision in %"
msgstr ""
#. module: account
-#: wizard_view:account.balance.account.balance.report,init:0
+#: wizard_view:account.analytic.account.balance.report,init:0
msgid "Select Period"
msgstr ""
@@ -6290,3 +6297,92 @@ msgstr ""
#: view:report.invoice.created:0
msgid "Untaxed Amount"
msgstr ""
+
+#~ msgid "account.config.wizard"
+#~ msgstr "account.config.wizard"
+
+#, python-format
+#~ msgid "Integrity Error !"
+#~ msgstr "Errore di Integrità!"
+
+#, python-format
+#~ msgid ""
+#~ "Specified Journal does not have any account move entries in draft state for "
+#~ "this period"
+#~ msgstr ""
+#~ "Il Giornale specificato non ha nessun movimento in stato di bozza per questo "
+#~ "periodo"
+
+#, python-format
+#~ msgid "You have to provide an account for the write off entry !"
+#~ msgstr "Occorre inserire un conto per la scrittura della registrazione"
+
+#, python-format
+#~ msgid "Warning !"
+#~ msgstr "Attenzione !"
+
+#, python-format
+#~ msgid "You can not delete posted movement: \"%s\"!"
+#~ msgstr "Non è possibile cancellare il movimento registrato \"%s\"!"
+
+#, python-format
+#~ msgid "No analytic journal !"
+#~ msgstr "Nessun Giornale analitico presente!"
+
+#, python-format
+#~ msgid "You can not use this general account in this journal !"
+#~ msgstr "Non è possibile utilizzare questo conto generale in questo giornale!"
+
+#, python-format
+#~ msgid "You can not add/modify entries in a closed journal."
+#~ msgstr "Non si può aggiungere/modificare registrazioni in un giornale chiuso"
+
+#, python-format
+#~ msgid ""
+#~ "You can not do this modification on a reconciled entry ! Please note that "
+#~ "you can just change some non important fields !"
+#~ msgstr ""
+#~ "Non si può fare questa modifica su una registrazione riconcigliata! Per "
+#~ "cortesia, osservare che si possono modificare solo campi non importanti!"
+
+#, python-format
+#~ msgid "You must first select a partner !"
+#~ msgstr "Bisogna prima selezionare un partner!"
+
+#, python-format
+#~ msgid "Free Reference"
+#~ msgstr "Riferimenti vari"
+
+#, python-format
+#~ msgid "Entries are not of the same account or already reconciled ! "
+#~ msgstr "Registrazioni non nello stesso conto, oppure già riconciliate! "
+
+#, python-format
+#~ msgid "Invalid action !"
+#~ msgstr "Azione non valida !"
+
+#, python-format
+#~ msgid "Some entries are already reconciled !"
+#~ msgstr "Alcune registrazioni sono già riconciliate !"
+
+#, python-format
+#~ msgid "The account entries lines are not in valid state."
+#~ msgstr "Queste registrazioni contabili non sono in uno stato valido."
+
+#, python-format
+#~ msgid "Sales Journal"
+#~ msgstr "Giornale Vendite"
+
+#, python-format
+#~ msgid "You can not modify/delete a journal with entries for this period !"
+#~ msgstr ""
+#~ "Non puoi modificare/cancellare un giornale con registrazioni per questo "
+#~ "periodo !"
+
+#, python-format
+#~ msgid "Entries: "
+#~ msgstr "Registrazioni: "
+
+#, python-format
+#~ msgid "Entry is already reconciled"
+#~ msgstr "La registrazione è già stata riconciliata"
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index ef056e454a9..b15c8667972 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -1171,7 +1171,7 @@ class account_invoice(osv.osv):
((move_id, invoice.move_id.id),))
lines = line.browse(cr, uid, map(lambda x: x[0], cr.fetchall()) )
for l in lines+invoice.payment_ids:
- if l.account_id.id==src_account_id:
+ if l.account_id.id == src_account_id:
line_ids.append(l.id)
total += (l.debit or 0.0) - (l.credit or 0.0)
diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml
index 1c1ae438094..609b8f0da5a 100644
--- a/addons/account/partner_view.xml
+++ b/addons/account/partner_view.xml
@@ -10,7 +10,7 @@
-
+
Accounts to Renew
@@ -335,7 +335,7 @@
form
tree,form,search
-
+
#
# Open journal entries
@@ -469,7 +469,7 @@
tree,graph
-
+
diff --git a/addons/account/test/account_customer_invoice.yml b/addons/account/test/account_customer_invoice.yml
index 0cbcc0f944d..e5920d0caed 100644
--- a/addons/account/test/account_customer_invoice.yml
+++ b/addons/account/test/account_customer_invoice.yml
@@ -32,6 +32,12 @@
-
!assert {model: account.invoice, id: account_invoice_customer0}:
- state == 'proforma2'
+-
+ I check that there is no move attached to the invoice
+-
+ !python {model: account.invoice}: |
+ acc_id=self.browse(cr, uid, ref("account_invoice_customer0"))
+ assert acc_id.move_id, "Move not created"
-
I create invoice by clicking on Create button
-
@@ -41,6 +47,13 @@
-
!assert {model: account.invoice, id: account_invoice_customer0}:
- state == 'open'
+
+-
+ I check that now there is a move attached to the invoice
+-
+ !python {model: account.invoice}: |
+ acc_id=self.browse(cr, uid, ref("account_invoice_customer0"))
+ assert acc_id.move_id, "Move created"
-
I create a record for partial payment of 1000 EUR.
-
diff --git a/addons/account/test/account_fiscalyear_close.yml b/addons/account/test/account_fiscalyear_close.yml
index 6a619a8df5c..fa4f24effc1 100644
--- a/addons/account/test/account_fiscalyear_close.yml
+++ b/addons/account/test/account_fiscalyear_close.yml
@@ -59,33 +59,33 @@
"tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
})
--
- In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011"
--
- !record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}:
- fyear_id: account.data_fiscalyear
--
- I clicked on Open button
--
- !python {model: account.open.closed.fiscalyear}: |
- self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang":
- 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")],
- "tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), })
--
- I check the opening entries By using "Entries by Line wizard"
--
- !record {model: account.move.journal, id: account_move_journal_2}:
- journal_id: account.sales_journal
- period_id: account_period_jan11
-
--
- I checked the Opening entries are cancelled successfully
--
- !python {model: account.move.journal}: |
- self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US',
- "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
- "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
- })
+#-
+# In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011"
+#-
+# !record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}:
+# fyear_id: account.data_fiscalyear
+#-
+# I clicked on Open button
+#-
+# !python {model: account.open.closed.fiscalyear}: |
+# self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang":
+# 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")],
+# "tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), })
+#-
+# I check the opening entries By using "Entries by Line wizard"
+#-
+# !record {model: account.move.journal, id: account_move_journal_2}:
+# journal_id: account.sales_journal
+# period_id: account_period_jan11
+#
+#-
+# I checked the Opening entries are cancelled successfully
+#-
+# !python {model: account.move.journal}: |
+# self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US',
+# "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
+# "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
+# })
diff --git a/addons/account/test/chart_of_account.yml b/addons/account/test/chart_of_account.yml
index 39d7428ea73..09271f778be 100644
--- a/addons/account/test/chart_of_account.yml
+++ b/addons/account/test/chart_of_account.yml
@@ -25,21 +25,19 @@
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_account_tree2")],
"tz": False, "active_id": ref("account.menu_action_account_tree2"), })
--
- In order to test Account Move Line Wizard I check the move line entries using this wizard
--
- !record {model: account.move.line.select, id: account_move_line_select_0}:
- {}
--
- I clicked on Button to open the account move lines
--
- !python {model: account.move.line.select}: |
- self.open_window(cr, uid, [ref("account_move_line_select_0")], {"lang": 'en_US',
- "state": "all", "tz": False, "active_model": "account.account", "active_ids":
- [ref("account.a_recv")], "fiscalyear": 1, "active_id": ref("account.a_recv"),
- })
-
-
+#-
+# In order to test Account Move Line Wizard I check the move line entries using this wizard
+#-
+# !record {model: account.move.line.select, id: account_move_line_select_0}:
+# {}
+#-
+# I clicked on Button to open the account move lines
+#-
+# !python {model: account.move.line.select}: |
+# self.open_window(cr, uid, [ref("account_move_line_select_0")], {"lang": 'en_US',
+# "state": "all", "tz": False, "active_model": "account.account", "active_ids":
+# [ref("account.a_recv")], "fiscalyear": 1, "active_id": ref("account.a_recv"),
+# })
-
In order to test the Analytic Charts of Account wizard I will generate chart
diff --git a/addons/account/wizard/account_subscription_generate_view.xml b/addons/account/wizard/account_subscription_generate_view.xml
index aeb6aef8324..b272230e89b 100644
--- a/addons/account/wizard/account_subscription_generate_view.xml
+++ b/addons/account/wizard/account_subscription_generate_view.xml
@@ -2,34 +2,34 @@
-
+
account.subscription.generate.form
account.subscription.generate
form
-
+
- Automatic Recurring
+ Generate Entries
account.subscription.generate
form
tree,form
-
- new
+
+ new
diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml
index 560030be2f5..6bae6c55d74 100644
--- a/addons/account/wizard/account_use_model_view.xml
+++ b/addons/account/wizard/account_use_model_view.xml
@@ -42,8 +42,8 @@
account.move.line
-
+
+
account.use.model.open.entry.form
diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml
index d5085b009da..22389386bba 100644
--- a/addons/account_analytic_plans/account_analytic_plans_view.xml
+++ b/addons/account_analytic_plans/account_analytic_plans_view.xml
@@ -192,8 +192,8 @@
tree,form
-
diff --git a/addons/account_followup/account_followup_view.xml b/addons/account_followup/account_followup_view.xml
index 938b5dd2639..e5639535742 100644
--- a/addons/account_followup/account_followup_view.xml
+++ b/addons/account_followup/account_followup_view.xml
@@ -136,7 +136,7 @@
-
+
diff --git a/addons/account_report/account_view.xml b/addons/account_report/account_view.xml
index 82fb48e5e8b..bec76093070 100644
--- a/addons/account_report/account_view.xml
+++ b/addons/account_report/account_view.xml
@@ -90,8 +90,12 @@
+
-
+
account.report.report.tree
@@ -110,14 +114,14 @@
- Custom reporting
+ Custom Reporting
account.fiscalyear
tree
[('parent_id','=',False)]
-
-
+
+
Fiscal Statements reporting
diff --git a/addons/account_report/i18n/pt_BR.po b/addons/account_report/i18n/pt_BR.po
index df3898bce2c..20abfd409fe 100644
--- a/addons/account_report/i18n/pt_BR.po
+++ b/addons/account_report/i18n/pt_BR.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: 2009-09-08 13:40+0000\n"
-"Last-Translator: Pedro_Maschio \n"
+"PO-Revision-Date: 2010-07-28 13:15+0000\n"
+"Last-Translator: Leandro Chaves \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-06-22 03:55+0000\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:33+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_report
@@ -21,166 +21,166 @@ msgstr ""
#: selection:account.report.report,type:0
#: model:ir.model,name:account_report.model_account_report_history
msgid "Indicator"
-msgstr ""
+msgstr "Indicador"
#. module: account_report
#: wizard_field:print.indicators.pdf,init,file:0
msgid "Select a PDF File"
-msgstr ""
+msgstr "Selecionar um Arquivo PDF"
#. module: account_report
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nome de modelo inválido na definição da ação"
#. module: account_report
#: view:account.report.report:0
msgid "Operators:"
-msgstr ""
+msgstr "Operadores"
#. module: account_report
#: field:account.report.report,parent_id:0
msgid "Parent"
-msgstr ""
+msgstr "Conta-pai"
#. module: account_report
#: field:account.report.report,disp_graph:0
msgid "Display As Graph"
-msgstr ""
+msgstr "Mostrar como Gráfico"
#. module: account_report
#: view:account.report.report:0
msgid "Account Debit:"
-msgstr ""
+msgstr "Débito Conta:"
#. module: account_report
#: selection:account.report.report,type:0
msgid "Others"
-msgstr ""
+msgstr "Outros"
#. module: account_report
#: view:account.report.report:0
msgid "balance(['ACCOUNT_CODE',],fiscalyear)"
-msgstr ""
+msgstr "saldo(['ACCOUNT_CODE',],fiscalyear)"
#. module: account_report
#: rml:print.indicators:0
msgid "Tabular Summary"
-msgstr ""
+msgstr "Resumo Tabular"
#. module: account_report
#: view:account.report.report:0
msgid "Notes"
-msgstr ""
+msgstr "Notas"
#. module: account_report
#: view:account.report.report:0
msgid "= Goodness Indicator Limit:"
-msgstr ""
+msgstr "= Limite do Indicador de Melhora"
#. module: account_report
#: view:account.report.report:0
msgid "Very bad"
-msgstr ""
+msgstr "Muito mal"
#. module: account_report
#: field:account.report.history,val:0
#: field:account.report.report,amount:0
msgid "Value"
-msgstr ""
+msgstr "Valor"
#. module: account_report
#: view:account.report.report:0
msgid "= Badness Indicator Limit:"
-msgstr ""
+msgstr "= Limite do Indicador de Piora"
#. module: account_report
#: view:account.report.report:0
#: selection:account.report.report,status:0
msgid "Bad"
-msgstr ""
+msgstr "Mal"
#. module: account_report
#: wizard_view:print.indicators.pdf,init:0
msgid "Select the PDF file on which Indicators will be printed."
-msgstr ""
+msgstr "Selecione o arquivo PDF no qual serão impressos os Indicadores"
#. module: account_report
#: view:account.report.report:0
msgid "> Goodness Indicator Limit:"
-msgstr ""
+msgstr "> Limite do Indicador de Melhora:"
#. module: account_report
#: field:account.report.report,badness_limit:0
msgid "Badness Indicator Limit"
-msgstr ""
+msgstr "Limite do Indicador de Piora"
#. module: account_report
#: selection:account.report.report,status:0
msgid "Very Bad"
-msgstr ""
+msgstr "Muito Mal"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.account_report_history_record_structure
msgid "Indicator history"
-msgstr ""
+msgstr "Histórico do indicador"
#. module: account_report
#: view:account.report.report:0
msgid "credit(['ACCOUNT_CODE',],fiscalyear)"
-msgstr ""
+msgstr "crédito(['ACCOUNT_CODE',],fiscalyear)"
#. module: account_report
#: view:account.report.report:0
msgid "Report Amount:"
-msgstr ""
+msgstr "Valor do Relatório"
#. module: account_report
#: model:ir.actions.report.xml,name:account_report.fiscal_statements
msgid "Fiscal Statements"
-msgstr ""
+msgstr "Demonstrativos Fiscais"
#. module: account_report
#: wizard_button:print.indicators,init,next:0
msgid "Next"
-msgstr ""
+msgstr "Próximo"
#. module: account_report
#: model:ir.module.module,shortdesc:account_report.module_meta_information
msgid "Reporting for accounting"
-msgstr ""
+msgstr "Relatórios para contabilização"
#. module: account_report
#: wizard_button:print.indicators,next,print:0
#: wizard_button:print.indicators.pdf,init,print:0
msgid "Print"
-msgstr ""
+msgstr "Imprimir"
#. module: account_report
#: field:account.report.report,type:0
msgid "Type"
-msgstr ""
+msgstr "Tipo"
#. module: account_report
#: model:ir.actions.report.xml,name:account_report.report_indicator_pdf
msgid "Print Indicators in PDF"
-msgstr ""
+msgstr "Imprimir Indicadores em PDF"
#. module: account_report
#: view:account.report.report:0
msgid "Account Tax Code:"
-msgstr ""
+msgstr "Código Contábil do Imposto"
#. module: account_report
#: view:account.report.report:0
#: selection:account.report.report,status:0
msgid "Good"
-msgstr ""
+msgstr "Bom"
#. module: account_report
#: view:account.report.history:0
msgid "Account Report History"
-msgstr ""
+msgstr "Histórico do Relatório de Conta"
#. module: account_report
#: constraint:ir.ui.view:0
@@ -190,54 +190,54 @@ msgstr "Invalido XML para Arquitetura da View"
#. module: account_report
#: help:account.report.report,badness_limit:0
msgid "This Value sets the limit of badness."
-msgstr ""
+msgstr "Este Valor define o limite de piora."
#. module: account_report
#: wizard_field:print.indicators,init,select_base:0
msgid "Choose Criteria"
-msgstr ""
+msgstr "Escolha o critério"
#. module: account_report
#: view:account.report.report:0
msgid "debit(['ACCOUNT_CODE',],fiscalyear)"
-msgstr ""
+msgstr "débito(['ACCOUNT_CODE',],fiscalyear)"
#. module: account_report
#: view:account.report.report:0
msgid "Account Credit:"
-msgstr ""
+msgstr "Crédito Conta:"
#. module: account_report
#: wizard_view:print.indicators,init:0
msgid "Select the criteria based on which Indicators will be printed."
-msgstr ""
+msgstr "Selecione o critério em função de quais Indicadores serão impressos."
#. module: account_report
#: view:account.report.report:0
msgid "< Badness Indicator Limit:"
-msgstr ""
+msgstr "< Limite do Indicador de Piora"
#. module: account_report
#: view:account.report.report:0
#: selection:account.report.report,status:0
msgid "Very Good"
-msgstr ""
+msgstr "Muito Bom"
#. module: account_report
#: field:account.report.report,note:0
msgid "Note"
-msgstr ""
+msgstr "Nota"
#. module: account_report
#: rml:accounting.report:0
#: rml:print.indicators:0
msgid "Currency:"
-msgstr ""
+msgstr "Moeda:"
#. module: account_report
#: field:account.report.report,status:0
msgid "Status"
-msgstr ""
+msgstr "Estado"
#. module: account_report
#: help:account.report.report,disp_tree:0
@@ -245,105 +245,108 @@ msgid ""
"When the indicators are printed, if one indicator is set with this field to "
"True, then it will display one more graphs with all its children in tree"
msgstr ""
+"Quando os indicadores são impressos, se um deles estiver marcado nesse campo "
+"como Verdadeiro, então irá mostrar um ou mais gráficos com todas as contas-"
+"filhas em árvore"
#. module: account_report
#: selection:account.report.report,status:0
msgid "Normal"
-msgstr ""
+msgstr "Normal"
#. module: account_report
#: view:account.report.report:0
msgid "Example: (balance(['6','45'],-1) - credit(['7'])) / report('RPT1')"
-msgstr ""
+msgstr "Exemplo: (saldo(['6','45'],-1) - crédito(['7'])) / relatório('RPT1')"
#. module: account_report
#: field:account.report.report,active:0
msgid "Active"
-msgstr ""
+msgstr "Ativo"
#. module: account_report
#: field:account.report.report,disp_tree:0
msgid "Display Tree"
-msgstr ""
+msgstr "Mostrar Árvore"
#. module: account_report
#: selection:print.indicators,init,select_base:0
msgid "Based On Fiscal Years"
-msgstr ""
+msgstr "Com Base em Anos Fiscais"
#. module: account_report
#: model:ir.model,name:account_report.model_account_report_report
msgid "Account reporting"
-msgstr ""
+msgstr "Relatório de conta"
#. module: account_report
#: view:account.report.report:0
msgid "Account Balance:"
-msgstr ""
+msgstr "Saldo de Conta"
#. module: account_report
#: rml:print.indicators:0
msgid "Expression :"
-msgstr ""
+msgstr "Expressão :"
#. module: account_report
#: view:account.report.report:0
msgid "report('REPORT_CODE')"
-msgstr ""
+msgstr "relatório('REPORT_CODE')"
#. module: account_report
#: field:account.report.report,expression:0
msgid "Expression"
-msgstr ""
+msgstr "Expressão"
#. module: account_report
#: view:account.report.report:0
msgid "Accounting reporting"
-msgstr ""
+msgstr "Relatório contábil"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_form
#: model:ir.ui.menu,name:account_report.menu_action_account_report_form
msgid "New Reporting Item Formula"
-msgstr ""
+msgstr "Fórmula para Item Novo de Relatório"
#. module: account_report
#: field:account.report.report,code:0
#: rml:accounting.report:0
msgid "Code"
-msgstr ""
+msgstr "Código"
#. module: account_report
#: field:account.report.history,tmp:0
msgid "temp"
-msgstr ""
+msgstr "temporário"
#. module: account_report
#: field:account.report.history,period_id:0
msgid "Period"
-msgstr ""
+msgstr "Período"
#. module: account_report
#: view:account.report.report:0
msgid "General"
-msgstr ""
+msgstr "Geral"
#. module: account_report
#: view:account.report.report:0
msgid "Legend of operators"
-msgstr ""
+msgstr "Legenda dos operadores"
#. module: account_report
#: wizard_button:print.indicators,init,end:0
#: wizard_button:print.indicators,next,end:0
#: wizard_button:print.indicators.pdf,init,end:0
msgid "Cancel"
-msgstr ""
+msgstr "Cancelar"
#. module: account_report
#: field:account.report.report,child_ids:0
msgid "Children"
-msgstr ""
+msgstr "Filhas (contas-filhas)"
#. module: account_report
#: constraint:ir.model:0
@@ -356,7 +359,7 @@ msgstr ""
#. module: account_report
#: help:account.report.report,goodness_limit:0
msgid "This Value sets the limit of goodness."
-msgstr ""
+msgstr "Este valor definie o limite de melhora."
#. module: account_report
#: model:ir.actions.wizard,name:account_report.wizard_print_indicators
@@ -364,45 +367,45 @@ msgstr ""
#: wizard_view:print.indicators,init:0
#: wizard_view:print.indicators,next:0
msgid "Print Indicators"
-msgstr ""
+msgstr "Imprimir Indicadores"
#. module: account_report
#: view:account.report.report:0
msgid "+ - * / ( )"
-msgstr ""
+msgstr "+ - * / ( )"
#. module: account_report
#: rml:accounting.report:0
#: rml:print.indicators:0
msgid "Printing date:"
-msgstr ""
+msgstr "Data de impressão:"
#. module: account_report
#: model:ir.actions.wizard,name:account_report.wizard_indicators_with_pdf
msgid "Indicators in PDF"
-msgstr ""
+msgstr "indicadores em PDF"
#. module: account_report
#: rml:accounting.report:0
#: rml:print.indicators:0
msgid "at"
-msgstr ""
+msgstr "em"
#. module: account_report
#: rml:accounting.report:0
msgid "Accounting Report"
-msgstr ""
+msgstr "Relatório Contábil"
#. module: account_report
#: field:account.report.report,goodness_limit:0
msgid "Goodness Indicator Limit"
-msgstr ""
+msgstr "Limite do Indicador de Melhora"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view_other
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_view_other
msgid "Other reports"
-msgstr ""
+msgstr "Outros relatórios"
#. module: account_report
#: view:account.report.report:0
@@ -410,61 +413,63 @@ msgid ""
"Note: The second arguement 'fiscalyear' and 'period' are optional "
"arguements.If the value is -1,previous fiscalyear or period is considered."
msgstr ""
+"Nota: O segundo argumento 'ano fiscal' e 'período' são opcionais. Se o valor "
+"for -1 o \"ano fiscal' e 'período' considerados serão os anteriores."
#. module: account_report
#: rml:print.indicators:0
msgid ")"
-msgstr ""
+msgstr ")"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view_fiscal
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_view_fiscal
msgid "Fiscal Statements reporting"
-msgstr ""
+msgstr "Relatório de Demonstrativos Fiscais"
#. module: account_report
#: selection:print.indicators,init,select_base:0
msgid "Based on Fiscal Periods"
-msgstr ""
+msgstr "Com base nos Períodos Fiscais"
#. module: account_report
#: model:ir.actions.report.xml,name:account_report.report_print_indicators
#: rml:print.indicators:0
msgid "Indicators"
-msgstr ""
+msgstr "Indicadores"
#. module: account_report
#: wizard_view:print.indicators.pdf,init:0
msgid "Print Indicators with PDF"
-msgstr ""
+msgstr "Imprimir Indicadores em PDF"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view_indicator
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_view_indicator
msgid "Indicators reporting"
-msgstr ""
+msgstr "Relatório de Indicadores"
#. module: account_report
#: field:account.report.report,name:0
#: rml:accounting.report:0
#: rml:print.indicators:0
msgid "Name"
-msgstr ""
+msgstr "Nome"
#. module: account_report
#: wizard_field:print.indicators,next,base_selection:0
msgid "Select Criteria"
-msgstr ""
+msgstr "Selecione o Critério"
#. module: account_report
#: view:account.report.report:0
msgid "tax_code(['ACCOUNT_TAX_CODE',],period)"
-msgstr ""
+msgstr "tax_code(['ACCOUNT_TAX_CODE',],period)"
#. module: account_report
#: field:account.report.history,fiscalyear_id:0
msgid "Fiscal Year"
-msgstr ""
+msgstr "Ano fiscal"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree
@@ -472,22 +477,22 @@ msgstr ""
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_define
#: model:ir.ui.menu,name:account_report.menu_action_account_report_tree_view
msgid "Custom reporting"
-msgstr ""
+msgstr "Relatórios personalizados"
#. module: account_report
#: rml:print.indicators:0
msgid "Page"
-msgstr ""
+msgstr "Página"
#. module: account_report
#: selection:account.report.report,type:0
msgid "View"
-msgstr ""
+msgstr "Ver"
#. module: account_report
#: rml:print.indicators:0
msgid "Indicators -"
-msgstr ""
+msgstr "Indicadores -"
#. module: account_report
#: help:account.report.report,disp_graph:0
@@ -495,26 +500,28 @@ msgid ""
"If the field is set to True, information will be printed as a Graph, "
"otherwise as an array."
msgstr ""
+"Se o campo for definido como Verdadeiro. a informação será impressa como "
+"Gráfico, caso contrário como tabela."
#. module: account_report
#: view:account.report.report:0
msgid "Return value for status"
-msgstr ""
+msgstr "Valor retornado para Estado"
#. module: account_report
#: field:account.report.report,sequence:0
msgid "Sequence"
-msgstr ""
+msgstr "Sequência"
#. module: account_report
#: rml:accounting.report:0
msgid "Amount"
-msgstr ""
+msgstr "Valor"
#. module: account_report
#: rml:print.indicators:0
msgid "1cm 27.7cm 20cm 27.7cm"
-msgstr ""
+msgstr "1cm 27.7cm 20cm 27.7cm"
#. module: account_report
#: model:ir.module.module,description:account_report.module_meta_information
@@ -524,8 +531,12 @@ msgid ""
" Indicators\n"
" "
msgstr ""
+"Relatório financeiro e contábil\n"
+" Demonstrativos fiscais\n"
+" Indicadores\n"
+" "
#. module: account_report
#: selection:account.report.report,type:0
msgid "Fiscal Statement"
-msgstr ""
+msgstr "Demonstrativo Fiscal"
diff --git a/addons/account_reporting/i18n/pt_BR.po b/addons/account_reporting/i18n/pt_BR.po
index 263f0852de9..a6d59ddeac6 100644
--- a/addons/account_reporting/i18n/pt_BR.po
+++ b/addons/account_reporting/i18n/pt_BR.po
@@ -7,19 +7,19 @@ 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: 2009-09-08 15:24+0000\n"
-"Last-Translator: Pedro_Maschio \n"
+"PO-Revision-Date: 2010-07-28 14:32+0000\n"
+"Last-Translator: Leandro Chaves \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-06-22 04:15+0000\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:33+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_reporting
#: field:color.rml,code:0
msgid "code"
-msgstr ""
+msgstr "Código"
#. module: account_reporting
#: constraint:ir.model:0
@@ -32,63 +32,63 @@ msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica-Bold"
-msgstr ""
+msgstr "Helvetica-Bold (negrito)"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica"
-msgstr ""
+msgstr "Helvetica"
#. module: account_reporting
#: field:account.report.bs,note:0
msgid "Note"
-msgstr ""
+msgstr "Nota"
#. module: account_reporting
#: field:account.report.bs,report_type:0
msgid "Report Type"
-msgstr ""
+msgstr "Tipo de Relatório"
#. module: account_reporting
#: model:ir.ui.menu,name:account_reporting.action_account_report_bs_form
#: model:ir.ui.menu,name:account_reporting.menu_finan_config_BSheet
msgid "Balance Sheet Report"
-msgstr ""
+msgstr "Balanço"
#. module: account_reporting
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nome de modelo inválido na definição da ação"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier"
-msgstr ""
+msgstr "Courier"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-BoldOblique"
-msgstr ""
+msgstr "Courier-BoldOblique (negrito)"
#. module: account_reporting
#: wizard_button:account.account.balancesheet.report,init,report:0
msgid "Print BalanceSheet"
-msgstr ""
+msgstr "Imprimir Balanço"
#. module: account_reporting
#: help:account.account.balancesheet.report,init,periods:0
msgid "All periods if empty"
-msgstr ""
+msgstr "Todos os perídos se vazio"
#. module: account_reporting
#: field:account.report.bs,color_font:0
msgid "Font Color"
-msgstr ""
+msgstr "Cor da Fonte"
#. module: account_reporting
#: selection:account.report.bs,report_type:0
msgid "Report Objects With Accounts and child of Accounts"
-msgstr ""
+msgstr "Objetos do Relatório com as Contas e Contas-filhas"
#. module: account_reporting
#: model:ir.module.module,description:account_reporting.module_meta_information
@@ -96,16 +96,18 @@ msgid ""
"Financial and accounting reporting\n"
" Balance Sheet Report"
msgstr ""
+"Relatório financeiro e contábil\n"
+" Balanço"
#. module: account_reporting
#: selection:account.report.bs,report_type:0
msgid "Report Objects With Accounts"
-msgstr ""
+msgstr "Objetos do Relatório com Contas"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-Oblique"
-msgstr ""
+msgstr "Courier-Oblique"
#. module: account_reporting
#: constraint:ir.ui.view:0
@@ -116,130 +118,130 @@ msgstr "Invalido XML para Arquitetura da View"
#: field:account.report.bs,name:0
#: field:color.rml,name:0
msgid "Name"
-msgstr ""
+msgstr "Nome"
#. module: account_reporting
#: view:account.report.bs:0
msgid "Account reporting"
-msgstr ""
+msgstr "Relatório de Conta"
#. module: account_reporting
#: model:ir.ui.menu,name:account_reporting.bs_report_action_form
msgid "Balance Sheet Report Form"
-msgstr ""
+msgstr "Formulário do Balanço"
#. module: account_reporting
#: view:account.report.bs:0
msgid "Notes"
-msgstr ""
+msgstr "Notas"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-BoldItalic"
-msgstr ""
+msgstr "Times-BoldItalic (negrito itálico)"
#. module: account_reporting
#: model:ir.model,name:account_reporting.model_account_report_bs
msgid "Account reporting for Balance Sheet"
-msgstr ""
+msgstr "Relatório contábil para Balanço"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-Bold"
-msgstr ""
+msgstr "Courier-Bold (negrito)"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Italic"
-msgstr ""
+msgstr "Times-Italic (itálico)"
#. module: account_reporting
#: selection:account.report.bs,report_type:0
msgid "Report Objects Only"
-msgstr ""
+msgstr "Relatar somento os Objetos"
#. module: account_reporting
#: model:ir.model,name:account_reporting.model_color_rml
msgid "Rml Colors"
-msgstr ""
+msgstr "Rml Colors"
#. module: account_reporting
#: model:ir.module.module,shortdesc:account_reporting.module_meta_information
msgid "Reporting of Balancesheet for accounting"
-msgstr ""
+msgstr "Relatório do Balanço para contabilização"
#. module: account_reporting
#: field:account.report.bs,code:0
msgid "Code"
-msgstr ""
+msgstr "Código"
#. module: account_reporting
#: field:account.report.bs,parent_id:0
msgid "Parent"
-msgstr ""
+msgstr "Conta-pai"
#. module: account_reporting
#: field:account.report.bs,sequence:0
msgid "Sequence"
-msgstr ""
+msgstr "Sequência"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Bold"
-msgstr ""
+msgstr "Times-Bold (negrito)"
#. module: account_reporting
#: view:account.report.bs:0
msgid "General"
-msgstr ""
+msgstr "Geral"
#. module: account_reporting
#: wizard_field:account.account.balancesheet.report,init,fiscalyear:0
msgid "Fiscal year"
-msgstr ""
+msgstr "Ano Fiscal"
#. module: account_reporting
#: view:account.report.bs:0
#: field:account.report.bs,account_id:0
msgid "Accounts"
-msgstr ""
+msgstr "Contas"
#. module: account_reporting
#: wizard_field:account.account.balancesheet.report,init,periods:0
msgid "Periods"
-msgstr ""
+msgstr "Períodos"
#. module: account_reporting
#: field:account.report.bs,color_back:0
msgid "Back Color"
-msgstr ""
+msgstr "Cor de Fundo"
#. module: account_reporting
#: field:account.report.bs,child_id:0
msgid "Children"
-msgstr ""
+msgstr "Contas-filhas"
#. module: account_reporting
#: wizard_button:account.account.balancesheet.report,init,end:0
msgid "Cancel"
-msgstr ""
+msgstr "Cancelar"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Roman"
-msgstr ""
+msgstr "Times-Roman"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica-Oblique"
-msgstr ""
+msgstr "Helvetica-Oblique"
#. module: account_reporting
#: field:account.report.bs,font_style:0
msgid "Font"
-msgstr ""
+msgstr "Fonte"
#. module: account_reporting
#: wizard_view:account.account.balancesheet.report,init:0
msgid "Customize Report"
-msgstr ""
+msgstr "Customizar Relatório (ajustes especiais)"
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 0f1885689c2..0b1b9b01b23 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -112,7 +112,6 @@ class account_voucher(osv.osv):
('bank_pay_voucher','Bank Payment'),
('rec_voucher','Cash Receipt'),
('bank_rec_voucher','Bank Receipt'),
-# ('cont_voucher','Contra'),
('journal_sale_vou','Journal Sale'),
('journal_pur_voucher','Journal Purchase'),
('journal_voucher','Journal Voucher'),
@@ -120,9 +119,9 @@ class account_voucher(osv.osv):
'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}, domain=[('type','<>','view')]),
- 'payment_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'draft':[('readonly',True)]}),
- 'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'posted':[('readonly',True)]}),
- 'narration':fields.text('Narration', readonly=True, states={'draft':[('readonly',False)]}, required=False),
+ 'payment_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=True, states={'draft':[('readonly',False)]}),
+ 'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'posted':[('readonly',False)]}),
+ 'narration':fields.text('Narration', readonly=True, states={'draft':[('readonly',False)]}),
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True),
'state':fields.selection(
@@ -262,26 +261,33 @@ class account_voucher(osv.osv):
move_line_pool = self.pool.get('account.move.line')
analytic_pool = self.pool.get('account.analytic.line')
currency_pool = self.pool.get('res.currency')
+ invoice_pool = self.pool.get('account.invoice')
for inv in self.browse(cr, uid, ids):
-
+
if inv.move_id:
continue
-
- company_currency = inv.company_id.currency_id.id
- diff_currency_p = inv.currency_id.id <> company_currency
-
+
journal = journal_pool.browse(cr, uid, inv.journal_id.id)
if journal.sequence_id:
name = sequence_pool.get_id(cr, uid, journal.sequence_id.id)
+ ref = False
+ if inv.type in ('journal_pur_voucher', 'bank_rec_voucher', 'rec_voucher'):
+ ref = inv.reference
+ else:
+ ref = invoice_pool._convert_ref(cr, uid, name)
+
+ company_currency = inv.company_id.currency_id.id
+ diff_currency_p = inv.currency_id.id <> company_currency
+
move = {
- 'name' : name,
- 'journal_id': journal.id,
- 'type' : inv.type,
- 'narration' : inv.narration and inv.narration or inv.name,
+ 'name':name,
+ 'journal_id':journal.id,
+ 'type':inv.type,
+ 'narration':inv.narration and inv.narration or inv.name,
'date':inv.date,
- 'ref':inv.reference
+ 'ref':ref
}
if inv.period_id:
@@ -301,7 +307,7 @@ class account_voucher(osv.osv):
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': False,
- 'ref': inv.reference,
+ 'ref':ref,
'date': inv.date
}
if diff_currency_p:
@@ -321,18 +327,22 @@ class account_voucher(osv.osv):
line_ids += [move_line_pool.create(cr, uid, move_line)]
for line in inv.payment_ids:
amount=0.0
+
+ if inv.type in ('bank_pay_voucher', 'pay_voucher', 'journal_voucher'):
+ ref = line.ref
+
move_line = {
- 'name': line.name,
- 'debit': False,
- 'credit': False,
- 'account_id': line.account_id.id or False,
- 'move_id': move_id ,
- 'journal_id': inv.journal_id.id,
- 'period_id': inv.period_id.id,
- 'partner_id': line.partner_id.id or False,
- 'ref': line.ref,
- 'date': inv.date,
- 'analytic_account_id': False
+ 'name':line.name,
+ 'debit':False,
+ 'credit':False,
+ 'account_id':line.account_id.id or False,
+ 'move_id':move_id ,
+ 'journal_id':inv.journal_id.id,
+ 'period_id':inv.period_id.id,
+ 'partner_id':line.partner_id.id or False,
+ 'ref':ref,
+ 'date':inv.date,
+ 'analytic_account_id':False
}
if diff_currency_p:
@@ -400,9 +410,9 @@ class account_voucher(osv.osv):
context={}
ids = []
if name:
- ids = self.search(cr, user, [('number','=',name)]+ args, limit=limit, context=context)
+ ids = self.search(cr, user, [('number','=',name)]+args, limit=limit, context=context)
if not ids:
- ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
+ ids = self.search(cr, user, [('name',operator,name)]+args, limit=limit, context=context)
return self.name_get(cr, user, ids, context)
def copy(self, cr, uid, id, default=None, context=None):
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index 2677f7be5d6..46e1f7342c1 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -6,9 +6,10 @@
account.voucher
tree
-
+
+
@@ -34,7 +35,7 @@
-
+
@@ -55,7 +56,6 @@
-
@@ -88,11 +88,13 @@
-
+
+
-
-
+
+
+
@@ -104,9 +106,11 @@
-
-
-
+
+
+
+
+
@@ -120,15 +124,25 @@
-
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account_voucher_payment/account_voucher_payment.py b/addons/account_voucher_payment/account_voucher_payment.py
index 38c8bf93f4a..3d860146520 100755
--- a/addons/account_voucher_payment/account_voucher_payment.py
+++ b/addons/account_voucher_payment/account_voucher_payment.py
@@ -22,7 +22,6 @@
from osv import fields, osv
from tools.translate import _
-
class account_move_line(osv.osv):
_inherit = "account.move.line"
_columns = {
@@ -45,26 +44,33 @@ class account_voucher(osv.osv):
analytic_pool = self.pool.get('account.analytic.line')
currency_pool = self.pool.get('res.currency')
invoice_pool = self.pool.get('account.invoice')
+ invoice_pool = self.pool.get('account.invoice')
for inv in self.browse(cr, uid, ids):
if inv.move_id:
continue
-
- company_currency = inv.company_id.currency_id.id
- diff_currency_p = inv.currency_id.id <> company_currency
journal = journal_pool.browse(cr, uid, inv.journal_id.id)
if journal.sequence_id:
name = sequence_pool.get_id(cr, uid, journal.sequence_id.id)
+ ref = False
+ if inv.type in ('journal_pur_voucher', 'bank_rec_voucher', 'rec_voucher'):
+ ref = inv.reference
+ else:
+ ref = invoice_pool._convert_ref(cr, uid, name)
+
+ company_currency = inv.company_id.currency_id.id
+ diff_currency_p = inv.currency_id.id <> company_currency
+
move = {
'name' : name,
'journal_id': journal.id,
'type' : inv.type,
'narration' : inv.narration and inv.narration or inv.name,
'date':inv.date,
- 'ref':inv.reference
+ 'ref':ref
}
if inv.period_id:
@@ -76,16 +82,16 @@ class account_voucher(osv.osv):
#create the first line manually
move_line = {
- 'name': inv.name,
- 'debit': False,
+ 'name':inv.name,
+ 'debit':False,
'credit':False,
- 'account_id': inv.account_id.id or False,
- 'move_id': move_id ,
- 'journal_id': inv.journal_id.id,
- 'period_id': inv.period_id.id,
- 'partner_id': False,
- 'ref': inv.reference,
- 'date': inv.date
+ 'account_id':inv.account_id.id or False,
+ 'move_id':move_id ,
+ 'journal_id':inv.journal_id.id,
+ 'period_id':inv.period_id.id,
+ 'partner_id':False,
+ 'ref':ref,
+ 'date':inv.date
}
if diff_currency_p:
amount_currency = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.amount)
@@ -103,20 +109,25 @@ class account_voucher(osv.osv):
line_ids = []
line_ids += [move_line_pool.create(cr, uid, move_line)]
rec_ids = []
+
for line in inv.payment_ids:
amount=0.0
+
+ if inv.type in ('bank_pay_voucher', 'pay_voucher', 'journal_voucher'):
+ ref = line.ref
+
move_line = {
- 'name': line.name,
- 'debit': False,
- 'credit': False,
- 'account_id': line.account_id.id or False,
- 'move_id': move_id ,
- 'journal_id': inv.journal_id.id,
- 'period_id': inv.period_id.id,
- 'partner_id': line.partner_id.id or False,
- 'ref': line.ref,
- 'date': inv.date,
- 'analytic_account_id': False
+ 'name':line.name,
+ 'debit':False,
+ 'credit':False,
+ 'account_id':line.account_id.id or False,
+ 'move_id':move_id ,
+ 'journal_id':inv.journal_id.id,
+ 'period_id':inv.period_id.id,
+ 'partner_id':line.partner_id.id or False,
+ 'ref':ref,
+ 'date':inv.date,
+ 'analytic_account_id':False
}
if diff_currency_p:
@@ -151,9 +162,7 @@ class account_voucher(osv.osv):
rec_ids += [move_line_id]
for move_line in line.invoice_id.move_id.line_id:
if line.account_id.id == move_line.account_id.id:
- rec_ids += [move_line.id]
- #move_line_pool.reconcile_partial(cr, uid, rec_ids)
-
+ rec_ids += [move_line.id]
if rec_ids:
move_line_pool.reconcile_partial(cr, uid, rec_ids)
diff --git a/addons/account_voucher_payment/i18n/pt_BR.po b/addons/account_voucher_payment/i18n/pt_BR.po
new file mode 100644
index 00000000000..0899a170f55
--- /dev/null
+++ b/addons/account_voucher_payment/i18n/pt_BR.po
@@ -0,0 +1,89 @@
+# Brazilian Portuguese 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 , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-05-13 20:11+0000\n"
+"PO-Revision-Date: 2010-07-28 14:21+0000\n"
+"Last-Translator: Leandro Chaves \n"
+"Language-Team: Brazilian Portuguese \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:34+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: account_voucher_payment
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML inválido para a arquitetura de exibição"
+
+#. module: account_voucher_payment
+#: wizard_view:account.voucher.unreconcile,init:0
+msgid "Unreconciliation transactions"
+msgstr "Transações não conciliadas"
+
+#. module: account_voucher_payment
+#: model:ir.module.module,description:account_voucher_payment.module_name_translation
+msgid ""
+"This module includes :\n"
+" * It reconcile the invoice (supplier, customer) while paying through \n"
+" Accounting Vouchers\n"
+" "
+msgstr ""
+
+#. module: account_voucher_payment
+#: wizard_view:account.voucher.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 ""
+"Se você desfazer a reconciliação de transações, você deve também verificar "
+"todas as ações que estão ligadas a essas operações, porque elas não serão "
+"desfeitas pelo sistema"
+
+#. module: account_voucher_payment
+#: view:account.voucher:0
+#: field:account.voucher,voucher_line_ids:0
+msgid "Voucher Lines"
+msgstr "Linhas de Comprovantes"
+
+#. module: account_voucher_payment
+#: model:ir.module.module,shortdesc:account_voucher_payment.module_name_translation
+msgid "Invoice Payment/Receipt by Vouchers."
+msgstr ""
+
+#. module: account_voucher_payment
+#: model:ir.actions.wizard,name:account_voucher_payment.wizard_unreconcile_voucher
+msgid "Unreconcile entries"
+msgstr "Anular reconciliação de lançamentos"
+
+#. module: account_voucher_payment
+#: field:account.move.line,voucher_invoice:0
+#: field:account.voucher.line,invoice_id:0
+msgid "Invoice"
+msgstr "Fatura"
+
+#. module: account_voucher_payment
+#: wizard_button:account.voucher.unreconcile,init,end:0
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: account_voucher_payment
+#: field:account.voucher,partner_id:0
+msgid "Partner"
+msgstr "Parceiro"
+
+#. module: account_voucher_payment
+#: wizard_button:account.voucher.unreconcile,init,unrec:0
+msgid "Unreconcile"
+msgstr "Não concilidado"
+
+#. module: account_voucher_payment
+#: wizard_view:account.voucher.unreconcile,init:0
+msgid "Unreconciliation"
+msgstr "Desconciliação"
diff --git a/addons/account_voucher_payment/i18n/sl.po b/addons/account_voucher_payment/i18n/sl.po
new file mode 100644
index 00000000000..ff98b869bbf
--- /dev/null
+++ b/addons/account_voucher_payment/i18n/sl.po
@@ -0,0 +1,88 @@
+# Slovenian 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 , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-05-13 20:11+0000\n"
+"PO-Revision-Date: 2010-07-28 12:23+0000\n"
+"Last-Translator: Simon Vidmar \n"
+"Language-Team: Slovenian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:34+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: account_voucher_payment
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "Neveljaven XML za arhitekturo pogleda!"
+
+#. module: account_voucher_payment
+#: wizard_view:account.voucher.unreconcile,init:0
+msgid "Unreconciliation transactions"
+msgstr "Preklic uskladitve transakcij"
+
+#. module: account_voucher_payment
+#: model:ir.module.module,description:account_voucher_payment.module_name_translation
+msgid ""
+"This module includes :\n"
+" * It reconcile the invoice (supplier, customer) while paying through \n"
+" Accounting Vouchers\n"
+" "
+msgstr ""
+
+#. module: account_voucher_payment
+#: wizard_view:account.voucher.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 ""
+"Če prekličete uskladitev transakcij, morate tudi preveriti vse akcije, ki so "
+"povezane s temi transakcijami, kajti le te ne bodo onemogočene."
+
+#. module: account_voucher_payment
+#: view:account.voucher:0
+#: field:account.voucher,voucher_line_ids:0
+msgid "Voucher Lines"
+msgstr ""
+
+#. module: account_voucher_payment
+#: model:ir.module.module,shortdesc:account_voucher_payment.module_name_translation
+msgid "Invoice Payment/Receipt by Vouchers."
+msgstr ""
+
+#. module: account_voucher_payment
+#: model:ir.actions.wizard,name:account_voucher_payment.wizard_unreconcile_voucher
+msgid "Unreconcile entries"
+msgstr "Prekliči uskladitev vknjižb"
+
+#. module: account_voucher_payment
+#: field:account.move.line,voucher_invoice:0
+#: field:account.voucher.line,invoice_id:0
+msgid "Invoice"
+msgstr "Račun"
+
+#. module: account_voucher_payment
+#: wizard_button:account.voucher.unreconcile,init,end:0
+msgid "Cancel"
+msgstr "Prekliči"
+
+#. module: account_voucher_payment
+#: field:account.voucher,partner_id:0
+msgid "Partner"
+msgstr "Partner"
+
+#. module: account_voucher_payment
+#: wizard_button:account.voucher.unreconcile,init,unrec:0
+msgid "Unreconcile"
+msgstr "Prekliči uskladitev"
+
+#. module: account_voucher_payment
+#: wizard_view:account.voucher.unreconcile,init:0
+msgid "Unreconciliation"
+msgstr "Preklic uskladitve"
diff --git a/addons/analytic/i18n/sl.po b/addons/analytic/i18n/sl.po
new file mode 100644
index 00000000000..48d92ea1941
--- /dev/null
+++ b/addons/analytic/i18n/sl.po
@@ -0,0 +1,266 @@
+# Slovenian 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 , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2010-06-18 10:59+0000\n"
+"PO-Revision-Date: 2010-07-28 12:27+0000\n"
+"Last-Translator: Simon Vidmar \n"
+"Language-Team: Slovenian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:34+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: analytic
+#: field:account.analytic.account,child_ids:0
+msgid "Child Accounts"
+msgstr "Podrejeni konti"
+
+#. module: analytic
+#: help:account.analytic.line,amount_currency:0
+msgid ""
+"The amount expressed in the related account currency if not equal to the "
+"company one."
+msgstr ""
+
+#. module: analytic
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"Naziv objekta se mora začeti z 'x_' in ne sme vsebovati posebnih znakov!"
+
+#. module: analytic
+#: field:account.analytic.account,name:0
+msgid "Account Name"
+msgstr "Naziv konta"
+
+#. module: analytic
+#: help:account.analytic.line,unit_amount:0
+msgid "Specifies the amount of quantity to count."
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,currency_id:0
+msgid "The related account currency if not equal to the company one."
+msgstr ""
+
+#. module: analytic
+#: model:ir.module.module,description:analytic.module_meta_information
+msgid ""
+"Module for defining analytic accounting object.\n"
+" "
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,state:0
+msgid "State"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,user_id:0
+msgid "Account Manager"
+msgstr "Odgovorni za stranko"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Draft"
+msgstr "Osnutek"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Closed"
+msgstr "Zaprto"
+
+#. module: analytic
+#: field:account.analytic.account,debit:0
+msgid "Debit"
+msgstr "Breme"
+
+#. module: analytic
+#: help:account.analytic.account,state:0
+msgid ""
+"* When an account is created its in 'Draft' state. "
+" \n"
+"* If any associated partner is there, it can be in 'Open' state. "
+" \n"
+"* If any pending balance is there it can be in 'Pending'. "
+" \n"
+"* And finally when all the transactions are over, it can be in 'Close' "
+"state. \n"
+"* The project can be in either if the states 'Template' and 'Running'.\n"
+" If it is template then we can make projects based on the template projects. "
+"If its in 'Running' state it is a normal project. "
+" \n"
+" If it is to be reviewed then the state is 'Pending'.\n"
+" When the project is completed the state is set to 'Done'."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,type:0
+msgid "Account Type"
+msgstr "Vrsta konta"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Template"
+msgstr "Predloga"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Pending"
+msgstr "Čakajoči"
+
+#. module: analytic
+#: model:ir.model,name:analytic.model_account_analytic_line
+msgid "Analytic Line"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,description:0
+#: field:account.analytic.line,name:0
+msgid "Description"
+msgstr "Opis"
+
+#. module: analytic
+#: help:account.analytic.line,amount:0
+msgid ""
+"Calculated by multiplying the quantity and the price given in the Product's "
+"cost price."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,company_id:0
+#: field:account.analytic.line,company_id:0
+msgid "Company"
+msgstr "Družba"
+
+#. module: analytic
+#: field:account.analytic.account,quantity_max:0
+msgid "Maximum Quantity"
+msgstr "Največja količina"
+
+#. module: analytic
+#: field:account.analytic.line,user_id:0
+msgid "User"
+msgstr "Uporabnik"
+
+#. module: analytic
+#: field:account.analytic.account,parent_id:0
+msgid "Parent Analytic Account"
+msgstr "Nadrejeni analitični konto"
+
+#. module: analytic
+#: field:account.analytic.line,date:0
+msgid "Date"
+msgstr "Datum"
+
+#. module: analytic
+#: field:account.analytic.account,currency_id:0
+#: field:account.analytic.line,currency_id:0
+msgid "Account currency"
+msgstr "Valuta konta"
+
+#. module: analytic
+#: selection:account.analytic.account,type:0
+msgid "View"
+msgstr "Pogled"
+
+#. module: analytic
+#: help:account.analytic.account,quantity_max:0
+msgid "Sets the higher limit of quantity of hours."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,credit:0
+msgid "Credit"
+msgstr "Dobro"
+
+#. module: analytic
+#: field:account.analytic.line,amount:0
+msgid "Amount"
+msgstr "Znesek"
+
+#. module: analytic
+#: field:account.analytic.account,contact_id:0
+msgid "Contact"
+msgstr "Stik"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Cancelled"
+msgstr "Preklicano"
+
+#. module: analytic
+#: field:account.analytic.account,balance:0
+msgid "Balance"
+msgstr "Stanje"
+
+#. module: analytic
+#: field:account.analytic.account,date_start:0
+msgid "Date Start"
+msgstr "Datum začetka"
+
+#. module: analytic
+#: field:account.analytic.account,quantity:0
+#: field:account.analytic.line,unit_amount:0
+msgid "Quantity"
+msgstr "Količina"
+
+#. module: analytic
+#: field:account.analytic.account,date:0
+msgid "Date End"
+msgstr "Datum konca"
+
+#. module: analytic
+#: field:account.analytic.account,code:0
+msgid "Account Code"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,type:0
+msgid "Normal"
+msgstr "Običajno"
+
+#. module: analytic
+#: field:account.analytic.account,complete_name:0
+msgid "Full Account Name"
+msgstr "Polni naziv konta"
+
+#. module: analytic
+#: field:account.analytic.line,account_id:0
+#: model:ir.model,name:analytic.model_account_analytic_account
+#: model:ir.module.module,shortdesc:analytic.module_meta_information
+msgid "Analytic Account"
+msgstr "Analitični konto"
+
+#. module: analytic
+#: field:account.analytic.account,company_currency_id:0
+msgid "Currency"
+msgstr "Valuta"
+
+#. module: analytic
+#: field:account.analytic.line,amount_currency:0
+msgid "Amount currency"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,partner_id:0
+msgid "Associated Partner"
+msgstr "Pridružen partner"
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Open"
+msgstr "Odpri"
+
+#. module: analytic
+#: field:account.analytic.account,line_ids:0
+msgid "Analytic Entries"
+msgstr "Analitične vknjižbe"
diff --git a/addons/auction/i18n/pt_BR.po b/addons/auction/i18n/pt_BR.po
index 46ddbdca567..f75e1d73416 100644
--- a/addons/auction/i18n/pt_BR.po
+++ b/addons/auction/i18n/pt_BR.po
@@ -1,19 +1,19 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
-# * auction
+# * auction
#
msgid ""
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-02-01 18:21+0000\n"
-"Last-Translator: Holverat Bortolossi \n"
+"PO-Revision-Date: 2010-07-28 14:41+0000\n"
+"Last-Translator: Leandro Chaves \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-06-22 04:13+0000\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:33+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: auction
@@ -32,16 +32,18 @@ msgid "Set to draft"
msgstr "Definir como rascunho"
#. module: auction
-#: field:auction.deposit,partner_id:0 view:auction.lots:0
-#: xsl:report.auction.seller.list:0 field:report.deposit.border,seller:0
-#: field:report.seller.auction,seller:0 field:report.seller.auction2,seller:0
+#: field:auction.deposit,partner_id:0
+#: view:auction.lots:0
+#: field:report.deposit.border,seller:0
+#: field:report.seller.auction,seller:0
+#: field:report.seller.auction2,seller:0
msgid "Seller"
msgstr "Loja"
#. module: auction
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr "Nome de modelo inválido na definição da ação."
+msgstr "Nome de modelo inválido na definição da ação"
#. module: auction
#: selection:auction.lots.send.aie,date_ask,numerotation:0
@@ -87,18 +89,23 @@ msgid "Deposit Form"
msgstr "Formulário de Depósitos"
#. module: auction
-#: rml:auction.bids:0 view:auction.lots:0 field:auction.lots,ach_uid:0
+#: rml:auction.bids:0
+#: view:auction.lots:0
+#: field:auction.lots,ach_uid:0
#: wizard_field:auction.lots.buyer_map,check,ach_uid:0
#: wizard_field:auction.lots.make_invoice_buyer,init,buyer_id:0
-#: wizard_field:auction.pay.buy,init,buyer_id:0 rml:buyer.list:0
+#: wizard_field:auction.pay.buy,init,buyer_id:0
+#: rml:buyer.list:0
#: model:ir.ui.menu,name:auction.auction_report_buyer_menu
-#: rml:report.auction.buyer.result:0 field:report.buyer.auction,buyer:0
+#: rml:report.auction.buyer.result:0
+#: field:report.buyer.auction,buyer:0
#: field:report.buyer.auction2,buyer:0
msgid "Buyer"
msgstr "Comprador"
#. module: auction
-#: field:report.auction.view,nobjects:0 field:report.buyer.auction,object:0
+#: field:report.auction.view,nobjects:0
+#: field:report.buyer.auction,object:0
msgid "No of objects"
msgstr "Nenhum dos objetos"
@@ -120,10 +127,11 @@ msgstr "Numeração (por lote)"
#. module: auction
#: selection:auction.lot.category,aie_categ:0
msgid "Antique/Books, manuscripts, eso."
-msgstr ""
+msgstr "Antiguidades/Livros, manuscritos, etc."
#. module: auction
-#: view:auction.deposit:0 model:ir.model,name:auction.model_auction_deposit
+#: view:auction.deposit:0
+#: model:ir.model,name:auction.model_auction_deposit
msgid "Deposit Border"
msgstr "Limite de Depósito"
@@ -195,7 +203,8 @@ msgid "Objects by Auction"
msgstr "Objetos em leilão"
#. module: auction
-#: field:auction.lots,lot_num:0 field:report.unclassified.objects,lot_num:0
+#: field:auction.lots,lot_num:0
+#: field:report.unclassified.objects,lot_num:0
msgid "List Number"
msgstr "Número de lista"
@@ -212,7 +221,7 @@ msgstr "Antiguidades"
#. module: auction
#: view:auction.dates:0
msgid "State"
-msgstr ""
+msgstr "Estado"
#. module: auction
#: field:report.auction.estimation.adj.category,lot_type:0
@@ -230,9 +239,10 @@ msgid "Contemporary Art"
msgstr "Arte contemporânea"
#. module: auction
-#: view:auction.lots:0 view:report.unclassified.objects:0
+#: view:auction.lots:0
+#: view:report.unclassified.objects:0
msgid "Ref"
-msgstr ""
+msgstr "Ref."
#. module: auction
#: field:report.auction.view,nseller:0
@@ -247,10 +257,11 @@ msgstr ""
#. module: auction
#: constraint:hr.attendance:0
msgid "Error: Sign in (resp. Sign out) must follow Sign out (resp. Sign in)"
-msgstr ""
+msgstr "Entrada (resp. Saída) deve seguir Saída (resp. Entrada)"
#. module: auction
-#: view:auction.lots:0 field:report.buyer.auction,total_price:0
+#: view:auction.lots:0
+#: field:report.buyer.auction,total_price:0
msgid "Total Adj."
msgstr ""
@@ -260,7 +271,8 @@ msgid "Net margin (%)"
msgstr "Margem líquida (%)"
#. module: auction
-#: selection:auction.lots,state:0 selection:report.object.encoded,state:0
+#: selection:auction.lots,state:0
+#: selection:report.object.encoded,state:0
#: selection:report.seller.auction,state:0
#: selection:report.unclassified.objects,state:0
msgid "Unsold"
@@ -290,7 +302,9 @@ msgid "Seller Costs"
msgstr "Custos do Vendedor"
#. module: auction
-#: view:auction.bid:0 view:auction.bid_line:0 view:auction.lots:0
+#: view:auction.bid:0
+#: view:auction.bid_line:0
+#: view:auction.lots:0
#: field:auction.lots,bid_lines:0
#: model:ir.actions.report.xml,name:auction.bid_auction
#: model:ir.ui.menu,name:auction.menu_action_bid_open
@@ -313,7 +327,8 @@ msgid "Contact"
msgstr "Contato"
#. module: auction
-#: field:report.auction.view,obj_ret:0 field:report.object.encoded,obj_ret:0
+#: field:report.auction.view,obj_ret:0
+#: field:report.object.encoded,obj_ret:0
#: field:report.object.encoded.manager,obj_ret:0
msgid "# obj ret"
msgstr ""
@@ -326,7 +341,7 @@ msgstr "Enviar SMS"
#. module: auction
#: selection:auction.lot.category,aie_categ:0
msgid "Cont. Art/Painting"
-msgstr ""
+msgstr "Cont. Arte/Pintura"
#. module: auction
#: field:auction.lots,sel_inv_id:0
@@ -354,7 +369,8 @@ msgid "Sold Objects"
msgstr "Objetos vendidos"
#. module: auction
-#: view:report.buyer.auction2:0 view:report.seller.auction2:0
+#: view:report.buyer.auction2:0
+#: view:report.seller.auction2:0
msgid "Sum net margin"
msgstr "Somar margem líquida"
@@ -364,7 +380,9 @@ msgid "Deposit Border Form"
msgstr "Formuálio de Limite de Depósito"
#. module: auction
-#: field:auction.bid,bid_lines:0 rml:auction.bids:0 rml:bids.lots:0
+#: field:auction.bid,bid_lines:0
+#: rml:auction.bids:0
+#: rml:bids.lots:0
#: model:ir.model,name:auction.model_auction_bid_line
msgid "Bid"
msgstr "Lance"
@@ -375,15 +393,17 @@ msgid "Langage"
msgstr "Idioma"
#. module: auction
-#: field:auction.bid_line,lot_id:0 field:auction.lot.history,lot_id:0
-#: view:auction.lots:0 model:ir.model,name:auction.model_auction_lots
+#: field:auction.bid_line,lot_id:0
+#: field:auction.lot.history,lot_id:0
+#: view:auction.lots:0
+#: model:ir.model,name:auction.model_auction_lots
msgid "Object"
msgstr "Objeto"
#. module: auction
#: model:ir.actions.wizard,name:auction.wizard_map_user
msgid "Map buyer username to Partners"
-msgstr ""
+msgstr "Mapear usuário comprador para Parceiros"
#. module: auction
#: wizard_field:auction.lots.numerotate,search,lot_num:0
@@ -409,9 +429,11 @@ msgid "Auction buyer reporting form view"
msgstr ""
#. module: auction
-#: field:auction.dates,state:0 field:auction.lots,state:0
+#: field:auction.dates,state:0
+#: field:auction.lots,state:0
#: field:report.auction.adjudication,state:0
-#: field:report.object.encoded,state:0 field:report.seller.auction,state:0
+#: field:report.object.encoded,state:0
+#: field:report.seller.auction,state:0
#: field:report.unclassified.objects,state:0
msgid "Status"
msgstr "Situação"
@@ -427,7 +449,8 @@ msgid "Antique/Cartoons"
msgstr "Antigo/Desenhos"
#. module: auction
-#: view:auction.lots:0 selection:auction.lots,state:0
+#: view:auction.lots:0
+#: selection:auction.lots,state:0
#: selection:report.seller.auction,state:0
#: selection:report.unclassified.objects,state:0
msgid "Sold"
@@ -484,7 +507,7 @@ msgstr "Relatório2 de formulário de Leilão"
#. module: auction
#: model:ir.actions.wizard,name:auction.wizard_pay
msgid "Pay objects of the buyer"
-msgstr ""
+msgstr "Pagar objetos do comprador"
#. module: auction
#: view:report.deposit.border:0
@@ -512,7 +535,8 @@ msgid "auction.dates"
msgstr "leilão.datas"
#. module: auction
-#: rml:auction.total.rml:0 model:ir.ui.menu,name:auction.auction_buyers_menu
+#: rml:auction.total.rml:0
+#: model:ir.ui.menu,name:auction.auction_buyers_menu
msgid "Buyers"
msgstr "Vendedores"
@@ -739,7 +763,8 @@ msgid "Antique/Toys"
msgstr "Antiguidade/Briquedos"
#. module: auction
-#: field:auction.deposit,create_uid:0 field:auction.lots,create_uid:0
+#: field:auction.deposit,create_uid:0
+#: field:auction.lots,create_uid:0
msgid "Created by"
msgstr "Criado por"
@@ -867,7 +892,8 @@ msgid "Gestion emporte"
msgstr ""
#. module: auction
-#: xsl:report.auction.lots.list.landscape:0 xsl:report.auction.vnd_bordereau:0
+#: xsl:report.auction.lots.list.landscape:0
+#: xsl:report.auction.vnd_bordereau:0
msgid "Cat. N."
msgstr ""
@@ -902,7 +928,8 @@ msgid "API ID"
msgstr ""
#. module: auction
-#: field:auction.bid,name:0 field:auction.bid_line,bid_id:0
+#: field:auction.bid,name:0
+#: field:auction.bid_line,bid_id:0
msgid "Bid ID"
msgstr ""
@@ -955,13 +982,14 @@ msgid "Antique/Carpet and textilles"
msgstr ""
#. module: auction
-#: xsl:report.auction.seller.list:0 field:report.object.encoded.manager,adj:0
+#: field:report.object.encoded.manager,adj:0
msgid "Adj."
msgstr ""
#. module: auction
-#: field:auction.lot.history,name:0 field:report.attendance,name:0
-#: field:report.auction.adjudication,date:0 xsl:report.auction.deposit:0
+#: field:auction.lot.history,name:0
+#: field:report.attendance,name:0
+#: field:report.auction.adjudication,date:0
#: field:report.auction.estimation.adj.category,date:0
msgid "Date"
msgstr ""
@@ -1002,12 +1030,14 @@ msgid "Specific Costs"
msgstr ""
#. module: auction
-#: view:report.buyer.auction2:0 view:report.seller.auction2:0
+#: view:report.buyer.auction2:0
+#: view:report.seller.auction2:0
msgid "Sum adj"
msgstr ""
#. module: auction
-#: view:auction.dates:0 view:report.auction.view2:0
+#: view:auction.dates:0
+#: view:report.auction.view2:0
msgid "Auctions"
msgstr ""
@@ -1042,8 +1072,7 @@ msgid "Aie Category"
msgstr ""
#. module: auction
-#: xsl:flagey.huissier:0 rml:report.auction.buyer.result:0
-#: xsl:report.auction.deposit:0
+#: rml:report.auction.buyer.result:0
msgid "Num"
msgstr ""
@@ -1090,7 +1119,8 @@ msgid "Detailed lots"
msgstr ""
#. module: auction
-#: view:report.object.encoded:0 view:report.object.encoded.manager:0
+#: view:report.object.encoded:0
+#: view:report.object.encoded.manager:0
msgid "Objects statistics"
msgstr ""
@@ -1105,7 +1135,8 @@ msgid "Send results to Auction-in-europe.com"
msgstr ""
#. module: auction
-#: rml:bids.lots:0 rml:bids.phones.details:0
+#: rml:bids.lots:0
+#: rml:bids.phones.details:0
msgid "Cat.N"
msgstr ""
@@ -1149,7 +1180,8 @@ msgid "-"
msgstr ""
#. module: auction
-#: xsl:report.auction.ach_bordereau:0 xsl:report.auction.vnd_bordereau:0
+#: xsl:report.auction.ach_bordereau:0
+#: xsl:report.auction.vnd_bordereau:0
msgid "Subtotal:"
msgstr ""
@@ -1165,7 +1197,8 @@ msgid "Invoice Number"
msgstr ""
#. module: auction
-#: field:report.buyer.auction,date:0 field:report.buyer.auction2,date:0
+#: field:report.buyer.auction,date:0
+#: field:report.buyer.auction2,date:0
#: field:report.object.encoded,date:0
#: field:report.object.encoded.manager,date:0
#: field:report.seller.auction,date:0
@@ -1188,7 +1221,8 @@ msgid "Name"
msgstr ""
#. module: auction
-#: field:auction.deposit,name:0 field:auction.lots,bord_vnd_id:0
+#: field:auction.deposit,name:0
+#: field:auction.lots,bord_vnd_id:0
#: wizard_field:auction.lots.numerotate,init,bord_vnd_id:0
#: field:report.deposit.border,bord:0
#: field:report.unclassified.objects,bord_vnd_id:0
@@ -1216,7 +1250,7 @@ msgid "Login"
msgstr ""
#. module: auction
-#: rml:buyer.list:0 xsl:report.auction.seller.list:0
+#: rml:buyer.list:0
msgid "To pay"
msgstr ""
@@ -1236,7 +1270,8 @@ msgid "Seller Form"
msgstr ""
#. module: auction
-#: field:auction.lots,lot_type:0 field:report.unclassified.objects,lot_type:0
+#: field:auction.lots,lot_type:0
+#: field:report.unclassified.objects,lot_type:0
msgid "Object category"
msgstr ""
@@ -1305,7 +1340,8 @@ msgid "Payment's history"
msgstr ""
#. module: auction
-#: xsl:report.auction.ach_bordereau:0 xsl:report.auction.vnd_bordereau:0
+#: xsl:report.auction.ach_bordereau:0
+#: xsl:report.auction.vnd_bordereau:0
msgid "Document"
msgstr ""
@@ -1377,7 +1413,8 @@ msgid "Cont. Art/Curiosa"
msgstr ""
#. module: auction
-#: field:auction.bid,auction_id:0 field:auction.lots,auction_id:0
+#: field:auction.bid,auction_id:0
+#: field:auction.lots,auction_id:0
#: wizard_field:auction.lots.auction_move,init,auction_id:0
#: wizard_field:auction.lots.send.aie,date_ask,dates:0
#: wizard_field:auction.lots.send.aie,init,dates:0
@@ -1425,7 +1462,8 @@ msgid "Cont. Art/Jewelry"
msgstr ""
#. module: auction
-#: xsl:report.auction.deposit:0 xsl:report.auction.vnd_bordereau:0
+#: xsl:report.auction.deposit:0
+#: xsl:report.auction.vnd_bordereau:0
msgid "Inventory"
msgstr ""
@@ -1435,7 +1473,7 @@ msgid "Next Auctions"
msgstr ""
#. module: auction
-#: rml:buyer.list:0 xsl:report.auction.seller.list:0
+#: rml:buyer.list:0
msgid "#"
msgstr ""
@@ -1566,14 +1604,15 @@ msgid "Buyer Journal"
msgstr ""
#. module: auction
-#: selection:auction.lots,state:0 xsl:report.auction.ach_bordereau:0
+#: selection:auction.lots,state:0
#: selection:report.object.encoded,state:0
#: selection:report.unclassified.objects,state:0
msgid "Paid"
msgstr ""
#. module: auction
-#: rml:bids.lots:0 rml:bids.phones.details:0
+#: rml:bids.lots:0
+#: rml:bids.phones.details:0
msgid "Phone"
msgstr ""
@@ -1604,8 +1643,7 @@ msgid "Antique/Sculpture, bronze, eso."
msgstr ""
#. module: auction
-#: rml:buyer.list:0 xsl:report.auction.ach_bordereau:0
-#: xsl:report.auction.seller.list:0 xsl:report.auction.vnd_bordereau:0
+#: rml:buyer.list:0
msgid "Total:"
msgstr ""
@@ -1751,7 +1789,8 @@ msgid "Plate Number:"
msgstr ""
#. module: auction
-#: view:auction.deposit:0 field:auction.deposit,lot_id:0
+#: view:auction.deposit:0
+#: field:auction.deposit,lot_id:0
#: model:ir.ui.menu,name:auction.auction_objects_menu
msgid "Objects"
msgstr "Objetos"
@@ -1773,9 +1812,10 @@ msgid "Allow Negative Amount"
msgstr ""
#. module: auction
-#: rml:auction.bids:0 view:auction.lots:0 rml:auction.total.rml:0
+#: rml:auction.bids:0
+#: view:auction.lots:0
+#: rml:auction.total.rml:0
#: model:ir.ui.menu,name:auction.auction_report_auction_menu
-#: xsl:report.auction.ach_bordereau:0 xsl:report.auction.deposit:0
msgid "Auction"
msgstr ""
@@ -1785,12 +1825,17 @@ msgid "Cont. Art/Shows"
msgstr ""
#. module: auction
-#: field:auction.dates,name:0 field:auction.lot.history,auction_id:0
+#: field:auction.dates,name:0
+#: field:auction.lot.history,auction_id:0
#: field:report.auction.adjudication,name:0
-#: field:report.auction.view,auction_id:0 field:report.auction.view2,auction:0
-#: field:report.auction.view2,date:0 field:report.buyer.auction,auction:0
-#: field:report.buyer.auction2,auction:0 field:report.seller.auction,auction:0
-#: field:report.seller.auction2,auction:0 field:report.seller.auction2,date:0
+#: field:report.auction.view,auction_id:0
+#: field:report.auction.view2,auction:0
+#: field:report.auction.view2,date:0
+#: field:report.buyer.auction,auction:0
+#: field:report.buyer.auction2,auction:0
+#: field:report.seller.auction,auction:0
+#: field:report.seller.auction2,auction:0
+#: field:report.seller.auction2,date:0
#: field:report.unclassified.objects,auction:0
msgid "Auction date"
msgstr ""
@@ -1852,7 +1897,6 @@ msgstr ""
#. module: auction
#: field:report.attendance,total_attendance:0
-#: xsl:report.auction.ach_bordereau:0
msgid "Total"
msgstr ""
@@ -1942,7 +1986,8 @@ msgstr ""
#. module: auction
#: wizard_view:auction.lots.auction_move,init:0
-msgid "Warning, this will erase the object adjudication price and its buyer !"
+msgid ""
+"Warning, this will erase the object adjudication price and its buyer !"
msgstr ""
#. module: auction
@@ -1966,14 +2011,16 @@ msgid "Income Account"
msgstr ""
#. module: auction
-#: field:auction.lots,net_revenue:0 field:report.auction.view2,net_revenue:0
+#: field:auction.lots,net_revenue:0
+#: field:report.auction.view2,net_revenue:0
#: field:report.object.encoded.manager,net_revenue:0
#: field:report.seller.auction2,net_revenue:0
msgid "Net revenue"
msgstr ""
#. module: auction
-#: xsl:report.auction.deposit:0 xsl:report.auction.lots.list.landscape:0
+#: xsl:report.auction.deposit:0
+#: xsl:report.auction.lots.list.landscape:0
msgid "Limit"
msgstr ""
@@ -2045,7 +2092,8 @@ msgid "Closed"
msgstr ""
#. module: auction
-#: field:auction.lots,obj_comm:0 field:report.unclassified.objects,obj_comm:0
+#: field:auction.lots,obj_comm:0
+#: field:report.unclassified.objects,obj_comm:0
msgid "Commission"
msgstr ""
@@ -2065,7 +2113,8 @@ msgid "Employee"
msgstr ""
#. module: auction
-#: xsl:report.auction.ach_bordereau:0 xsl:report.auction.vnd_bordereau:0
+#: xsl:report.auction.ach_bordereau:0
+#: xsl:report.auction.vnd_bordereau:0
msgid "Adj.(EUR)"
msgstr ""
@@ -2142,7 +2191,8 @@ msgid "Invoiced"
msgstr ""
#. module: auction
-#: view:auction.lots:0 selection:auction.lots,state:0
+#: view:auction.lots:0
+#: selection:auction.lots,state:0
msgid "Taken away"
msgstr ""
@@ -2176,10 +2226,11 @@ msgstr ""
#. module: auction
#: constraint:res.partner:0
msgid "Error ! You can not create recursive associated members."
-msgstr ""
+msgstr "Erro! Você não pode criar membros recursivos associados."
#. module: auction
-#: selection:auction.dates,state:0 selection:auction.lots,state:0
+#: selection:auction.dates,state:0
+#: selection:auction.lots,state:0
#: selection:report.auction.adjudication,state:0
#: selection:report.object.encoded,state:0
#: selection:report.seller.auction,state:0
@@ -2208,7 +2259,8 @@ msgid "Adj"
msgstr ""
#. module: auction
-#: view:auction.dates:0 model:ir.ui.menu,name:auction.auction_date_menu
+#: view:auction.dates:0
+#: model:ir.ui.menu,name:auction.auction_date_menu
msgid "Auction Dates"
msgstr ""
@@ -2354,11 +2406,11 @@ msgid "Report Sign In/Out"
msgstr ""
#. module: auction
-#: view:auction.deposit:0 field:auction.deposit,info:0 view:auction.lots:0
+#: view:auction.deposit:0
+#: field:auction.deposit,info:0
+#: view:auction.lots:0
#: wizard_field:auction.lots.numerotate,search,obj_desc:0
-#: rml:bids.phones.details:0 xsl:flagey.huissier:0
-#: xsl:report.auction.ach_bordereau:0 xsl:report.auction.deposit:0
-#: xsl:report.auction.lots.list.landscape:0 xsl:report.auction.vnd_bordereau:0
+#: rml:bids.phones.details:0
msgid "Description"
msgstr ""
@@ -2368,7 +2420,8 @@ msgid "Cont. Art/Arts"
msgstr ""
#. module: auction
-#: field:auction.lots,obj_price:0 field:report.auction.view,adj_price:0
+#: field:auction.lots,obj_price:0
+#: field:report.auction.view,adj_price:0
#: field:report.unclassified.objects,obj_price:0
msgid "Adjudication price"
msgstr ""
@@ -2430,7 +2483,8 @@ msgid "Pay objects"
msgstr ""
#. module: auction
-#: view:report.object.encoded:0 view:report.object.encoded.manager:0
+#: view:report.object.encoded:0
+#: view:report.object.encoded.manager:0
msgid "# objects"
msgstr ""
diff --git a/addons/audittrail/i18n/pt_BR.po b/addons/audittrail/i18n/pt_BR.po
index b3ab5532ca8..678303551ce 100644
--- a/addons/audittrail/i18n/pt_BR.po
+++ b/addons/audittrail/i18n/pt_BR.po
@@ -7,19 +7,19 @@ 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-01-20 01:10+0000\n"
-"Last-Translator: pedrobom \n"
+"PO-Revision-Date: 2010-07-28 13:21+0000\n"
+"Last-Translator: Leandro Chaves \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-06-22 04:16+0000\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:33+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: audittrail
#: model:ir.module.module,shortdesc:audittrail.module_meta_information
msgid "Audit Trail"
-msgstr ""
+msgstr "Trilha de Auditoria"
#. module: audittrail
#: constraint:ir.model:0
@@ -62,7 +62,7 @@ msgstr "Status"
#. module: audittrail
#: selection:audittrail.rule,state:0
msgid "Draft"
-msgstr ""
+msgstr "Provisório"
#. module: audittrail
#: field:audittrail.log.line,old_value:0
@@ -77,12 +77,12 @@ msgstr "Nome de modelo inválido na definição da ação."
#. module: audittrail
#: model:ir.actions.wizard,name:audittrail.wizard_audittrail_log
msgid "View log"
-msgstr ""
+msgstr "Ver log"
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_log_line
msgid "audittrail.log.line"
-msgstr ""
+msgstr "audittrail.log.line"
#. module: audittrail
#: field:audittrail.log,method:0
@@ -92,7 +92,7 @@ msgstr "Método"
#. module: audittrail
#: wizard_field:audittrail.view.log,init,from:0
msgid "Log From"
-msgstr ""
+msgstr "Log de"
#. module: audittrail
#: field:audittrail.log.line,log:0
@@ -112,7 +112,7 @@ msgstr "Escrever"
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail
msgid "Audittrails"
-msgstr ""
+msgstr "Trilhas de Auditoria"
#. module: audittrail
#: view:audittrail.log:0
@@ -138,17 +138,17 @@ msgstr "Objeto"
#. module: audittrail
#: view:audittrail.rule:0
msgid "AuditTrail Rule"
-msgstr ""
+msgstr "Regra de Trilha de Auditoria"
#. module: audittrail
#: wizard_field:audittrail.view.log,init,to:0
msgid "Log To"
-msgstr ""
+msgstr "'Logar' no"
#. module: audittrail
#: view:audittrail.log:0
msgid "New Value Text: "
-msgstr ""
+msgstr "Texto do Novo Valor: "
#. module: audittrail
#: model:ir.module.module,description:audittrail.module_meta_information
@@ -158,6 +158,10 @@ msgid ""
" Subscribe Rules for read, write, create and delete on objects and check "
"logs"
msgstr ""
+"Permite ao administrador acompanhar cada operação de cada usuário em todos "
+"objetos do sistema.\n"
+" Inscreva Regras para leitura, escrita e apagar nos objetos e marque os "
+"logs"
#. module: audittrail
#: field:audittrail.log,timestamp:0
@@ -172,7 +176,7 @@ msgstr "Usuário"
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value Text : "
-msgstr ""
+msgstr "Texto do Valor Anterior "
#. module: audittrail
#: constraint:ir.ui.view:0
@@ -272,7 +276,7 @@ msgstr "Ver Logs"
#. module: audittrail
#: field:audittrail.rule,log_create:0
msgid "Log creates"
-msgstr ""
+msgstr "Criações de Logs"
#. module: audittrail
#: view:audittrail.log:0
@@ -307,4 +311,4 @@ msgstr "Cancelar"
#. module: audittrail
#: field:audittrail.rule,log_unlink:0
msgid "Log deletes"
-msgstr ""
+msgstr "Eliminações do Log"
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 66f857c4e94..710fc9d0075 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -1,9 +1,9 @@
-
+ parent="base.menu_base_config" sequence="3" />
- Action Rules
+ Automated Actions
base.action.rule
form
tree,form
@@ -113,7 +113,7 @@
+ parent="base.menu_base_action_rule" action="base_action_rule_act" sequence="1"/>
diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml
index cb754080c02..2324be6adbd 100644
--- a/addons/base_calendar/base_calendar_view.xml
+++ b/addons/base_calendar/base_calendar_view.xml
@@ -157,7 +157,7 @@
+ parent="base.menu_base_config" sequence="6" />
@@ -201,7 +201,7 @@
- Available Alarms
+ Alarms
ir.actions.act_window
res.alarm
form
diff --git a/addons/board_account/i18n/pt_BR.po b/addons/board_account/i18n/pt_BR.po
new file mode 100644
index 00000000000..2ff98fb547f
--- /dev/null
+++ b/addons/board_account/i18n/pt_BR.po
@@ -0,0 +1,95 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * board_account
+#
+msgid ""
+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-07-28 14:34+0000\n"
+"Last-Translator: Leandro Chaves \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-07-29 03:33+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: board_account
+#: view:board.board:0
+msgid "Analytic accounts to close"
+msgstr "Contas analíticas a fechar"
+
+#. module: board_account
+#: view:board.board:0
+msgid "Draft invoices"
+msgstr ""
+
+#. module: board_account
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "Invalido XML para Arquitetura da View"
+
+#. module: board_account
+#: model:ir.actions.act_window,name:board_account.open_board_account
+#: model:ir.ui.menu,name:board_account.menu_board_account
+msgid "Accounting Dashboard"
+msgstr "Painel contábil"
+
+#. module: board_account
+#: model:ir.actions.act_window,name:board_account.action_aged_receivable
+msgid "Receivable Accounts"
+msgstr "Contas a receber"
+
+#. module: board_account
+#: view:board.board:0
+#: model:ir.actions.act_window,name:board_account.act_my_account
+msgid "Accounts to invoice"
+msgstr "contas a faturar"
+
+#. module: board_account
+#: view:board.board:0
+#: model:ir.actions.act_window,name:board_account.action_account_analytic_line_to_invoice
+msgid "Costs to invoice"
+msgstr "Custos a faturar"
+
+#. module: board_account
+#: view:board.board:0
+msgid "Aged receivables"
+msgstr "Recebíveis vencidos"
+
+#. module: board_account
+#: model:ir.module.module,shortdesc:board_account.module_meta_information
+msgid "Board for accountant"
+msgstr "Painel para contadores"
+
+#. module: board_account
+#: model:ir.actions.act_window,name:board_account.action_aged_income
+msgid "Income Accounts"
+msgstr "Contas de Receita"
+
+#. module: board_account
+#: view:board.board:0
+msgid "My indicators"
+msgstr "Meus indicadores"
+
+#. module: board_account
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Nome de modelo inválido na definição da ação"
+
+#. module: board_account
+#: model:ir.ui.menu,name:board_account.next_id_68
+msgid "Accounting"
+msgstr "Contabilidade"
+
+#. module: board_account
+#: view:board.board:0
+msgid "Account Board"
+msgstr "Painel Contábil"
+
+#. module: board_account
+#: view:board.board:0
+msgid "Aged income"
+msgstr "Receita vencida"
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index 35870801ae6..0b170a85924 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -86,6 +86,7 @@ Create dashboard for CRM that includes:
'wizard/crm_send_email_view.xml',
'wizard/crm_forward_to_partner_view.xml',
'wizard/crm_custom_create_menu_view.xml',
+ 'wizard/crm_merge_opportunities_view.xml',
'crm_view.xml',
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 2cabefd7f13..47a3938e1e2 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -121,7 +121,6 @@ class crm_case(object):
s = self.get_stage_dict(cr, uid, ids, context=context)
section = self._name
stage = False
- stage_pool = self.pool.get('crm.case.stage')
for case in self.browse(cr, uid, ids, context):
if section in s:
st = not context.get('force_domain', False) and case.stage_id.id or False
@@ -141,8 +140,18 @@ class crm_case(object):
if not context:
context = {}
stage_obj = self.pool.get('crm.case.stage')
- tmp = self.read(cr, uid, ids, ['section_id'], context)[0]['section_id']
- section_id = tmp and tmp[0] or False
+ res = self.read(cr, uid, ids, ['section_id', 'stage_id'], context)[0]
+ section_id = res['section_id'] and res['section_id'][0] or False
+ stage_id = res['stage_id'] and res['stage_id'][0] or False
+
+ # We select either the stages in the same section as the current stage
+ # if it a stage that does not have a section, or the stages of the
+ # current section of the case
+ if stage_id:
+ stage_record = stage_obj.browse(cr, uid, stage_id)
+ if not stage_record.section_id:
+ section_id = False # only select stages without section
+
domain = [('object_id.model', '=', self._name), ('section_id', '=', section_id)]
if 'force_domain' in context and context['force_domain']:
domain += context['force_domain']
@@ -150,6 +159,7 @@ class crm_case(object):
s = {}
previous = {}
section = self._name
+
for stage in stage_obj.browse(cr, uid, sid, context=context):
s.setdefault(section, {})
s[section][previous.get(section, False)] = stage.id
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index dd18d055f64..4ae7b1dd344 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -19,15 +19,13 @@
#
##############################################################################
-from osv import fields, osv, orm
-from datetime import datetime, timedelta
+from osv import fields, osv
+from datetime import datetime
import crm
-import math
import time
import mx.DateTime
from tools.translate import _
from crm import crm_case
-import collections
import binascii
import tools
@@ -348,7 +346,6 @@ class crm_lead(osv.osv, crm_case):
if isinstance(ids, (str, int, long)):
ids = [ids]
- msg_from = msg['from']
if msg.get('priority'):
vals['priority'] = msg.get('priority')
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 6897a3d1a23..9ddc87b2efd 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -15,7 +15,7 @@
+ parent="base.menu_crm_config_lead" />
@@ -31,7 +31,7 @@
+ parent="base.menu_crm_config_lead" />
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml
index 2c6fbd02cc9..66bbc061009 100644
--- a/addons/crm/crm_meeting_view.xml
+++ b/addons/crm/crm_meeting_view.xml
@@ -13,8 +13,8 @@
{'object_id':'crm.meeting'}
-
+
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 3a2e58efdb0..411ae9ec58d 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -35,6 +35,8 @@
+
@@ -156,7 +158,7 @@
name="%(crm.action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.lead'}"
icon="terp-mail-message-new" type="action" />
-
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 7e4eee1a469..41375001257 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -2,14 +2,14 @@
-
+
-
+
-
+
@@ -17,11 +17,11 @@
-
+ name="Create Menu for Custom Cases" /-->
@@ -90,7 +90,7 @@
+ parent="base.menu_crm_config_lead" />
@@ -180,7 +180,7 @@
+ parent="base.menu_crm_config_lead" sequence="1"/>
@@ -334,7 +334,7 @@
- Segmentation
+ Partners Segmentation
crm.segmentation
form
tree,form
@@ -342,8 +342,8 @@
+ groups="base.group_extended" sequence="2"
+ parent="base.menu_base_action_rule" />
view.users.form.crm.modif.inherited1
diff --git a/addons/crm/i18n/pt_BR.po b/addons/crm/i18n/pt_BR.po
index 1337d0eefa8..9965d059c1c 100644
--- a/addons/crm/i18n/pt_BR.po
+++ b/addons/crm/i18n/pt_BR.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: 2010-01-05 05:59+0000\n"
-"PO-Revision-Date: 2010-05-22 04:53+0000\n"
-"Last-Translator: Guilherme Santos \n"
+"PO-Revision-Date: 2010-07-28 13:44+0000\n"
+"Last-Translator: Leandro Chaves \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-06-22 04:00+0000\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:33+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -27,6 +27,8 @@ msgid ""
"This property defines the list of date/time exceptions for "
"arecurring calendar component."
msgstr ""
+"Esta propriedade define a lista de exceção de data/hora para componente do "
+"calendário recorrente."
#. module: crm
#: help:crm.case.rule,act_mail_to_user:0
@@ -44,12 +46,12 @@ msgstr "Título"
#. module: crm
#: model:ir.model,name:crm.model_report_crm_case_section_categ2
msgid "Cases by section and category2"
-msgstr ""
+msgstr "Casos por seção e categoria2"
#. module: crm
#: wizard_field:crm.lead.partner_create,init,close:0
msgid "Close Lead"
-msgstr ""
+msgstr "Encerrar ligação"
#. module: crm
#: view:crm.job:0
@@ -62,7 +64,7 @@ msgstr " 7 Dias "
#. module: crm
#: help:crm.menu.config_wizard,helpdesk:0
msgid "Manages an Helpdesk service."
-msgstr ""
+msgstr "Administrar um serviço de helpdesk"
#. module: crm
#: view:crm.job:0
@@ -82,19 +84,17 @@ msgstr "Custos planejados"
#. module: crm
#: wizard_field:crm.job.partner_create,init,close:0
msgid "Close job request"
-msgstr ""
+msgstr "Fechar requisição de trabalho"
#. module: crm
#: field:crm.case.stage,name:0
msgid "Stage Name"
-msgstr ""
+msgstr "Nome do estágio"
#. module: crm
#: view:crm.case:0
#: view:crm.case.history:0
-#: model:ir.actions.act_window,name:crm.crm_case_categ0-act
#: model:ir.actions.act_window,name:crm.crm_case_section_open_act
-#: model:ir.ui.menu,name:crm.menu_crm_case_categ0-act
#: model:ir.ui.menu,name:crm.next_id_51
msgid "Cases"
msgstr "Casos"
@@ -116,7 +116,7 @@ msgstr "Recursos Humanos"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_oppor_categ_categ2
msgid "Cases by Opportunities, Category and Type"
-msgstr ""
+msgstr "Casos por Oportunidades, Categoria e Tipo"
#. module: crm
#: help:crm.menu.config_wizard,claims:0
@@ -124,6 +124,8 @@ msgid ""
"Manages the supplier and customers claims, including your corrective or "
"preventive actions."
msgstr ""
+"Administra as reivindicações de fornecedores e clientes, incluindo suas "
+"ações corretivas ou preventivas."
#. module: crm
#: view:crm.fundraising:0
@@ -133,19 +135,16 @@ msgstr "Quantia"
#. module: crm
#: model:process.transition,note:crm.process_transition_opportunitymeeting0
msgid "Normal or phone meeting for opportunity"
-msgstr ""
+msgstr "Reunião normal ou por telefone para a oportunidade"
#. module: crm
#: model:crm.case.stage,name:crm.stage_claim2
#: model:crm.case.stage,name:crm.stage_meet1
msgid "Fixed"
-msgstr ""
+msgstr "Fixo"
#. module: crm
#: code:addons/crm/crm.py:0
-#: code:addons/crm/wizard/crm_job_wizard.py:0
-#: code:addons/crm/wizard/crm_lead_wizard.py:0
-#: code:addons/crm/wizard/crm_phonecall_wizard.py:0
#, python-format
msgid "Warning !"
msgstr "Atenção !"
@@ -154,7 +153,7 @@ msgstr "Atenção !"
#: code:addons/crm/wizard/wizard_crm_new_send_email.py:0
#, python-format
msgid "Please specify user's email address !"
-msgstr ""
+msgstr "Por favor, especifique o endereço de e-mail do usuário !"
#. module: crm
#: model:crm.case.categ,name:crm.categ_oppor5
@@ -196,32 +195,20 @@ msgid ""
"Section to which Case belongs to. Define Responsible user and Email account "
"for mail gateway."
msgstr ""
+"Seção a que pertence o caso. Definir usuário responsável e conta de e-mail "
+"para o acesso."
#. module: crm
-#: view:crm.case:0
#: field:crm.case,partner_id:0
-#: model:crm.case.categ,name:crm.categ_lead4
-#: model:crm.case.categ,name:crm.categ_oppor4
-#: wizard_field:crm.case.opportunity.partner_opportunity,init,partner_id:0
#: field:crm.case.rule,trg_partner_id:0
-#: selection:crm.email.add.cc,name:0
-#: field:crm.email.add.cc,partner_id:0
-#: wizard_field:crm.lead.opportunity_set,create_partner,partner_id:0
-#: wizard_field:crm.lead.opportunity_set,opportunity,partner_id:0
-#: view:crm.opportunity:0
-#: view:crm.phonecall:0
-#: wizard_field:crm.phonecall.opportunity_set,create_partner,partner_id:0
-#: wizard_field:crm.phonecall.opportunity_set,opportunity,partner_id:0
-#: model:process.node,name:crm.process_node_partner0
msgid "Partner"
msgstr "Parceiro"
#. module: crm
#: field:crm.case.categ,section_id:0
-#: field:crm.case.category2,section_id:0
#: view:crm.case.section:0
#: field:crm.case.section,name:0
-#: field:crm.case.stage,section_id:0
+#: wizard_field:crm.case.section.menu,init,section_id:0
#: model:ir.model,name:crm.model_crm_case_section
msgid "Case Section"
msgstr "Seção de caso"
@@ -275,7 +262,8 @@ msgid "Send New Email"
msgstr "Enviar Novo Email"
#. module: crm
-#: view:crm.case.history:0
+#: model:ir.actions.act_window,name:crm.crm_case_history_my-act
+#: model:ir.ui.menu,name:crm.menu_crm_case_history_my-act
msgid "My Histories"
msgstr "Meus históricos"
@@ -294,11 +282,12 @@ msgstr "Sessões"
#: help:crm.menu.config_wizard,opportunity:0
msgid "Tracks identified business opportunities for your sales pipeline."
msgstr ""
+"As trilhas identificaram oportunidades de negócio para melhoria das vendas."
#. module: crm
#: view:crm.meeting:0
msgid "Exception Dates"
-msgstr ""
+msgstr "Datas excepcionais"
#. module: crm
#: selection:crm.case.rule,trg_date_type:0
@@ -334,11 +323,6 @@ msgstr "Atenção!"
#. module: crm
#: view:crm.case:0
-#: view:crm.claim:0
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
msgid "Dates"
msgstr "Datas"
@@ -350,7 +334,7 @@ msgstr "Teste de segmentação"
#. module: crm
#: model:process.transition,name:crm.process_transition_leadpartner0
msgid "Prospect Partner"
-msgstr ""
+msgstr "Perspectiva do Parceiro"
#. module: crm
#: view:crm.fundraising:0
@@ -382,7 +366,7 @@ msgstr "Tipo de atraso"
#: view:crm.opportunity:0
#: view:crm.phonecall:0
msgid "Contact"
-msgstr ""
+msgstr "Contato"
#. module: crm
#: view:crm.job:0
@@ -421,7 +405,6 @@ msgid "Exception Rules"
msgstr "Regras de exceção"
#. module: crm
-#: field:crm.menu.config_wizard,opportunity:0
#: model:ir.actions.report.xml,name:crm.crm_business_opportunities_report
msgid "Business Opportunities"
msgstr "Oportunidades de negócios"
@@ -453,7 +436,7 @@ msgstr "%(email_from)s = Email do Parceiro"
#. module: crm
#: model:crm.case.stage,name:crm.stage_lead6
msgid "Dead"
-msgstr ""
+msgstr "Morta"
#. module: crm
#: view:crm.meeting:0
@@ -469,17 +452,11 @@ msgstr "Cliente existente"
#. module: crm
#: model:crm.case.category2,name:crm.category_meet2
msgid "Home"
-msgstr ""
+msgstr "Início"
#. module: crm
#: field:crm.case,categ_id:0
#: field:crm.case.rule,trg_categ_id:0
-#: wizard_field:crm.job.reschedule_phone_call,init,category_id:0
-#: view:crm.opportunity:0
-#: wizard_field:crm.opportunity.reschedule_phone_call,init,category_id:0
-#: field:report.crm.case.section.categ.categ2,categ_id:0
-#: field:report.crm.case.section.categ.stage,categ_id:0
-#: field:report.crm.case.section.stage,categ_id:0
msgid "Category"
msgstr "Categoria"
@@ -509,11 +486,6 @@ msgstr "%(parceiro)s = Nome do Parceiro"
#. module: crm
#: view:crm.case:0
-#: view:crm.claim:0
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
msgid "Action Information"
msgstr "Informação da ação"
@@ -542,13 +514,12 @@ msgstr "Condições"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_categ0-act_open
+#: model:ir.ui.menu,name:crm.menu_crm_case_categ0-act_open
msgid "Open Cases"
msgstr "Casos abertos"
#. module: crm
-#: field:crm.case.log,name:0
-#: view:crm.claim:0
-#: view:crm.job:0
+#: field:crm.case,state:0
msgid "Status"
msgstr "Situação"
@@ -560,7 +531,7 @@ msgstr "Situação"
#: model:ir.actions.wizard,name:crm.wizard_partner_create_opportunity
#: model:ir.actions.wizard,name:crm.wizard_partner_create_opportunity1
msgid "Create Opportunity"
-msgstr ""
+msgstr "Criar oportunidade"
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@@ -580,9 +551,6 @@ msgstr "Árvore de reuniões"
#: view:crm.case:0
#: selection:crm.case.rule,trg_state_from:0
#: selection:crm.case.rule,trg_state_to:0
-#: view:crm.fundraising:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
#, python-format
msgid "Escalate"
msgstr "Escalada"
@@ -601,7 +569,7 @@ msgstr "Gestão do Relacionamento entre Cliente & Fornecedor"
#: view:crm.email.add.cc:0
#: model:ir.actions.act_window,name:crm.action_view_crm_email_add_cc_wizard
msgid "Add CC"
-msgstr ""
+msgstr "Adicionar CC"
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@@ -652,7 +620,7 @@ msgstr "%(case_id)s = Identificação do Caso"
#. module: crm
#: model:crm.case.category2,name:crm.category_oppor2
msgid "New Business"
-msgstr ""
+msgstr "Negócio novo"
#. module: crm
#: help:crm.case,email_from:0
@@ -696,12 +664,10 @@ msgstr ""
#. module: crm
#: model:crm.case.categ,name:crm.categ_claim3
msgid "Policy Claims"
-msgstr ""
+msgstr "Política de Reclamações"
#. module: crm
#: code:addons/crm/crm.py:0
-#: code:addons/crm/wizard/wizard_crm_new_send_email.py:0
-#: code:addons/crm/wizard/wizard_crm_send_email.py:0
#, python-format
msgid ""
"You must define a responsible user for this case in order to use this action!"
@@ -727,7 +693,7 @@ msgstr "Contrato proposto"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm_case_job_req_main
msgid "Jobs - Hiring Process"
-msgstr ""
+msgstr "Trabalhos - Processo de contratação"
#. module: crm
#: view:crm.case:0
@@ -747,11 +713,6 @@ msgstr "Setembro"
#. module: crm
#: view:crm.case:0
-#: view:crm.claim:0
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
msgid "Communication history"
msgstr "Histórico"
@@ -794,7 +755,7 @@ msgstr "Linhas da segmentação de parceiro"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_category_act_leads_all
msgid "All Leads"
-msgstr ""
+msgstr "Todas as iniciativas (leads)"
#. module: crm
#: view:crm.lead:0
@@ -868,7 +829,7 @@ msgstr "Oportunidade"
#: view:crm.lead:0
#: view:crm.opportunity:0
msgid "Emails"
-msgstr ""
+msgstr "E-mails"
#. module: crm
#: model:crm.case.category2,name:crm.category_lead7
@@ -883,18 +844,18 @@ msgstr "Parar processo"
#. module: crm
#: model:crm.case.categ,name:crm.categ_claim1
msgid "Factual Claims"
-msgstr ""
+msgstr "Reclamações Efetivas"
#. module: crm
#: view:crm.phonecall:0
msgid "Search Phonecalls"
-msgstr ""
+msgstr "Chamadas telefônicas de pesquisa"
#. module: crm
#: wizard_button:crm.lead.opportunity_set,create_partner,create:0
#: wizard_button:crm.phonecall.opportunity_set,create_partner,create:0
msgid "Continue"
-msgstr ""
+msgstr "Continuar"
#. module: crm
#: field:crm.segmentation,som_interval:0
@@ -1174,10 +1135,8 @@ msgid "Next Action"
msgstr "Próxima ação"
#. module: crm
-#: view:crm.case:0
#: field:crm.case,date_deadline:0
#: selection:crm.case.rule,trg_date_type:0
-#: view:crm.opportunity:0
msgid "Deadline"
msgstr "Prazo final"
@@ -1196,7 +1155,7 @@ msgstr ""
#. module: crm
#: view:crm.segmentation:0
msgid "Partner Segmentations"
-msgstr "Segmentação de Parceiros"
+msgstr "Segmentações de Parceiros"
#. module: crm
#: view:crm.meeting:0
@@ -1363,12 +1322,6 @@ msgstr "%(partner_email)s = Email do Parceiro"
#. module: crm
#: view:crm.case:0
-#: view:crm.claim:0
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
-#: view:crm.phonecall:0
msgid "Reset to Draft"
msgstr "Restaurar para esboço"
@@ -1581,8 +1534,6 @@ msgstr "Aguardando resposta"
#: field:crm.case,date:0
#: field:crm.case.log,date:0
#: selection:crm.case.rule,trg_date_type:0
-#: view:crm.claim:0
-#: view:crm.phonecall:0
msgid "Date"
msgstr "Data"
@@ -1629,11 +1580,6 @@ msgstr "Dá a localização da reunião"
#. module: crm
#: view:crm.case:0
-#: view:crm.claim:0
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
msgid "History"
msgstr "Histórico"
@@ -1668,40 +1614,18 @@ msgstr "Enviar lembrete"
#. module: crm
#: view:crm.case:0
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
msgid "References"
msgstr "Referências"
#. module: crm
#: code:addons/crm/crm.py:0
#: view:crm.case:0
-#: wizard_button:crm.case.opportunity.partner_opportunity,init,end:0
-#: view:crm.claim:0
-#: view:crm.claim.assign_wizard:0
-#: view:crm.fundraising:0
-#: view:crm.helpdesk.assign_wizard:0
-#: wizard_button:crm.job.meeting_set,init,end:0
-#: wizard_button:crm.job.partner_create,init,end:0
-#: wizard_button:crm.job.reschedule_phone_call,init,end:0
-#: view:crm.lead:0
-#: wizard_button:crm.lead.opportunity_set,create_partner,end:0
-#: wizard_button:crm.lead.opportunity_set,opportunity,end:0
-#: wizard_button:crm.lead.partner_create,init,end:0
-#: view:crm.meeting.generic_wizard:0
-#: wizard_button:crm.new.send.mail,init,end:0
-#: view:crm.opportunity:0
-#: view:crm.opportunity.assign_wizard:0
-#: wizard_button:crm.opportunity.reschedule_phone_call,init,end:0
-#: view:crm.phonecall:0
-#: view:crm.phonecall.assign_wizard:0
-#: wizard_button:crm.phonecall.meeting_set,init,end:0
-#: wizard_button:crm.phonecall.opportunity_set,create_partner,end:0
-#: wizard_button:crm.phonecall.opportunity_set,opportunity,end:0
-#: wizard_button:crm.phonecall.partner_create,init,end:0
-#: wizard_button:crm.send.mail,init,end:0
+#: selection:crm.case,state:0
+#: selection:crm.case.rule,act_state:0
+#: selection:crm.case.rule,trg_state_from:0
+#: selection:crm.case.rule,trg_state_to:0
+#: wizard_button:crm.case.section.menu,design_menu,end:0
+#: wizard_button:crm.case.section.menu,init,end:0
#, python-format
msgid "Cancel"
msgstr "Cancelar"
@@ -1814,9 +1738,6 @@ msgid "="
msgstr "="
#. module: crm
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: field:crm.menu.config_wizard,name:0
#: field:crm.segmentation,name:0
msgid "Name"
msgstr "Nome"
@@ -1868,11 +1789,6 @@ msgstr ""
#. module: crm
#: view:crm.case:0
#: view:crm.case.rule:0
-#: view:crm.claim:0
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
msgid "Actions"
msgstr "Ações"
@@ -2133,17 +2049,12 @@ msgstr "Estado do caso"
#. module: crm
#: code:addons/crm/crm.py:0
-#: code:addons/crm/wizard/wizard_crm_new_send_email.py:0
-#: code:addons/crm/wizard/wizard_crm_send_email.py:0
#, python-format
msgid "Send"
msgstr "Enviar"
#. module: crm
#: field:crm.case,priority:0
-#: view:crm.fundraising:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
msgid "Priority"
msgstr "Prioridade"
@@ -2189,11 +2100,6 @@ msgstr ""
#. module: crm
#: code:addons/crm/crm.py:0
-#: code:addons/crm/crm_claim.py:0
-#: code:addons/crm/crm_helpdesk.py:0
-#: code:addons/crm/crm_meeting.py:0
-#: code:addons/crm/crm_opportunity.py:0
-#: code:addons/crm/crm_phonecall.py:0
#, python-format
msgid "Error !"
msgstr "Erro !"
@@ -2437,14 +2343,6 @@ msgstr "Baixo"
#. module: crm
#: field:crm.case,date_closed:0
-#: selection:crm.case,state:0
-#: selection:crm.case.rule,act_state:0
-#: selection:crm.case.rule,trg_state_from:0
-#: selection:crm.case.rule,trg_state_to:0
-#: selection:report.crm.case.section.categ.categ2,state:0
-#: selection:report.crm.case.section.categ.stage,state:0
-#: selection:report.crm.case.section.categ2,state:0
-#: selection:report.crm.case.section.stage,state:0
msgid "Closed"
msgstr "Fechado"
@@ -2626,10 +2524,9 @@ msgid "Are you sure you want to create a partner based on this job request ?"
msgstr ""
#. module: crm
-#: wizard_field:crm.lead.opportunity_set,create_partner,action:0
-#: wizard_field:crm.phonecall.opportunity_set,create_partner,action:0
+#: field:crm.case.log,name:0
msgid "Action"
-msgstr "Ação"
+msgstr ""
#. module: crm
#: code:addons/crm/crm_claim.py:0
@@ -2675,7 +2572,6 @@ msgstr ""
#. module: crm
#: view:crm.case:0
-#: view:crm.phonecall:0
msgid "General"
msgstr "Geral"
@@ -2722,16 +2618,6 @@ msgstr ""
#: selection:crm.case.rule,act_state:0
#: selection:crm.case.rule,trg_state_from:0
#: selection:crm.case.rule,trg_state_to:0
-#: view:crm.claim:0
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: view:crm.lead:0
-#: view:crm.opportunity:0
-#: view:crm.phonecall:0
-#: selection:report.crm.case.section.categ.categ2,state:0
-#: selection:report.crm.case.section.categ.stage,state:0
-#: selection:report.crm.case.section.categ2,state:0
-#: selection:report.crm.case.section.stage,state:0
#, python-format
msgid "Open"
msgstr "Abrir"
@@ -2767,16 +2653,6 @@ msgstr ""
#. module: crm
#: field:crm.case,user_id:0
#: field:crm.case.rule,trg_user_id:0
-#: view:crm.claim:0
-#: field:crm.claim.assign_wizard,user_id:0
-#: view:crm.fundraising:0
-#: field:crm.helpdesk.assign_wizard,user_id:0
-#: view:crm.job:0
-#: view:crm.meeting:0
-#: field:crm.meeting.generic_wizard,user_id:0
-#: view:crm.opportunity:0
-#: field:crm.opportunity.assign_wizard,user_id:0
-#: field:crm.phonecall.assign_wizard,user_id:0
msgid "Responsible"
msgstr "Responsável"
@@ -3011,6 +2887,8 @@ msgid "Jobs Hiring Process"
msgstr ""
#. module: crm
+#: model:ir.actions.act_window,name:crm.crm_case_categ0-act
+#: model:ir.ui.menu,name:crm.menu_crm_case_categ0-act
#: model:ir.ui.menu,name:crm.next_id_52
msgid "All Cases"
msgstr "Todos os casos"
@@ -3130,7 +3008,6 @@ msgstr ""
#. module: crm
#: code:addons/crm/crm.py:0
-#: code:addons/crm/wizard/wizard_cal_subscribe.py:0
#, python-format
msgid "Error!"
msgstr "Erro!"
@@ -3219,17 +3096,6 @@ msgstr "%(case_subject)s = Assunto do Caso"
#: field:crm.case,section_id:0
#: field:crm.case.log,section_id:0
#: field:crm.case.rule,trg_section_id:0
-#: field:crm.claim.assign_wizard,section_id:0
-#: field:crm.helpdesk.assign_wizard,section_id:0
-#: wizard_field:crm.job.reschedule_phone_call,init,section_id:0
-#: field:crm.meeting.generic_wizard,section_id:0
-#: field:crm.opportunity.assign_wizard,section_id:0
-#: wizard_field:crm.opportunity.reschedule_phone_call,init,section_id:0
-#: field:crm.phonecall.assign_wizard,section_id:0
-#: field:report.crm.case.section.categ.categ2,section_id:0
-#: field:report.crm.case.section.categ.stage,section_id:0
-#: field:report.crm.case.section.categ2,section_id:0
-#: field:report.crm.case.section.stage,section_id:0
msgid "Section"
msgstr "Seção"
@@ -3260,10 +3126,7 @@ msgid "Your action"
msgstr "Sua ação"
#. module: crm
-#: model:crm.case.category2,name:crm.category_lead3
#: field:crm.case.history,email:0
-#: field:crm.email.add.cc,email:0
-#: view:crm.job:0
msgid "Email"
msgstr "E-mail"
@@ -3320,16 +3183,6 @@ msgstr ""
#: selection:crm.case.rule,act_state:0
#: selection:crm.case.rule,trg_state_from:0
#: selection:crm.case.rule,trg_state_to:0
-#: view:crm.claim:0
-#: view:crm.fundraising:0
-#: view:crm.job:0
-#: view:crm.lead:0
-#: selection:crm.new.send.mail,init,state:0
-#: view:crm.opportunity:0
-#: selection:report.crm.case.section.categ.categ2,state:0
-#: selection:report.crm.case.section.categ.stage,state:0
-#: selection:report.crm.case.section.categ2,state:0
-#: selection:report.crm.case.section.stage,state:0
#, python-format
msgid "Pending"
msgstr "Pendente"
@@ -3475,11 +3328,25 @@ msgid "All Funds"
msgstr ""
#. module: crm
-#: field:crm.case.section,calendar:0
-#: view:crm.meeting:0
-#: model:ir.ui.menu,name:crm.menu_crm_case_category_act_meetings
+#: selection:crm.case.section.menu,design_menu,menu10_option:0
+#: selection:crm.case.section.menu,design_menu,menu11_option:0
+#: selection:crm.case.section.menu,design_menu,menu12_option:0
+#: selection:crm.case.section.menu,design_menu,menu13_option:0
+#: selection:crm.case.section.menu,design_menu,menu14_option:0
+#: selection:crm.case.section.menu,design_menu,menu15_option:0
+#: selection:crm.case.section.menu,design_menu,menu16_option:0
+#: selection:crm.case.section.menu,design_menu,menu17_option:0
+#: selection:crm.case.section.menu,design_menu,menu1_option:0
+#: selection:crm.case.section.menu,design_menu,menu2_option:0
+#: selection:crm.case.section.menu,design_menu,menu3_option:0
+#: selection:crm.case.section.menu,design_menu,menu4_option:0
+#: selection:crm.case.section.menu,design_menu,menu5_option:0
+#: selection:crm.case.section.menu,design_menu,menu6_option:0
+#: selection:crm.case.section.menu,design_menu,menu7_option:0
+#: selection:crm.case.section.menu,design_menu,menu8_option:0
+#: selection:crm.case.section.menu,design_menu,menu9_option:0
msgid "Calendar"
-msgstr "Calendário"
+msgstr ""
#. module: crm
#: model:crm.case.categ,name:crm.categ_job1
@@ -3523,6 +3390,7 @@ msgstr ""
#. module: crm
#: code:addons/crm/crm.py:0
+#: view:crm.case:0
#, python-format
msgid "Historize"
msgstr "Historiar"
@@ -3550,11 +3418,6 @@ msgstr ""
#: selection:crm.case.rule,act_state:0
#: selection:crm.case.rule,trg_state_from:0
#: selection:crm.case.rule,trg_state_to:0
-#: view:crm.meeting:0
-#: selection:report.crm.case.section.categ.categ2,state:0
-#: selection:report.crm.case.section.categ.stage,state:0
-#: selection:report.crm.case.section.categ2,state:0
-#: selection:report.crm.case.section.stage,state:0
#, python-format
msgid "Draft"
msgstr "Esboço"
@@ -3584,8 +3447,6 @@ msgstr "Normal"
#. module: crm
#: code:addons/crm/crm.py:0
-#: code:addons/crm/wizard/wizard_crm_new_send_email.py:0
-#: code:addons/crm/wizard/wizard_crm_send_email.py:0
#, python-format
msgid "You must put a Partner eMail to use this action!"
msgstr "Você deve colocar um e-mail de parceiro para utilizar esta ação!"
@@ -3728,8 +3589,6 @@ msgstr ""
#. module: crm
#: view:crm.case:0
-#: view:crm.fundraising:0
-#: view:crm.opportunity:0
msgid "Estimates"
msgstr "Estimativas"
@@ -3741,6 +3600,10 @@ msgstr "Usuário Responsável"
#. module: crm
#: code:addons/crm/crm.py:0
#: view:crm.case:0
+#: selection:crm.case,state:0
+#: selection:crm.case.rule,act_state:0
+#: selection:crm.case.rule,trg_state_from:0
+#: selection:crm.case.rule,trg_state_to:0
#, python-format
msgid "Close"
msgstr "Fechar"
@@ -3798,14 +3661,9 @@ msgid "% = The '%' Character"
msgstr ""
#. module: crm
-#: view:crm.case:0
#: field:crm.case,name:0
#: field:crm.case.history,description:0
#: field:crm.case.history,note:0
-#: view:crm.job:0
-#: view:crm.meeting:0
-#: view:crm.opportunity:0
-#: view:crm.phonecall:0
#: field:crm.segmentation,description:0
msgid "Description"
msgstr "Descrição"
@@ -3855,14 +3713,6 @@ msgstr ""
#. module: crm
#: code:addons/crm/crm.py:0
#: field:crm.case.log,case_id:0
-#: field:crm.claim,inherit_case_id:0
-#: field:crm.fundraising,inherit_case_id:0
-#: field:crm.helpdesk,inherit_case_id:0
-#: field:crm.job,inherit_case_id:0
-#: field:crm.lead,inherit_case_id:0
-#: field:crm.meeting,inherit_case_id:0
-#: field:crm.opportunity,inherit_case_id:0
-#: field:crm.phonecall,inherit_case_id:0
#: model:ir.model,name:crm.model_crm_case
#: model:res.request.link,name:crm.req_link_case
#, python-format
@@ -3986,7 +3836,6 @@ msgstr ""
#. module: crm
#: field:crm.case.rule,sequence:0
#: field:crm.case.section,sequence:0
-#: field:crm.case.stage,sequence:0
msgid "Sequence"
msgstr "Sequência"
@@ -4166,8 +4015,21 @@ msgstr ""
#~ msgid "Mail to watchers (Cc)"
#~ msgstr "Correio para observadors (cc)"
-#~ msgid "crm.case.section.open"
-#~ msgstr "crm.case.section.open"
+#~ msgid "New "
+#~ msgstr "Novo "
#~ msgid "Form View"
#~ msgstr "Visualização de formulário"
+
+#~ msgid ""
+#~ "You may want to create a new parent menu to put all the created menus in."
+#~ msgstr ""
+#~ "Pode ser que você queira criar um novo menu principal para agregar todos os "
+#~ "menus criados."
+
+#~ msgid "this wizard will create all sub-menus, within the selected menu."
+#~ msgstr "este wizard cria todos os sub-menus, dentro de um menu selecionado"
+
+#~ msgid "Deadline Date is automatically computed from Start Date + Duration"
+#~ msgstr ""
+#~ "Data limite é calculada automaticamente pela soma da Data Inicial + Duração"
diff --git a/addons/crm/wizard/__init__.py b/addons/crm/wizard/__init__.py
index 8c6a650b8da..70dd08a23cf 100644
--- a/addons/crm/wizard/__init__.py
+++ b/addons/crm/wizard/__init__.py
@@ -31,6 +31,8 @@ import crm_phonecall_to_opportunity
import crm_partner_to_opportunity
import crm_custom_create_menu
+import crm_merge_opportunities
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_forward_to_partner.py b/addons/crm/wizard/crm_forward_to_partner.py
index 50cfc922104..aaa26c438b6 100644
--- a/addons/crm/wizard/crm_forward_to_partner.py
+++ b/addons/crm/wizard/crm_forward_to_partner.py
@@ -203,11 +203,11 @@ class crm_lead_forward_to_partner(osv.osv_memory):
body = []
lead_proxy = self.pool.get('crm.lead')
lead = lead_proxy.browse(cr, uid, lead_id, context=context)
- if not lead.type or lead.type == 'lead':
+ if not lead.type or lead.type == 'lead' or not lead.partner_address_id:
field_names = [
- 'partner_name', 'title', 'function', 'street', 'street2',
- 'zip', 'city', 'country_id', 'state_id', 'email_from',
- 'phone', 'fax', 'mobile'
+ 'partner_name', 'title', 'function', 'street', 'street2',
+ 'zip', 'city', 'country_id', 'state_id', 'email_from',
+ 'phone', 'fax', 'mobile', 'categ_id', 'description',
]
for field_name in field_names:
@@ -218,7 +218,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
if hasattr(field_definition.selection, '__call__'):
key = field_definition.selection(lead_proxy, cr, uid, context=context)
else:
- key = field.definition.selection
+ key = field_definition.selection
value = dict(key).get(lead[field_name], lead[field_name])
elif field_definition._type == 'many2one':
if lead[field_name]:
@@ -230,22 +230,22 @@ class crm_lead_forward_to_partner(osv.osv_memory):
elif lead.type == 'opportunity':
pa = lead.partner_address_id
body = [
- "Partner: %s" % (lead.partner_id and lead.partner_id.name_get()[0][1]),
- "Contact: %s" % (pa.name or ''),
- "Title: %s" % (pa.title or ''),
- "Function: %s" % (pa.function or ''),
- "Street: %s" % (pa.street or ''),
- "Street2: %s" % (pa.street2 or ''),
- "Zip: %s" % (pa.zip or ''),
- "City: %s" % (pa.city or ''),
- "Country: %s" % (pa.country_id and pa.country_id.name_get()[0][1] or ''),
- "State: %s" % (pa.state_id and pa.state_id.name_get()[0][1] or ''),
- "Email: %s" % (pa.email or ''),
- "Phone: %s" % (pa.phone or ''),
- "Fax: %s" % (pa.fax or ''),
- "Mobile: %s" % (pa.mobile or ''),
- "Lead Category: %s" % (lead.categ_id and lead.categ_id.name or ''),
- "Details: %s" % (lead.description or ''),
+ "Partner: %s" % (lead.partner_id and lead.partner_id.name_get()[0][1]),
+ "Contact: %s" % (pa.name or ''),
+ "Title: %s" % (pa.title or ''),
+ "Function: %s" % (pa.function or ''),
+ "Street: %s" % (pa.street or ''),
+ "Street2: %s" % (pa.street2 or ''),
+ "Zip: %s" % (pa.zip or ''),
+ "City: %s" % (pa.city or ''),
+ "Country: %s" % (pa.country_id and pa.country_id.name_get()[0][1] or ''),
+ "State: %s" % (pa.state_id and pa.state_id.name_get()[0][1] or ''),
+ "Email: %s" % (pa.email or ''),
+ "Phone: %s" % (pa.phone or ''),
+ "Fax: %s" % (pa.fax or ''),
+ "Mobile: %s" % (pa.mobile or ''),
+ "Lead Category: %s" % (lead.categ_id and lead.categ_id.name or ''),
+ "Details: %s" % (lead.description or ''),
]
return "\n".join(body + ['---'])
diff --git a/addons/crm/wizard/crm_merge_opportunities.py b/addons/crm/wizard/crm_merge_opportunities.py
new file mode 100644
index 00000000000..67a73bf4d13
--- /dev/null
+++ b/addons/crm/wizard/crm_merge_opportunities.py
@@ -0,0 +1,151 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+from crm import crm
+from osv import osv, fields
+from tools.translate import _
+
+class crm_merge_opportunity(osv.osv_memory):
+ """Merge two Opportunities"""
+
+ _name = 'crm.merge.opportunity'
+ _description = 'Merge two Opportunities'
+
+ def view_init(self, cr, uid, fields, context=None):
+ """
+ This function checks for precondition before wizard executes
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ """
+ record_id = context and context.get('active_id', False) or False
+ if record_id:
+ opp_obj = self.pool.get('crm.lead')
+ opp = opp_obj.browse(cr, uid, record_id, context=context)
+ if opp.type != 'opportunity':
+ raise osv.except_osv(_('Warning!'), _('Can only perform this Operation for "Opportunities".'))
+ if not opp.partner_id:
+ raise osv.except_osv(_('Warning!'), _('Opportunity must have Partner assigned before merging with other Opportunity.'))
+ #Search for Opportunity for the same partner
+ opp_ids = opp_obj.search(cr, uid, [('partner_id', '=', opp.partner_id.id), ('type', '=', 'opportunity'), ('state', 'in', ('open', 'pending'))])
+ # Removing current opportunity
+ if record_id in opp_ids:
+ opp_ids.remove(record_id)
+ if not opp_ids:
+ raise osv.except_osv(_('Warning!'), _("There are no other 'Open' or 'Pending' Opportunities for the partner '%s'.") % (opp.partner_id.name))
+ pass
+
+
+ def action_merge(self, cr, uid, ids, context=None):
+ """
+ This function merges two opportunities
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Phonecall to Opportunity IDs
+ @param context: A standard dictionary for contextual values
+
+ @return : Dictionary value for created Opportunity form
+ """
+ record_id = context and context.get('active_id', False) or False
+ if record_id:
+ opp_obj = self.pool.get('crm.lead')
+ message_obj = self.pool.get('mailgate.message')
+ current_opp = opp_obj.browse(cr, uid, record_id, context=context)
+
+ for this in self.browse(cr, uid, ids, context=context):
+ for opp in this.opportunity_ids:
+ opp_obj.write(cr, uid, opp.id, {
+ 'stage_id': opp.stage_id.id or current_opp.stage_id.id or False,
+ 'priority': opp.priority or current_opp.priority,
+ 'email_from': opp.email_from or current_opp.email_from,
+ 'phone': opp.phone or current_opp.phone,
+ 'section_id': opp.section_id.id or current_opp.section_id.id or False,
+ 'categ_id': opp.categ_id.id or current_opp.categ_id.id or False,
+ 'description': (opp.description or '') + '\n' + (current_opp.description or ''),
+ 'partner_name': opp.partner_name or current_opp.partner_name,
+ 'title': opp.title.id or current_opp.title.id or False,
+ 'function': opp.function or current_opp.function,
+ 'street': opp.street or current_opp.street,
+ 'street2': opp.street2 or current_opp.street2,
+ 'zip': opp.zip or current_opp.zip,
+ 'city': opp.city or current_opp.city,
+ 'country_id': opp.country_id.id or current_opp.country_id.id or False,
+ 'state_id': opp.state_id.id or current_opp.state_id.id or False,
+ 'fax': opp.fax or current_opp.fax,
+ 'mobile': opp.mobile or current_opp.mobile,
+ 'email_cc': ','.join(filter(lambda x: x, [opp.email_cc, current_opp.email_cc]))
+ })
+ for history in current_opp.message_ids:
+ if history.history:
+ new_history = message_obj.copy(cr, uid, history.id, default={'res_id': opp.id})
+ opp_obj._history(cr, uid, [current_opp], _('Merged into Opportunity: %s') % (opp.id))
+
+ if this.state == 'unchanged':
+ pass
+ elif this.state == 'done':
+ opp_obj.case_close(cr, uid, [record_id])
+ elif this.state == 'draft':
+ opp_obj.case_reset(cr, uid, [record_id])
+ elif this.state in ['cancel', 'open', 'pending']:
+ act = 'case_' + this.state
+ getattr(opp_obj, act)(cr, uid, [record_id])
+ return {}
+
+ _columns = {
+ 'opportunity_ids' : fields.many2many('crm.lead', 'merge_opportunity_rel', 'merge_id', 'opportunity_id', 'Opportunities', domain=[('type', '=', 'opportunity')]),
+ 'state': fields.selection(crm.AVAILABLE_STATES + [('unchanged', 'Unchanged')], string='Set State To', required=True),
+ }
+
+ def default_get(self, cr, uid, fields, context=None):
+ """
+ This function gets default values
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ @return : default values of fields.
+ """
+ record_id = context and context.get('active_id', False) or False
+ res = super(crm_merge_opportunity, self).default_get(cr, uid, fields, context=context)
+
+ if record_id:
+ opp_obj = self.pool.get('crm.lead')
+ opp = opp_obj.browse(cr, uid, record_id, context=context)
+ opp_ids = opp_obj.search(cr, uid, [('partner_id', '=', opp.partner_id.id), ('type', '=', 'opportunity'), ('state', 'in', ('open', 'pending'))])
+ # Removing current opportunity
+ if record_id in opp_ids:
+ opp_ids.remove(record_id)
+
+ if 'opportunity_ids' in fields:
+ res.update({'opportunity_ids': opp_ids})
+ if 'state' in fields:
+ res.update({'state': u'cancel'})
+
+ return res
+
+crm_merge_opportunity()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_merge_opportunities_view.xml b/addons/crm/wizard/crm_merge_opportunities_view.xml
new file mode 100644
index 00000000000..5ee0eda5375
--- /dev/null
+++ b/addons/crm/wizard/crm_merge_opportunities_view.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+ crm.merge.opportunity.form
+ crm.merge.opportunity
+ form
+
+
+
+
+
+
+
+
+ Merge Opportunities
+ crm.merge.opportunity
+ form
+ form
+
+ new
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py
index 76a6073b58c..905b1bba9ff 100644
--- a/addons/crm_claim/crm_claim.py
+++ b/addons/crm_claim/crm_claim.py
@@ -52,12 +52,6 @@ class crm_claim(osv.osv, crm.crm_case):
"canall which is this opportunity source."),
'planned_revenue': fields.float('Planned Revenue'),
'planned_cost': fields.float('Planned Costs'),
- 'som': fields.many2one('res.partner.som', 'State of Mind', \
- help="The minds states allow to define a value scale "\
- "which represents the partner mentality in "\
- "relation to our services.The scale has to be "\
- "created with a factor for each level from 0 "\
- "(Very dissatisfied) to 10 (Extremely satisfied)"),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),
diff --git a/addons/crm_claim/report/crm_claim_report.py b/addons/crm_claim/report/crm_claim_report.py
index 18c6d16ed53..fed4026aa02 100644
--- a/addons/crm_claim/report/crm_claim_report.py
+++ b/addons/crm_claim/report/crm_claim_report.py
@@ -107,7 +107,7 @@ class crm_claim_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), \
c.state, c.user_id,c.section_id, c.stage_id,\
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
- ,c.priority,c.type_id,c.som
+ ,c.priority,c.type_id
)""")
crm_claim_report()
diff --git a/addons/crm_fundraising/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py
index 81e16a47ac3..962fae07fd3 100644
--- a/addons/crm_fundraising/crm_fundraising.py
+++ b/addons/crm_fundraising/crm_fundraising.py
@@ -75,11 +75,6 @@ class crm_fundraising(osv.osv, crm.crm_case):
"modes available with the customer." \
" With each commercial opportunity, you can indicate\
the canall which is this opportunity source."),
- 'som': fields.many2one('res.partner.som', 'State of Mind', \
- help="The minds states allow to define a value scale which represents" \
- "the partner mentality in relation to our services.The scale has" \
- "to be created with a factor for each level from 0 \
- (Very dissatisfied) to 10 (Extremely satisfied)."),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\
diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py
index d4a1e9d59fc..9c223c74a54 100644
--- a/addons/crm_helpdesk/crm_helpdesk.py
+++ b/addons/crm_helpdesk/crm_helpdesk.py
@@ -61,11 +61,6 @@ class crm_helpdesk(osv.osv, crm.crm_case):
'planned_cost': fields.float('Planned Costs'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'probability': fields.float('Probability (%)'),
- 'som': fields.many2one('res.partner.som', 'State of Mind', \
- help="The minds states allow to define a value scale which represents" \
- "the partner mentality in relation to our services.The scale has" \
- "to be created with a factor for each level from 0" \
- "(Very dissatisfied) to 10 (Extremely satisfied)."),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.helpdesk')]"),
diff --git a/addons/crm_helpdesk/crm_helpdesk_demo.xml b/addons/crm_helpdesk/crm_helpdesk_demo.xml
index fd31bb4c8fb..be8da99f140 100644
--- a/addons/crm_helpdesk/crm_helpdesk_demo.xml
+++ b/addons/crm_helpdesk/crm_helpdesk_demo.xml
@@ -3,7 +3,6 @@
-
@@ -17,7 +16,6 @@
-
@@ -31,7 +29,6 @@
-
@@ -46,7 +43,6 @@
-
diff --git a/addons/crm_profiling/crm_profiling_view.xml b/addons/crm_profiling/crm_profiling_view.xml
index eeb95d77fc1..e0dbcce05a1 100644
--- a/addons/crm_profiling/crm_profiling_view.xml
+++ b/addons/crm_profiling/crm_profiling_view.xml
@@ -16,7 +16,7 @@
tree,form
-
@@ -26,7 +26,7 @@
tree,form
-
diff --git a/addons/hr_attendance/test/test_hr_attendance.yml b/addons/hr_attendance/test/test_hr_attendance.yml
index 5c1132525f5..e4a08476985 100644
--- a/addons/hr_attendance/test/test_hr_attendance.yml
+++ b/addons/hr_attendance/test/test_hr_attendance.yml
@@ -1,8 +1,8 @@
-- |
- In order to test hr_attendance module in OpenERP, I create new attendance and perform Sign In/Sign Out operation.
-
-- |
- First I create Employee "Mark Johnson".
+-
+ In order to test hr_attendance module in OpenERP, I will first create new attendance reasons and perform Sign In/Sign Out operations.
+
+-
+ I create a new employee "Mark Johnson".
-
!record {model: hr.employee, id: hr_employee_employee0}:
address_home_id: base.res_partner_address_1
@@ -10,56 +10,56 @@
gender: male
name: Mark Johnson
user_id: base.user_root
-
-- |
- Given that I have Attendance Reason "Good Morning" for Sign In.
--
- !record {model: hr.action.reason, id: hr_action_reason_goodmorning0}:
- name: Good Morning
+
+-
+ I create a new attendance reason "Login" for Sign In.
+-
+ !record {model: hr.action.reason, id: hr_action_reason_login0}:
+ name: Login
action_type: sign_in
-- |
- I also create another Attendance Reason for Sign Out.
--
- !record {model: hr.action.reason, id: hr_action_reason_goodnight0}:
- name: Good Night
+-
+ I create second attendance reason "Logout" for Sign Out.
+-
+ !record {model: hr.action.reason, id: hr_action_reason_logout0}:
+ name: Logout
action_type: sign_out
-- |
- Now , When I came in office , I create Atendances and perform "Sign In" action with proper reason.
--
+-
+ Now, at the time of login, I create an attendance with "Sign In" action and proper reason.
+-
!record {model: hr.attendance, id: hr_attendance_0}:
action: sign_in
- action_desc: 'hr_action_reason_goodmorning0'
+ action_desc: 'hr_action_reason_login0'
employee_id: 'hr_employee_employee0'
name: '2010-05-18 19:08:08'
-- |
- I check that Employee is in "Present" state.
-
- !assert {model: hr.employee, id: hr_employee_employee0}:
+ I check that Employee state is "Present".
+-
+ !assert {model: hr.employee, id: hr_employee_employee0}:
- state == 'present'
-
-- |
- When I left office , I create attendance and perform "Sign Out".
--
+
+-
+ At the time of logout, I create an attendance with "Sign Out" action.
+-
!record {model: hr.attendance, id: hr_attendance_1}:
action: sign_out
employee_id: 'hr_employee_employee0'
name: '2010-05-18 19:10:55'
-- |
- I check that Employee is in "Absent" state.
-
- !assert {model: hr.employee, id: hr_employee_employee0}:
- - state == 'absent'
+ I check that Employee state is Absent.
+-
+ !assert {model: hr.employee, id: hr_employee_employee0}:
+ - state == 'absent'
-- |
- I can also fill my attendance using "Sign In/Sign Out" wizard.
--
+-
+ I will use "Sign In/Sign Out" wizard for attendances.
+-
!record {model: hr.sign.in.out, id: hr_sign_in_out_markjohnson0}:
name: Mark Johnson
state: absent
-
-- |
- I click on "Sign In" button of this wizard to perform present action.
--
+
+-
+ I click on "Sign In" button of this wizard to login.
+-
!python {model: hr.sign.in.out}: |
obj_attendance = self.pool.get('hr.employee')
emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Mark Johnson")])
@@ -68,21 +68,21 @@
self.write(cr, uid, [ref('hr_sign_in_out_markjohnson0')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]})
self.si_check(cr, uid, [ref("hr_sign_in_out_markjohnson0")], {"active_id": ref("hr_employee_employee0")})
-- |
- I check that Employee is in "Present" state.
+-
+ I check that Employee state is "Present".
-
!assert {model: hr.employee, id: hr_employee_employee0}:
- - state == 'present'
-
-- |
- I forgot to "Sign Out" in Yesterday and want to sign in Today using This wizard.
--
+ - state == 'present'
+
+-
+ I forgot to "Sign Out" Yesterday and want to sign in Today using This wizard.
+-
!record {model: hr.sign.in.out, id: hr_sign_in_out_markjohnson0}:
name: Mark Johnson
state: present
-- |
- I click on "Sign In" button of this wizard. that will Open new form which ask for Last Sign Out date.
--
+-
+ I click on "Sign In" button of this wizard, this will Open a new form which ask for Last Sign Out date.
+-
!python {model: hr.sign.in.out}: |
obj_attendance = self.pool.get('hr.employee')
emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Mark Johnson")])
@@ -90,15 +90,15 @@
employee = obj_attendance.read(cr, uid, emp_id)[0]
self.write(cr, uid, [ref('hr_sign_in_out_markjohnson0')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]})
self.si_check(cr, uid, [ref("hr_sign_in_out_markjohnson0")])
-- |
- I select Last Sign Out date in "hr sign out ask" wizard.
--
+-
+ I select Last Sign Out date.
+-
!record {model: hr.sign.in.out.ask, id: hr_sign_in_out_ask_markjohnson0}:
last_time: !eval time.strftime('%Y-%m-%d %H:%M:%S')
- name: Mark Johnson
-- |
- Now I click on "Sign In" button of this wizard.
--
+ name: Mark Johnson
+-
+ Now I click on "Sign In" button of this wizard.
+-
!python {model: hr.sign.in.out.ask}: |
obj_attendance = self.pool.get('hr.employee')
emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Mark Johnson")])
@@ -106,4 +106,11 @@
employee = obj_attendance.read(cr, uid, emp_id)[0]
self.write(cr, uid, [ref('hr_sign_in_out_ask_markjohnson0')], {'emp_id': emp_id[0]})
#self.sign_in(cr, uid, [ref("hr_sign_in_out_ask_markjohnson0")], {"active_ids": [ref("hr_attendance.menu_hr_attendance_sigh_in_out")]})
-
\ No newline at end of file
+
+-
+ Finally i will check the state of the employee is present.
+-
+ !record {model: hr.sign.in.out, id: hr_sign_in_out_markjohnson0}:
+ name: Mark Johnson
+ state: present
+
diff --git a/addons/hr_contract/test/test_hr_contract.yml b/addons/hr_contract/test/test_hr_contract.yml
index cbcc7e67fda..084e45620a4 100644
--- a/addons/hr_contract/test/test_hr_contract.yml
+++ b/addons/hr_contract/test/test_hr_contract.yml
@@ -1,9 +1,8 @@
-- |
- In order to test hr_contract module in OpenERP,
- I will create contract for "Mark Johnson" employee.
-
-- |
- I create Employee "Mark Johnson" to assign contract.
+-
+ In order to test hr_contract module in OpenERP, I will create a new employee and create contract for the same.
+
+-
+ I create a new employee "Mark Johnson".
-
!record {model: hr.employee, id: hr_employee_employee0}:
address_home_id: base.res_partner_address_1
@@ -11,29 +10,31 @@
gender: male
name: Mark Johnson
user_id: base.user_root
-
-- |
- Given that I have Contract wage period "monthly" and
- specify "hours in period" is "176.00"
--
+ children: 2
+ marital: hr.hr_employee_marital_status_married
+ place_of_birth: Belgium
+ vehicle: 'No'
+ vehicle_distance: 12
+
+
+-
+ I create a new Contract wage period.
+-
!record {model: hr.contract.wage.type.period, id: hr_contract_wage_type_period_monthly0}:
- factor_days: 178.0
+ factor_days: 176.0
name: monthly
-- |
- Given that I have Contract wage type "Monthly Gross Wage".
- select wage period "monthly" and type "Gross". with hour cost "1.9"
--
+-
+ I create a new Contract Wage Type.
+-
!record {model: hr.contract.wage.type, id: hr_contract_wage_type_monthlygrosswage0}:
factor_type: 1.9
name: Monthly Gross Wage
period_id: 'hr_contract_wage_type_period_monthly0'
type: gross
-
-- |
- Now I start by creating contract for "Mark Johnson".
- Select wage type "Monthly Gross Wage" and Wage period "monthly"
- which I had given.
--
+
+-
+ I create a new contract for "Mark Johnson".
+-
!record {model: hr.contract, id: hr_contract_contract0}:
advantages_gross: 0.0
employee_id: 'hr_employee_employee0'
diff --git a/addons/hr_holidays/test/test_hr_holiday.yml b/addons/hr_holidays/test/test_hr_holiday.yml
index 68d58b1791b..03c1666dc6f 100644
--- a/addons/hr_holidays/test/test_hr_holiday.yml
+++ b/addons/hr_holidays/test/test_hr_holiday.yml
@@ -1,8 +1,8 @@
-- |
- In order to test the hr_holiday in OpenERP, I will Allocate leaves for Employee and manage leaves and leaves requests.
-- |
- For that First I create new user "user1" to make leave request.
--
+-
+ In order to test the hr_holiday module in OpenERP, I will Allocate leaves for Employee and manage leaves and leaves requests.
+-
+ I create new user "user1" to who makes leave request.
+-
!record {model: res.users, id: res_users_user0}:
company_id: base.main_company
context_lang: en_US
@@ -13,7 +13,7 @@
login: user1
name: user1
password: user1
-- |
+-
I create a new employee “Mark Johnshon” as Manager to validate employee leave.
-
!record {model: hr.employee, id: hr_employee_employee0}:
@@ -22,90 +22,87 @@
gender: male
name: Mark Johnson
user_id: base.user_root
-- |
- Create another employee "Phil Graves" as "user1" who make leave request.
--
+-
+ I Create another employee "Phil Graves" as "user1".
+-
!record {model: hr.employee, id: hr_employee_philgraves0}:
address_home_id: base.res_partner_address_8
name: Phil Graves
parent_id: 'hr_employee_employee0'
user_id: 'res_users_user0'
-- |
- Given that I have Leave type for employee.
--
- !record {model: hr.holidays.status, id: hr_holidays_status_fullleave0}:
+-
+ I create a new Leave type "Sick Leave".
+-
+ !record {model: hr.holidays.status, id: hr_holidays_status_sick0}:
color_name: red
- name: Full Leave.
- limit: 1
+ name: Sick Leave.
+ limit: 12
-- |
- After that I allocate leave request for employee "Phil Graves".
--
+-
+ I allocate leave request for employee "Phil Graves".
+-
!record {model: hr.holidays, id: hr_holidays_allocateleaveforuser0}:
allocation_type: employee
employee_id: 'hr_employee_philgraves0'
- holiday_status_id: hr_holidays_status_fullleave0
- name: Allocate leave for user1
+ holiday_status_id: hr_holidays_status_sick0
+ name: Sick Leaves for Phil Graves
number_of_days_temp: 12.0
date_from: '05/20/2010 13:59:00'
date_to: '05/22/2010 13:59:00'
type: add
-- |
- I click on "Confirm" button to confirm allocate leave for employee.
--
- !workflow {model: hr.holidays, action: confirm, ref: hr_holidays_allocateleaveforuser0}
-
-- |
- I click on "Validate" button to validate leave for employee.
-
- !workflow {model: hr.holidays, action: validate, ref: hr_holidays_allocateleaveforuser0}
+ I confirmed the allocation by clicking on "Confirm" button.
+-
+ !workflow {model: hr.holidays, action: confirm, ref: hr_holidays_allocateleaveforuser0}
-- |
- Now employee "Phil Graves" want to leave. so, I connect as user1 which is username of this employee and want to make leave request.
--
+-
+ I validate the allocation by clicking on "To Approve" button.
+-
+ !workflow {model: hr.holidays, action: validate, ref: hr_holidays_allocateleaveforuser0}
+
+-
+ I connect as "user1", and create a new leave request for employee "Phil Graves".
+-
!record {model: hr.holidays, id: hr_holidays_iwanttoleaveforgotohospital0}:
allocation_type: employee
date_from: '2010-05-20 11:48:00'
date_to: '2010-05-21 11:48:00'
employee_id: 'hr_employee_philgraves0'
- holiday_status_id: 'hr_holidays_status_fullleave0'
- name: I want to leave for go to hospital
- notes: I want to leave for go to hospital. so please accept my leave.
+ holiday_status_id: 'hr_holidays_status_sick0'
+ name: Appointment with Doctor
+ notes: My appointment with the doctor is confirmed. so please accept my leave.
number_of_days_temp: 2.0
type: remove
user_id: 'res_users_user0'
-- |
- I check that Leave Request is on "Draft" state.
+-
+ I check that Leave Request is in "Draft" state.
-
!assert {model: hr.holidays, id: hr_holidays_iwanttoleaveforgotohospital0}:
- - state == 'draft'
-
-- |
- I confirm my leave Request by click on "Confirm" button.
--
+ - state == 'draft'
+
+-
+ I confirm leave Request by click on "Confirm" button.
+-
!workflow {model: hr.holidays, action: confirm, ref: hr_holidays_iwanttoleaveforgotohospital0}
-
-- |
- I connect as Admin user and Open Leave request of "Phil Graves".
- and "validate" it by click on "validate" button.
--
+
+-
+ I connect as "Admin" user and Open Leave request of "Phil Graves" and "validate" it by click on "Approve" button.
+-
!workflow {model: hr.holidays, action: validate, ref: hr_holidays_iwanttoleaveforgotohospital0}
-
-- |
- I check that "Leave Manager" field is automaticly filled by the user who validate the leave'.
+
+-
+ I check that "Leave Manager" field is automatically filled by the user who validate the leave'.
-
!python {model: hr.holidays}: |
ids2 = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)])
obj = self.browse(cr, uid, ref('hr_holidays_iwanttoleaveforgotohospital0'))
assert ids2[0] == obj.manager_id.id
-
-- |
+
+-
I check that Leave request state is "Validated".
--
+-
!assert {model: hr.holidays, id: hr_holidays_iwanttoleaveforgotohospital0}:
- - state == "validate"
-
-- |
- I can also see Summary of Employee's holiday by using 'Print Summary of Employee's Holidays'.
- This will allow you to choose if you want to print either the Confirmed & Validated holidays or only the Validated ones.
-
\ No newline at end of file
+ - state == "validate"
+
+-
+ I can also see Summary of Employee's holiday by using 'Employee's Holidays' Report. This report will allows to choose to print holidays with state Confirmed, Validated or both.
diff --git a/addons/hr_timesheet/test/test_hr_timesheet.yml b/addons/hr_timesheet/test/test_hr_timesheet.yml
index 2b5a924805a..43143e4e324 100644
--- a/addons/hr_timesheet/test/test_hr_timesheet.yml
+++ b/addons/hr_timesheet/test/test_hr_timesheet.yml
@@ -1,9 +1,9 @@
-- |
- In order to test hr_timesheet Module in OpenERP, I make "Sign In or Sign Out for Project" to encode and
- track time spent on the different projects.
+-
+ In order to test hr_timesheet Module in OpenERP, I make "Sign In/Sign Out for Project" to encode and
+ track time spent on the different projects.
-- |
- Now, I create a new employee “Mark Johnson” to test Timesheet.
+-
+ I create a new employee “Mark Johnson” to test Timesheet.
-
!record {model: hr.employee, id: hr_employee_employee0}:
address_home_id: base.res_partner_address_1
@@ -13,8 +13,8 @@
name: Mark Johnson
user_id: base.user_root
-- |
- I create new user "user1" which is assigned to employee.
+-
+ I create new user "user1".
-
!record {model: res.users, id: res_users_user0}:
company_id: base.main_company
@@ -29,8 +29,8 @@
name: user1
password: user1
-- |
- I create another employee "Francline" as "user1".
+-
+ I create another new employee "Francline" as "user1".
-
!record {model: hr.employee, id: hr_employee_fracline1}:
address_home_id: base.res_partner_address_8
@@ -38,16 +38,16 @@
parent_id: 'hr_employee_employee0'
user_id: 'res_users_user0'
-- |
- Given that I have Timesheet journal for employee.
+-
+ I create Timesheet journal for employee.
-
!record {model: account.analytic.journal, id: analytic_journal}:
code: TS
name: Timesheet Journal
type: general
-- |
- Given that I have product for "Consultancy - Senior Developer".
+-
+ I create a product as "Consultancy - Senior Developer".
-
!record {model: product.product, id: product_consultant}:
categ_id: product.product_category_10
@@ -62,42 +62,41 @@
uom_id: product.uom_hour
uom_po_id: product.uom_hour
-- |
- I assing product and journal to "Mark Johnson"
+-
+ I assigned product and journal to "Mark Johnson"
-
!record {model: hr.employee, id: hr_employee_employee0}:
product_id: product_consultant
journal_id: analytic_journal
-- |
- And also assing product and journal to "francline" employee.
+-
+ I assigned product and journal to "Francline".
-
!record {model: hr.employee, id: hr_employee_fracline1}:
product_id: product_consultant
journal_id: analytic_journal
-- |
- Now , When I came in office , I create Attendances and perform "Sign In" action with proper reason.
+-
+ I create attendance and perform "Sign In" action with proper reason.
-
!record {model: hr.attendance, id: hr_attendance_0}:
action: sign_in
employee_id: 'hr_employee_fracline1'
name: '2010-05-26 10:08:08'
-- |
- When I left office , I create attendance and perform "Sign Out".
+-
+ I create attendance and perform "Sign Out" action.
-
!record {model: hr.attendance, id: hr_attendance_1}:
action: sign_out
employee_id: 'hr_employee_fracline1'
name: '2010-05-26 15:10:55'
-
-- |
- I start by "Sign In/Sign Out by Project" wizard and click on "Sign In/Sign Out" button of this wizard.
+-
+ On "Sign In/Sign Out by Project" wizard i click on "Sign In/Sign Out" button of this wizard.
-
!python {model: hr.sign.in.project}: |
uid = ref('res_users_user0')
self.check_state(cr, uid, [ref("hr_employee_fracline1")], {"active_ids": [ref("hr_timesheet.menu_hr_timesheet_sign_in")]})
-- |
+-
I select start date and Perform start work on project.
-
!python {model: hr.sign.in.project}: |
@@ -105,8 +104,8 @@
new_id = self.create(cr, uid, {'emp_id': 'hr_employee_fracline1', 'name': 'Francline', 'server_date': '2010-06-08 19:50:54', 'state': 'absent'})
self.sign_in_result(cr, uid, [new_id], context)
-- |
- My work is done and I want to stop work.for that I click on "Sign In/Sign Out" button of "Sign In/Sign Out by Project" wizard.
+-
+ To stop work I click on "Sign In/Sign Out" button of "Sign In/Sign Out by Project" wizard.
Which check state in hr attendace form for user.
-
!python {model: hr.sign.in.project}: |
@@ -115,11 +114,9 @@
self.check_state(cr, uid, ids, {"active_ids": [ref("hr_timesheet.menu_hr_timesheet_sign_in")]
})
-- |
- This will Open "hr sign out project" form. I select analytical project2 development account.
--
- For that I Creating a analytic account.
--
+-
+ I Create an analytic account "Project2".
+-
!record {model: account.analytic.account, id: account_analytic_account_project0}:
company_id: base.main_company
name: Project2
@@ -127,8 +124,8 @@
quantity_max: 0.0
state: open
-- |
- My work for this project is over and I stop work by click on "Stop Work" button of this wizard.
+-
+ My work for this project is over and I stop working by clicking on "Stop Work" button of this wizard.
-
!python {model: hr.sign.out.project}: |
import time
diff --git a/addons/hr_timesheet_invoice/i18n/sl.po b/addons/hr_timesheet_invoice/i18n/sl.po
index b2b2f8cc19e..387535c1a36 100644
--- a/addons/hr_timesheet_invoice/i18n/sl.po
+++ b/addons/hr_timesheet_invoice/i18n/sl.po
@@ -1,19 +1,19 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
-# * hr_timesheet_invoice
+# * hr_timesheet_invoice
#
msgid ""
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-01-27 14:46+0000\n"
+"PO-Revision-Date: 2010-07-28 12:25+0000\n"
"Last-Translator: Simon Vidmar \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-06-22 04:11+0000\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:33+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet_invoice
@@ -157,7 +157,7 @@ msgstr "Izberite"
#. module: hr_timesheet_invoice
#: rml:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
msgid "Debit"
-msgstr "V breme"
+msgstr "Breme"
#. module: hr_timesheet_invoice
#: wizard_button:account.analytic.profit,init,report:0
@@ -490,119 +490,119 @@ msgstr "Strošek"
#. module: hr_timesheet_invoice
#: model:ir.model,name:hr_timesheet_invoice.model_report_analytic_account_close
msgid "Analytic account to close"
-msgstr "Zapreti analitični konto"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.analytic.account.close,quantity_max:0
msgid "Max. Quantity"
-msgstr "Najv. količina"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.analytic.account.close,name:0
msgid "Analytic account"
-msgstr "Analitični konto"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.analytic.account.close,state:0
msgid "State"
-msgstr "Stanje"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.analytic.account.close,date_deadline:0
msgid "Deadline"
-msgstr "Rok"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.module.module,shortdesc:hr_timesheet_invoice.module_meta_information
msgid "Analytic Account Reporting"
-msgstr "Poročanje po analitičnih kontih"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.analytic.account.close,partner_id:0
msgid "Partner"
-msgstr "Partner"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_analytic_account_tree
#: model:ir.ui.menu,name:hr_timesheet_invoice.menu_action_analytic_account_tree
#: view:report.analytic.account.close:0
msgid "Expired analytic accounts"
-msgstr "Neveljavni analitični konti"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.analytic.account.close,quantity:0
msgid "Quantity"
-msgstr "Količina"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice
msgid "Lines to Invoice"
-msgstr "Vrstice za fakturiranje"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_account_analytic_line_to_invoice
#: model:ir.ui.menu,name:hr_timesheet_invoice.account_analytic_lines_to_invoice_report
#: view:report.account.analytic.line.to.invoice:0
msgid "Analytic Lines to Invoice"
-msgstr "Analitične vrstice za fakturiranje"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.account.analytic.line.to.invoice,sale_price:0
msgid "Sale price"
-msgstr "Prodajna cena"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.module.module,shortdesc:hr_timesheet_invoice.module_meta_information
msgid "Analytic lines - Reporting"
-msgstr "Analitične vrstice - Poročanje"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.account.analytic.line.to.invoice,name:0
msgid "Month"
-msgstr "Mesec"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.account.analytic.line.to.invoice,amount:0
msgid "Amount"
-msgstr "Znesek"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.model,name:hr_timesheet_invoice.model_report_account_analytic_line_to_invoice
msgid "Analytic lines to invoice report"
-msgstr "Analitične vrstice za poročilo fakturiranja"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report.account.analytic.line.to.invoice,product_uom_id:0
msgid "UoM"
-msgstr "ME"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_account_date_stat_my
#: model:ir.ui.menu,name:report_timesheet_invoice.menu_report_timesheet_account_date_my
msgid "My daily timesheets by account"
-msgstr "Moje dnevne časovnice po strankah"
+msgstr ""
#. module: hr_timesheet_invoice
#: view:report_timesheet.user:0
msgid "Timesheet by user"
-msgstr "Časovnice po uporabnikih"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_account_stat_all
#: model:ir.ui.menu,name:report_timesheet_invoice.menu_report_timesheet_account_all
msgid "Timesheet by Account"
-msgstr "Časovnice po kontih"
+msgstr ""
#. module: hr_timesheet_invoice
#: view:report_timesheet.account:0
msgid "Timesheet by account"
-msgstr "Časovnice po kontih"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.act_res_users_2_report_timesheet_invoice
#: model:ir.model,name:report_timesheet_invoice.model_report_timesheet_invoice
msgid "Costs to invoice"
-msgstr "Zaračunavanje stroškov"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_user_stat_my
@@ -619,54 +619,54 @@ msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.act_account_analytic_account_2_report_timehsheet_account
msgid "Timesheets"
-msgstr "Časovnice"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.act_res_users_2_report_timehsheet_account
msgid "Timesheets per account"
-msgstr "Časovnice po strankah"
+msgstr ""
#. module: hr_timesheet_invoice
#: view:report_timesheet.invoice:0
msgid "Timesheets to invoice"
-msgstr "Zaračunavanje po časovnicah"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.act_res_users_2_report_timesheet_user
msgid "Timesheets per day"
-msgstr "Časovnice po dneh"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_account_date_stat_all
#: model:ir.ui.menu,name:report_timesheet_invoice.menu_report_timesheet_account_date_all
msgid "Daily Timesheet by Account"
-msgstr "Dnevna časovnica po stranki"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:random.timesheet.lines,name:0 field:report.random.timesheet,name:0
msgid "Description"
-msgstr "Opis"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.model,name:report_timesheet_invoice.model_report_timesheet_account
#: view:report_timesheet.account:0
msgid "Timesheet per account"
-msgstr "Časovnica po stranki"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.module.module,shortdesc:report_timesheet.module_meta_information
msgid "Timesheet - Reporting"
-msgstr "Časovnice - poročanje"
+msgstr ""
#. module: hr_timesheet_invoice
#: view:report_timesheet.invoice:0
msgid "Timesheet by invoice"
-msgstr "Časovnica po računu"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.ui.menu,name:report_timesheet_invoice.next_id_69
msgid "This Month"
-msgstr "Ta mesec"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_account_stat_my
@@ -687,7 +687,7 @@ msgstr ""
#: field:report_timesheet.invoice,user_id:0
#: field:report_timesheet.user,user_id:0
msgid "User"
-msgstr "Uporabnik"
+msgstr ""
#. module: hr_timesheet_invoice
#: view:report.random.timesheet:0
@@ -707,12 +707,12 @@ msgstr ""
#. module: hr_timesheet_invoice
#: field:report_timesheet.invoice,account_id:0
msgid "Project"
-msgstr "Projekt"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report_timesheet.invoice,amount_invoice:0
msgid "To invoice"
-msgstr "Za zaračunavanje"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_user_stat_all
@@ -724,7 +724,7 @@ msgstr ""
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_invoice_stat_all
#: model:ir.ui.menu,name:report_timesheet_invoice.menu_report_timesheet_invoice_all
msgid "Timesheet by Invoice"
-msgstr "Časovnica po računu"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_random_timesheet_board
@@ -734,7 +734,7 @@ msgstr ""
#. module: hr_timesheet_invoice
#: field:random.timesheet.lines,general_account_id:0
msgid "General Account"
-msgstr "Splošni konto"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.model,name:report_timesheet_invoice.model_report_timesheet_user
@@ -766,12 +766,12 @@ msgstr ""
#: field:report_timesheet.account,account_id:0
#: field:report_timesheet.account.date,account_id:0
msgid "Analytic Account"
-msgstr "Analitični konto"
+msgstr ""
#. module: hr_timesheet_invoice
#: field:report_timesheet.invoice,manager_id:0
msgid "Manager"
-msgstr "Upravitelj"
+msgstr ""
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:report_timesheet_invoice.action_timesheet_user_stat
diff --git a/addons/hr_timesheet_invoice/report/report_analytic_view.xml b/addons/hr_timesheet_invoice/report/report_analytic_view.xml
index 7d24e8c26ec..de46463bb12 100644
--- a/addons/hr_timesheet_invoice/report/report_analytic_view.xml
+++ b/addons/hr_timesheet_invoice/report/report_analytic_view.xml
@@ -57,8 +57,7 @@
tree,graph
[('state','=','open')]
-
-
+
report.account.analytic.line.to.invoice
@@ -109,20 +108,20 @@
-
+
report.account.analytic.line.to.invoice.select
report.account.analytic.line.to.invoice
search
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -135,7 +134,7 @@
tree,graph
-
+
diff --git a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
index 38186031028..c21a5b36ebb 100644
--- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
+++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
@@ -1,55 +1,36 @@
-- |
- In order, to test hr_timesheet_sheet module in OpenERP, I create timesheet and check validation process done by
- manager.
-
-- |
- Now, I create a new employee “Mark Johnson” to test Timesheet.
+-
+ In order to test hr_timesheet_sheet module in OpenERP, I create timesheet and check validation process done by manager.
+-
+ I will create a company and set maximum allowed difference between timesheet and attendance to 1 hour
+-
+ !record {model: res.company, id: res_company_openERP}:
+ currency_id: base.ARS
+ name: OpenERP SA
+ partner_id: base.res_partner_desertic_hispafuentes
+ timesheet_max_difference: 1.0
+
+-
+ I create a new employee “Mark Johnson”.
-
!record {model: hr.employee, id: hr_employee_employee0}:
address_home_id: base.res_partner_address_1
- company_id: base.main_company
+ company_id: res_company_openERP
gender: male
marital: hr.hr_employee_marital_status_single
name: Mark Johnson
user_id: base.user_root
-
-- |
- I create new user "user1".
--
- !record {model: res.users, id: res_users_user0}:
- company_id: base.main_company
- context_lang: en_US
- groups_id:
- - hr.group_hr_user
- - hr_attendance.group_hr_attendance
- - base.group_user
- - base.group_extended
- - hr.group_hr_manager
- login: user1
- name: user1
- password: user1
-- |
- create another employee "Francline" as "user1".
--
- !record {model: hr.employee, id: hr_employee_fracline0}:
- address_home_id: base.res_partner_address_8
- name: Francline
- parent_id: 'hr_employee_employee0'
- user_id: 'res_users_user0'
-
-- |
- Given that I have Timesheet journal for employee.
-
--
+-
+ I create new Timesheet journal for employee.
+-
!record {model: account.analytic.journal, id: analytic_journal}:
code: TS
name: Timesheet Journal
type: general
-
-- |
- Given that I have product for "Consultancy - Senior Developer".
--
+
+-
+ I create a new product "Consultancy - Senior Developer".
+-
!record {model: product.product, id: product_consultant}:
categ_id: product.product_category_10
default_code: DEV
@@ -63,77 +44,110 @@
uom_id: product.uom_hour
uom_po_id: product.uom_hour
-- |
- I assing product and journal to "Mark Johnson"
--
+-
+ I assign this product and journal to "Mark Johnson"
+-
!record {model: hr.employee, id: hr_employee_employee0}:
- product_id: product_consultant
+ product_id: product_consultant
journal_id: analytic_journal
-- |
- And also assing product and journal to "francline" employee.
--
- !record {model: hr.employee, id: hr_employee_fracline0}:
- product_id: product_consultant
- journal_id: analytic_journal
-
-- |
- I connect as "francline" and create my current timesheet.
--
+
+-
+ I create my current timesheet for "Mark Johnson".
+-
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
date_current: '2010-05-26'
date_from: '2010-05-01'
date_to: '2010-05-31'
name: Week-22(2010)
state: new
- user_id: 'res_users_user0'
-- |
- Now , When I came in office , I create Attendances and perform "Sign In" action with proper reason.
--
+ user_id: base.user_root
+-
+ Now , at the time of login, I create Attendances and perform "Sign In" action.
+-
!record {model: hr.attendance, id: hr_attendance_0}:
action: sign_in
- employee_id: 'hr_employee_fracline0'
+ employee_id: 'hr_employee_employee0'
name: '2010-05-26 10:08:08'
-
-- |
- When I left office , I create attendance and perform "Sign Out".
--
+
+-
+ At the time of logout, I create attendance and perform "Sign Out".
+-
!record {model: hr.attendance, id: hr_attendance_1}:
action: sign_out
- employee_id: 'hr_employee_fracline0'
+ employee_id: 'hr_employee_employee0'
name: '2010-05-26 15:10:55'
--
- I create Timesheet Entry for time spend on today work.
-
-
+ I create Timesheet Entry for time spend on today work.
+
+-
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet.sheet1}:
timesheet_ids:
- account_id: account.analytic_sednacom
date: '05/26/2010'
name: 'Develop yaml for hr module'
- unit_amount: 5.00
+ unit_amount: 3.00
amount: -90.00
product_id: hr_timesheet.product_consultant
general_account_id: account.a_expense
- user_id: res_users_user0
- journal_id: hr_timesheet.analytic_journal
-
-- |
- I confirm my timesheet at end of period by click on "Confirm" button which is signal of workflow.
--
- !python {model: hr_timesheet_sheet.sheet}: |
- uid = ref('res_users_user0')
- self.button_confirm(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')])
-- |
- I check that state is "Confirmed".
--
- !assert {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
- - state == 'confirm'
-- |
- "Mark Johnson" check timesheet and time spend on project by "francline" employee.
- And then accept it request by click on "Accept" button.If "Maximal difference between timesheet and attendances" is more than 1 then manage can "Refuse" his request.
-
+ user_id: base.user_root
+ journal_id: hr_timesheet.analytic_journal
-
- !python {model: hr_timesheet_sheet.sheet}: |
- self.write(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')], {'state': 'done'})
\ No newline at end of file
+ I confirm my timesheet at end of period by click on "Confirm" button,
+ if the difference between timesheet hour and attendance hour is more than 1 hour it will give message.
+-
+ !python {model: hr_timesheet_sheet.sheet}: |
+ uid = ref('base.user_root')
+ for sheet in self.browse(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')]):
+ di = sheet.user_id.company_id.timesheet_max_difference
+ if (abs(sheet.total_difference) < di) or not di:
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'hr_timesheet_sheet.sheet', sheet.id, 'confirm', cr)
+ else:
+ print "Please verify that the total difference of the sheet is lower than %.2f" %di
+
+-
+ I Modified the timesheet record.
+-
+ !record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet.sheet1}:
+ timesheet_ids:
+ - account_id: account.analytic_sednacom
+ date: '05/26/2010'
+ name: 'Develop yaml for hr module'
+ unit_amount: 2.0
+ amount: -90.00
+ product_id: hr_timesheet.product_consultant
+ general_account_id: account.a_expense
+ user_id: base.user_root
+ journal_id: hr_timesheet.analytic_journal
+
+-
+ I tried again to confirm the timesheet after modification.
+-
+ !python {model: hr_timesheet_sheet.sheet}: |
+ uid = ref('base.user_root')
+ self.button_confirm(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')], {"lang": 'en_US', "active_ids":
+ [ref("hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form")], "tz": False, "active_model":
+ "ir.ui.menu", "department_id": False, "section_id": False, "search_default_my_timesheet":
+ 1, "search_default_user_id": 1, "project_id": False, "active_id": ref("hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"),
+ })
+
+-
+ This time timesheet confirmed successfully.
+ I check that state is "Confirmed".
+-
+ !assert {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
+ - state == 'confirm'
+-
+ The manager will accept This request by click on "Accept" button.
+
+-
+ !python {model: hr_timesheet_sheet.sheet}: |
+ self.write(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')], {'state': 'done'})
+-
+ I check that state is "Done".
+-
+ !assert {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
+ - state == 'done'
+
diff --git a/addons/l10n_ch/account_journal_view.xml b/addons/l10n_ch/account_journal_view.xml
index aa5d6c20080..5e681131e9c 100644
--- a/addons/l10n_ch/account_journal_view.xml
+++ b/addons/l10n_ch/account_journal_view.xml
@@ -8,24 +8,32 @@
+
+ Configure Your Account Journal System
+
+
+ Set accounts on financial journals defined by CamptoCamp l10n_ch module
+ 150
+
+
+ 15
+
+
-
-
-
-
-
-
-
+
+
+
+
+
- Next
+ Next
diff --git a/addons/mail_gateway/mail_gateway_view.xml b/addons/mail_gateway/mail_gateway_view.xml
index a9a2d1f96fc..fb70a08efc3 100644
--- a/addons/mail_gateway/mail_gateway_view.xml
+++ b/addons/mail_gateway/mail_gateway_view.xml
@@ -177,7 +177,7 @@
-
+
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 51578408499..813133385be 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -533,33 +533,46 @@ class mrp_production(osv.osv):
return {'value': {'location_dest_id': src}}
return {}
- def product_id_change(self, cr, uid, ids, product, context=None):
+ def product_id_change(self, cr, uid, ids, product_id, context=None):
""" Finds UoM of changed product.
- @param product: Id of changed product.
+ @param product_id: Id of changed product.
@return: Dictionary of values.
"""
- if not product:
+ if not product_id:
return {'value': {
'product_uom': False,
- 'bom_id': False
+ 'bom_id': False,
+ 'routing_id': False
}}
- res = self.pool.get('product.product').browse(cr, uid, product, context=context)
+ bom_obj = self.pool.get('mrp.bom')
+ product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
+ bom_id = bom_obj._bom_find(cr, uid, product.id, product.uom_id and product.uom_id.id, [])
+ routing_id = False
+ if bom_id:
+ bom_point = bom_obj.browse(cr, uid, bom_id, context=context)
+ routing_id = bom_point.routing_id.id or False
result = {
- 'product_uom': res.uom_id and res.uom_id.id or False,
- 'bom_id': res.bom_ids and res.bom_ids[0].id or False
+ 'product_uom': product.uom_id and product.uom_id.id or False,
+ 'bom_id': bom_id,
+ 'routing_id': routing_id
}
return {'value': result}
- def bom_id_change(self, cr, uid, ids, product):
+ def bom_id_change(self, cr, uid, ids, bom_id, context=None):
""" Finds routing for changed BoM.
@param product: Id of product.
@return: Dictionary of values.
"""
- if not product:
- return {}
- res = self.pool.get('mrp.bom').read(cr, uid, [product], ['routing_id'])[0]
- routing_id = res['routing_id'] and res['routing_id'][0]
- result = {'routing_id': routing_id}
+ if not bom_id:
+ return {'value': {
+ 'routing_id': False
+ }}
+ bom_pool = self.pool.get('mrp.bom')
+ bom_point = bom_pool.browse(cr, uid, bom_id, context=context)
+ routing_id = bom_point.routing_id.id or False
+ result = {
+ 'routing_id': routing_id
+ }
return {'value': result}
def action_picking_except(self, cr, uid, ids):
diff --git a/addons/mrp/wizard/change_production_qty_view.xml b/addons/mrp/wizard/change_production_qty_view.xml
index b73d8bcc529..a9125afe41b 100644
--- a/addons/mrp/wizard/change_production_qty_view.xml
+++ b/addons/mrp/wizard/change_production_qty_view.xml
@@ -10,8 +10,11 @@
form
@@ -45,7 +49,7 @@
tree
-
+
@@ -56,8 +60,12 @@
-
-
+
+
+
+
+
+
@@ -103,7 +111,7 @@
-
+
diff --git a/addons/olap/data/olap_cube_view.xml b/addons/olap/data/olap_cube_view.xml
index 706f9093b3f..4ffbab0ff60 100644
--- a/addons/olap/data/olap_cube_view.xml
+++ b/addons/olap/data/olap_cube_view.xml
@@ -76,14 +76,14 @@
olap.parameters.config.wizard
form
-
@@ -284,59 +284,59 @@
Planning
-
-
+
+
draft
-
-
+
+
-
+
Web Design
-
-
+
+
draft
-
-
+
+
-
+
Development, Integration and Testing
-
-
+
+
draft
-
-
+
+
-
+
Website Deployment
-
-
+
+
draft
-
-
+
+
diff --git a/addons/project_long_term/test/schedule_phase_tasks.yml b/addons/project_long_term/test/schedule_phase_tasks.yml
index 7af72f05824..92286700e6c 100644
--- a/addons/project_long_term/test/schedule_phase_tasks.yml
+++ b/addons/project_long_term/test/schedule_phase_tasks.yml
@@ -16,7 +16,7 @@
Create phase 'Develop GUI' in Outlook
-
!record {model: project.phase, id: project_phase_phase0}:
- date_start: '2010-06-02 00:00:00'
+ date_start: '2010-06-02'
duration: 200.0
name: phase123
product_uom: product.uom_day
@@ -36,7 +36,6 @@
-
!record {model: project.task, id: project_task_t0}:
name: t1
- occupation_rate: 1.0
planned_hours: 20.0
remaining_hours: 20.0
state: draft
@@ -49,7 +48,6 @@
-
!record {model: project.task, id: project_task_t1}:
name: t2
- occupation_rate: 1.0
planned_hours: 25.0
remaining_hours: 25.0
state: draft
@@ -61,7 +59,6 @@
-
!record {model: project.task, id: project_task_t2}:
name: t3
- occupation_rate: 1.0
planned_hours: 30.0
remaining_hours: 30.0
state: draft
@@ -74,7 +71,6 @@
-
!record {model: project.task, id: project_task_3}:
name: t4
- occupation_rate: 1.0
planned_hours: 25.0
remaining_hours: 25.0
state: draft
diff --git a/addons/project_long_term/test/schedule_project_phases.yml b/addons/project_long_term/test/schedule_project_phases.yml
index 470f2dc2e48..7f59b476c65 100644
--- a/addons/project_long_term/test/schedule_project_phases.yml
+++ b/addons/project_long_term/test/schedule_project_phases.yml
@@ -10,7 +10,7 @@
Create a project phase 'Defining Client's Basic Idea of Project'
-
!record {model: project.phase, id: project_phase_definingclientsbasicideaofproject0}:
- date_start: '2010-06-02 00:00:00'
+ date_start: '2010-06-02'
duration: 15.0
name: "Defining Client's Basic Idea of Project"
product_uom: product.uom_day
@@ -22,7 +22,7 @@
Create project phase 'Establishing Project Feasibility'
-
!record {model: project.phase, id: project_phase_establishingprojectfeasibility0}:
- date_start: '2010-06-02 00:00:00'
+ date_start: '2010-06-02'
duration: 30.0
name: Establishing Project Feasibility
product_uom: product.uom_day
@@ -33,7 +33,7 @@
Create project phase 'Preparation of Engineering Designs'
-
!record {model: project.phase, id: project_phase_preparationofengineeringdesigns0}:
- date_start: '2010-06-02 00:00:00'
+ date_start: '2010-06-02'
duration: 100.0
name: Preparation of Engineering Designs
product_uom: product.uom_hour
@@ -45,7 +45,7 @@
Create project phase 'Procurement of Works and Goods'
-
!record {model: project.phase, id: project_phase_procurementofworksandgoods0}:
- date_start: '2010-06-02 00:00:00'
+ date_start: '2010-06-02'
duration: 24.0
name: Procurement of Works and Goods
product_uom: product.uom_hour
@@ -57,7 +57,7 @@
Create project phase 'Project Construction'
-
!record {model: project.phase, id: project_phase_projectconstruction0}:
- date_start: '2010-06-02 00:00:00'
+ date_start: '2010-06-02'
duration: 4320.0
name: Project Construction
product_uom: product.uom_hour
@@ -69,7 +69,7 @@
Create project phase 'Project Completion'
-
!record {model: project.phase, id: project_phase_projectcompletion0}:
- date_start: '2010-06-02 00:00:00'
+ date_start: '2010-06-02'
duration: 240.0
name: Project Completion
product_uom: product.uom_hour
diff --git a/addons/project_long_term/test/schedule_project_tasks.yml b/addons/project_long_term/test/schedule_project_tasks.yml
index 1a218b83ad6..012898b9860 100644
--- a/addons/project_long_term/test/schedule_project_tasks.yml
+++ b/addons/project_long_term/test/schedule_project_tasks.yml
@@ -17,7 +17,7 @@
Create phase 'Develop GUI' in Thunderbird
-
!record {model: project.phase, id: project_phase_phase1}:
- date_start: '2010-06-02 00:00:00'
+ date_start: '2010-06-02'
duration: 100.0
name: phase22
product_uom: product.uom_day
diff --git a/addons/project_long_term/wizard/project_compute_phases.py b/addons/project_long_term/wizard/project_compute_phases.py
index bc377a5af7d..e13d307aab2 100644
--- a/addons/project_long_term/wizard/project_compute_phases.py
+++ b/addons/project_long_term/wizard/project_compute_phases.py
@@ -103,20 +103,20 @@ class project_compute_phases(osv.osv_memory):
# Recalculate date_start and date_end
# according to constraints on date start and date end on phase
if phase.constraint_date_start and str(s_date) < phase.constraint_date_start:
- start_date = datetime.datetime.strptime(phase.constraint_date_start, '%Y-%m-%d %H:%M:%S')
+ start_date = datetime.datetime.strptime(phase.constraint_date_start, '%Y-%m-%d')
else:
start_date = s_date
if phase.constraint_date_end and str(e_date) > phase.constraint_date_end:
- end_date= datetime.datetime.strptime(phase.constraint_date_end, '%Y-%m-%d %H:%M:%S')
- date_start = phase.constraint_date_end[:-3]
+ end_date= datetime.datetime.strptime(phase.constraint_date_end, '%Y-%m-%d')
+ date_start = phase.constraint_date_end
else:
end_date = e_date
date_start = end_date
# Write the calculated dates back
ctx = context.copy()
ctx.update({'scheduler': True})
- phase_obj.write(cr, uid, [phase.id], {'date_start': start_date.strftime('%Y-%m-%d %H:%M:%S'),
- 'date_end': end_date.strftime('%Y-%m-%d %H:%M:%S')},
+ phase_obj.write(cr, uid, [phase.id], {'date_start': start_date.strftime('%Y-%m-%d'),
+ 'date_end': end_date.strftime('%Y-%m-%d')},
context=ctx)
# Recursive call till all the next phases scheduled
for phase in phase.next_phase_ids:
diff --git a/addons/project_long_term/wizard/project_schedule_tasks.py b/addons/project_long_term/wizard/project_schedule_tasks.py
index d3c42a983d0..df9f1aae7d4 100644
--- a/addons/project_long_term/wizard/project_schedule_tasks.py
+++ b/addons/project_long_term/wizard/project_schedule_tasks.py
@@ -92,7 +92,7 @@ class project_schedule_task(osv.osv_memory):
if task_ids:
task_ids.sort()
tasks = task_obj.browse(cr, uid, task_ids, context=context)
- start_date = str(phase.date_start)[:-9]
+ start_date = str(phase.date_start)
if not phase.date_start:
if not phase.project_id.date_start:
start_date = datetime.datetime.now().strftime("%Y-%m-%d")
diff --git a/addons/purchase/test/procurement_buy.yml b/addons/purchase/test/procurement_buy.yml
index 011e70d0cdc..69b4f1d6195 100644
--- a/addons/purchase/test/procurement_buy.yml
+++ b/addons/purchase/test/procurement_buy.yml
@@ -23,6 +23,7 @@
- delay: 1
name: base.res_partner_asus
qty: 5.0
+ min_qty:1.0
-
I create procurement order.
-
diff --git a/addons/sale/__init__.py b/addons/sale/__init__.py
index 3ad30a6233e..4d8541b4ab5 100644
--- a/addons/sale/__init__.py
+++ b/addons/sale/__init__.py
@@ -25,6 +25,7 @@
import sale
import stock
+import sale_installer
import product
import wizard
import report
diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py
index d6943e617d0..bc9e073de01 100644
--- a/addons/sale/__openerp__.py
+++ b/addons/sale/__openerp__.py
@@ -61,6 +61,7 @@
'sale_sequence.xml',
'sale_data.xml',
'sale_view.xml',
+ 'sale_installer.xml',
'report/sale_report_view.xml',
'sale_report.xml',
'stock_view.xml',
@@ -69,12 +70,17 @@
],
'demo_xml': ['sale_demo.xml','board_sale_demo.xml'],
'test': [
- 'test/shipping_manual_sale_order.yml',
- 'test/prepaid_sale_order.yml',
+ 'test/data_test.yml',
+ 'test/manual_order_policy.yml',
+ 'test/prepaid_order_policy.yml',
+ 'test/picking_order_policy.yml',
+ 'test/postpaid_order_policy.yml',
'test/advance_invoice.yml',
'test/so_make_line_invoice.yml',
'test/so_make_invoice.yml',
'test/sale_procurement.yml',
+ 'test/invoice_on_ordered_qty.yml',
+ 'test/invoice_on_shipped_qty.yml',
],
'installable': True,
'active': False,
diff --git a/addons/sale/sale_installer.py b/addons/sale/sale_installer.py
new file mode 100644
index 00000000000..d85273fa9a0
--- /dev/null
+++ b/addons/sale/sale_installer.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+from osv import fields, osv
+
+class sale_installer(osv.osv_memory):
+ _name = 'sale.installer'
+ _inherit = 'res.config.installer'
+
+ _columns = {
+ 'sale_analytic_plans': fields.boolean('Sales Analytic Distribution Management',
+ help="The base module to manage analytic distribution and sales orders."),
+ 'sale_journal': fields.boolean('Sales and deliveries by journal',
+ help="The sale journal modules allows you to categorise your "
+ "sales and deliveries (picking lists) between different journals. "
+ "This module is very helpful for bigger companies that "
+ "works by departments."),
+ 'sale_layout': fields.boolean('Sale Order Layout Improvement',
+ help="This module provides some features to improve the layout of the Sale Order."),
+ 'sale_margin': fields.boolean('Margins in Sale Orders',
+ help="This module adds the 'Margin' on sales order, "
+ "which gives the profitability by calculating "
+ "the difference between the Unit Price and Cost Price."),
+ 'sale_order_dates': fields.boolean('Sale Order Dates',
+ help="Add commitment, requested and effective dates on the sale order."),
+ }
+sale_installer()
diff --git a/addons/sale/sale_installer.xml b/addons/sale/sale_installer.xml
new file mode 100644
index 00000000000..c77faf905e6
--- /dev/null
+++ b/addons/sale/sale_installer.xml
@@ -0,0 +1,66 @@
+
+
+
+ sale.installer.view
+ sale.installer
+ form
+
+
+
+
+ Sale Management Modules Installation
+
+
+
+ Sales Management
+
+
+ After having installed the core sales application, you can extend it depending on the needs of your sale's organization.
+
+
+
+
+
+ Configure
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sale Management Modules Installation
+ ir.actions.act_window
+ sale.installer
+
+ form
+ form
+ new
+
+
+
+
+ 3
+
+
+
+
+ ir.actions.todo
+ sale_installer_action_replace
+ tree
+
+
+
+
+
+
+
+
+
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index ce39930f039..8cb74fb95c5 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -79,11 +79,11 @@
tree
-
-
+
+
@@ -163,12 +163,14 @@
+
+
@@ -280,8 +282,9 @@
-
+
+
diff --git a/addons/sale/test/advance_invoice.yml b/addons/sale/test/advance_invoice.yml
index 8b93b031d39..5a8d06c354c 100644
--- a/addons/sale/test/advance_invoice.yml
+++ b/addons/sale/test/advance_invoice.yml
@@ -1,269 +1,23 @@
-
- In order to test the sale module in the Open-ERP, I need to configure details regarding product & customer.
--
- I am going to sell my Mobile products to the customer with name Cleartrail
+ In order to test the Deposit wizard of sale module in the Open-ERP,
+ I create a Sale Order for LG Viewty Smart for qty 100 having order_policy manual.
-
- I create View Account Type.
--
- !record {model: account.account.type, id: account_account_type_view0}:
- close_method: none
- code: View
- name: View
- sign: 1
--
- I create Income Account Type.
--
- !record {model: account.account.type, id: account_account_type_income0}:
- close_method: unreconciled
- code: Income
- name: Income
- sign: 1
--
- I create Expense Account Type.
--
- !record {model: account.account.type, id: account_account_type_expense0}:
- close_method: unreconciled
- code: Expense
- name: Expense
- sign: 1
--
- I create Cash Account Type.
--
- !record {model: account.account.type, id: account_account_type_cash0}:
- close_method: balance
- code: Cash
- name: Cash
- sign: 1
--
- I create Minimal Chart Account.
--
- !record {model: account.account, id: account_account_minimalchart0}:
- code: '0'
- company_id: base.main_company
- currency_mode: current
- name: Minimal Chart
- parent_left: 1
- parent_right: 12
- type: view
- user_type: account_account_type_view0
--
- I create Payable Account.
--
- !record {model: account.account, id: account_account_payable1}:
- code: AP
- company_id: base.main_company
- currency_mode: current
- name: Payable
- parent_id: account_account_minimalchart0
- parent_left: 2
- parent_right: 3
- reconcile: true
- type: payable
- user_type: account_account_type_expense0
--
- I create Receivable Account.
--
- !record {model: account.account, id: account_account_receivable0}:
- code: AR
- currency_mode: current
- name: Receivable
- parent_id: account_account_minimalchart0
- parent_left: 4
- parent_right: 5
- reconcile: true
- type: receivable
- user_type: account_account_type_income0
--
- I create Cash Account.
--
- !record {model: account.account, id: account_account_cash0}:
- code: C
- currency_mode: current
- name: Cash
- parent_id: account_account_minimalchart0
- parent_left: 6
- parent_right: 7
- type: other
- user_type: account_account_type_cash0
--
- I create Purchases Account.
--
- !record {model: account.account, id: account_account_purchases0}:
- code: P
- company_id: base.main_company
- currency_mode: current
- name: Purchases
- parent_id: account_account_minimalchart0
- parent_left: 8
- parent_right: 9
- type: other
- user_type: account_account_type_expense0
--
- I create Sales Account.
--
- !record {model: account.account, id: account_account_sales0}:
- code: S
- company_id: base.main_company
- currency_mode: current
- name: Sales
- parent_id: account_account_minimalchart0
- parent_left: 10
- parent_right: 11
- type: other
- user_type: account_account_type_income0
--
- I create Purchase Journal.
--
- !record {model: account.journal, id: account_journal_purchasejournal0}:
- code: PUJ
- company_id: base.main_company
- default_credit_account_id: account_account_purchases0
- default_debit_account_id: account_account_purchases0
- name: Purchase Journal
- sequence_id: account.sequence_purchase_journal
- type: purchase
- view_id: account.account_journal_view
--
- I create Sale Journal.
--
- !record {model: account.journal, id: account_journal_salejournal0}:
- code: SAJ
- company_id: base.main_company
- default_credit_account_id: account_account_sales0
- default_debit_account_id: account_account_sales0
- name: Sale Journal
- sequence_id: account.sequence_sale_journal
- type: sale
- view_id: account.account_journal_view
--
- I create Bank Journal.
--
- !record {model: account.journal, id: account_journal_bankjournal0}:
- code: BNK
- default_credit_account_id: account_account_cash0
- default_debit_account_id: account_account_cash0
- name: Bank Journal
- sequence_id: account.sequence_journal
- type: cash
- view_id: account.account_journal_bank_view
--
- I create ir.property for account payable.
--
- !record {model: ir.property, id: ir_property_propertyaccountexpensecateg0}:
- company_id: base.main_company
- fields_id: account.field_res_partner_property_account_payable
- name: property_account_expense_categ
- value_reference: account.account,5
--
- I create ir.property for account receivable.
--
- !record {model: ir.property, id: ir_property_propertyaccountincomecateg0}:
- company_id: base.main_company
- fields_id: account.field_res_partner_property_account_receivable
- name: property_account_income_categ
- value_reference: account.account,6
--
- I create Partner category Customers.
--
- !record {model: res.partner.category, id: res_partner_category_customers0}:
- name: Customers
--
- I create Cleartrail Customer.
--
- !record {model: res.partner, id: res_partner_cleartrail0}:
- category_id:
- - res_partner_category_customers0
- name: Cleartrail
--
- I create contact address for Cleartrail.
--
- !record {model: res.partner.address, id: res_partner_address_1}:
- partner_id: res_partner_cleartrail0
- street: onam plaza, 14 B palasia A B Road
- type: contact
--
- I create invoice address for Cleartrail.
--
- !record {model: res.partner.address, id: res_partner_address_2}:
- partner_id: res_partner_cleartrail0
- street: sarda house 24 B palasia, A B Road
- type: invoice
--
- I create delivery address for Cleartrail.
--
- !record {model: res.partner.address, id: res_partner_address_3}:
- partner_id: res_partner_cleartrail0
- street: sangam house 15 B palasia, A B Road
- type: delivery
--
- Customer Cleartrail has specific instrument requirement regarding the stockable products.
--
- I define product category Mobile Products Sellable.
--
- !record {model: product.category, id: product_category_allproductssellable0}:
- name: Mobile Products Sellable
-
-
--
- I define product category Mobile Services.
--
- !record {model: product.category, id: product_category_services0}:
- name: Mobile Services
--
- I define LG Viewty Smart product template.
--
- !record {model: product.template, id: product_template_lgviewtysmart0}:
- categ_id: product_category_allproductssellable0
- cost_method: standard
- list_price: 170.0
- mes_type: fixed
- name: LG Viewty Smart
- procure_method: make_to_order
- standard_price: 160.0
- supply_method: produce
- type: product
- uom_id: product.product_uom_unit
- uom_po_id: product.product_uom_unit
-
--
- I define LG Viewty Smart product.
--
- !record {model: product.product, id: product_product_lgviewtysmart0}:
- categ_id: product_category_allproductssellable0
- cost_method: standard
- list_price: 170.0
- mes_type: fixed
- name: LG Viewty Smart
- pricelist_purchase: 'Default Purchase Pricelist (0.00) : 160.00\n'
- pricelist_sale: 'Public Pricelist (0.00) : 170.00\n'
- procure_method: make_to_order
- property_account_expense: sale.account_account_payable1
- property_account_income: sale.account_account_receivable0
- seller_delay: '1'
- standard_price: 160.0
- supply_method: produce
- type: product
- uom_id: product.product_uom_unit
- uom_po_id: product.product_uom_unit
--
- I create a Sale Order for LG Viewty Smart for qty 500 having order_policy prepaid.
--
- !record {model: sale.order, id: sale_order_so0}:
- date_order: '2010-05-03'
+ !record {model: sale.order, id: sale_order_so5}:
+ date_order: '2010-07-17'
invoice_quantity: order
name: SO004
order_line:
- name: LG Viewty Smart
price_unit: 170.0
product_uom: product.product_uom_unit
- product_uom_qty: 500.0
+ product_uom_qty: 100.0
state: draft
delay: 7.0
product_id: sale.product_product_lgviewtysmart0
- product_uos_qty: 500.0
+ product_uos_qty: 100.0
th_weight: 0.0
type: make_to_order
- order_policy: prepaid
+ order_policy: manual
partner_id: sale.res_partner_cleartrail0
partner_invoice_id: sale.res_partner_address_2
partner_order_id: sale.res_partner_address_1
@@ -271,28 +25,164 @@
picking_policy: direct
pricelist_id: product.list0
shop_id: sale.shop
-
+-
+ I confirm the Sale Order.
-
- I use the Advance Payment wizard.
+ !workflow {model: sale.order, action: order_confirm, ref: sale_order_so5}
+-
+ I use the Advance Payment wizard.
-
!record {model: sale.advance.payment.inv, id: sale_advance_payment_inv_0}:
amount: 1000.0
product_id: product.product_product_pc3
qtty: 3.0
-
-
-
- Performing an osv_memory action create_invoices on module sale.advance.payment.inv
+ Then I click on the "Create Partial Invoice" button
-
!python {model: sale.advance.payment.inv}: |
self.create_invoices(cr, uid, [ref("sale_advance_payment_inv_0")], {"lang": 'en_US',
- "active_model": 'sale.order', "active_ids": [ref("sale_order_so0")], "tz":
- False, "active_id": ref("sale_order_so0"), })
+ "active_model": 'sale.order', "active_ids": [ref("sale_order_so5")], "tz":
+ False, "active_id": ref("sale_order_so5"), })
-
- I will verify whether the invoice has been generated.
+ I verify whether the invoice has been generated.
-
!python {model: sale.order}: |
- so = self.browse(cr, uid, ref("sale_order_so0"))
- assert so.invoice_ids, "Invoices has not been generated for sale_order_so0"
-
-
+ so = self.browse(cr, uid, ref("sale_order_so5"))
+ assert so.invoice_ids, "Invoices has not been generated for sale_order_so5"
+-
+ I open the Invoice for the SO.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ I verify that an invoice state has transit from draft to open state
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','open')])
+ assert invoice_id, "Invoice is not in the open state"
+-
+ Creating a account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst0}:
+ amount: 3000.0
+ date: '2010-07-17'
+ journal_id: sale.account_journal_bankjournal0
+ name: test
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst0")], {"lang": "en_US", "active_model": "account.invoice",
+ "tz":False,"record_id": so.invoice_ids[0].id, "active_ids": [so.invoice_ids[0].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[0].id})
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_5}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ I verify that invoice has transit from Open to Done state
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','paid')])
+ assert invoice_id, "Invoice for SO is not in done state."
+-
+ I verify that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so5"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
+-
+ I click on "Create Invoice" button of Sales order to create the invoice.
+-
+ !workflow {model: sale.order, action: manual_invoice, ref: sale_order_so5}
+-
+ I verify whether the invoice has been generated for SO
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so5"))
+ assert so.invoice_ids[1], "Invoices has not been generated for sale_order_so5"
+-
+ I open the Invoice for the SO.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ I verify that an invoice state has transit from draft to open state
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','open')])
+ assert invoice_id, "Invoice is not in the open state"
+-
+ Creating a account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst2}:
+ amount: 14000.0
+ date: '2010-07-17'
+ journal_id: sale.account_journal_bankjournal0
+ name: test
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst2")], {"lang": "en_US", "active_model": "account.invoice",
+ "tz":False,"record_id": so.invoice_ids[1].id, "active_ids": [so.invoice_ids[1].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[1].id})
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ Pay and Reconcile the Invoice.
+-
+ !python {model: account.invoice.pay.writeoff}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
+ self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
+ {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
+ [so.invoice_ids[1].id], "type": "out_invoice", "active_id": so.invoice_ids[1].id})
+-
+ I verify that an invoice is in done state.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','paid')])
+ assert invoice_id, "Invoice for SO is not in done state."
+-
+ I verify that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so5"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
\ No newline at end of file
diff --git a/addons/sale/test/prepaid_sale_order.yml b/addons/sale/test/data_test.yml
similarity index 58%
rename from addons/sale/test/prepaid_sale_order.yml
rename to addons/sale/test/data_test.yml
index ce344bb23ae..ef3b0bfe0ed 100644
--- a/addons/sale/test/prepaid_sale_order.yml
+++ b/addons/sale/test/data_test.yml
@@ -1,42 +1,42 @@
-
- In order to test the sale module in the Open-ERP, I need to configure details regarding product & customer.
+ In order to test the sale module, I need to configure details regarding product,customer and account.
-
I am going to sell my Mobile products to the customer with name Cleartrail
--
+-
I create View Account Type.
--
+-
!record {model: account.account.type, id: account_account_type_view0}:
close_method: none
code: View
name: View
sign: 1
--
+-
I create Income Account Type.
--
+-
!record {model: account.account.type, id: account_account_type_income0}:
close_method: unreconciled
code: Income
name: Income
sign: 1
--
+-
I create Expense Account Type.
--
+-
!record {model: account.account.type, id: account_account_type_expense0}:
close_method: unreconciled
code: Expense
name: Expense
sign: 1
--
+-
I create Cash Account Type.
--
+-
!record {model: account.account.type, id: account_account_type_cash0}:
close_method: balance
code: Cash
name: Cash
sign: 1
--
+-
I create Minimal Chart Account.
--
+-
!record {model: account.account, id: account_account_minimalchart0}:
code: '0'
company_id: base.main_company
@@ -46,9 +46,9 @@
parent_right: 12
type: view
user_type: account_account_type_view0
--
+-
I create Payable Account.
--
+-
!record {model: account.account, id: account_account_payable1}:
code: AP
company_id: base.main_company
@@ -60,11 +60,12 @@
reconcile: true
type: payable
user_type: account_account_type_expense0
--
+-
I create Receivable Account.
--
+-
!record {model: account.account, id: account_account_receivable0}:
code: AR
+ company_id: base.main_company
currency_mode: current
name: Receivable
parent_id: account_account_minimalchart0
@@ -73,11 +74,12 @@
reconcile: true
type: receivable
user_type: account_account_type_income0
--
+-
I create Cash Account.
--
+-
!record {model: account.account, id: account_account_cash0}:
code: C
+ company_id: base.main_company
currency_mode: current
name: Cash
parent_id: account_account_minimalchart0
@@ -85,9 +87,9 @@
parent_right: 7
type: other
user_type: account_account_type_cash0
--
+-
I create Purchases Account.
--
+-
!record {model: account.account, id: account_account_purchases0}:
code: P
company_id: base.main_company
@@ -98,9 +100,9 @@
parent_right: 9
type: other
user_type: account_account_type_expense0
--
+-
I create Sales Account.
--
+-
!record {model: account.account, id: account_account_sales0}:
code: S
company_id: base.main_company
@@ -111,9 +113,9 @@
parent_right: 11
type: other
user_type: account_account_type_income0
--
+-
I create Purchase Journal.
--
+-
!record {model: account.journal, id: account_journal_purchasejournal0}:
code: PUJ
company_id: base.main_company
@@ -123,9 +125,9 @@
sequence_id: account.sequence_purchase_journal
type: purchase
view_id: account.account_journal_view
--
+-
I create Sale Journal.
--
+-
!record {model: account.journal, id: account_journal_salejournal0}:
code: SAJ
company_id: base.main_company
@@ -135,81 +137,80 @@
sequence_id: account.sequence_sale_journal
type: sale
view_id: account.account_journal_view
--
+-
I create Bank Journal.
--
+-
!record {model: account.journal, id: account_journal_bankjournal0}:
code: BNK
+ company_id: base.main_company
default_credit_account_id: account_account_cash0
default_debit_account_id: account_account_cash0
name: Bank Journal
sequence_id: account.sequence_journal
type: cash
view_id: account.account_journal_bank_view
--
+-
I create ir.property for account payable.
--
+-
!record {model: ir.property, id: ir_property_propertyaccountexpensecateg0}:
company_id: base.main_company
fields_id: account.field_res_partner_property_account_payable
name: property_account_expense_categ
value_reference: account.account,5
--
+-
I create ir.property for account receivable.
--
+-
!record {model: ir.property, id: ir_property_propertyaccountincomecateg0}:
company_id: base.main_company
fields_id: account.field_res_partner_property_account_receivable
name: property_account_income_categ
value_reference: account.account,6
--
+-
I create Partner category Customers.
--
+-
!record {model: res.partner.category, id: res_partner_category_customers0}:
name: Customers
-
I create Cleartrail Customer.
--
+-
!record {model: res.partner, id: res_partner_cleartrail0}:
category_id:
- res_partner_category_customers0
name: Cleartrail
--
+-
I create contact address for Cleartrail.
--
+-
!record {model: res.partner.address, id: res_partner_address_1}:
partner_id: res_partner_cleartrail0
street: onam plaza, 14 B palasia A B Road
type: contact
--
+-
I create invoice address for Cleartrail.
--
+-
!record {model: res.partner.address, id: res_partner_address_2}:
partner_id: res_partner_cleartrail0
street: sarda house 24 B palasia, A B Road
type: invoice
--
+-
I create delivery address for Cleartrail.
--
+-
!record {model: res.partner.address, id: res_partner_address_3}:
partner_id: res_partner_cleartrail0
street: sangam house 15 B palasia, A B Road
type: delivery
-
Customer Cleartrail has specific instrument requirement regarding the stockable products.
--
+-
I define product category Mobile Products Sellable.
--
+-
!record {model: product.category, id: product_category_allproductssellable0}:
name: Mobile Products Sellable
-
-
--
- I define product category Mobile Services.
-
+ I define product category Mobile Services.
+-
!record {model: product.category, id: product_category_services0}:
name: Mobile Services
--
+-
I define LG Viewty Smart product template.
-
!record {model: product.template, id: product_template_lgviewtysmart0}:
@@ -239,138 +240,53 @@
property_account_expense: sale.account_account_payable1
property_account_income: sale.account_account_receivable0
seller_delay: '1'
+ seller_ids:
+ - delay: 1
+ name: base.res_partner_agrolait
+ min_qty: 2.0
+ qty: 5.0
standard_price: 160.0
supply_method: produce
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
- I create a Sale Order for LG Viewty Smart for qty 500 having order_policy prepaid.
--
- !record {model: sale.order, id: sale_order_so1}:
- date_order: '2010-05-03'
- invoice_quantity: order
- name: Test_SO001
- order_line:
- - name: LG Viewty Smart
- price_unit: 170.0
- product_uom: product.product_uom_unit
- product_uom_qty: 500.0
- state: draft
- delay: 7.0
- product_id: sale.product_product_lgviewtysmart0
- product_uos_qty: 500.0
- th_weight: 0.0
- type: make_to_order
- order_policy: prepaid
- partner_id: sale.res_partner_cleartrail0
- partner_invoice_id: sale.res_partner_address_2
- partner_order_id: sale.res_partner_address_1
- partner_shipping_id: sale.res_partner_address_3
- picking_policy: direct
- pricelist_id: product.list0
- shop_id: sale.shop
-
-
--
- I confirm the sale order.
--
- !workflow {model: sale.order, action: order_confirm, ref: sale_order_so1}
--
- I will verify whether the invoice has been generated for SO since Shipping policy is 'Payment Before Delivery'
--
- !python {model: sale.order}: |
- so = self.browse(cr, uid, ref("sale_order_so1"))
- assert so.invoice_ids, "Invoices has not been generated for sale_order_so1"
--
- I open the Invoice for the SO.
--
- !python {model: account.invoice}: |
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
- import netsvc
- wf_service = netsvc.LocalService("workflow")
- invoice_ids = so.invoice_ids
- for invoice in invoice_ids:
- wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
--
- Creating a account invoice pay entry.
--
- !record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
- amount: 85000.0
- date: '2010-05-10'
- journal_id: sale.account_journal_bankjournal0
- name: tst
- period_id: account.period_5
--
- I pay the invoice.
--
- !python {model: account.invoice.pay}: |
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
- self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
- False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
- "out_invoice", "active_id": so.invoice_ids[0].id, })
-
-
--
- Creating an account invoice pay writeoff entry.
--
- !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
- analytic_id: account.analytic_customers
- comment: Write-Off
- writeoff_acc_id: account.a_sale
- writeoff_journal_id: sale.account_journal_bankjournal0
-
-
--
- Pay and Reconcile the Invoice.
--
- !python {model: account.invoice.pay.writeoff}: |
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
- self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
- {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
- [so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id })
-
-
--
- I will verify the picking associated with the sale order sale_order_so1
--
- !python {model: sale.order}: |
- so = self.browse(cr, uid, ref("sale_order_so1"))
- assert so.picking_ids,"Picking has not been generated for sale_order_so1"
--
- Products are delivered to the Cleartrail Customer.
--
- !python {model: stock.picking }: |
- import time
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
- if picking_id:
- pick=self.browse(cr,uid,picking_id[0])
- pick.force_assign(cr, uid)
- partial_datas = {
- 'partner_id':pick.address_id.partner_id.id,
- 'address_id': pick.address_id.id,
- 'delivery_date' : time.strftime('%Y-%m-%d'),
- }
- move = pick.move_lines[0]
- partial_datas['move%s'%(move.id)]= {
- 'product_id': move.product_id.id,
- 'product_qty': move.product_qty,
- 'product_uom': move.product_uom.id,
- }
- self.do_partial(cr, uid, [pick.id],partial_datas)
--
- I verify that picking order is in done state.
--
- !python {model: stock.picking }: |
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
-
- if picking_id:
- pick = self.browse(cr,uid,picking_id[0])
- assert (pick.state) =='done', "Picking for SO is not in done state."
+ I define Slider Mobile template.
+-
+ !record {model: product.template, id: product_template_slidermobile0}:
+ categ_id: product_category_allproductssellable0
+ cost_method: standard
+ list_price: 200.0
+ mes_type: fixed
+ name: Slider Mobile
+ procure_method: make_to_order
+ standard_price: 189.0
+ supply_method: buy
+ type: product
+ uom_id: product.product_uom_unit
+ uom_po_id: product.product_uom_unit
+-
+ I define Slider Mobile.
+-
+ !record {model: product.product, id: product_product_slidermobile0}:
+ categ_id: product_category_allproductssellable0
+ cost_method: standard
+ list_price: 200
+ mes_type: fixed
+ name: Slider Mobile
+ pricelist_purchase: 'Default Purchase Pricelist (0.00) : 500.0.00\n'
+ pricelist_sale: 'Public Pricelist (0.00) : 510.00\n'
+ procure_method: make_to_order
+ property_account_expense: sale.account_account_payable1
+ property_account_income: sale.account_account_receivable0
+ seller_delay: '1'
+ seller_ids:
+ - delay: 1
+ name: base.res_partner_agrolait
+ min_qty: 2.0
+ qty: 5.0
+ standard_price: 189.0
+ supply_method: buy
+ type: product
+ uom_id: product.product_uom_unit
+ uom_po_id: product.product_uom_unit
diff --git a/addons/sale/test/invoice_on_ordered_qty.yml b/addons/sale/test/invoice_on_ordered_qty.yml
new file mode 100644
index 00000000000..9056e4cbb83
--- /dev/null
+++ b/addons/sale/test/invoice_on_ordered_qty.yml
@@ -0,0 +1,151 @@
+-
+ In order to test the Sale module in OpenERP,
+ I create a Sale Order for Slider Mobile for 500 quantity having Shipping Policy 'Shipping & Manual Invoice' and Invoice on 'Ordered quantities'
+ in order to create an invoice based on the ordered quantity
+-
+ !record {model: sale.order, id: sale_order_so8}:
+ date_order: '2010-07-17'
+ invoice_quantity: order
+ name: Test_SO006
+ order_line:
+ - name: Slider Mobile
+ price_unit: 200
+ product_uom: product.product_uom_unit
+ product_uom_qty: 200.0
+ state: draft
+ delay: 7.0
+ product_id: sale.product_product_slidermobile0
+ product_uos_qty: 200.0
+ type: make_to_order
+ order_policy: manual
+ invoice_quantity: order
+ partner_id: sale.res_partner_cleartrail0
+ partner_invoice_id: sale.res_partner_address_2
+ partner_order_id: sale.res_partner_address_1
+ partner_shipping_id: sale.res_partner_address_3
+ picking_policy: direct
+ pricelist_id: product.list0
+ shop_id: sale.shop
+-
+ I confirm the Sale Order.
+-
+ !workflow {model: sale.order, action: order_confirm, ref: sale_order_so8}
+-
+ I verify that the picking has been generated for the sale order
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ assert so.picking_ids,"Picking has not been generated for sale_order_so8"
+-
+ Then I click on the "Products Received" button of Incoming Shipments
+-
+ !record {model: stock.partial.picking, id: stock_partial_picking_0}:
+ date: '2010-07-17 17:52:09'
+-
+ Then I done the picking
+-
+ !python {model: stock.picking }: |
+ import time
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
+ if picking_id:
+ pick=self.browse(cr,uid,picking_id[0])
+ pick.force_assign(cr, uid)
+ partial_datas = {
+ 'partner_id':pick.address_id.partner_id.id,
+ 'address_id': pick.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d'),
+ }
+ move = pick.move_lines[0]
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id.id,
+ 'product_qty': '100',
+ 'product_uom': move.product_uom.id,
+ }
+ self.do_partial(cr, uid, [pick.id],partial_datas)
+-
+ I click on Create Invoice button to create the invoice.
+-
+ !workflow {model: sale.order, action: manual_invoice, ref: sale_order_so8}
+-
+ I verify whether the invoice has been generated for SO
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ assert so.invoice_ids, "Invoices has not been generated for sale_order_so8"
+-
+ I verify that an invoice is created on the basis of ordered quantity
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ for so_lines in so.order_line:
+ qty=so_lines.product_uom_qty
+ ids = self.search(cr, uid, [('origin', '=', so.name)])
+ inv_brw = self.browse(cr,uid,ids)[0]
+ for inv_lines in inv_brw.invoice_line:
+ qty1=inv_lines.quantity
+ invoice_id = self.search(cr, uid, [('qty1','=', 'qty') and ('origin', '=', so.name)])
+ assert invoice_id, "Quantities are not same"
+-
+ I open the Invoice for the SO.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ Creating a account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
+ amount: 40000.0
+ date: '2010-07-17'
+ journal_id: sale.account_journal_bankjournal0
+ name: tst
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
+ False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[0].id, })
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ Pay and Reconcile the Invoice.
+-
+ !python {model: account.invoice.pay.writeoff}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
+ {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
+ [so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id })
+-
+ I verify the invoice are in paid state or not.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ assert (invoice.state) =='paid', "Invoice for SO is not in done state."
+-
+ I check that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so8"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
\ No newline at end of file
diff --git a/addons/sale/test/invoice_on_shipped_qty.yml b/addons/sale/test/invoice_on_shipped_qty.yml
new file mode 100644
index 00000000000..5a608aff9b8
--- /dev/null
+++ b/addons/sale/test/invoice_on_shipped_qty.yml
@@ -0,0 +1,154 @@
+-
+ In order to test the Sale module in OpenERP,
+ I create a Sale Order for Slider Mobile for 500 quantity having Shipping Policy 'Shipping & Manual Invoice' and Invoice on 'Shipped quantities'
+ in order to create an invoice based on the shipping quantity
+-
+ !record {model: sale.order, id: sale_order_so6}:
+ date_order: '2010-07-17'
+ invoice_quantity: order
+ name: Test_SO006
+ order_line:
+ - name: Slider Mobile
+ price_unit: 200
+ product_uom: product.product_uom_unit
+ product_uom_qty: 200.0
+ state: draft
+ delay: 7.0
+ product_id: sale.product_product_slidermobile0
+ product_uos_qty: 200.0
+ type: make_to_order
+ order_policy: manual
+ invoice_quantity: procurement
+ partner_id: sale.res_partner_cleartrail0
+ partner_invoice_id: sale.res_partner_address_2
+ partner_order_id: sale.res_partner_address_1
+ partner_shipping_id: sale.res_partner_address_3
+ picking_policy: direct
+ pricelist_id: product.list0
+ shop_id: sale.shop
+-
+ I confirm the Sale Order.
+-
+ !workflow {model: sale.order, action: order_confirm, ref: sale_order_so6}
+-
+ I verify that the picking has been generated for the sale order
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so6"))
+ assert so.picking_ids,"Picking has not been generated for sale_order_so6"
+-
+ Then I click on the "Products Received" button of Incoming Shipments
+-
+ !record {model: stock.partial.picking, id: stock_partial_picking_0}:
+ date: '2010-07-17 17:52:09'
+-
+ Then I done the picking
+-
+ !python {model: stock.picking }: |
+ import time
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
+ if picking_id:
+ pick=self.browse(cr,uid,picking_id[0])
+ pick.force_assign(cr, uid)
+ partial_datas = {
+ 'partner_id':pick.address_id.partner_id.id,
+ 'address_id': pick.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d'),
+ }
+ move = pick.move_lines[0]
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id.id,
+ 'product_qty': '100',
+ 'product_uom': move.product_uom.id,
+ }
+ self.do_partial(cr, uid, [pick.id],partial_datas)
+-
+ I click on Create Invoice button to create the invoice.
+-
+ !workflow {model: sale.order, action: manual_invoice, ref: sale_order_so6}
+-
+ I verify whether the invoice has been generated for SO
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so6"))
+ assert so.invoice_ids, "Invoices has not been generated for sale_order_so6"
+-
+ I verify that an invoice is created on the basis of shipped quantity
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
+ picking_obj = self.pool.get('stock.picking')
+ ids = picking_obj.search(cr, uid, [('origin', '=', so.name)])
+ pick_brw = picking_obj.browse(cr,uid, ids)[0]
+ for lines in pick_brw.move_lines:
+ qty=lines.product_qty
+ inv_id = self.search(cr, uid, [('origin', '=', so.name)])
+ inv_brw = self.browse(cr,uid,inv_id)[0]
+ for inv_lines in inv_brw.invoice_line:
+ qty1=inv_lines.quantity
+ invoice_id = self.search(cr, uid, [('qty1','=', 'qty') and ('origin', '=', so.name)])
+ assert invoice_id, "Quantities are not same"
+-
+ I open the Invoice for the SO.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ Creating a account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
+ amount: 20000.0
+ date: '2010-07-17'
+ journal_id: sale.account_journal_bankjournal0
+ name: tst
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
+ False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[0].id, })
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ Pay and Reconcile the Invoice.
+-
+ !python {model: account.invoice.pay.writeoff}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
+ self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
+ {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
+ [so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id })
+-
+ I verify the invoice are in paid state or not.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ assert (invoice.state) =='paid', "Invoice for SO is not in done state."
+-
+ I check that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so6"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
diff --git a/addons/sale/test/manual_order_policy.yml b/addons/sale/test/manual_order_policy.yml
new file mode 100644
index 00000000000..3d7abdcf549
--- /dev/null
+++ b/addons/sale/test/manual_order_policy.yml
@@ -0,0 +1,339 @@
+-
+ In order to test the Sale module in OpenERP,
+ I create a Sale Order for Slider Mobile for 500 quantity having Shipping Policy 'Shipping & Manual Invoice'
+-
+ !record {model: sale.order, id: sale_order_so0}:
+ date_order: '2010-07-17'
+ invoice_quantity: order
+ name: Test_SO002
+ order_line:
+ - name: Slider Mobile
+ price_unit: 200
+ product_uom: product.product_uom_unit
+ product_uom_qty: 500.0
+ state: draft
+ delay: 7.0
+ product_id: sale.product_product_slidermobile0
+ product_uos_qty: 500.0
+ type: make_to_order
+ order_policy: manual
+ partner_id: sale.res_partner_cleartrail0
+ partner_invoice_id: sale.res_partner_address_2
+ partner_order_id: sale.res_partner_address_1
+ partner_shipping_id: sale.res_partner_address_3
+ picking_policy: direct
+ pricelist_id: product.list0
+ shop_id: sale.shop
+-
+ I confirm the Sale Order.
+-
+ !workflow {model: sale.order, action: order_confirm, ref: sale_order_so0}
+-
+ I click on Create Invoice button to create the invoice.
+-
+ !workflow {model: sale.order, action: manual_invoice, ref: sale_order_so0}
+
+-
+ I verify whether the invoice has been generated for SO
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so0"))
+ assert so.invoice_ids, "Invoices has not been generated for sale_order_so0"
+-
+ I open the Invoice for the SO.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ I verify that an invoice state has transit from draft to open state
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','open')])
+ assert invoice_id, "Invoice is not in the open state"
+-
+ I verify that its Journal Entries has been created
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','open')])
+ inv_brw = self.browse(cr, uid, invoice_id)[0]
+ assert inv_brw.move_id, "Journal Entries has not been created"
+-
+ Creating a account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst0}:
+ amount: 100000.0
+ date: '2010-07-17'
+ journal_id: sale.account_journal_bankjournal0
+ name: test
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst0")], {"lang": "en_US", "active_model": "account.invoice",
+ "tz":False,"record_id": so.invoice_ids[0].id, "active_ids": [so.invoice_ids[0].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[0].id})
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ Pay and Reconcile the Invoice.
+-
+ !python {model: account.invoice.pay.writeoff}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
+ {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
+ [so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id, })
+-
+ I verify the invoice is in done state.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','paid')])
+ assert invoice_id, "Invoice for SO is not in done state."
+-
+ I verify that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so0"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
+-
+ I verify that the picking has been generated for the sale order
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so0"))
+ assert so.picking_ids,"Picking has not been generated for sale_order_so0"
+-
+ I verify that delivery order has been generated for sale order
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ assert (picking_id),"Delivery order has not been generated"
+-
+ I verify that a procurement has been generated for so
+-
+ !python {model: procurement.order}: |
+ from tools.translate import _
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ proc_ids = self.search(cr, uid, [('origin','=',so.name)])
+ assert proc_ids, _('No Procurements!')
+-
+ Then I click on the "Run Procurement" button
+-
+ !python {model: procurement.order}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ proc_ids = self.search(cr, uid, [('origin','=',so.name)])
+ for proc in proc_ids:
+ wf_service.trg_validate(uid, 'procurement.order',proc,'button_check', cr)
+-
+ I verify that a procurement state is "running"
+-
+ !python {model: procurement.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ proc_ids = self.search(cr, uid, [('origin','=',so.name) and ('state','=','running')])
+ assert proc_ids, _('Procurement is not in the running state!')
+-
+ I verify that a purchase order has been generated
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if(mod_brw.state == 'installed'):
+ so = self.browse(cr, uid, ref("sale_order_so0"))
+ pur_obj=self.pool.get('purchase.order')
+ pur_id=pur_obj.search(cr, uid, [('origin','=',so.name)])
+ assert pur_id, _('Purchase order has not been generated')
+
+-
+ I click on the "Confirm" button to confirm the purchase order
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if(mod_brw.state == 'installed'):
+ pur_obj=self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so0"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ pur_ids = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ for pur in pur_ids:
+ wf_service.trg_validate(uid, 'purchase.order',pur,'purchase_confirm', cr)
+-
+ I click on the "Approved by supplier" button to approve the purchase order
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so0"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ pur_ids = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ for pur in pur_ids:
+ wf_service.trg_validate(uid, 'purchase.order',pur,'purchase_approve', cr)
+-
+ I verify that a picking related to purchase order has been generated.
+-
+ !python {model: sale.order}: |
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so0"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ assert(po.picking_ids),"Picking for purchase order has not been generated"
+-
+ Then I click on the "Products Received" button of Incoming Shipments
+-
+ !record {model: stock.partial.picking, id: stock_partial_picking_0}:
+ date: '2010-07-17 17:52:09'
+-
+ I click on the "Validate" button
+-
+ !python {model: stock.picking}: |
+ modules = self.pool.get('ir.module.module')
+ sale_order_obj = self.pool.get('sale.order')
+ pur_obj = self.pool.get('purchase.order')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ pick_ser_id = self.search(cr, uid, [('purchase_id', '=', po.id )])
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ for pick in pick_ser_id:
+ wf_service.trg_validate(uid, 'stock.picking',pick,'button_done', cr)
+-
+ I verify that picking for purchase order has been done.
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if(mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so0"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ picking_obj = self.pool.get('stock.picking')
+ ids = picking_obj.search(cr, uid, [('purchase_id', '=', po.id ) and ('state', '=', 'done')])
+ assert ids, _('Picking is not in the done state!')
+-
+ Then I done the picking
+-
+ !python {model: stock.picking }: |
+ import time
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
+ if picking_id:
+ pick=self.browse(cr,uid,picking_id[0])
+ pick.force_assign(cr, uid)
+ partial_datas = {
+ 'partner_id':pick.address_id.partner_id.id,
+ 'address_id': pick.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d'),
+ }
+ move = pick.move_lines[0]
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id.id,
+ 'product_qty': move.product_qty,
+ 'product_uom': move.product_uom.id,
+ }
+ self.do_partial(cr, uid, [pick.id],partial_datas)
+-
+ I verify that picking for sale order is in done state.
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
+ pick = self.browse(cr,uid,picking_id[0])
+ assert (pick.state) =='done', "Picking for SO is not in done state."
+-
+ Then I done the delivery order
+-
+ !python {model: stock.picking }: |
+ import time
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ if picking_id:
+ pick=self.browse(cr,uid,picking_id[0])
+ pick.force_assign(cr, uid)
+ partial_datas = {
+ 'partner_id':pick.address_id.partner_id.id,
+ 'address_id': pick.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d'),
+ }
+ move = pick.move_lines[0]
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id.id,
+ 'product_qty': move.product_qty,
+ 'product_uom': move.product_uom.id,
+ }
+ self.do_partial(cr, uid, [pick.id],partial_datas)
+-
+ I verify that delivery state is done
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ pick = self.browse(cr,uid,picking_id[0])
+ assert (pick.state) =='done', "Picking for SO is not in done state."
+-
+ I verify that a "Picked" has been set to true
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so0"))
+ assert (so.shipped == True), "Picked has not been set to True"
+-
+ I verify that a sale order is in done state
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so0"))
+ assert (so.state == 'done'), "Sale order is not in the done state."
diff --git a/addons/sale/test/picking_order_policy.yml b/addons/sale/test/picking_order_policy.yml
new file mode 100644
index 00000000000..d973f31d1f3
--- /dev/null
+++ b/addons/sale/test/picking_order_policy.yml
@@ -0,0 +1,329 @@
+-
+ In order to test the Sale module in OpenERP,
+ I create a Sale Order for Slider Mobile for qty 500 having Shipping Policy is 'Invoice from Picking'
+-
+ !record {model: sale.order, id: sale_order_so7}:
+ date_order: '2010-07-15'
+ invoice_quantity: order
+ name: Test_SO007
+ order_line:
+ - name: Slider Mobile
+ price_unit: 200
+ product_uom: product.product_uom_unit
+ product_uom_qty: 500.0
+ state: draft
+ delay: 7.0
+ product_id: sale.product_product_slidermobile0
+ product_uos_qty: 500.0
+ th_weight: 0.0
+ type: make_to_order
+ order_policy: picking
+ partner_id: sale.res_partner_cleartrail0
+ partner_invoice_id: sale.res_partner_address_2
+ partner_order_id: sale.res_partner_address_1
+ partner_shipping_id: sale.res_partner_address_3
+ picking_policy: direct
+ pricelist_id: product.list0
+ shop_id: sale.shop
+-
+ I confirm the sale order.
+-
+ !workflow {model: sale.order, action: order_confirm, ref: sale_order_so7}
+-
+ I verify that picking has been generated for the sale order.
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so7"))
+ assert so.picking_ids,"Picking has not been generated for sale_order_so7"
+-
+ Then I done the picking
+-
+ !python {model: stock.picking }: |
+ import time
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
+ if picking_id:
+ pick=self.browse(cr,uid,picking_id[0])
+ pick.force_assign(cr, uid)
+ partial_datas = {
+ 'partner_id':pick.address_id.partner_id.id,
+ 'address_id': pick.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d'),
+ }
+ move = pick.move_lines[0]
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id.id,
+ 'product_qty': move.product_qty,
+ 'product_uom': move.product_uom.id,
+ }
+ self.do_partial(cr, uid, [pick.id],partial_datas)
+-
+ Then I create invoice from picking
+-
+ !record {model: stock.invoice.onshipping, id: stock_invoice_onshipping_0}:
+ invoice_date: '2010-07-15'
+ journal_id: account.sales_journal
+ type: out_invoice
+-
+ Then I click on 'Create Invoices' button
+-
+ !python {model: stock.invoice.onshipping}: |
+ sale_obj=self.pool.get('sale.order')
+ sale_id=sale_obj.browse(cr, uid, ref("sale_order_so7"))
+ picking_obj = self.pool.get('stock.picking')
+ ids = picking_obj.search(cr, uid, [('origin', '=', sale_id.name)])
+ self.create_invoice(cr, uid, [ref("stock_invoice_onshipping_0")], {"lang": "en_US",
+ "search_default_available": 1, "tz": False, "active_model": "stock.picking",
+ "contact_display": "partner", "active_ids": ids, "active_id": ids[0]})
+-
+ I check that an invoice has been created.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so7"))
+ assert(sale_id.invoice_ids), "Invoice has not been created"
+-
+ I open the Invoice for the SO.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ Creating a account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
+ amount: 255000.0
+ date: '2010-07-15'
+ journal_id: sale.account_journal_bankjournal0
+ name: tst
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
+ False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[0].id, })
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ Pay and Reconcile the Invoice.
+-
+ !python {model: account.invoice.pay.writeoff}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
+ {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
+ [so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id })
+-
+ I verify the invoice are in paid state or not.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ assert (invoice.state) =='paid', "Invoice for SO is not in done state."
+-
+ I check that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so7"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
+-
+ I verify that a procurement has been generated for so
+-
+ !python {model: procurement.order}: |
+ from tools.translate import _
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ proc_ids = self.search(cr, uid, [('origin','=',so.name)])
+ assert proc_ids, _('No Procurements!')
+-
+ Then I click on the "Run Procurement" button
+-
+ !python {model: procurement.order}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ proc_ids = self.search(cr, uid, [('origin','=',so.name)])
+ for proc in proc_ids:
+ wf_service.trg_validate(uid, 'procurement.order',proc,'button_check', cr)
+-
+ I verify that a procurement state is "running"
+-
+ !python {model: procurement.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ proc_ids = self.search(cr, uid, [('origin','=',so.name) and ('state','=','running')])
+ assert proc_ids, _('Procurement is not in the running state!')
+-
+ I verify that a purchase order has been generated
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ so = self.browse(cr, uid, ref("sale_order_so7"))
+ pur_obj=self.pool.get('purchase.order')
+ pur_id=pur_obj.search(cr, uid, [('origin','=',so.name)])
+ assert pur_id, _('Purchase order has not been generated')
+-
+ I click on the "Confirm" button to confirm the purchase order
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj=self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so7"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ pur_ids = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ for pur in pur_ids:
+ wf_service.trg_validate(uid, 'purchase.order',pur,'purchase_confirm', cr)
+-
+ I click on the "Approved by supplier" button to approve the purchase order
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so7"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ pur_ids = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ for pur in pur_ids:
+ wf_service.trg_validate(uid, 'purchase.order',pur,'purchase_approve', cr)
+-
+ I verify that a picking related to purchase order has been generated.
+-
+ !python {model: sale.order}: |
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so7"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ assert(po.picking_ids),"Picking for purchase order has not been generated"
+-
+ Then I click on the "Products Received" button of Incoming Shipments
+-
+ !record {model: stock.partial.picking, id: stock_partial_picking_0}:
+ date: '2010-07-15 17:52:09'
+-
+ I click on the "Validate" button
+-
+ !python {model: stock.picking}: |
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ sale_order_obj = self.pool.get('sale.order')
+ pur_obj = self.pool.get('purchase.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ pick_ser_id = self.search(cr, uid, [('purchase_id', '=', po.id )])
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ for pick in pick_ser_id:
+ wf_service.trg_validate(uid, 'stock.picking',pick,'button_done', cr)
+-
+ I verify that picking for purchase order has been done.
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so7"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ picking_obj = self.pool.get('stock.picking')
+ ids = picking_obj.search(cr, uid, [('purchase_id', '=', po.id ) and ('state', '=', 'done')])
+ assert ids, _('Picking is not in the done state!')
+-
+ I verify that delivery order has been generated for sale order
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ assert (picking_id),"Delivery order has not been generated"
+-
+ I verify that delivery has been done
+-
+ !python {model: stock.picking }: |
+ import time
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ if picking_id:
+ pick=self.browse(cr,uid,picking_id[0])
+ pick.force_assign(cr, uid)
+ partial_datas = {
+ 'partner_id':pick.address_id.partner_id.id,
+ 'address_id': pick.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d'),
+ }
+ move = pick.move_lines[0]
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id.id,
+ 'product_qty': move.product_qty,
+ 'product_uom': move.product_uom.id,
+ }
+ self.do_partial(cr, uid, [pick.id],partial_datas)
+-
+ I verify that delivery state is done
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ if picking_id:
+ pick = self.browse(cr,uid,picking_id[0])
+ assert (pick.state) =='done', "Picking for SO is not in done state."
+-
+ I verify that a "Picked" has been set to true
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so7"))
+ assert (so.shipped == True), "Picked has not been set to True"
+-
+ I verify that a sale order is in done state
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so7"))
+ assert (so.state == 'done'), "Sale order is not in the done state."
+
diff --git a/addons/sale/test/postpaid_order_policy.yml b/addons/sale/test/postpaid_order_policy.yml
new file mode 100644
index 00000000000..056a8327435
--- /dev/null
+++ b/addons/sale/test/postpaid_order_policy.yml
@@ -0,0 +1,330 @@
+-
+ In order to test the Sale module in OpenERP,
+ I create a Sale Order for Slider Mobile for qty 500 having Shipping Policy is 'Invoice on order after Delivery'
+-
+ !record {model: sale.order, id: sale_order_so8}:
+ date_order: '2010-07-15'
+ invoice_quantity: order
+ name: Test_SO008
+ order_line:
+ - name: Slider Mobile
+ price_unit: 200.0
+ product_uom: product.product_uom_unit
+ product_uom_qty: 500.0
+ state: draft
+ delay: 7.0
+ product_id: sale.product_product_slidermobile0
+ product_uos_qty: 500.0
+ type: make_to_order
+ order_policy: postpaid
+ partner_id: sale.res_partner_cleartrail0
+ partner_invoice_id: sale.res_partner_address_2
+ partner_order_id: sale.res_partner_address_1
+ partner_shipping_id: sale.res_partner_address_3
+ picking_policy: direct
+ pricelist_id: product.list0
+ shop_id: sale.shop
+-
+ I confirm the Sale Order.
+-
+ !workflow {model: sale.order, action: order_confirm, ref: sale_order_so8}
+-
+ I verify that the picking has been generated for the sale order
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ assert so.picking_ids,"Picking has not been generated for sale_order_so8"
+-
+ Then I done the picking
+-
+ !python {model: stock.picking }: |
+ import time
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
+ if picking_id:
+ pick=self.browse(cr,uid,picking_id[0])
+ pick.force_assign(cr, uid)
+ partial_datas = {
+ 'partner_id':pick.address_id.partner_id.id,
+ 'address_id': pick.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d'),
+ }
+ move = pick.move_lines[0]
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id.id,
+ 'product_qty': move.product_qty,
+ 'product_uom': move.product_uom.id,
+ }
+ self.do_partial(cr, uid, [pick.id],partial_datas)
+-
+ I verify that picking order is in done state.
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
+ if picking_id:
+ pick = self.browse(cr,uid,picking_id[0])
+ assert (pick.state == 'done'), "Picking for SO is not in done state."
+-
+ I verify that delivery order has been generated for sale order
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ assert (picking_id),"Delivery order has not been generated"
+-
+ I click on the Products Sent button and then on the Validate button
+-
+ !python {model: stock.picking }: |
+ import time
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ if picking_id:
+ pick=self.browse(cr,uid,picking_id[0])
+ pick.force_assign(cr, uid)
+ partial_datas = {
+ 'partner_id':pick.address_id.partner_id.id,
+ 'address_id': pick.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d'),
+ }
+ move = pick.move_lines[0]
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id.id,
+ 'product_qty': move.product_qty,
+ 'product_uom': move.product_uom.id,
+ }
+ self.do_partial(cr, uid, [pick.id],partial_datas)
+-
+ I verify that delivery state is done
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ if picking_id:
+ pick = self.browse(cr,uid,picking_id[0])
+ assert (pick.state) =='done', "Picking for SO is not in done state."
+-
+ I verify that a procurement has been generated for so
+-
+ !python {model: procurement.order}: |
+ from tools.translate import _
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ proc_ids = self.search(cr, uid, [('origin','=',so.name)])
+ assert proc_ids, _('No Procurements!')
+-
+ Then I click on the "Run Procurement" button
+-
+ !python {model: procurement.order}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ proc_ids = self.search(cr, uid, [('origin','=',so.name)])
+ for proc in proc_ids:
+ wf_service.trg_validate(uid, 'procurement.order',proc,'button_check', cr)
+-
+ I verify that a procurement state is "running"
+-
+ !python {model: procurement.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ proc_ids = self.search(cr, uid, [('origin','=',so.name) and ('state','=','running')])
+-
+ I verify that a purchase order has been generated
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ pur_obj=self.pool.get('purchase.order')
+ pur_id=pur_obj.search(cr, uid, [('origin','=',so.name)])
+ assert pur_id, _('Purchase order has not been generated')
+-
+ I click on the "Confirm" button to confirm the purchase order
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj=self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ pur_ids = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ for pur in pur_ids:
+ wf_service.trg_validate(uid, 'purchase.order',pur,'purchase_confirm', cr)
+-
+ I click on the "Approved by supplier" button to approve the purchase order
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ pur_ids = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ for pur in pur_ids:
+ wf_service.trg_validate(uid, 'purchase.order',pur,'purchase_approve', cr)
+-
+ I verify that a picking related to purchase order has been generated.
+-
+ !python {model: sale.order}: |
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ assert(po.picking_ids),"Picking for purchase order has not been generated"
+-
+ Then I click on the "Products Received" button of Incoming Shipments
+-
+ !record {model: stock.partial.picking, id: stock_partial_picking_0}:
+ date: '2010-07-15 17:52:09'
+-
+ I click on the "Validate" button
+-
+ !python {model: stock.picking}: |
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ sale_order_obj = self.pool.get('sale.order')
+ pur_obj = self.pool.get('purchase.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ pick_ser_id = self.search(cr, uid, [('purchase_id', '=', po.id )])
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ for pick in pick_ser_id:
+ wf_service.trg_validate(uid, 'stock.picking',pick,'button_done', cr)
+-
+ I verify that picking for purchase order has been done.
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ picking_obj = self.pool.get('stock.picking')
+ ids = picking_obj.search(cr, uid, [('purchase_id', '=', po.id ) and ('state', '=', 'done')])
+ assert ids, _('Picking is not in the done state!')
+-
+ I verify that a "Picked" has been set to true
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ assert (so.shipped == True), "Picking is not done."
+-
+ I verify that an invoice has been generated for SO
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ assert so.invoice_ids, "Invoice has not been generated"
+-
+ I open the Invoice for the SO.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ Creating a account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst0}:
+ amount: 100000.0
+ date: '2010-07-15'
+ journal_id: sale.account_journal_bankjournal0
+ name: test
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst0")], {"lang": "en_US", "tz":
+ False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[0].id})
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ Pay and Reconcile the Invoice.
+-
+ !python {model: account.invoice.pay.writeoff}: |
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
+ {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
+ [so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id, })
+-
+ I verify the invoice are in paid state or not.
+-
+ !python {model: account.invoice}: |
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ assert (invoice.state) =='paid', "Invoice for SO is not in done state."
+-
+ I verify that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so8"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
+-
+ I verify that sale order is in done state
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so8"))
+ assert (so.state == 'done'), "Sale order is not in the done state."
\ No newline at end of file
diff --git a/addons/sale/test/prepaid_order_policy.yml b/addons/sale/test/prepaid_order_policy.yml
new file mode 100644
index 00000000000..fd7f04bede0
--- /dev/null
+++ b/addons/sale/test/prepaid_order_policy.yml
@@ -0,0 +1,284 @@
+-
+ I create a Sale Order for LG Viewty Smart for qty 500 having Shipping Policy is 'Payment Before Delivery'
+-
+ !record {model: sale.order, id: sale_order_so1}:
+ date_order: '2010-07-20'
+ invoice_quantity: order
+ name: Test_SO001
+ order_line:
+ - name: Slider Mobile
+ price_unit: 200
+ product_uom: product.product_uom_unit
+ product_uom_qty: 500.0
+ state: draft
+ delay: 7.0
+ product_id: sale.product_product_slidermobile0
+ product_uos_qty: 500.0
+ th_weight: 0.0
+ type: make_to_order
+ order_policy: prepaid
+ partner_id: sale.res_partner_cleartrail0
+ partner_invoice_id: sale.res_partner_address_2
+ partner_order_id: sale.res_partner_address_1
+ partner_shipping_id: sale.res_partner_address_3
+ picking_policy: direct
+ pricelist_id: product.list0
+ shop_id: sale.shop
+-
+ I confirm the sale order.
+-
+ !workflow {model: sale.order, action: order_confirm, ref: sale_order_so1}
+-
+ I verify whether the invoice has been generated for SO since Shipping policy is 'Payment Before Delivery'
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so1"))
+ assert so.invoice_ids, "Invoices has not been generated for sale_order_so1"
+-
+ I verify there are no pickings attached to this sale order
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ picking_id = self.search(cr, uid, [('origin','!=',so.name),(('type','=','out')and('type','=','delivery'))])
+ assert picking_id,"There is a picking attached to this sale order"
+-
+ I open the Invoice for the SO.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ Creating a account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
+ amount: 85000.0
+ date: '2010-07-20'
+ journal_id: sale.account_journal_bankjournal0
+ name: tst
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
+ False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[0].id, })
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ Pay and Reconcile the Invoice.
+-
+ !python {model: account.invoice.pay.writeoff}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
+ {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
+ [so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id, })
+-
+ I verify the invoice is in done state or not.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','paid')])
+ assert invoice_id, "Invoice for SO is not in done state."
+-
+ I check that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so1"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
+-
+ I verify the picking associated with the sale order sale_order_so1
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so1"))
+ assert so.picking_ids,"Picking has not been generated"
+-
+ Products are delivered to the Cleartrail Customer.
+-
+ !python {model: stock.picking }: |
+ import time
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
+ if picking_id:
+ pick=self.browse(cr,uid,picking_id[0])
+ pick.force_assign(cr, uid)
+ partial_datas = {
+ 'partner_id':pick.address_id.partner_id.id,
+ 'address_id': pick.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d'),
+ }
+ move = pick.move_lines[0]
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id.id,
+ 'product_qty': move.product_qty,
+ 'product_uom': move.product_uom.id,
+ }
+ self.do_partial(cr, uid, [pick.id],partial_datas)
+-
+ I verify that picking order is in done state.
+-
+ !python {model: stock.picking }: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
+ pick = self.browse(cr,uid,picking_id[0])
+ assert (pick.state) =='done', "Picking for SO is not in done state."
+-
+ I verify that a procurement has been generated for so
+-
+ !python {model: procurement.order}: |
+ from tools.translate import _
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ proc_ids = self.search(cr, uid, [('origin','=',so.name)])
+ assert proc_ids, _('No Procurements!')
+-
+ Then I click on the "Run Procurement" button
+-
+ !python {model: procurement.order}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ proc_ids = self.search(cr, uid, [('origin','=',so.name)])
+ for proc in proc_ids:
+ wf_service.trg_validate(uid, 'procurement.order',proc,'button_check', cr)
+-
+ I verify that a procurement state is "running"
+-
+ !python {model: procurement.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if(mod_brw.state == 'installed'):
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ proc_ids = self.search(cr, uid, [('origin','=',so.name) and ('state','=','running')])
+ assert proc_ids, _('Procurement is not in the running state!')
+-
+ I verify that a purchase order has been generated
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if(mod_brw.state == 'installed'):
+ so = self.browse(cr, uid, ref("sale_order_so1"))
+ pur_obj=self.pool.get('purchase.order')
+ pur_id=pur_obj.search(cr, uid, [('origin','=',so.name)])
+ assert pur_id, _('Purchase order has not been generated')
+-
+ I click on the "Confirm" button to confirm the purchase order
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if(mod_brw.state == 'installed'):
+ pur_obj=self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so1"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ pur_ids = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ for pur in pur_ids:
+ wf_service.trg_validate(uid, 'purchase.order',pur,'purchase_confirm', cr)
+-
+ I click on the "Approved by supplier" button to approve the purchase order
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so1"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ pur_ids = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ for pur in pur_ids:
+ wf_service.trg_validate(uid, 'purchase.order',pur,'purchase_approve', cr)
+-
+ I verify that a picking related to purchase order has been generated.
+-
+ !python {model: sale.order}: |
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so1"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ assert(po.picking_ids),"Picking for purchase order has not been generated"
+-
+ Then I click on the "Products Received" button of Incoming Shipments
+-
+ !record {model: stock.partial.picking, id: stock_partial_picking_0}:
+ date: '2010-07-20 17:52:09'
+-
+ I click on the "Validate" button
+-
+ !python {model: stock.picking}: |
+ modules = self.pool.get('ir.module.module')
+ sale_order_obj = self.pool.get('sale.order')
+ pur_obj = self.pool.get('purchase.order')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if (mod_brw.state == 'installed'):
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ pick_ser_id = self.search(cr, uid, [('purchase_id', '=', po.id )])
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ for pick in pick_ser_id:
+ wf_service.trg_validate(uid, 'stock.picking',pick,'button_done', cr)
+-
+ I verify that picking for purchase order has been done.
+-
+ !python {model: sale.order}: |
+ from tools.translate import _
+ modules = self.pool.get('ir.module.module')
+ mod_pur = modules.search(cr, uid, [('name','=','purchase')])
+ mod_brw = modules.browse(cr,uid,mod_pur)[0]
+ if(mod_brw.state == 'installed'):
+ pur_obj = self.pool.get('purchase.order')
+ so = self.browse(cr, uid, ref("sale_order_so1"))
+ pur_id = pur_obj.search(cr, uid, [('origin','=',so.name)])
+ po = pur_obj.browse(cr, uid, pur_id)[0]
+ picking_obj = self.pool.get('stock.picking')
+ ids = picking_obj.search(cr, uid, [('purchase_id', '=', po.id ) and ('state', '=', 'done')])
+ assert ids, _('Picking is not in the done state!')
+-
+ I verify that a "Picked" has been set to true
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so1"))
+ assert (so.shipped == True), "Picking is not done."
+-
+ I verify that a sale order is in done state
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so1"))
+ assert (so.state == 'done'), "Sale order is not in the done state."
diff --git a/addons/sale/test/shipping_manual_sale_order.yml b/addons/sale/test/shipping_manual_sale_order.yml
deleted file mode 100644
index 1f5bc5fe10a..00000000000
--- a/addons/sale/test/shipping_manual_sale_order.yml
+++ /dev/null
@@ -1,384 +0,0 @@
--
- In order to test the sale module, I need to configure details regarding product & customer.
--
- I am going to sell my Mobile products to the customer with name Cleartrail
--
- I create View Account Type.
--
- !record {model: account.account.type, id: account_account_type_view0}:
- close_method: none
- code: View
- name: View
- sign: 1
--
- I create Income Account Type.
--
- !record {model: account.account.type, id: account_account_type_income0}:
- close_method: unreconciled
- code: Income
- name: Income
- sign: 1
--
- I create Expense Account Type.
--
- !record {model: account.account.type, id: account_account_type_expense0}:
- close_method: unreconciled
- code: Expense
- name: Expense
- sign: 1
--
- I create Cash Account Type.
--
- !record {model: account.account.type, id: account_account_type_cash0}:
- close_method: balance
- code: Cash
- name: Cash
- sign: 1
--
- I create Minimal Chart Account.
--
- !record {model: account.account, id: account_account_minimalchart0}:
- code: '0'
- company_id: base.main_company
- currency_mode: current
- name: Minimal Chart
- parent_left: 1
- parent_right: 12
- type: view
- user_type: account_account_type_view0
--
- I create Payable Account.
--
- !record {model: account.account, id: account_account_payable1}:
- code: AP
- company_id: base.main_company
- currency_mode: current
- name: Payable
- parent_id: account_account_minimalchart0
- parent_left: 2
- parent_right: 3
- reconcile: true
- type: payable
- user_type: account_account_type_expense0
--
- I create Receivable Account.
--
- !record {model: account.account, id: account_account_receivable0}:
- code: AR
- company_id: base.main_company
- currency_mode: current
- name: Receivable
- parent_id: account_account_minimalchart0
- parent_left: 4
- parent_right: 5
- reconcile: true
- type: receivable
- user_type: account_account_type_income0
--
- I create Cash Account.
--
- !record {model: account.account, id: account_account_cash0}:
- code: C
- company_id: base.main_company
- currency_mode: current
- name: Cash
- parent_id: account_account_minimalchart0
- parent_left: 6
- parent_right: 7
- type: other
- user_type: account_account_type_cash0
--
- I create Purchases Account.
--
- !record {model: account.account, id: account_account_purchases0}:
- code: P
- company_id: base.main_company
- currency_mode: current
- name: Purchases
- parent_id: account_account_minimalchart0
- parent_left: 8
- parent_right: 9
- type: other
- user_type: account_account_type_expense0
--
- I create Sales Account.
--
- !record {model: account.account, id: account_account_sales0}:
- code: S
- company_id: base.main_company
- currency_mode: current
- name: Sales
- parent_id: account_account_minimalchart0
- parent_left: 10
- parent_right: 11
- type: other
- user_type: account_account_type_income0
--
- I create Purchase Journal.
--
- !record {model: account.journal, id: account_journal_purchasejournal0}:
- code: PUJ
- company_id: base.main_company
- default_credit_account_id: account_account_purchases0
- default_debit_account_id: account_account_purchases0
- name: Purchase Journal
- sequence_id: account.sequence_purchase_journal
- type: purchase
- view_id: account.account_journal_view
--
- I create Sale Journal.
--
- !record {model: account.journal, id: account_journal_salejournal0}:
- code: SAJ
- company_id: base.main_company
- default_credit_account_id: account_account_sales0
- default_debit_account_id: account_account_sales0
- name: Sale Journal
- sequence_id: account.sequence_sale_journal
- type: sale
- view_id: account.account_journal_view
--
- I create Bank Journal.
--
- !record {model: account.journal, id: account_journal_bankjournal0}:
- code: BNK
- company_id: base.main_company
- default_credit_account_id: account_account_cash0
- default_debit_account_id: account_account_cash0
- name: Bank Journal
- sequence_id: account.sequence_journal
- type: cash
- view_id: account.account_journal_bank_view
--
- I create ir.property for account payable.
--
- !record {model: ir.property, id: ir_property_propertyaccountexpensecateg0}:
- company_id: base.main_company
- fields_id: account.field_res_partner_property_account_payable
- name: property_account_expense_categ
- value_reference: account.account,5
--
- I create ir.property for account receivable.
--
- !record {model: ir.property, id: ir_property_propertyaccountincomecateg0}:
- company_id: base.main_company
- fields_id: account.field_res_partner_property_account_receivable
- name: property_account_income_categ
- value_reference: account.account,6
--
- I create Partner category Customers.
--
- !record {model: res.partner.category, id: res_partner_category_customers0}:
- name: Customers
--
- I create Cleartrail Customer.
--
- !record {model: res.partner, id: res_partner_cleartrail0}:
- category_id:
- - res_partner_category_customers0
- name: Cleartrail
--
- I create contact address for Cleartrail.
--
- !record {model: res.partner.address, id: res_partner_address_1}:
- partner_id: res_partner_cleartrail0
- street: onam plaza, 14 B palasia A B Road
- type: contact
--
- I create invoice address for Cleartrail.
--
- !record {model: res.partner.address, id: res_partner_address_2}:
- partner_id: res_partner_cleartrail0
- street: sarda house 24 B palasia, A B Road
- type: invoice
--
- I create delivery address for Cleartrail.
--
- !record {model: res.partner.address, id: res_partner_address_3}:
- partner_id: res_partner_cleartrail0
- street: sangam house 15 B palasia, A B Road
- type: delivery
--
- Customer Cleartrail has specific instrument requirement regarding the stockable products.
--
- I define product category Mobile Products Sellable.
--
- !record {model: product.category, id: product_category_allproductssellable0}:
- name: Mobile Products Sellable
--
- I define product category Mobile Services.
--
- !record {model: product.category, id: product_category_services0}:
- name: Mobile Services
--
- I define New Chocolate Slider Mobile template.
--
- !record {model: product.template, id: product_template_newchocolateslidermobile0}:
- categ_id: product_category_allproductssellable0
- cost_method: standard
- list_price: 200.0
- mes_type: fixed
- name: New Chocolate Slider Mobile
- procure_method: make_to_order
- standard_price: 189.0
- supply_method: buy
- type: product
- uom_id: product.product_uom_unit
- uom_po_id: product.product_uom_unit
--
- I define New Chocolate Slider Mobile.
--
- !record {model: product.product, id: product_product_newchocolateslidermobile0}:
- categ_id: product_category_allproductssellable0
- cost_method: standard
- list_price: 200.0
- mes_type: fixed
- name: New Chocolate Slider Mobile
- pricelist_purchase: 'Default Purchase Pricelist (0.00) : 189.00\n'
- pricelist_sale: 'Public Pricelist (0.00) : 200.00\n'
- procure_method: make_to_order
- property_account_expense: sale.account_account_payable1
- property_account_income: sale.account_account_receivable0
- seller_delay: '1'
- standard_price: 189.0
- supply_method: buy
- type: product
- uom_id: product.product_uom_unit
- uom_po_id: product.product_uom_unit
--
- I create a Sale Order for LG Viewty Smart for qty 500 having order_policy manual.
--
- !record {model: sale.order, id: sale_order_so0}:
- date_order: '2010-05-12'
- invoice_quantity: order
- name: Test_SO002
- order_line:
- - name: New Chocolate Slider Mobile
- price_unit: 200.0
- product_uom: product.product_uom_unit
- product_uom_qty: 500.0
- state: draft
- delay: 7.0
- product_id: sale.product_product_newchocolateslidermobile0
- product_uos_qty: 500.0
- type: make_to_order
- order_policy: manual
- partner_id: sale.res_partner_cleartrail0
- partner_invoice_id: sale.res_partner_address_2
- partner_order_id: sale.res_partner_address_1
- partner_shipping_id: sale.res_partner_address_3
- picking_policy: direct
- pricelist_id: product.list0
- shop_id: sale.shop
--
- I confirm the Sale Order.
--
- !workflow {model: sale.order, action: order_confirm, ref: sale_order_so0}
--
- I click on Create Invoice button to create the invoice.
--
- !workflow {model: sale.order, action: manual_invoice, ref: sale_order_so0}
--
- I verify whether the invoice has been generated for SO
--
- !python {model: sale.order}: |
- so = self.browse(cr, uid, ref("sale_order_so0"))
- assert so.invoice_ids, "Invoices has not been generated for sale_order_so0"
--
- I open the Invoice for the SO.
--
- !python {model: account.invoice}: |
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
- import netsvc
- wf_service = netsvc.LocalService("workflow")
- invoice_ids = so.invoice_ids
- for invoice in invoice_ids:
- wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
--
- Creating a account invoice pay entry.
--
- !record {model: account.invoice.pay, id: account_invoice_pay_tst0}:
- amount: 100000.0
- date: '2010-05-10'
- journal_id: sale.account_journal_bankjournal0
- name: test
- period_id: account.period_5
--
- I pay the invoice.
--
- !python {model: account.invoice.pay}: |
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
- self.wo_check(cr, uid, [ref("account_invoice_pay_tst0")], {"lang": "en_US", "tz":
- False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
- "out_invoice", "active_id": so.invoice_ids[0].id})
-
-
--
- Creating an account invoice pay writeoff entry.
--
- !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
- analytic_id: account.analytic_customers
- comment: Write-Off
- writeoff_acc_id: account.a_sale
- writeoff_journal_id: sale.account_journal_bankjournal0
-
-
--
- Pay and Reconcile the Invoice.
--
- !python {model: account.invoice.pay.writeoff}: |
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
- self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
- {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
- [so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id, })
--
- I verify the invoice are in paid state or not.
--
- !python {model: account.invoice}: |
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
- invoice_ids = so.invoice_ids
- for invoice in invoice_ids:
- assert (invoice.state) =='paid', "Invoice for SO is not in done state."
--
- I verify the picking associated with the sale order sale_order_so0.
--
- !python {model: sale.order}: |
- so = self.browse(cr, uid, ref("sale_order_so0"))
- assert so.picking_ids,"Picking has not been generated for sale_order_so0"
--
- Products are delivered to the Cleartrail Customer.
--
- !python {model: stock.picking }: |
- import time
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
- if picking_id:
- pick=self.browse(cr,uid,picking_id[0])
- pick.force_assign(cr, uid)
- partial_datas = {
- 'partner_id':pick.address_id.partner_id.id,
- 'address_id': pick.address_id.id,
- 'delivery_date' : time.strftime('%Y-%m-%d'),
- }
- move = pick.move_lines[0]
- partial_datas['move%s'%(move.id)]= {
- 'product_id': move.product_id.id,
- 'product_qty': move.product_qty,
- 'product_uom': move.product_uom.id,
- }
- self.do_partial(cr, uid, [pick.id],partial_datas)
--
- I verify that picking order is in done state.
--
- !python {model: stock.picking }: |
- sale_order_obj = self.pool.get('sale.order')
- so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
- if picking_id:
- pick = self.browse(cr,uid,picking_id[0])
- assert (pick.state) =='done', "Picking for SO is not in done state."
diff --git a/addons/sale/test/so_make_line_invoice.yml b/addons/sale/test/so_make_line_invoice.yml
index c09e4bf2c11..9725a169b2c 100644
--- a/addons/sale/test/so_make_line_invoice.yml
+++ b/addons/sale/test/so_make_line_invoice.yml
@@ -1,307 +1,29 @@
-
- In order to test the sale module in the Open-ERP, I need to configure details regarding product & customer.
--
- I am going to sell my Mobile products to the customer with name Cleartrail
--
- I create View Account Type.
--
- !record {model: account.account.type, id: account_account_type_view0}:
- close_method: none
- code: View
- name: View
- sign: 1
--
- I create Income Account Type.
--
- !record {model: account.account.type, id: account_account_type_income0}:
- close_method: unreconciled
- code: Income
- name: Income
- sign: 1
--
- I create Expense Account Type.
--
- !record {model: account.account.type, id: account_account_type_expense0}:
- close_method: unreconciled
- code: Expense
- name: Expense
- sign: 1
--
- I create Cash Account Type.
--
- !record {model: account.account.type, id: account_account_type_cash0}:
- close_method: balance
- code: Cash
- name: Cash
- sign: 1
--
- I create Minimal Chart Account.
--
- !record {model: account.account, id: account_account_minimalchart0}:
- code: '0'
- company_id: base.main_company
- currency_mode: current
- name: Minimal Chart
- parent_left: 1
- parent_right: 12
- type: view
- user_type: account_account_type_view0
--
- I create Payable Account.
--
- !record {model: account.account, id: account_account_payable1}:
- code: AP
- company_id: base.main_company
- currency_mode: current
- name: Payable
- parent_id: account_account_minimalchart0
- parent_left: 2
- parent_right: 3
- reconcile: true
- type: payable
- user_type: account_account_type_expense0
--
- I create Receivable Account.
--
- !record {model: account.account, id: account_account_receivable0}:
- code: AR
- currency_mode: current
- name: Receivable
- parent_id: account_account_minimalchart0
- parent_left: 4
- parent_right: 5
- reconcile: true
- type: receivable
- user_type: account_account_type_income0
--
- I create Cash Account.
--
- !record {model: account.account, id: account_account_cash0}:
- code: C
- currency_mode: current
- name: Cash
- parent_id: account_account_minimalchart0
- parent_left: 6
- parent_right: 7
- type: other
- user_type: account_account_type_cash0
--
- I create Purchases Account.
--
- !record {model: account.account, id: account_account_purchases0}:
- code: P
- company_id: base.main_company
- currency_mode: current
- name: Purchases
- parent_id: account_account_minimalchart0
- parent_left: 8
- parent_right: 9
- type: other
- user_type: account_account_type_expense0
--
- I create Sales Account.
--
- !record {model: account.account, id: account_account_sales0}:
- code: S
- company_id: base.main_company
- currency_mode: current
- name: Sales
- parent_id: account_account_minimalchart0
- parent_left: 10
- parent_right: 11
- type: other
- user_type: account_account_type_income0
--
- I create Purchase Journal.
--
- !record {model: account.journal, id: account_journal_purchasejournal0}:
- code: PUJ
- company_id: base.main_company
- default_credit_account_id: account_account_purchases0
- default_debit_account_id: account_account_purchases0
- name: Purchase Journal
- sequence_id: account.sequence_purchase_journal
- type: purchase
- view_id: account.account_journal_view
--
- I create Sale Journal.
--
- !record {model: account.journal, id: account_journal_salejournal0}:
- code: SAJ
- company_id: base.main_company
- default_credit_account_id: account_account_sales0
- default_debit_account_id: account_account_sales0
- name: Sale Journal
- sequence_id: account.sequence_sale_journal
- type: sale
- view_id: account.account_journal_view
--
- I create Bank Journal.
--
- !record {model: account.journal, id: account_journal_bankjournal0}:
- code: BNK
- default_credit_account_id: account_account_cash0
- default_debit_account_id: account_account_cash0
- name: Bank Journal
- sequence_id: account.sequence_journal
- type: cash
- view_id: account.account_journal_bank_view
--
- I create ir.property for account payable.
--
- !record {model: ir.property, id: ir_property_propertyaccountexpensecateg0}:
- company_id: base.main_company
- fields_id: account.field_res_partner_property_account_payable
- name: property_account_expense_categ
- value_reference: account.account,5
--
- I create ir.property for account receivable.
--
- !record {model: ir.property, id: ir_property_propertyaccountincomecateg0}:
- company_id: base.main_company
- fields_id: account.field_res_partner_property_account_receivable
- name: property_account_income_categ
- value_reference: account.account,6
--
- I create Partner category Customers.
--
- !record {model: res.partner.category, id: res_partner_category_customers0}:
- name: Customers
--
- I create Cleartrail Customer.
--
- !record {model: res.partner, id: res_partner_cleartrail0}:
- category_id:
- - res_partner_category_customers0
- name: Cleartrail
--
- I create contact address for Cleartrail.
--
- !record {model: res.partner.address, id: res_partner_address_1}:
- partner_id: res_partner_cleartrail0
- street: onam plaza, 14 B palasia A B Road
- type: contact
--
- I create invoice address for Cleartrail.
--
- !record {model: res.partner.address, id: res_partner_address_2}:
- partner_id: res_partner_cleartrail0
- street: sarda house 24 B palasia, A B Road
- type: invoice
--
- I create delivery address for Cleartrail.
--
- !record {model: res.partner.address, id: res_partner_address_3}:
- partner_id: res_partner_cleartrail0
- street: sangam house 15 B palasia, A B Road
- type: delivery
--
- Customer Cleartrail has specific instrument requirement regarding the stockable products.
--
- I define product category Mobile Products Sellable.
--
- !record {model: product.category, id: product_category_allproductssellable0}:
- name: Mobile Products Sellable
--
- I define product category Mobile Services.
--
- !record {model: product.category, id: product_category_services0}:
- name: Mobile Services
--
- I define LG Viewty Smart product template.
--
- !record {model: product.template, id: product_template_lgviewtysmart0}:
- categ_id: product_category_allproductssellable0
- cost_method: standard
- list_price: 170.0
- mes_type: fixed
- name: LG Viewty Smart
- procure_method: make_to_order
- standard_price: 160.0
- supply_method: produce
- type: product
- uom_id: product.product_uom_unit
- uom_po_id: product.product_uom_unit
--
- I define LG Viewty Smart product.
--
- !record {model: product.product, id: product_product_lgviewtysmart0}:
- categ_id: product_category_allproductssellable0
- cost_method: standard
- list_price: 170.0
- mes_type: fixed
- name: LG Viewty Smart
- pricelist_purchase: 'Default Purchase Pricelist (0.00) : 160.00\n'
- pricelist_sale: 'Public Pricelist (0.00) : 170.00\n'
- procure_method: make_to_order
- property_account_expense: sale.account_account_payable1
- property_account_income: sale.account_account_receivable0
- seller_delay: '1'
- standard_price: 160.0
- supply_method: produce
- type: product
- uom_id: product.product_uom_unit
- uom_po_id: product.product_uom_unit
--
- I define New Chocolate Slider Mobile template.
--
- !record {model: product.template, id: product_template_newchocolateslidermobile0}:
- categ_id: product_category_allproductssellable0
- cost_method: standard
- list_price: 200.0
- mes_type: fixed
- name: New Chocolate Slider Mobile
- procure_method: make_to_order
- standard_price: 189.0
- supply_method: buy
- type: product
- uom_id: product.product_uom_unit
- uom_po_id: product.product_uom_unit
--
- I define New Chocolate Slider Mobile.
--
- !record {model: product.product, id: product_product_newchocolateslidermobile0}:
- categ_id: product_category_allproductssellable0
- cost_method: standard
- list_price: 200.0
- mes_type: fixed
- name: New Chocolate Slider Mobile
- pricelist_purchase: 'Default Purchase Pricelist (0.00) : 189.00\n'
- pricelist_sale: 'Public Pricelist (0.00) : 200.00\n'
- procure_method: make_to_order
- property_account_expense: sale.account_account_payable1
- property_account_income: sale.account_account_receivable0
- seller_delay: '1'
- standard_price: 189.0
- supply_method: buy
- type: product
- uom_id: product.product_uom_unit
- uom_po_id: product.product_uom_unit
--
- I create a Sale Order for LG Viewty Smart for qty 500 having order_policy manual.
+ In order to test the invoices based on sale order lines of sales module in OpenERP
+ I create a Sale Order for two products LG Viewty Smart and Slider mobile for qty 100 having order_policy manual.
-
!record {model: sale.order, id: sale_order_so3}:
- date_order: '2010-05-12'
+ date_order: '2010-07-12'
invoice_quantity: order
name: Test_SO003
order_line:
- - name: New Chocolate Slider Mobile
+ - name: Slider Mobile
price_unit: 200.0
product_uom: product.product_uom_unit
- product_uom_qty: 500.0
+ product_uom_qty: 100.0
state: draft
delay: 7.0
- product_id: sale.product_product_newchocolateslidermobile0
- product_uos_qty: 500.0
+ product_id: sale.product_product_slidermobile0
+ product_uos_qty: 100.0
type: make_to_order
- name: LG Viewty Smart
price_unit: 170.0
product_uom: product.product_uom_unit
- product_uom_qty: 500.0
+ product_uom_qty: 100.0
state: draft
delay: 7.0
product_id: sale.product_product_lgviewtysmart0
- product_uos_qty: 500.0
+ product_uos_qty: 100.0
th_weight: 0.0
type: make_to_order
order_policy: manual
@@ -317,23 +39,205 @@
-
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so3}
-
- I create an invoice on sale order line.
+ I click on the "Create Invoice" button of sale order line
-
- !record {model: sale.order.line.make.invoice, id: sale_order_line_make_invoice_0}:
- {}
--
- invoice is created for specific sale order line.
--
- !python {model: sale.order.line.make.invoice}: |
+ !python {model: sale.order.line}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
- sol = so.order_line[0]
- self.make_invoices(cr, uid, [ref("sale_order_line_make_invoice_0")], {"lang":
- 'en_US', "active_model": "sale.order.line", "active_ids": [ref(sol.id)], "tz":
- False, "active_id": ref(sol.id), })
+ sol = so.order_line[0]
+ self.create_sale_order_line_invoice(cr, uid, [sol.id], {"lang": "en_US",
+ "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
+ "search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
+ })
-
- I verify that invoice regarding sale order line has been created.
+ I verify that "Invoiced" has been set to True.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so3"))
+ sol = sale_id.order_line[0]
+ assert(sol.invoiced == True), "Invoiced has not been set to true"
+-
+ I verify that an invoice for sale order line has been created.
-
!python {model: sale.order}: |
so = self.browse(cr, uid, ref("sale_order_so3"))
- assert so.invoice_ids, "Invoices has not been generated for sale_order_so0"
+ assert so.invoice_ids, "Invoices has not been generated for sale_order_so3"
+-
+ I click on the Create button of invoice
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ I verify that an invoice state has transit from draft to open state
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','open')])
+ assert invoice_id, "Invoice is not in the open state"
+-
+ Creating an account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst0}:
+ amount: 20000.0
+ date: '2010-07-12'
+ journal_id: sale.account_journal_bankjournal0
+ name: test
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst0")], {"lang": "en_US", "active_model": "account.invoice",
+ "tz":False,"record_id": so.invoice_ids[0].id, "active_ids": [so.invoice_ids[0].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[0].id})
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ Pay and Reconcile the Invoice.
+-
+ !python {model: account.invoice.pay.writeoff}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
+ {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
+ [so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id, })
+-
+ I verify that an invoice is in done state.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','paid')])
+ assert invoice_id, "Invoice for SO is not in done state."
+-
+ I verify that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so3"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
+-
+ I click on the "Create Invoice" button of sale order and verify that it gives a warning message
+-
+ !python {model: sale.order}: |
+ sale_order_obj = self.pool.get('sale.order')
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ try:
+ wf_service.trg_validate(uid, 'sale.order',ref("sale_order_so3"),'manual_invoice', cr)
+ except:
+ pass
+-
+ I create an invoice for another sale order line.
+-
+ I click on the "Create Invoice" button of sale order line
+-
+ !python {model: sale.order.line}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ sol = so.order_line[1]
+ self.create_sale_order_line_invoice(cr, uid, [sol.id], {"lang": "en_US",
+ "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
+ "search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
+ })
+-
+ I verify that invoice for sale order line has been created.
+-
+ !python {model: sale.order}: |
+ so = self.browse(cr, uid, ref("sale_order_so3"))
+ assert so.invoice_ids[1], "Invoices has not been generated for sale_order_so3"
+-
+ I verify that "Invoiced" has been set to True.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so3"))
+ sol = sale_id.order_line[1]
+ assert(sol.invoiced == True), "Invoiced has not been set to true"
+-
+ I verify that "Paid" has been set to False.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so3"))
+ assert(sale_id.invoiced == False), "Paid has not been set to true"
+-
+ I open the Invoice for the SO.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ import netsvc
+ wf_service = netsvc.LocalService("workflow")
+ invoice_ids = so.invoice_ids
+ for invoice in invoice_ids:
+ wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
+-
+ I verify that an invoice state has transit from draft to open state
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','open')])
+ assert invoice_id, "Invoice is not in the open state"
+-
+ Creating a account invoice pay entry.
+-
+ !record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
+ amount: 17000.0
+ date: '2010-07-12'
+ journal_id: sale.account_journal_bankjournal0
+ name: test
+ period_id: account.period_5
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice.pay}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "active_model": "account.invoice",
+ "tz":False,"record_id": so.invoice_ids[1].id, "active_ids": [so.invoice_ids[1].id], "type":
+ "out_invoice", "active_id": so.invoice_ids[1].id})
+-
+ Creating an account invoice pay writeoff entry.
+-
+ !record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_1}:
+ analytic_id: account.analytic_customers
+ comment: Write-Off
+ writeoff_acc_id: account.a_sale
+ writeoff_journal_id: sale.account_journal_bankjournal0
+-
+ Pay and Reconcile the Invoice.
+-
+ !python {model: account.invoice.pay.writeoff}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_1")],
+ {"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
+ [so.invoice_ids[1].id], "type": "out_invoice", "active_id": so.invoice_ids[1].id})
+-
+ I verify the invoice is in done state.
+-
+ !python {model: account.invoice}: |
+ sale_order_obj = self.pool.get('sale.order')
+ so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
+ invoice_id = self.search(cr, uid, [('origin','=',so.name) and ('state','=','paid')])
+ assert invoice_id, "Invoice for SO is not in done state."
+-
+ I verify that Paid has been set to true.
+-
+ !python {model: sale.order}: |
+ sale_id=self.browse(cr, uid, ref("sale_order_so3"))
+ assert(sale_id.invoiced == True), "Paid has not been set to true"
\ No newline at end of file
diff --git a/addons/sale_mrp/i18n/sl.po b/addons/sale_mrp/i18n/sl.po
new file mode 100644
index 00000000000..4c27df121ed
--- /dev/null
+++ b/addons/sale_mrp/i18n/sl.po
@@ -0,0 +1,73 @@
+# Slovenian 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 , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2010-06-28 09:21+0000\n"
+"PO-Revision-Date: 2010-07-28 12:42+0000\n"
+"Last-Translator: Simon Vidmar \n"
+"Language-Team: Slovenian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-07-29 03:34+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: sale_mrp
+#: help:mrp.production,sale_ref:0
+msgid "Indicate the Customer Reference from sale order."
+msgstr ""
+
+#. module: sale_mrp
+#: help:mrp.production,sale_name:0
+msgid "Indicate the name of sale order."
+msgstr ""
+
+#. module: sale_mrp
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "Neveljaven XML za arhitekturo pogleda!"
+
+#. module: sale_mrp
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"Naziv objekta se mora začeti z 'x_' in ne sme vsebovati posebnih znakov!"
+
+#. module: sale_mrp
+#: field:mrp.production,sale_name:0
+msgid "Sale Name"
+msgstr ""
+
+#. module: sale_mrp
+#: model:ir.model,name:sale_mrp.model_mrp_production
+msgid "Manufacturing Order"
+msgstr ""
+
+#. module: sale_mrp
+#: model:ir.module.module,description:sale_mrp.module_meta_information
+msgid ""
+"\n"
+" This module provides facility to the user to install mrp and sale "
+"modules\n"
+" at a time. It is basically used when we want to keep track of "
+"production\n"
+" orders generated from sale orders.\n"
+" It adds sale name and sale Reference on production order\n"
+" "
+msgstr ""
+
+#. module: sale_mrp
+#: field:mrp.production,sale_ref:0
+msgid "Sale Reference"
+msgstr ""
+
+#. module: sale_mrp
+#: model:ir.module.module,shortdesc:sale_mrp.module_meta_information
+msgid "Sales and MRP Management"
+msgstr ""
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 5668ed673d4..5980870f89f 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -785,7 +785,7 @@
form
-
+
@@ -1185,7 +1185,6 @@
-
@@ -1220,7 +1219,7 @@
+ states="draft,assigned,confirmed"/>
-
+
-
diff --git a/addons/stock/test/stock_test.yml b/addons/stock/test/stock_test.yml
index 33b3350d628..442cc8735b9 100644
--- a/addons/stock/test/stock_test.yml
+++ b/addons/stock/test/stock_test.yml
@@ -192,7 +192,7 @@
seller_ids:
- delay: 1
name: stock.res_partner_shawtrust0
- qty: 5.0
+ min_qty: 5.0
supply_method: buy
type: product
uom_id: product.product_uom_unit
@@ -213,7 +213,7 @@
seller_ids:
- delay: 1
name: res_partner_shawtrust0
- qty: 5.0
+ min_qty: 5.0
supply_method: buy
type: product
uom_id: product.product_uom_unit
diff --git a/addons/stock/wizard/stock_change_standard_price.py b/addons/stock/wizard/stock_change_standard_price.py
index 149b0b04e84..7d0be0b333b 100644
--- a/addons/stock/wizard/stock_change_standard_price.py
+++ b/addons/stock/wizard/stock_change_standard_price.py
@@ -26,7 +26,10 @@ class change_standard_price(osv.osv_memory):
_name = "stock.change.standard.price"
_description = "Change Standard Price"
_columns = {
- 'new_price': fields.float('Price', required=True),
+ 'new_price': fields.float('Price', required=True,
+ help="If cost price is increased, stock variation account will be debited "
+ "and stock output account will be credited with the value = (difference of amount * quantity available).\n"
+ "If cost price is decreased, stock variation account will be creadited and stock input account will be debited."),
'stock_account_input':fields.many2one('account.account', 'Stock Input Account'),
'stock_account_output':fields.many2one('account.account', 'Stock Output Account'),
'stock_journal':fields.many2one('account.journal', 'Stock journal', required=True),
diff --git a/addons/stock/wizard/stock_change_standard_price_view.xml b/addons/stock/wizard/stock_change_standard_price_view.xml
index 374a34b4b6a..b46829b1a0a 100644
--- a/addons/stock/wizard/stock_change_standard_price_view.xml
+++ b/addons/stock/wizard/stock_change_standard_price_view.xml
@@ -7,7 +7,9 @@
form
-
+
+
+
diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py
index 67dd232c168..044dc131df0 100644
--- a/addons/stock/wizard/stock_partial_move.py
+++ b/addons/stock/wizard/stock_partial_move.py
@@ -68,8 +68,7 @@ class stock_partial_move(osv.osv_memory):
move_ids = move_obj.search(cr, uid, [('id','in',move_ids)])
_moves_arch_lst = """
-
-
+
diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py
index 4083785a8d1..5cad3807ab3 100644
--- a/addons/stock/wizard/stock_partial_picking.py
+++ b/addons/stock/wizard/stock_partial_picking.py
@@ -48,6 +48,8 @@ class stock_partial_picking(osv.osv_memory):
self._columns['move%s_product_qty'%(m.id)] = fields.float("Quantity")
if 'move%s_product_uom'%(m.id) not in self._columns:
self._columns['move%s_product_uom'%(m.id)] = fields.many2one('product.uom',string="Product UOM")
+ if 'move%s_prodlot_id'%(m.id) not in self._columns:
+ self._columns['move%s_prodlot_id'%(m.id)] = fields.many2one('stock.production.lot', string="Lot")
if (m.product_id.cost_method == 'average'):
if 'move%s_product_price'%(m.id) not in self._columns:
@@ -62,8 +64,9 @@ class stock_partial_picking(osv.osv_memory):
picking_ids = context.get('active_ids', False)
_moves_arch_lst = """
-
-
+
+
+
"""
_moves_fields = result['fields']
@@ -91,6 +94,12 @@ class stock_partial_picking(osv.osv_memory):
'relation': 'product.uom',
'required' : True,
'readonly' : True,
+ },
+ 'move%s_prodlot_id'%(m.id): {
+ 'string': _('Production Lot'),
+ 'type': 'many2one',
+ 'relation': 'stock.production.lot',
+ 'readonly': True,
}
})
@@ -99,7 +108,8 @@ class stock_partial_picking(osv.osv_memory):
- """%(m.id, m.id, m.id)
+
+ """%(m.id, m.id, m.id, m.id)
if (m.product_id.cost_method == 'average'):
_moves_fields.update({
'move%s_product_price'%(m.id) : {
@@ -161,6 +171,8 @@ class stock_partial_picking(osv.osv_memory):
res['move%s_product_qty'%(m.id)] = m.product_qty
if 'move%s_product_uom'%(m.id) in fields:
res['move%s_product_uom'%(m.id)] = m.product_uom.id
+ if 'move%s_prodlot_id'%(m.id) in fields:
+ res['move%s_prodlot_id'%(m.id)] = m.prodlot_id.id
if (m.product_id.cost_method == 'average'):
currency = False
@@ -203,7 +215,8 @@ class stock_partial_picking(osv.osv_memory):
partial_datas['move%s'%(m.id)] = {
'product_id' : getattr(partial, 'move%s_product_id'%(m.id)).id,
'product_qty' : getattr(partial, 'move%s_product_qty'%(m.id)),
- 'product_uom' : getattr(partial, 'move%s_product_uom'%(m.id)).id
+ 'product_uom' : getattr(partial, 'move%s_product_uom'%(m.id)).id,
+ 'prodlot_id' : getattr(partial, 'move%s_prodlot_id'%(m.id)).id
}
if (m.product_id.cost_method == 'average'):
diff --git a/addons/stock_planning/__init__.py b/addons/stock_planning/__init__.py
index f0fea471a21..9873817f0f3 100644
--- a/addons/stock_planning/__init__.py
+++ b/addons/stock_planning/__init__.py
@@ -1,7 +1,8 @@
+# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL ().
+# Copyright (C) 2004-2010 Tiny SPRL ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -14,11 +15,12 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
import stock_planning
+import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_planning/__openerp__.py b/addons/stock_planning/__openerp__.py
index c03945785a1..10e461acdf0 100644
--- a/addons/stock_planning/__openerp__.py
+++ b/addons/stock_planning/__openerp__.py
@@ -1,7 +1,8 @@
+# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL ().
+# Copyright (C) 2004-2010 Tiny SPRL ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -14,7 +15,7 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -138,7 +139,14 @@ Remarks:
- When you wish to work with different periods for some part of products define two kinds of periods (fe. Weekly and Monthly) and use them for different products. Example: If you use always Weekly periods for Products A, and Monthly periods for Products B your all calculations will work correctly. You can also use different kind of periods for the same products from different warehouse or companies. But you cannot use overlapping periods for the same product, warehouse and company because results can be unpredictable. The same apply to Forecasts lines.
""",
"demo_xml":[],
- "update_xml":["security/ir.model.access.csv","stock_planning_view.xml"],
+ "update_xml": [
+ "security/ir.model.access.csv",
+ "stock_planning_view.xml",
+ "wizard/stock_planning_create_periods_view.xml",
+ "wizard/stock_planning_forecast_view.xml",
+ "wizard/stock_planning_createlines_view.xml",
+ ],
+ "test": ["test/stock_planning.yml"],
"active": False,
"installable": True,
}
diff --git a/addons/stock_planning/stock_planning.py b/addons/stock_planning/stock_planning.py
index e86d0fdd731..2e4f333b840 100644
--- a/addons/stock_planning/stock_planning.py
+++ b/addons/stock_planning/stock_planning.py
@@ -1,21 +1,20 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved
-# $Id$
+# Copyright (C) 2004-2010 Tiny SPRL ().
#
# 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.
+# 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 General Public License for more details.
+# GNU Affero General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
+# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
#
##############################################################################
@@ -27,7 +26,7 @@ from mx.DateTime import RelativeDateTime, now, DateTime, localtime
from osv import osv, fields
import netsvc
from tools.translate import _
-from tools import config
+#from tools import config
def rounding(fl, round_value):
@@ -35,85 +34,6 @@ def rounding(fl, round_value):
return fl
return round(fl / round_value) * round_value
-# Object creating periods quickly
-# changed that stop_date is created with hour 23:59:00 when it was 00:00:00 stop date was excluded from period
-class stock_period_createlines(osv.osv_memory):
- _name = "stock.period.createlines"
-
- def _get_new_period_start(self, cr, uid, context=None):
- cr.execute("select max(date_stop) from stock_period")
- result = cr.fetchone()
- last_date = result and result[0] or False
- if last_date:
- period_start = mx.DateTime.strptime(last_date,"%Y-%m-%d %H:%M:%S")+ RelativeDateTime(days=1)
- period_start = period_start - RelativeDateTime(hours=period_start.hour, minutes=period_start.minute, seconds=period_start.second)
- else:
- period_start = mx.DateTime.today()
- return period_start.strftime('%Y-%m-%d')
-
-
- _columns = {
- 'name': fields.char('Period Name', size=64),
- 'date_start': fields.date('Start Date', required=True),
- 'date_stop': fields.date('End Date', required=True),
- 'period_ids': fields.one2many('stock.period', 'planning_id', 'Periods'),
- }
- _defaults={
- 'date_start': _get_new_period_start,
- }
-
- def create_period_weekly(self, cr, uid, ids, context=None):
- res = self.create_period(cr, uid, ids, context, 6, 'Weekly')
- return {
- 'view_type': 'form',
- "view_mode": 'tree',
- 'res_model': 'stock.period',
- 'type': 'ir.actions.act_window',
- }
-
- def create_period_monthly(self,cr, uid, ids, interval=1, context=None):
- for p in self.browse(cr, uid, ids, context=context):
- dt = p.date_start
- ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d')
- while ds.strftime('%Y-%m-%d') < p.date_stop:
- de = ds + RelativeDateTime(months=interval, minutes=-1)
- self.pool.get('stock.period').create(cr, uid, {
- 'name': ds.strftime('%Y/%m'),
- 'date_start': ds.strftime('%Y-%m-%d'),
- 'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'),
- })
- ds = ds + RelativeDateTime(months=interval)
- return {
- 'view_type': 'form',
- "view_mode": 'tree',
- 'res_model': 'stock.period',
- 'type': 'ir.actions.act_window',
- }
-
- def create_period(self, cr, uid, ids, interval=0, name='Daily', context=None):
- for p in self.browse(cr, uid, ids, context=context):
- dt = p.date_start
- ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d')
- while ds.strftime('%Y-%m-%d') < p.date_stop:
- de = ds + RelativeDateTime(days=interval, minutes =-1)
- if name =='Daily':
- new_name=de.strftime('%Y-%m-%d')
- if name =="Weekly":
- new_name = de.strftime('%Y, week %W')
- self.pool.get('stock.period').create(cr, uid, {
- 'name': new_name,
- 'date_start': ds.strftime('%Y-%m-%d'),
- 'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'),
- })
- ds = ds + RelativeDateTime(days=interval) + 1
- return {
- 'view_type': 'form',
- "view_mode": 'tree',
- 'res_model': 'stock.period',
- 'type': 'ir.actions.act_window',
- }
-stock_period_createlines()
-
# Periods have no company_id field as they can be shared across similar companies.
# If somone thinks different it can be improved.
class stock_period(osv.osv):
@@ -131,104 +51,6 @@ class stock_period(osv.osv):
stock_period()
-# Creates forecasts records for products from selected Product Category for selected 'Warehouse - Period'
-# Object added by contributor in ver 1.1
-class stock_sale_forecast_createlines(osv.osv_memory):
- _name = "stock.sale.forecast.createlines"
- _description = "stock.sale.forecast.createlines"
-
-# FIXME Add some period sugestion like below
-
-# def _get_latest_period(self,cr,uid,context={}):
-# cr.execute("select max(date_stop) from stock_period")
-# result=cr.fetchone()
-# return result and result[0] or False
-
-
- _columns = {
- 'company_id': fields.many2one('res.company', 'Company', required=True, select=1),
- 'warehouse_id1': fields.many2one('stock.warehouse' , 'Warehouse', required=True, \
- help='Warehouse which forecasts will concern. '\
- 'If during stock planning you will need sales forecast for all warehouses choose any warehouse now.'),
- 'period_id1': fields.many2one('stock.period' , 'Period', required=True, help = 'Period which forecasts will concern.' ),
- 'product_categ_id1': fields.many2one('product.category' , 'Product Category', required=True, \
- help ='Product Category of products which created forecasts will concern.'),
- 'copy_forecast': fields.boolean('Copy Last Forecast', help="Copy quantities from last Stock and Sale Forecast."),
- }
-
- _defaults = {
- 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.sale.forecast.createlines', context=c),
- }
-
- def create_forecast(self, cr, uid, ids, context=None):
- product_obj = self.pool.get('product.product')
- forecast_obj = self.pool.get('stock.sale.forecast')
- mod_obj = self.pool.get('ir.model.data')
- prod_categ_obj = self.pool.get('product.category')
- template_obj = self.pool.get('product.template')
- for f in self.browse(cr, uid, ids, context=context):
- categ_ids = f.product_categ_id1.id and [f.product_categ_id1.id] or []
- prod_categ_ids = prod_categ_obj.search(cr, uid, [('parent_id','child_of', categ_ids)])
- templates_ids = template_obj.search(cr, uid, [('categ_id','in',prod_categ_ids)])
- products_ids = product_obj.search(cr, uid, [('product_tmpl_id','in',templates_ids)])
- if len(products_ids) == 0:
- raise osv.except_osv(_('Error !'), _('No products in selected category !'))
- copy = f.copy_forecast
- for p in product_obj.browse(cr, uid, products_ids,{}):
- if len(forecast_obj.search(cr, uid, [('product_id','=',p.id) , \
- ('period_id','=',f.period_id1.id), \
- ('user_id','=',uid), \
- ('warehouse_id','=',f.warehouse_id1.id)]))== 0:
- forecast_qty = 0.0
-# Not sure if it is expected quantity for this feature (copying forecast from previous period)
-# because it can take incidental forecast of this warehouse, this product and this user (creating, writing or validating forecast).
-# It takes only one forecast line (no sum). If user creates only one forecast per period it will be OK. If not I have no idea how to count it.
-
- prod_uom = False
- if copy:
- cr.execute("SELECT period.date_stop, forecast.product_qty, forecast.product_uom \
- FROM stock_sale_forecast AS forecast \
- LEFT JOIN stock_period AS period \
- ON forecast.period_id = period.id \
- WHERE (forecast.user_id = %s OR forecast.create_uid = %s OR forecast.write_uid = %s) \
- AND forecast.warehouse_id = %s AND forecast.product_id = %s \
- AND period.date_stop < %s \
- ORDER BY period.date_stop DESC",
- (uid, uid, uid, f.warehouse_id1.id, p.id, f.period_id1.date_stop) )
- ret = cr.fetchone()
- if ret:
- forecast_qty = ret[1]
- prod_uom = ret[2]
- prod_uom = prod_uom or p.uom_id.id
- prod_uos_categ = False
- if p.uos_id:
- prod_uos_categ = p.uos_id.category_id.id
- forecast_obj.create(cr, uid, {
- 'company_id': f.warehouse_id1.company_id.id,
- 'period_id': f.period_id1.id,
- 'warehouse_id': f.warehouse_id1.id,
- 'product_id': p.id,
- 'product_qty': forecast_qty,
- 'product_amt': 0.0,
- 'product_uom': prod_uom,
- 'active_uom': prod_uom,
- 'product_uom_categ': p.uom_id.category_id.id,
- 'product_uos_categ': prod_uos_categ,
- })
- result = mod_obj._get_id(cr, uid, 'stock_planning', 'view_stock_sale_forecast_filter')
- id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
-
- return {
- 'view_type': 'form',
- "view_mode": 'tree',
- 'res_model': 'stock.sale.forecast',
- 'type': 'ir.actions.act_window',
- 'search_view_id': id['res_id'],
- }
-
-stock_sale_forecast_createlines()
-
-
# Stock and Sales Forecast object. Previously stock_planning_sale_prevision.
# A lot of changes in 1.1
class stock_sale_forecast(osv.osv):
@@ -476,124 +298,6 @@ class stock_sale_forecast(osv.osv):
stock_sale_forecast()
-# Creates stock planning records for products from selected Product Category for selected 'Warehouse - Period'
-# Object added by contributor in ver 1.1
-class stock_planning_createlines(osv.osv_memory):
- _name = "stock.planning.createlines"
-
- def onchange_company(self, cr, uid, ids, company_id=False):
- result = {}
- if company_id:
- result['warehouse_id2'] = False
- return {'value': result}
-
- _columns = {
- 'company_id': fields.many2one('res.company', 'Company', required=True),
- 'period_id2': fields.many2one('stock.period' , 'Period', required=True, help = 'Period which planning will concern.'),
- 'warehouse_id2': fields.many2one('stock.warehouse' , 'Warehouse', required=True, help = 'Warehouse which planning will concern.'),
- 'product_categ_id2': fields.many2one('product.category' , 'Product Category', \
- help = 'Planning will be created for products from Product Category selected by this field. '\
- 'This field is ignored when you check \"All Forecasted Product\" box.' ),
- 'forecasted_products': fields.boolean('All Products with Forecast', \
- help = "Check this box to create planning for all products having any forecast for selected Warehouse and Period. "\
- "Product Category field will be ignored."),
- }
-
- _defaults = {
- 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.planning', context=c),
- }
-
- def create_planning(self,cr, uid, ids, context=None):
- if context is None:
- context = {}
- product_obj = self.pool.get('product.product')
- planning_obj = self.pool.get('stock.planning')
- mod_obj = self.pool.get('ir.model.data')
- for f in self.browse(cr, uid, ids, context=context):
- if f.forecasted_products:
- cr.execute("SELECT product_id \
- FROM stock_sale_forecast \
- WHERE (period_id = %s) AND (warehouse_id = %s)", (f.period_id2.id, f.warehouse_id2.id))
- products_id1 = [x for x, in cr.fetchall()]
- else:
- prod_categ_obj = self.pool.get('product.category')
- template_obj = self.pool.get('product.template')
- categ_ids = f.product_categ_id2.id and [f.product_categ_id2.id] or []
- prod_categ_ids = prod_categ_obj.search(cr,uid,[('parent_id','child_of',categ_ids)])
- templates_ids = template_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)])
- products_id1 = product_obj.search(cr,uid,[('product_tmpl_id','in',templates_ids)])
- if len(products_id1)==0:
- raise osv.except_osv(_('Error !'), _('No forecasts for selected period or no products in selected category !'))
-
- for p in product_obj.browse(cr, uid, products_id1,context=context):
- if len(planning_obj.search(cr, uid, [('product_id','=',p.id),
- ('period_id','=',f.period_id2.id),
- ('warehouse_id','=',f.warehouse_id2.id)]))== 0:
- cr.execute("SELECT period.date_stop, planning.product_uom, planning.planned_outgoing, planning.to_procure, \
- planning.stock_only, planning.procure_to_stock, planning.confirmed_forecasts_only, \
- planning.supply_warehouse_id, planning.stock_supply_location \
- FROM stock_planning AS planning \
- LEFT JOIN stock_period AS period \
- ON planning.period_id = period.id \
- WHERE (planning.create_uid = %s OR planning.write_uid = %s) \
- AND planning.warehouse_id = %s AND planning.product_id = %s \
- AND period.date_stop < %s \
- ORDER BY period.date_stop DESC",
- (uid, uid, f.warehouse_id2.id, p.id, f.period_id2.date_stop) )
- ret=cr.fetchone()
-# forecast_qty = ret and ret[0] or 0.0
- if ret:
-# raise osv.except_osv(_('Error !'), _('ret is %s %s %s %s %s %s')%(ret[0],ret[2],ret[3],ret[4],ret[5],ret[6],))
- prod_uom = ret[1]
- planned_out = ret[2]
- to_procure = ret[3]
- stock_only = ret[4]
- procure_to_stock = ret[5]
- confirmed_forecasts_only = ret[6]
- supply_warehouse_id = ret[7]
- stock_supply_location = ret[8]
- else:
- prod_uom = p.uom_id.id
- planned_out = False
- to_procure = False
- stock_only = False
- procure_to_stock = False
- confirmed_forecasts_only = False
- supply_warehouse_id = False
- stock_supply_location = False
- prod_uos_categ = False
- if p.uos_id:
- prod_uos_categ = p.uos_id.category_id.id
- planning_obj.create(cr, uid, {
- 'company_id' : f.warehouse_id2.company_id.id,
- 'period_id': f.period_id2.id,
- 'warehouse_id' : f.warehouse_id2.id,
- 'product_id': p.id,
- 'product_uom' : prod_uom,
- 'product_uom_categ' : p.uom_id.category_id.id,
- 'product_uos_categ' : prod_uos_categ,
- 'active_uom' : prod_uom,
- 'planned_outgoing': planned_out,
- 'to_procure': to_procure,
- 'stock_only': stock_only,
- 'procure_to_stock': procure_to_stock,
- 'confirmed_forecasts_only': confirmed_forecasts_only,
- 'supply_warehouse_id': supply_warehouse_id,
- 'stock_supply_location': stock_supply_location,
-
- })
- result = mod_obj._get_id(cr, uid, 'stock_planning', 'view_stock_planning_filter')
- id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
- return {
- 'view_type': 'form',
- "view_mode": 'tree',
- 'res_model': 'stock.planning',
- 'type': 'ir.actions.act_window',
- 'search_view_id': id['res_id'],
- }
-stock_planning_createlines()
-
-
# The main Stock Planning object
# A lot of changes by contributor in ver 1.1
class stock_planning(osv.osv):
diff --git a/addons/stock_planning/stock_planning_view.xml b/addons/stock_planning/stock_planning_view.xml
index 0bb9222df35..10297a8ef81 100644
--- a/addons/stock_planning/stock_planning_view.xml
+++ b/addons/stock_planning/stock_planning_view.xml
@@ -1,47 +1,11 @@
-
+
-
-
-
- stock.period.createlines.form
- stock.period.createlines
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Stock and Sales Planning Periods
- stock.period.createlines
- form
- form
-
- new
-
-
-
-
-
+
stock.period.form
@@ -78,53 +42,12 @@
tree,form
-
-
-
-
- stock.sale.forecast.createlines
- stock.sale.forecast.createlines
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create Sales Forecasts
- stock.sale.forecast.createlines
- form
- form
-
- new
-
-
-
-
-
stock.sale.forecast.form
stock.sale.forecast
@@ -132,7 +55,7 @@
-
+
-
-
+
+
-
-
+
+
@@ -155,7 +78,7 @@
-
+
@@ -199,7 +122,6 @@
-
@@ -209,15 +131,14 @@
stock.sale.forecast
tree
-
-
-
-
+
-
+
+
+
@@ -234,9 +155,13 @@
+
+
+
+
-
-
+
stock.sale.forecast.list.select
stock.sale.forecast
search
@@ -275,51 +200,10 @@
parent="menu_stock_sale_forecast"
action="action_view_stock_sale_forecast_form"/>
-
-
+
+
-
- stock.planning.createlines.form
- stock.planning.createlines
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create Stock Planning Lines
- stock.planning.createlines
- form
- form
-
- new
-
-
-
-
-
-
stock.planning.form
stock.planning
@@ -330,14 +214,13 @@
-
-
-
+
+
@@ -346,8 +229,6 @@
-
-
@@ -415,7 +296,6 @@
tree
-
@@ -423,6 +303,7 @@
+
diff --git a/addons/stock_planning/test/stock_planning.yml b/addons/stock_planning/test/stock_planning.yml
new file mode 100644
index 00000000000..178c361a10c
--- /dev/null
+++ b/addons/stock_planning/test/stock_planning.yml
@@ -0,0 +1,150 @@
+-
+ In order to test the flow of stock planning module. I will create forecast periods,
+ stock forecast and then with master procurement schedule.
+-
+ I create weekly stock periods for the month of July.
+-
+ I create stock period for the first week of July.
+-
+ !record {model: stock.period, id: stock_period_01}:
+ date_start: '2010-07-01 00:00:00'
+ date_stop: '2010/07/06 23:59:00'
+ name: 2010, week 27
+-
+ I create stock period for the second week of July.
+-
+ !record {model: stock.period, id: stock_period_02}:
+ date_start: '2010/07/07 00:00:00'
+ date_stop: '2010/07/12 23:59:00'
+ name: 2010, week 28
+-
+ I create stock period for the third week of July.
+-
+ !record {model: stock.period, id: stock_period_03}:
+ date_start: '2010/07/15 00:00:00'
+ date_stop: '2010/07/20 23:59:00'
+ name: 2010, week 29
+-
+ I create stock period for the fourth week of July.
+-
+ !record {model: stock.period, id: stock_period_04}:
+ date_start: '2010/07/22 00:00:00'
+ date_stop: '2010/07/27 23:59:00'
+ name: 2010, week 30
+-
+ I create stock period for the fifth week of July.
+-
+ !record {model: stock.period, id: stock_period_05}:
+ date_start: '2010/07/29 00:00:00'
+ date_stop: '2010/07/31 23:59:00'
+ name: 2010, week 31
+-
+ Now I create the forecast for this period for all PCs.
+-
+ !record {model: stock.sale.forecast.createlines, id: stock_sale_forecast_createlines_0}:
+ company_id: base.main_company
+ period_id: stock_period_03
+ product_categ_id: product.product_category_pc
+ warehouse_id: stock.warehouse0
+-
+ Performing an osv_memory action create_forecast on module stock.sale.forecast.createlines
+-
+ !python {model: stock.sale.forecast.createlines}: |
+ self.create_forecast(cr, uid, [ref("stock_sale_forecast_createlines_0")], {"lang":
+ 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("stock_planning.menu_stock_sale_forecast_createlines")],
+ "tz": False, "active_id": ref("stock_planning.menu_stock_sale_forecast_createlines"),
+ })
+-
+ I create a sale order for PC1-Basic PC and PC3-Medium PC.
+-
+ !record {model: sale.order, id: sale_order_so0}:
+ date_order: '2010-07-20'
+ invoice_quantity: order
+ name: SO006
+ order_line:
+ - name: '[PC1] Basic PC'
+ price_unit: 450.0
+ product_uom: product.product_uom_unit
+ product_uom_qty: 13.0
+ state: draft
+ delay: 2.0
+ product_id: product.product_product_pc1
+ product_uos_qty: 13.0
+ th_weight: 0.0
+ type: make_to_stock
+ - name: '[PC3] Medium PC'
+ price_unit: 900.0
+ product_uom: product.product_uom_unit
+ product_uom_qty: 5.0
+ state: draft
+ delay: 3.0
+ product_id: product.product_product_pc3
+ product_uos_qty: 5.0
+ th_weight: 0.0
+ type: make_to_stock
+ order_policy: manual
+ partner_id: base.res_partner_desertic_hispafuentes
+ partner_invoice_id: base.res_partner_address_3000
+ partner_order_id: base.res_partner_address_3000
+ partner_shipping_id: base.res_partner_address_3000
+ picking_policy: direct
+ pricelist_id: product.list0
+ shop_id: sale.shop
+-
+ Now I want to calculate sales history for both the products PC1-Basic PC and PC3-Medium PC and forecast the quantity.
+-
+ !python {model: stock.sale.forecast}: |
+ forecast_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_pc1'))])
+ write_dict = {'product_qty': 30.0,
+ 'analyzed_dept_id': ref("hr.dep_sales"),
+ 'analyzed_period1_id': ref("stock_period_03"),
+ 'analyzed_user_id': ref("base.user_root"),
+ 'analyzed_warehouse_id': ref("stock.warehouse0")}
+ self.write(cr, uid, forecast_ids, write_dict)
+ self.calculate_sales_history(cr, uid, forecast_ids, {"lang": "en_US", "tz":
+ False, "search_default_create_uid": 1, "active_model": "ir.ui.menu", "department_id":
+ False, "active_ids": [ref("stock_planning.menu_stock_sale_forecast_all")], "active_id":
+ ref("stock_planning.menu_stock_sale_forecast_all"), })
+-
+ I create Master procurement schedule for the third week of July.
+-
+ !record {model: stock.planning.createlines, id: stock_planning_createlines_0}:
+ company_id: base.main_company
+ period_id: stock_period_03
+ product_categ_id: product.product_category_pc
+ warehouse_id: stock.warehouse0
+-
+ Performing an osv_memory action create_planning on module stock.planning.createlines
+-
+ !python {model: stock.planning.createlines}: |
+ self.create_planning(cr, uid, [ref("stock_planning_createlines_0")], {"lang":
+ "en_US", "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("stock_planning.menu_stock_planning_createlines")],
+ "active_id": ref("stock_planning.menu_stock_planning_createlines"), "department_id":
+ False, })
+-
+ I calculate the planning in master procurement schedule.
+-
+ !python {model: stock.planning}: |
+ planning_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_pc1')),('period_id','=',ref('stock_period_03'))])
+ self.write(cr, uid, planning_ids, {'to_procure': 30.0,'planned_outgoing': 40.0})
+ self.calculate_planning(cr, uid, planning_ids, {"lang": "en_US", "tz": False,
+ "active_model": "ir.ui.menu", "active_ids": [ref("stock_planning.menu_stock_planning")],
+ "active_id": ref("stock_planning.menu_stock_planning"), "department_id": False,
+ })
+-
+ I create a procurement order for the incoming products left.
+-
+ !python {model: stock.planning}: |
+ planning_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_pc1')),('period_id','=',ref('stock_period_03'))])
+ plann = self.browse(cr, uid, planning_ids)
+ assert plann[0].incoming_left, 'Incoming Left must be greater than 0 !'
+ self.procure_incomming_left(cr, uid, planning_ids, {"lang": 'en_US', "tz":
+ False, "active_model": "ir.ui.menu", "active_ids": [ref("stock_planning.menu_stock_planning")],
+ "active_id": ref("stock_planning.menu_stock_planning"), "department_id": False,
+ })
+-
+ I check whether the procurement orders are created or not.
+-
+ !python {model: procurement.order}: |
+ proc_ids = self.search(cr, uid, [('origin','=','MPS(admin) 2010, week 29'),('product_id','=',ref("product.product_product_pc1"))])
+ assert proc_ids,'No Procurements!'
diff --git a/addons/profile_manufacturing/__init__.py b/addons/stock_planning/wizard/__init__.py
similarity index 89%
rename from addons/profile_manufacturing/__init__.py
rename to addons/stock_planning/wizard/__init__.py
index d9a31f5fb06..1e9d74d0394 100644
--- a/addons/profile_manufacturing/__init__.py
+++ b/addons/stock_planning/wizard/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,10 +15,10 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
-import profile_manufacturing
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+import stock_planning_create_periods
+import stock_planning_forecast
+import stock_planning_createlines
diff --git a/addons/stock_planning/wizard/stock_planning_create_periods.py b/addons/stock_planning/wizard/stock_planning_create_periods.py
new file mode 100644
index 00000000000..fe953806dcc
--- /dev/null
+++ b/addons/stock_planning/wizard/stock_planning_create_periods.py
@@ -0,0 +1,102 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import time
+import mx.DateTime
+from mx.DateTime import RelativeDateTime, now, DateTime, localtime
+
+from osv import osv, fields
+
+# Object creating periods quickly
+# changed that stop_date is created with hour 23:59:00 when it was 00:00:00 stop date was excluded from period
+class stock_period_createlines(osv.osv_memory):
+ _name = "stock.period.createlines"
+
+ def _get_new_period_start(self, cr, uid, context=None):
+ cr.execute("select max(date_stop) from stock_period")
+ result = cr.fetchone()
+ last_date = result and result[0] or False
+ if last_date:
+ period_start = mx.DateTime.strptime(last_date,"%Y-%m-%d %H:%M:%S")+ RelativeDateTime(days=1)
+ period_start = period_start - RelativeDateTime(hours=period_start.hour, minutes=period_start.minute, seconds=period_start.second)
+ else:
+ period_start = mx.DateTime.today()
+ return period_start.strftime('%Y-%m-%d')
+
+
+ _columns = {
+ 'name': fields.char('Period Name', size=64),
+ 'date_start': fields.date('Start Date', required=True),
+ 'date_stop': fields.date('End Date', required=True),
+ 'period_ids': fields.one2many('stock.period', 'planning_id', 'Periods'),
+ }
+ _defaults={
+ 'date_start': _get_new_period_start,
+ }
+
+ def create_stock_periods(self, cr, uid, ids, context=None):
+ interval = context.get('interval',0)
+ name = context.get('name','Daily')
+ period_obj = self.pool.get('stock.period')
+ lines = []
+ for p in self.browse(cr, uid, ids, context=context):
+ dt = p.date_start
+ ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d')
+ while ds.strftime('%Y-%m-%d') < p.date_stop:
+ if name =='Daily':
+ de = ds + RelativeDateTime(days=interval, minutes =-1)
+ new_name = de.strftime('%Y-%m-%d')
+ new_id = period_obj.create(cr, uid, {
+ 'name': new_name,
+ 'date_start': ds.strftime('%Y-%m-%d'),
+ 'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'),
+ })
+ ds = ds + RelativeDateTime(days=interval) + 1
+ if name =="Weekly":
+ de = ds + RelativeDateTime(days=interval, minutes =-1)
+ new_name = de.strftime('%Y, week %W')
+ new_id = period_obj.create(cr, uid, {
+ 'name': new_name,
+ 'date_start': ds.strftime('%Y-%m-%d'),
+ 'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'),
+ })
+ ds = ds + RelativeDateTime(days=interval) + 1
+ if name == "Monthly":
+ de = ds + RelativeDateTime(months=interval, minutes=-1)
+ new_name = ds.strftime('%Y/%m')
+ new_id =period_obj.create(cr, uid, {
+ 'name': new_name,
+ 'date_start': ds.strftime('%Y-%m-%d'),
+ 'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'),
+ })
+ ds = ds + RelativeDateTime(months=interval)
+ lines.append(new_id)
+ return {
+ 'domain': "[('id','in', ["+','.join(map(str, lines))+"])]",
+ 'view_type': 'form',
+ "view_mode": 'tree, form',
+ 'res_model': 'stock.period',
+ 'type': 'ir.actions.act_window',
+ }
+
+stock_period_createlines()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_planning/wizard/stock_planning_create_periods_view.xml b/addons/stock_planning/wizard/stock_planning_create_periods_view.xml
new file mode 100644
index 00000000000..4d0f9ae6a82
--- /dev/null
+++ b/addons/stock_planning/wizard/stock_planning_create_periods_view.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ stock.period.createlines.form
+ stock.period.createlines
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Stock and Sales Planning Periods
+ stock.period.createlines
+ form
+ form
+
+ new
+
+
+
+
+
diff --git a/addons/stock_planning/wizard/stock_planning_createlines.py b/addons/stock_planning/wizard/stock_planning_createlines.py
new file mode 100644
index 00000000000..a0aa1e85249
--- /dev/null
+++ b/addons/stock_planning/wizard/stock_planning_createlines.py
@@ -0,0 +1,146 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from osv import osv, fields
+from tools.translate import _
+
+# Creates stock planning records for products from selected Product Category for selected 'Warehouse - Period'
+# Object added by contributor in ver 1.1
+class stock_planning_createlines(osv.osv_memory):
+ _name = "stock.planning.createlines"
+
+ def onchange_company(self, cr, uid, ids, company_id=False):
+ result = {}
+ if company_id:
+ result['warehouse_id'] = False
+ return {'value': result}
+
+ _columns = {
+ 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'period_id': fields.many2one('stock.period' , 'Period', required=True, help = 'Period which planning will concern.'),
+ 'warehouse_id': fields.many2one('stock.warehouse' , 'Warehouse', required=True, help = 'Warehouse which planning will concern.'),
+ 'product_categ_id': fields.many2one('product.category' , 'Product Category', \
+ help = 'Planning will be created for products from Product Category selected by this field. '\
+ 'This field is ignored when you check \"All Forecasted Product\" box.' ),
+ 'forecasted_products': fields.boolean('All Products with Forecast', \
+ help = "Check this box to create planning for all products having any forecast for selected Warehouse and Period. "\
+ "Product Category field will be ignored."),
+ }
+
+ _defaults = {
+ 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.planning', context=c),
+ }
+
+ def create_planning(self,cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ product_obj = self.pool.get('product.product')
+ planning_obj = self.pool.get('stock.planning')
+ mod_obj = self.pool.get('ir.model.data')
+ prod_categ_obj = self.pool.get('product.category')
+ template_obj = self.pool.get('product.template')
+ planning_lines = []
+ for f in self.browse(cr, uid, ids, context=context):
+ if f.forecasted_products:
+ cr.execute("SELECT product_id \
+ FROM stock_sale_forecast \
+ WHERE (period_id = %s) AND (warehouse_id = %s)", (f.period_id2.id, f.warehouse_id2.id))
+ products_id1 = [x for x, in cr.fetchall()]
+ else:
+ categ_ids = f.product_categ_id.id and [f.product_categ_id.id] or []
+ prod_categ_ids = prod_categ_obj.search(cr,uid,[('parent_id','child_of',categ_ids)])
+ templates_ids = template_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)])
+ products_id1 = product_obj.search(cr,uid,[('product_tmpl_id','in',templates_ids)])
+ if len(products_id1)==0:
+ raise osv.except_osv(_('Error !'), _('No forecasts for selected period or no products in selected category !'))
+
+ for p in product_obj.browse(cr, uid, products_id1,context=context):
+ if len(planning_obj.search(cr, uid, [('product_id','=',p.id),
+ ('period_id','=',f.period_id.id),
+ ('warehouse_id','=',f.warehouse_id.id)]))== 0:
+ cr.execute("SELECT period.date_stop, planning.product_uom, planning.planned_outgoing, planning.to_procure, \
+ planning.stock_only, planning.procure_to_stock, planning.confirmed_forecasts_only, \
+ planning.supply_warehouse_id, planning.stock_supply_location \
+ FROM stock_planning AS planning \
+ LEFT JOIN stock_period AS period \
+ ON planning.period_id = period.id \
+ WHERE (planning.create_uid = %s OR planning.write_uid = %s) \
+ AND planning.warehouse_id = %s AND planning.product_id = %s \
+ AND period.date_stop < %s \
+ ORDER BY period.date_stop DESC",
+ (uid, uid, f.warehouse_id.id, p.id, f.period_id.date_stop) )
+ ret=cr.fetchone()
+# forecast_qty = ret and ret[0] or 0.0
+ if ret:
+# raise osv.except_osv(_('Error !'), _('ret is %s %s %s %s %s %s')%(ret[0],ret[2],ret[3],ret[4],ret[5],ret[6],))
+ prod_uom = ret[1]
+ planned_out = ret[2]
+ to_procure = ret[3]
+ stock_only = ret[4]
+ procure_to_stock = ret[5]
+ confirmed_forecasts_only = ret[6]
+ supply_warehouse_id = ret[7]
+ stock_supply_location = ret[8]
+ else:
+ prod_uom = p.uom_id.id
+ planned_out = False
+ to_procure = False
+ stock_only = False
+ procure_to_stock = False
+ confirmed_forecasts_only = False
+ supply_warehouse_id = False
+ stock_supply_location = False
+ prod_uos_categ = False
+ if p.uos_id:
+ prod_uos_categ = p.uos_id.category_id.id
+ planning_lines.append(planning_obj.create(cr, uid, {
+ 'company_id' : f.warehouse_id.company_id.id,
+ 'period_id': f.period_id.id,
+ 'warehouse_id' : f.warehouse_id.id,
+ 'product_id': p.id,
+ 'product_uom' : prod_uom,
+ 'product_uom_categ' : p.uom_id.category_id.id,
+ 'product_uos_categ' : prod_uos_categ,
+ 'active_uom' : prod_uom,
+ 'planned_outgoing': planned_out,
+ 'to_procure': to_procure,
+ 'stock_only': stock_only,
+ 'procure_to_stock': procure_to_stock,
+ 'confirmed_forecasts_only': confirmed_forecasts_only,
+ 'supply_warehouse_id': supply_warehouse_id,
+ 'stock_supply_location': stock_supply_location,
+
+ }))
+ result = mod_obj._get_id(cr, uid, 'stock_planning', 'view_stock_planning_filter')
+ id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
+
+ return {
+ 'domain': "[('id','in', ["+','.join(map(str, planning_lines))+"])]",
+ 'view_type': 'form',
+ "view_mode": 'tree, form',
+ 'res_model': 'stock.planning',
+ 'type': 'ir.actions.act_window',
+ 'search_view_id': id['res_id'],
+ }
+
+stock_planning_createlines()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_planning/wizard/stock_planning_createlines_view.xml b/addons/stock_planning/wizard/stock_planning_createlines_view.xml
new file mode 100644
index 00000000000..7dc4504daef
--- /dev/null
+++ b/addons/stock_planning/wizard/stock_planning_createlines_view.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+ stock.planning.createlines.form
+ stock.planning.createlines
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create Stock Planning Lines
+ stock.planning.createlines
+ form
+ form
+
+ new
+
+
+
+
+
diff --git a/addons/stock_planning/wizard/stock_planning_forecast.py b/addons/stock_planning/wizard/stock_planning_forecast.py
new file mode 100644
index 00000000000..b261d8ffc72
--- /dev/null
+++ b/addons/stock_planning/wizard/stock_planning_forecast.py
@@ -0,0 +1,123 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from osv import osv, fields
+
+# Creates forecasts records for products from selected Product Category for selected 'Warehouse - Period'
+# Object added by contributor in ver 1.1
+class stock_sale_forecast_createlines(osv.osv_memory):
+ _name = "stock.sale.forecast.createlines"
+ _description = "stock.sale.forecast.createlines"
+
+# FIXME Add some period sugestion like below
+
+# def _get_latest_period(self,cr,uid,context={}):
+# cr.execute("select max(date_stop) from stock_period")
+# result=cr.fetchone()
+# return result and result[0] or False
+
+
+ _columns = {
+ 'company_id': fields.many2one('res.company', 'Company', required=True, select=1),
+ 'warehouse_id': fields.many2one('stock.warehouse' , 'Warehouse', required=True, \
+ help='Warehouse which forecasts will concern. '\
+ 'If during stock planning you will need sales forecast for all warehouses choose any warehouse now.'),
+ 'period_id': fields.many2one('stock.period' , 'Period', required=True, help = 'Period which forecasts will concern.' ),
+ 'product_categ_id': fields.many2one('product.category' , 'Product Category', required=True, \
+ help ='Product Category of products which created forecasts will concern.'),
+ 'copy_forecast': fields.boolean('Copy Last Forecast', help="Copy quantities from last Stock and Sale Forecast."),
+ }
+
+ _defaults = {
+ 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.sale.forecast.createlines', context=c),
+ }
+
+ def create_forecast(self, cr, uid, ids, context=None):
+ product_obj = self.pool.get('product.product')
+ forecast_obj = self.pool.get('stock.sale.forecast')
+ mod_obj = self.pool.get('ir.model.data')
+ prod_categ_obj = self.pool.get('product.category')
+ template_obj = self.pool.get('product.template')
+ forecast_lines = []
+ for f in self.browse(cr, uid, ids, context=context):
+ categ_ids = f.product_categ_id.id and [f.product_categ_id.id] or []
+ prod_categ_ids = prod_categ_obj.search(cr, uid, [('parent_id','child_of', categ_ids)])
+ templates_ids = template_obj.search(cr, uid, [('categ_id','in',prod_categ_ids)])
+ products_ids = product_obj.search(cr, uid, [('product_tmpl_id','in',templates_ids)])
+ if len(products_ids) == 0:
+ raise osv.except_osv(_('Error !'), _('No products in selected category !'))
+ copy = f.copy_forecast
+ for p in product_obj.browse(cr, uid, products_ids,{}):
+ if len(forecast_obj.search(cr, uid, [('product_id','=',p.id) , \
+ ('period_id','=',f.period_id.id), \
+ ('user_id','=',uid), \
+ ('warehouse_id','=',f.warehouse_id.id)]))== 0:
+ forecast_qty = 0.0
+# Not sure if it is expected quantity for this feature (copying forecast from previous period)
+# because it can take incidental forecast of this warehouse, this product and this user (creating, writing or validating forecast).
+# It takes only one forecast line (no sum). If user creates only one forecast per period it will be OK. If not I have no idea how to count it.
+
+ prod_uom = False
+ if copy:
+ cr.execute("SELECT period.date_stop, forecast.product_qty, forecast.product_uom \
+ FROM stock_sale_forecast AS forecast \
+ LEFT JOIN stock_period AS period \
+ ON forecast.period_id = period.id \
+ WHERE (forecast.user_id = %s OR forecast.create_uid = %s OR forecast.write_uid = %s) \
+ AND forecast.warehouse_id = %s AND forecast.product_id = %s \
+ AND period.date_stop < %s \
+ ORDER BY period.date_stop DESC",
+ (uid, uid, uid, f.warehouse_id.id, p.id, f.period_id.date_stop) )
+ ret = cr.fetchone()
+ if ret:
+ forecast_qty = ret[1]
+ prod_uom = ret[2]
+ prod_uom = prod_uom or p.uom_id.id
+ prod_uos_categ = False
+ if p.uos_id:
+ prod_uos_categ = p.uos_id.category_id.id
+ forecast_lines.append(forecast_obj.create(cr, uid, {
+ 'company_id': f.warehouse_id.company_id.id,
+ 'period_id': f.period_id.id,
+ 'warehouse_id': f.warehouse_id.id,
+ 'product_id': p.id,
+ 'product_qty': forecast_qty,
+ 'product_amt': 0.0,
+ 'product_uom': prod_uom,
+ 'active_uom': prod_uom,
+ 'product_uom_categ': p.uom_id.category_id.id,
+ 'product_uos_categ': prod_uos_categ,
+ }))
+ result = mod_obj._get_id(cr, uid, 'stock_planning', 'view_stock_sale_forecast_filter')
+ id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
+
+ return {
+ 'domain': "[('id','in', ["+','.join(map(str, forecast_lines))+"])]",
+ 'view_type': 'form',
+ "view_mode": 'tree, form',
+ 'res_model': 'stock.sale.forecast',
+ 'type': 'ir.actions.act_window',
+ 'search_view_id': id['res_id'],
+ }
+
+stock_sale_forecast_createlines()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_planning/wizard/stock_planning_forecast_view.xml b/addons/stock_planning/wizard/stock_planning_forecast_view.xml
new file mode 100644
index 00000000000..9b87b5cdffd
--- /dev/null
+++ b/addons/stock_planning/wizard/stock_planning_forecast_view.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+ stock.sale.forecast.createlines
+ stock.sale.forecast.createlines
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create Sales Forecasts
+ stock.sale.forecast.createlines
+ form
+ form
+
+ new
+
+
+
+
+
+
+
+