diff --git a/addons/account/i18n/et.po b/addons/account/i18n/et.po index fbe197f9df7..69a3ef62f7a 100644 --- a/addons/account/i18n/et.po +++ b/addons/account/i18n/et.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-11-09 14:40+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2010-05-09 18:34+0000\n" +"Last-Translator: lyyser \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:06+0000\n" +"X-Launchpad-Export-Date: 2010-05-10 04:17+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -312,7 +312,7 @@ msgstr "Päritolu" #. module: account #: rml:account.analytic.account.journal:0 msgid "Move Name" -msgstr "" +msgstr "Liiguta nime" #. module: account #: xsl:account.transfer:0 @@ -422,12 +422,12 @@ msgstr "Negatiivne" #. module: account #: rml:account.partner.balance:0 msgid "(Account/Partner) Name" -msgstr "" +msgstr "(Konto/partneri) nimi" #. module: account #: selection:account.move,type:0 msgid "Contra" -msgstr "" +msgstr "Vastu" #. module: account #: field:account.analytic.account,state:0 @@ -454,7 +454,7 @@ msgstr "Eriline arvutamine" #. module: account #: model:process.transition,note:account.process_transition_confirmstatementfromdraft0 msgid "Confirm statement with/without reconciliation from draft statement" -msgstr "" +msgstr "Kinnita avaldus koos/ilma alates leppimise avalduse esitamisest" #. module: account #: wizard_view:account.move.bank.reconcile,init:0 @@ -784,7 +784,7 @@ msgstr "Partneri konto" #. module: account #: wizard_view:account.subscription.generate,init:0 msgid "Generate entries before:" -msgstr "" +msgstr "Genereerida kirjed enne:" #. module: account #: rml:account.analytic.account.cost_ledger:0 @@ -912,7 +912,7 @@ msgstr "" #. module: account #: wizard_field:account.open_closed_fiscalyear,init,fyear_id:0 msgid "Fiscal Year to Open" -msgstr "" +msgstr "Finantsaasta avada" #. module: account #: view:account.config.wizard:0 @@ -1320,7 +1320,7 @@ msgstr "" #. module: account #: view:wizard.company.setup:0 msgid "Message" -msgstr "" +msgstr "Sõnum" #. module: account #: model:process.node,note:account.process_node_supplierpaymentorder0 @@ -1387,7 +1387,7 @@ msgstr "Maksuread" #. module: account #: field:ir.sequence,fiscal_ids:0 msgid "Sequences" -msgstr "" +msgstr "Järjekorrad" #. module: account #: model:ir.actions.act_window,name:account.action_account_type_form @@ -1473,7 +1473,7 @@ msgstr "" #. module: account #: wizard_button:account.fiscalyear.close.state,init,close:0 msgid "Close states" -msgstr "" +msgstr "Suletud seisud" #. module: account #: model:ir.model,name:account.model_wizard_company_setup @@ -1704,7 +1704,7 @@ msgstr "Annab järjekorra kui näidatakse konto nimelirja tüüpe." #. module: account #: view:account.invoice:0 msgid "Re-Open" -msgstr "" +msgstr "Ava uuesti" #. module: account #: wizard_view:account.fiscalyear.close,init:0 @@ -1741,7 +1741,7 @@ msgstr "Kulupäevik perioodiks" #: model:ir.actions.act_window,name:account.action_bank_statement_tree2 #: model:ir.ui.menu,name:account.menu_bank_statement_tree2 msgid "New Statement" -msgstr "" +msgstr "Uus teatis" #. module: account #: wizard_field:account.analytic.account.chart,init,from_date:0 @@ -1984,7 +1984,7 @@ msgstr " Alguskuupäev" #. module: account #: wizard_view:account.analytic.account.journal.report,init:0 msgid "Analytic Journal Report" -msgstr "" +msgstr "Analüütilise päeviku raport" #. module: account #: model:ir.actions.act_window,name:account.action_invoice_tree3 @@ -2000,7 +2000,7 @@ msgstr "Maksu summa" #. module: account #: rml:account.analytic.account.quantity_cost_ledger:0 msgid "J.C./Move name" -msgstr "" +msgstr "J.C./liiguta nime" #. module: account #: field:account.journal.period,name:0 @@ -2058,7 +2058,7 @@ msgstr "" #. module: account #: wizard_view:account.automatic.reconcile,init:0 msgid "Options" -msgstr "" +msgstr "Seaded" #. module: account #: model:process.process,name:account.process_process_invoiceprocess0 @@ -2085,12 +2085,12 @@ msgstr "Kinnita kontoliikumised" #. module: account #: selection:account.subscription,period_type:0 msgid "days" -msgstr "" +msgstr "päevad" #. module: account #: selection:account.aged.trial.balance,init,direction_selection:0 msgid "Past" -msgstr "" +msgstr "Endine" #. module: account #: field:account.analytic.account,company_currency_id:0 @@ -2126,7 +2126,7 @@ msgstr "" #: model:ir.actions.act_window,name:account.action_subscription_form_new #: model:ir.ui.menu,name:account.menu_action_subscription_form_new msgid "New Subscription" -msgstr "" +msgstr "Uus tellimus" #. module: account #: view:account.payment.term:0 @@ -2136,7 +2136,7 @@ msgstr "" #. module: account #: view:account.analytic.line:0 msgid "Analytic Entry" -msgstr "" +msgstr "Analüütiline kirje" #. module: account #: view:res.company:0 field:res.company,overdue_msg:0 @@ -2162,7 +2162,7 @@ msgstr "" #. module: account #: field:account.invoice,address_contact_id:0 msgid "Contact Address" -msgstr "" +msgstr "Kontaktaadress" #. module: account #: view:account.fiscalyear:0 @@ -2172,7 +2172,7 @@ msgstr "Loo 3 kuupikkused perioodid" #. module: account #: view:account.invoice:0 msgid "(keep empty to use the current period)" -msgstr "" +msgstr "(jätke tühjaks, et kasutada praegusel perioodil)" #. module: account #: model:ir.actions.act_window,name:account.action_invoice_tree8 @@ -2188,7 +2188,7 @@ msgstr "" #. module: account #: selection:account.account.type,close_method:0 msgid "Detail" -msgstr "" +msgstr "Detail" #. module: account #: selection:account.account,type:0 @@ -2226,13 +2226,13 @@ msgstr "Kontoplaan" #. module: account #: model:account.journal,name:account.check_journal msgid "x Checks Journal" -msgstr "" +msgstr "x Tšekkide päevik" #. module: account #: model:ir.actions.wizard,name:account.wizard_generate_subscription #: model:ir.ui.menu,name:account.menu_generate_subscription msgid "Create subscription entries" -msgstr "" +msgstr "Koosta tellimus sissekanded" #. module: account #: wizard_field:account.fiscalyear.close,init,journal_id:0 @@ -2271,7 +2271,7 @@ msgstr "Kohustus" #. module: account #: selection:account.automatic.reconcile,init,power:0 msgid "2" -msgstr "" +msgstr "2" #. module: account #: wizard_view:account.chart,init:0 @@ -2306,7 +2306,7 @@ msgstr "Kuupäev" #. module: account #: field:account.invoice,reference_type:0 msgid "Reference Type" -msgstr "" +msgstr "Viite tüüp" #. module: account #: wizard_button:account.move.line.unreconcile,init,unrec:0 diff --git a/addons/account/i18n/it.po b/addons/account/i18n/it.po index d38b9e78254..3e1cac8d4b5 100644 --- a/addons/account/i18n/it.po +++ b/addons/account/i18n/it.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-04-26 07:46+0000\n" +"PO-Revision-Date: 2010-05-10 08:37+0000\n" "Last-Translator: eLBati - albatos.com \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-28 03:44+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:18+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -1192,7 +1192,7 @@ msgstr "Report tassa" #: wizard_button:account.analytic.account.chart,init,open:0 #: wizard_button:account.chart,init,open:0 msgid "Open Charts" -msgstr "Apri" +msgstr "Apri conti" #. module: account #: wizard_view:account.fiscalyear.close.state,init:0 @@ -4162,7 +4162,7 @@ msgstr "Fattura" #: wizard_button:account.open_closed_fiscalyear,init,open:0 #: wizard_button:account_use_models,create,open_move:0 msgid "Open" -msgstr "Apri" +msgstr "Aperto" #. module: account #: model:ir.ui.menu,name:account.next_id_29 diff --git a/addons/account/i18n/pl.po b/addons/account/i18n/pl.po index 95a498d8632..075000596c9 100644 --- a/addons/account/i18n/pl.po +++ b/addons/account/i18n/pl.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-05-05 14:54+0000\n" +"PO-Revision-Date: 2010-05-06 09:55+0000\n" "Last-Translator: Grzegorz Grzelak (Cirrus.pl) \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-05-06 04:04+0000\n" +"X-Launchpad-Export-Date: 2010-05-07 04:03+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -2768,7 +2768,7 @@ msgstr "O_k" #. module: account #: field:account.invoice,amount_untaxed:0 msgid "Untaxed" -msgstr "Nieopodatkowane" +msgstr "Netto" #. module: account #: model:ir.actions.report.xml,name:account.account_analytic_account_inverted_balance diff --git a/addons/account/i18n/zh_CN.po b/addons/account/i18n/zh_CN.po index 020de45656d..c89e2e107cf 100644 --- a/addons/account/i18n/zh_CN.po +++ b/addons/account/i18n/zh_CN.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.6\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-05-06 01:44+0000\n" +"PO-Revision-Date: 2010-05-06 05:39+0000\n" "Last-Translator: digitalsatori \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-05-06 04:04+0000\n" +"X-Launchpad-Export-Date: 2010-05-07 04:03+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account diff --git a/addons/account_report/account_report.xml b/addons/account_report/account_report.xml index 94bd6f5fc11..4576e421c2e 100644 --- a/addons/account_report/account_report.xml +++ b/addons/account_report/account_report.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/account_tax_include/i18n/en_AU.po b/addons/account_tax_include/i18n/en_AU.po index ae6cc0da559..892197cf816 100644 --- a/addons/account_tax_include/i18n/en_AU.po +++ b/addons/account_tax_include/i18n/en_AU.po @@ -8,46 +8,46 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-02-26 06:55+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2010-05-09 21:19+0000\n" +"Last-Translator: MoLE \n" "Language-Team: English (Australia) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:05+0000\n" +"X-Launchpad-Export-Date: 2010-05-10 04:17+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account_tax_include #: constraint:ir.ui.view:0 msgid "Invalid XML for View Architecture!" -msgstr "" +msgstr "Invalid XML for View Architecture!" #. module: account_tax_include #: field:account.invoice,price_type:0 msgid "Price method" -msgstr "" +msgstr "Price method" #. module: account_tax_include #: model:ir.module.module,shortdesc:account_tax_include.module_meta_information msgid "Invoices and prices with taxes included" -msgstr "" +msgstr "Invoices and prices with taxes included" #. module: account_tax_include #: selection:account.invoice,price_type:0 msgid "Tax included" -msgstr "" +msgstr "Tax included" #. module: account_tax_include #: selection:account.invoice,price_type:0 msgid "Tax excluded" -msgstr "" +msgstr "Tax excluded" #. module: account_tax_include #: view:account.tax:0 msgid "Compute Code for Taxes included prices" -msgstr "" +msgstr "Compute Code for Taxes included prices" #. module: account_tax_include #: field:account.invoice.line,price_subtotal_incl:0 msgid "Subtotal" -msgstr "" +msgstr "Subtotal" diff --git a/addons/account_tax_include/i18n/en_GB.po b/addons/account_tax_include/i18n/en_GB.po new file mode 100644 index 00000000000..0341993acca --- /dev/null +++ b/addons/account_tax_include/i18n/en_GB.po @@ -0,0 +1,53 @@ +# English (United Kingdom) 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-08-28 16:01+0000\n" +"PO-Revision-Date: 2010-05-09 21:20+0000\n" +"Last-Translator: MoLE \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2010-05-10 04:17+0000\n" +"X-Generator: Launchpad (build Unknown)\n" + +#. module: account_tax_include +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "Invalid XML for View Architecture!" + +#. module: account_tax_include +#: field:account.invoice,price_type:0 +msgid "Price method" +msgstr "Price method" + +#. module: account_tax_include +#: model:ir.module.module,shortdesc:account_tax_include.module_meta_information +msgid "Invoices and prices with taxes included" +msgstr "Invoices and prices with taxes included" + +#. module: account_tax_include +#: selection:account.invoice,price_type:0 +msgid "Tax included" +msgstr "Tax included" + +#. module: account_tax_include +#: selection:account.invoice,price_type:0 +msgid "Tax excluded" +msgstr "Tax excluded" + +#. module: account_tax_include +#: view:account.tax:0 +msgid "Compute Code for Taxes included prices" +msgstr "Compute Code for Taxes included prices" + +#. module: account_tax_include +#: field:account.invoice.line,price_subtotal_incl:0 +msgid "Subtotal" +msgstr "Subtotal" diff --git a/addons/board_manufacturing/board_manufacturing_view.xml b/addons/board_manufacturing/board_manufacturing_view.xml index 17b4bc486bc..191f1818612 100644 --- a/addons/board_manufacturing/board_manufacturing_view.xml +++ b/addons/board_manufacturing/board_manufacturing_view.xml @@ -15,7 +15,7 @@ - + diff --git a/addons/board_warehouse/board_warehouse_view.xml b/addons/board_warehouse/board_warehouse_view.xml index cdc93d9a274..af797401935 100644 --- a/addons/board_warehouse/board_warehouse_view.xml +++ b/addons/board_warehouse/board_warehouse_view.xml @@ -23,7 +23,7 @@
- + diff --git a/addons/event/i18n/et.po b/addons/event/i18n/et.po index d184aebb4cc..d7595209b97 100644 --- a/addons/event/i18n/et.po +++ b/addons/event/i18n/et.po @@ -7,25 +7,25 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2009-11-09 13:36+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2010-05-10 10:27+0000\n" +"Last-Translator: lyyser \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:00+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:18+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: event #: field:event.event,date_end:0 #: field:report.event.registration,date_end:0 msgid "Ending date" -msgstr "" +msgstr "Lõpu kuupäev" #. module: event #: field:event.event,register_min:0 msgid "Minimum Registrations" -msgstr "" +msgstr "Miinimum registreerimised" #. module: event #: constraint:ir.actions.act_window:0 @@ -35,17 +35,17 @@ msgstr "Vigane mudeli nimi toimingu definitsioonis." #. module: event #: field:event.event,mail_registr:0 msgid "Registration Email" -msgstr "" +msgstr "Registreerimise Email" #. module: event #: model:crm.case.section,name:event.event_0_crm_case_section msgid "Concert of Bon Jovi" -msgstr "" +msgstr "Bon Jovi kontsert" #. module: event #: field:event.event,mail_confirm:0 msgid "Confirmation Email" -msgstr "" +msgstr "Kinnitus Email" #. module: event #: constraint:crm.case.section:0 @@ -55,7 +55,7 @@ msgstr "Viga! Sa ei saa luua rekursiivseid sektsioone." #. module: event #: model:ir.model,name:event.model_event_registration msgid "Event Registration" -msgstr "" +msgstr "Sündmuse registreerimine" #. module: event #: model:ir.actions.wizard,name:event.event_reg_invoice @@ -65,52 +65,52 @@ msgstr "" #. module: event #: field:report.event.type.registration,draft_state:0 msgid "Draft Registrations" -msgstr "" +msgstr "Registreerimiste mustand" #. module: event #: view:report.event.registration:0 msgid "Event on Registration" -msgstr "" +msgstr "Registreerimise sündmus" #. module: event #: wizard_button:event.reg_make_invoice,init,end:0 msgid "Ok" -msgstr "" +msgstr "Ok" #. module: event #: field:event.event,mail_auto_confirm:0 msgid "Mail Auto Confirm" -msgstr "" +msgstr "Autokinnituse meil" #. module: event #: model:product.template,name:event.event_product_1_product_template msgid "Ticket for Opera" -msgstr "" +msgstr "Ooperi pilet" #. module: event #: wizard_field:event.reg_make_invoice,init,inv_rejected:0 msgid "Invoice Rejected" -msgstr "" +msgstr "Arve väljapraagitud" #. module: event #: view:event.event:0 msgid "Confirm Event" -msgstr "" +msgstr "Kinnita sündmus" #. module: event #: model:crm.case.section,name:event.event_1_crm_case_section msgid "Opera of Verdi" -msgstr "" +msgstr "Verdi ooper" #. module: event #: field:report.event.registration,draft_state:0 msgid "Draft Registration" -msgstr "" +msgstr "Registreerimise mustand" #. module: event #: wizard_view:event.reg_make_invoice,init:0 msgid "Create Invoices" -msgstr "" +msgstr "Loo arved" #. module: event #: model:ir.module.module,description:event.module_meta_information @@ -134,12 +134,12 @@ msgstr "" #. module: event #: view:event.registration:0 msgid "Extra Info" -msgstr "" +msgstr "Täiendav info" #. module: event #: view:event.registration:0 msgid "Registration" -msgstr "" +msgstr "Registreerimine" #. module: event #: field:event.type,name:0 diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 598ed4aad6f..d8ae92654e3 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -184,7 +184,7 @@ class email_server(osv.osv): history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) - + msg = {} if not message_id: return False @@ -193,24 +193,28 @@ class email_server(osv.osv): msg['id'] = message_id msg['message-id'] = message_id + + def _decode_header(txt): + txt = txt.replace('\r', '') + return ' '.join(map(lambda (x, y): unicode(x, y or 'ascii'), decode_header(txt))) if 'Subject' in fields: - msg['subject'] = msg_txt.get('Subject') + msg['subject'] = _decode_header(msg_txt.get('Subject')) if 'Content-Type' in fields: msg['content-type'] = msg_txt.get('Content-Type') if 'From' in fields: - msg['from'] = msg_txt.get('From') + msg['from'] = _decode_header(msg_txt.get('From')) if 'Delivered-To' in fields: - msg['to'] = msg_txt.get('Delivered-To') + msg['to'] = _decode_header(msg_txt.get('Delivered-To')) if 'Cc' in fields: - msg['cc'] = msg_txt.get('Cc') + msg['cc'] = _decode_header(msg_txt.get('Cc')) if 'Reply-To' in fields: - msg['reply'] = msg_txt.get('Reply-To') + msg['reply'] = _decode_header(msg_txt.get('Reply-To')) if 'Date' in fields: msg['date'] = msg_txt.get('Date') @@ -228,7 +232,10 @@ class email_server(osv.osv): msg['priority'] = msg_txt.get('X-priority', '3 (Normal)').split(' ')[0] if not msg_txt.is_multipart() or 'text/plain' in msg.get('content-type', None): + encoding = msg_txt.get_content_charset() msg['body'] = msg_txt.get_payload(decode=True) + if encoding: + msg['body'] = msg['body'].decode(encoding).encode('utf-8') attachents = {} if msg_txt.is_multipart() or 'multipart/alternative' in msg.get('content-type', None): @@ -238,27 +245,35 @@ class email_server(osv.osv): if part.get_content_maintype() == 'multipart': continue + encoding = part.get_content_charset() + if part.get_content_maintype()=='text': content = part.get_payload(decode=True) - if part.get_content_subtype() == 'html': - body = html2plaintext(content) - elif part.get_content_subtype() == 'plain': - body = content - filename = part.get_filename() if filename : - attachents[filename] = part.get_payload(decode=True) - + attachents[filename] = content + else: + if encoding: + content = unicode(content, encoding) + if part.get_content_subtype() == 'html': + body = html2plaintext(content) + elif part.get_content_subtype() == 'plain': + body = content elif part.get_content_maintype()=='application' or part.get_content_maintype()=='image' or part.get_content_maintype()=='text': filename = part.get_filename(); if filename : attachents[filename] = part.get_payload(decode=True) else: - body += part.get_payload(decode=True) + res = part.get_payload(decode=True) + if encoding: + res = res.decode(encoding).encode('utf-8') + + body += res msg['body'] = body msg['attachments'] = attachents + res_id = False if msg.get('references', False): id = False diff --git a/addons/hr/i18n/tr.po b/addons/hr/i18n/tr.po index 5e4be7c5558..86e7205ef3a 100644 --- a/addons/hr/i18n/tr.po +++ b/addons/hr/i18n/tr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-02-14 21:34+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2010-05-10 13:18+0000\n" +"Last-Translator: Angel Spy \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:16+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:19+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: hr @@ -62,7 +62,7 @@ msgstr "" #. module: hr #: view:hr.department:0 msgid "Department" -msgstr "" +msgstr "Bölüm" #. module: hr #: model:process.transition,name:hr.process_transition_contactofemployee0 @@ -340,7 +340,7 @@ msgstr "Firmalar" #. module: hr #: selection:hr.timesheet,dayofweek:0 msgid "Wednesday" -msgstr "Carsamba" +msgstr "Çarşamba" #. module: hr #: model:ir.actions.act_window,name:hr.open_view_categ_form diff --git a/addons/hr_contract/hr_contract.py b/addons/hr_contract/hr_contract.py index b8a310cc7bd..ddc29bd26a1 100644 --- a/addons/hr_contract/hr_contract.py +++ b/addons/hr_contract/hr_contract.py @@ -86,7 +86,7 @@ class hr_contract(osv.osv): 'job_id': fields.many2one('hr.job', 'Job Title'), 'date_start': fields.date('Start Date', required=True), 'date_end': fields.date('End Date'), - 'working_hours': fields.many2one('resource.calendar','Working hours'), + 'working_hours': fields.many2one('resource.calendar','Working Schedule'), 'wage_type_id': fields.many2one('hr.contract.wage.type', 'Wage Type', required=True), 'wage': fields.float('Wage', digits=(16,2), required=True), 'advantages': fields.text('Advantages'), @@ -99,4 +99,4 @@ class hr_contract(osv.osv): } hr_contract() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_holidays/i18n/et.po b/addons/hr_holidays/i18n/et.po index 525dc107a0a..5712d0b5647 100644 --- a/addons/hr_holidays/i18n/et.po +++ b/addons/hr_holidays/i18n/et.po @@ -7,24 +7,24 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2009-11-09 13:37+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2010-05-07 14:57+0000\n" +"Last-Translator: lyyser \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:15+0000\n" +"X-Launchpad-Export-Date: 2010-05-08 04:05+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: hr_holidays #: model:ir.ui.menu,name:hr_holidays.menu_open_ask_holidays_new msgid "New Holidays Request" -msgstr "" +msgstr "Uus puhkusetaotlus" #. module: hr_holidays #: model:ir.ui.menu,name:hr_holidays.menu_action_all_holiday msgid "All Holidays Requests" -msgstr "" +msgstr "Kõik puhkusetaotlus" #. module: hr_holidays #: constraint:ir.actions.act_window:0 @@ -34,44 +34,44 @@ msgstr "Vigane mudeli nimi toimingu definitsioonis." #. module: hr_holidays #: field:hr.holidays.per.user,remaining_leaves:0 msgid "Remaining Leaves" -msgstr "" +msgstr "Järelejäänud puhkusepäevi" #. module: hr_holidays #: model:ir.actions.act_window,name:hr_holidays.action_holiday_waiting msgid "Requests Awaiting for Validation" -msgstr "" +msgstr "Valideerimist ootavad taotlused" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Light Blue" -msgstr "" +msgstr "Helesinine" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Brown" -msgstr "" +msgstr "Pruun" #. module: hr_holidays #: xsl:holidays.summary:0 msgid "of the" -msgstr "" +msgstr "." #. module: hr_holidays #: xsl:holidays.summary:0 msgid "Off-Days' Summary" -msgstr "" +msgstr "Töövabade päevade kokkuvõte" #. module: hr_holidays #: view:hr.holidays:0 #: view:hr.holidays.per.user:0 #: model:process.transition,name:hr_holidays.process_transition_employeeholidays0 msgid "Employee Holidays" -msgstr "" +msgstr "Töötaja Puhkused" #. module: hr_holidays #: view:hr.holidays:0 msgid "Set to Draft" -msgstr "" +msgstr "Sea mustandiks" #. module: hr_holidays #: view:hr.holidays.per.user:0 @@ -79,27 +79,27 @@ msgstr "" #: model:ir.model,name:hr_holidays.model_hr_holidays #: model:process.node,name:hr_holidays.process_node_holidays0 msgid "Holidays" -msgstr "" +msgstr "Pühad" #. module: hr_holidays #: xsl:holidays.summary:0 msgid "to" -msgstr "" +msgstr "kuni" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Light Cyan" -msgstr "" +msgstr "Heletsüaan" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Light Green" -msgstr "" +msgstr "Heleroheline" #. module: hr_holidays #: model:process.transition,name:hr_holidays.process_transition_employeedeclaration0 msgid "Employee Declaration" -msgstr "" +msgstr "Töötaja deklaratsioon" #. module: hr_holidays #: view:hr.holidays:0 @@ -111,7 +111,7 @@ msgstr "Valideeri" #. module: hr_holidays #: model:process.transition,name:hr_holidays.process_transition_refusedrequest0 msgid "Refused Request" -msgstr "" +msgstr "Tagasilükatud palved" #. module: hr_holidays #: model:process.node,name:hr_holidays.process_node_approved0 @@ -121,113 +121,113 @@ msgstr "Heakskiidetud" #. module: hr_holidays #: selection:hr.holidays.summary.employee,init,holiday_type:0 msgid "Both" -msgstr "" +msgstr "Mõlemad" #. module: hr_holidays #: view:hr.holidays:0 msgid "Refuse" -msgstr "" +msgstr "Keeldu" #. module: hr_holidays #: wizard_button:hr.holidays.summary,notify,end:0 #: wizard_button:hr.holidays.summary.employee,notify,end:0 msgid "Ok" -msgstr "" +msgstr "Ok" #. module: hr_holidays #: model:ir.ui.menu,name:hr_holidays.menu_action_my_holiday msgid "My Holidays Requests" -msgstr "" +msgstr "Minu puhkusetaotlused" #. module: hr_holidays #: field:hr.holidays,notes:0 #: field:hr.holidays.per.user,notes:0 msgid "Notes" -msgstr "" +msgstr "Märkmed" #. module: hr_holidays #: field:hr.holidays,holiday_status:0 #: field:hr.holidays.log,holiday_status:0 #: field:hr.holidays.per.user,holiday_status:0 msgid "Holiday's Status" -msgstr "" +msgstr "Puhkuste staatus" #. module: hr_holidays #: model:process.transition,note:hr_holidays.process_transition_refusedrequest0 msgid "Request is refused." -msgstr "" +msgstr "Taotlus on tagasi lükatud." #. module: hr_holidays #: model:ir.ui.menu,name:hr_holidays.menu_open_ask_holidays msgid "Holidays Management" -msgstr "" +msgstr "Puhkuste haldus" #. module: hr_holidays #: xsl:holidays.summary:0 msgid "Analyze from" -msgstr "" +msgstr "Analüüs alates" #. module: hr_holidays #: model:ir.actions.report.xml,name:hr_holidays.report_holidays_summary msgid "Summary Of Holidays" -msgstr "" +msgstr "Puhkuste kokkuvõte" #. module: hr_holidays #: model:process.node,note:hr_holidays.process_node_calendar0 msgid "The holiday is set in the calendar" -msgstr "" +msgstr "Puhkus on kalendrisse seatud" #. module: hr_holidays #: view:hr.holidays.status:0 msgid "Holiday status" -msgstr "" +msgstr "Puhkuse staatus" #. module: hr_holidays #: model:ir.model,name:hr_holidays.model_hr_holidays_status msgid "Holidays Status" -msgstr "" +msgstr "Puhkuste Staatus" #. module: hr_holidays #: field:hr.holidays,date_to:0 msgid "Vacation end day" -msgstr "" +msgstr "Puhkuse lõpp" #. module: hr_holidays #: view:hr.holidays.per.user:0 msgid "Holidays Allowed" -msgstr "" +msgstr "Puhkused Lubatud" #. module: hr_holidays #: model:process.node,note:hr_holidays.process_node_legaldeclaration0 msgid "Legal Declaration Document to declare new employee" -msgstr "" +msgstr "Õigusdeklaratsiooni dokument uue töötaja deklareerimiseks" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Magenta" -msgstr "" +msgstr "Fuksiinpunane" #. module: hr_holidays #: model:ir.model,name:hr_holidays.model_hr_holidays_per_user msgid "Holidays Per User" -msgstr "" +msgstr "Puhkused kasutaja kohta" #. module: hr_holidays #: view:hr.holidays.status:0 msgid "Define holiday status" -msgstr "" +msgstr "Defineeri puhkuse Staatus" #. module: hr_holidays #: selection:hr.holidays.summary,init,holiday_type:0 #: selection:hr.holidays.summary.employee,init,holiday_type:0 msgid "Confirmed" -msgstr "" +msgstr "Kinnitatud" #. module: hr_holidays #: wizard_field:hr.holidays.summary,init,date_from:0 #: wizard_field:hr.holidays.summary.employee,init,date_from:0 msgid "From" -msgstr "" +msgstr "Alates" #. module: hr_holidays #: view:hr.holidays:0 @@ -239,24 +239,24 @@ msgstr "Kinnita" #: model:ir.actions.act_window,name:hr_holidays.action_my_holiday_waiting #: model:ir.ui.menu,name:hr_holidays.menu_action_my_holiday_waiting msgid "My Awaiting Confirmation Holidays Requests" -msgstr "" +msgstr "Minu kinnitamist ootavad puhkusetaotlused" #. module: hr_holidays #: field:hr.holidays,user_id:0 msgid "Employee_id" -msgstr "" +msgstr "Töötaja_id" #. module: hr_holidays #: model:process.node,note:hr_holidays.process_node_holidaysdefinition0 msgid "Encoding of annual available holidays." -msgstr "" +msgstr "Igaastase saadaoleva puhkuse arvutamine" #. module: hr_holidays #: field:hr.holidays,employee_id:0 #: field:hr.holidays.log,employee_id:0 #: field:hr.holidays.per.user,employee_id:0 msgid "Employee" -msgstr "" +msgstr "Töötaja" #. module: hr_holidays #: selection:hr.holidays,state:0 @@ -271,41 +271,41 @@ msgstr "" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Light Salmon" -msgstr "" +msgstr "Helekollane" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Wheat" -msgstr "" +msgstr "Nisukarva" #. module: hr_holidays #: field:hr.holidays.log,nb_holidays:0 msgid "Number of Holidays Requested" -msgstr "" +msgstr "Taodeldud puhkuste arv" #. module: hr_holidays #: model:ir.actions.act_window,name:hr_holidays.act_hr_employee_holiday_request msgid "My Holiday Requests" -msgstr "" +msgstr "Minu puhkusetaotlused" #. module: hr_holidays #: view:hr.holidays:0 #: view:hr.holidays.per.user:0 msgid "Number of Days" -msgstr "" +msgstr "Päevade arv" #. module: hr_holidays #: field:hr.holidays.status,name:0 #: model:ir.actions.act_window,name:hr_holidays.open_view_holiday_status #: model:ir.ui.menu,name:hr_holidays.menu_open_view_holiday_status msgid "Holiday Status" -msgstr "" +msgstr "Puhkuse Staatus" #. module: hr_holidays #: wizard_view:hr.holidays.summary,init:0 #: wizard_view:hr.holidays.summary.employee,init:0 msgid "Report Options" -msgstr "" +msgstr "Aruande valikud" #. module: hr_holidays #: constraint:ir.ui.view:0 @@ -315,44 +315,44 @@ msgstr "Vigane XML vaate arhitektuurile!" #. module: hr_holidays #: model:process.node,note:hr_holidays.process_node_approved0 msgid "His manager approves the request" -msgstr "" +msgstr "Tema juhataja kiidab taotluse heaks" #. module: hr_holidays #: model:process.transition,note:hr_holidays.process_transition_holidaysdefrequest0 msgid "If holidays available, employee can take it and fill it." -msgstr "" +msgstr "Kui puhkused on saadaval, saab töötaja neid võtta ja täita." #. module: hr_holidays #: wizard_view:hr.holidays.summary.employee,notify:0 msgid "You have to select at least 1 Employee. Try again." -msgstr "" +msgstr "Pead valima vähemalt 1 Töötaja. Proovi uuesti." #. module: hr_holidays #: model:ir.ui.menu,name:hr_holidays.menu_action_my_holiday_validate msgid "My Validated Holidays Requests" -msgstr "" +msgstr "Minu valideeritud puhkusetaotlused" #. module: hr_holidays #: wizard_field:hr.holidays.summary.employee,init,emp:0 msgid "Employee(s)" -msgstr "" +msgstr "Töötaja(d)" #. module: hr_holidays #: field:hr.holidays,number_of_days:0 msgid "Number of Days in this Holiday Request" -msgstr "" +msgstr "Päevade arv selles puhkusetaotluses" #. module: hr_holidays #: view:hr.holidays.per.user:0 #: model:ir.actions.act_window,name:hr_holidays.action_holidays_per_user #: model:ir.ui.menu,name:hr_holidays.menu_open_holidays_per_user msgid "Holidays Per Employee" -msgstr "" +msgstr "Puhkusi töötaja kohta" #. module: hr_holidays #: field:hr.holidays.status,limit:0 msgid "Allow to override Limit" -msgstr "" +msgstr "Luba tühistada limiiti" #. module: hr_holidays #: field:hr.holidays.log,holiday_user_id:0 @@ -362,27 +362,27 @@ msgstr "" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Lavender" -msgstr "" +msgstr "Lavendel (Kahvatulilla)" #. module: hr_holidays #: model:ir.model,name:hr_holidays.model_hr_holidays_log msgid "hr.holidays.log" -msgstr "" +msgstr "hr.holidays.log" #. module: hr_holidays #: model:ir.actions.wizard,name:hr_holidays.wizard_holidays_summary msgid "Print Summary of Employee's Holidays" -msgstr "" +msgstr "Prindi töötajate puhkuste kokkuvõte" #. module: hr_holidays #: model:process.node,name:hr_holidays.process_node_calendar0 msgid "Calendar" -msgstr "" +msgstr "Kalender" #. module: hr_holidays #: field:hr.holidays,date_from:0 msgid "Vacation start day" -msgstr "" +msgstr "Puhkuse algus" #. module: hr_holidays #: model:ir.module.module,description:hr_holidays.module_meta_information @@ -425,159 +425,159 @@ msgstr "" #: wizard_view:hr.holidays.summary,notify:0 #: wizard_view:hr.holidays.summary.employee,notify:0 msgid "Notification" -msgstr "" +msgstr "Teavitus" #. module: hr_holidays #: model:process.node,note:hr_holidays.process_node_holidaysrequest0 msgid "Employee fills in a request for holidays" -msgstr "" +msgstr "Töötaja täidab puhkusetaotluse" #. module: hr_holidays #: model:process.transition,note:hr_holidays.process_transition_setholiday0 msgid "Holiday is set in the calendar." -msgstr "" +msgstr "Puhkus on kalendrisse seatud" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Light Coral" -msgstr "" +msgstr "Hele korall" #. module: hr_holidays #: model:ir.actions.act_window,name:hr_holidays.action_my_holiday_available #: model:ir.ui.menu,name:hr_holidays.menu_action_my_holiday_available msgid "My Available Holidays" -msgstr "" +msgstr "Minu Saadaolevad Puhkused" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Black" -msgstr "" +msgstr "Must" #. module: hr_holidays #: model:ir.ui.menu,name:hr_holidays.menu_action_my_holiday_refuse msgid "My Refused Holidays Requests" -msgstr "" +msgstr "Minu tagasi lükatud puhkusetaotlused" #. module: hr_holidays #: model:process.transition,name:hr_holidays.process_transition_setholiday0 msgid "Set Holiday" -msgstr "" +msgstr "Sea Puhkus" #. module: hr_holidays #: model:ir.ui.menu,name:hr_holidays.menu_action_my_holiday_draft msgid "My Draft Holidays Requests" -msgstr "" +msgstr "Minu puhkusetaotluste mustandid" #. module: hr_holidays #: field:hr.holidays.per.user,max_leaves:0 msgid "Maximum Leaves Allowed" -msgstr "" +msgstr "Maks. lubatud puhkusepäevi" #. module: hr_holidays #: field:hr.holidays,state:0 msgid "Status" -msgstr "" +msgstr "Staatus" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Ivory" -msgstr "" +msgstr "Elevandiluu" #. module: hr_holidays #: model:ir.actions.act_window,name:hr_holidays.action_my_holiday msgid "My Holidays Request" -msgstr "" +msgstr "Minu puhkusetaotlused" #. module: hr_holidays #: field:hr.holidays.status,color_name:0 msgid "Color of the status" -msgstr "" +msgstr "Staatuse värv" #. module: hr_holidays #: selection:hr.holidays.summary,init,holiday_type:0 msgid "Both Validated and Confirmed" -msgstr "" +msgstr "Valideeritud ja kinnitatud" #. module: hr_holidays #: field:hr.holidays.per.user,leaves_taken:0 msgid "Leaves Already Taken" -msgstr "" +msgstr "Juba võetud puhkusepäevad" #. module: hr_holidays #: xsl:holidays.summary:0 msgid "holidays." -msgstr "" +msgstr "puhkused." #. module: hr_holidays #: selection:hr.holidays,state:0 msgid "draft" -msgstr "" +msgstr "mustand" #. module: hr_holidays #: field:hr.holidays.per.user,user_id:0 msgid "User" -msgstr "" +msgstr "Kasutaja" #. module: hr_holidays #: model:process.transition,note:hr_holidays.process_transition_employeedeclaration0 msgid "Document for employee" -msgstr "" +msgstr "Dokument töötajale" #. module: hr_holidays #: field:hr.holidays.log,date:0 msgid "Date" -msgstr "" +msgstr "Kuupäev" #. module: hr_holidays #: model:process.transition.action,name:hr_holidays.process_transition_action_reufse0 msgid "Reufse" -msgstr "" +msgstr "Lükka tagasi" #. module: hr_holidays #: field:hr.holidays.status,section_id:0 msgid "Section" -msgstr "" +msgstr "Sektsioon" #. module: hr_holidays #: field:hr.holidays,manager_id:0 msgid "Holiday manager" -msgstr "" +msgstr "Puhkuste haldur" #. module: hr_holidays #: field:hr.holidays.per.user,active:0 #: field:hr.holidays.status,active:0 msgid "Active" -msgstr "" +msgstr "Aktiivne" #. module: hr_holidays #: model:ir.actions.act_window,name:hr_holidays.action_my_holiday_draft msgid "My Holidays Request Draft" -msgstr "" +msgstr "Minu puhkusetaotluste mustandid" #. module: hr_holidays #: model:process.transition,name:hr_holidays.process_transition_approvedrequest0 msgid "Approved Request" -msgstr "" +msgstr "Heaks kiidetud taotlus" #. module: hr_holidays #: model:process.node,name:hr_holidays.process_node_holidaysrequest0 msgid "Holidays Request" -msgstr "" +msgstr "Puhkusetaotlus" #. module: hr_holidays #: model:ir.ui.menu,name:hr_holidays.menu_action_holiday_waiting msgid "Holidays Requests Awaiting for Validation" -msgstr "" +msgstr "Kinnitamist ootavad puhkusetaotlused" #. module: hr_holidays #: view:hr.holidays:0 msgid "General" -msgstr "" +msgstr "Üldine" #. module: hr_holidays #: view:hr.holidays.per.user:0 msgid "General Information" -msgstr "" +msgstr "Üldine info" #. module: hr_holidays #: view:hr.holidays:0 @@ -585,7 +585,7 @@ msgstr "" #: wizard_button:hr.holidays.summary,init,end:0 #: wizard_button:hr.holidays.summary.employee,init,end:0 msgid "Cancel" -msgstr "" +msgstr "Katkesta" #. module: hr_holidays #: model:process.transition,name:hr_holidays.process_transition_holidaysdefrequest0 @@ -596,12 +596,12 @@ msgstr "" #: selection:hr.holidays.summary,init,holiday_type:0 #: selection:hr.holidays.summary.employee,init,holiday_type:0 msgid "Validated" -msgstr "" +msgstr "Kinnitatud" #. module: hr_holidays #: model:ir.actions.act_window,name:hr_holidays.action_my_holiday_refuse msgid "My Holidays Request Refused" -msgstr "" +msgstr "Minu tagasi lükatud puhkusetaotlused" #. module: hr_holidays #: constraint:ir.model:0 @@ -614,23 +614,23 @@ msgstr "" #: wizard_button:hr.holidays.summary,init,checkdept:0 #: wizard_button:hr.holidays.summary.employee,init,checkemp:0 msgid "Print" -msgstr "" +msgstr "Prindi" #. module: hr_holidays #: model:ir.actions.wizard,name:hr_holidays.holidays_summary #: model:ir.ui.menu,name:hr_holidays.menu_holidays_summary msgid "Print Summary of Holidays" -msgstr "" +msgstr "Prindi puhkuste kokkuvõte" #. module: hr_holidays #: wizard_field:hr.holidays.summary,init,depts:0 msgid "Department(s)" -msgstr "" +msgstr "Osakon(na)d" #. module: hr_holidays #: field:hr.holidays,name:0 msgid "Description" -msgstr "" +msgstr "Kirjeldus" #. module: hr_holidays #: selection:hr.holidays,state:0 @@ -641,23 +641,23 @@ msgstr "Tagasi lükatud" #. module: hr_holidays #: model:process.transition,note:hr_holidays.process_transition_approvedrequest0 msgid "Request is approved." -msgstr "" +msgstr "Taotlus on heaks kiidetud." #. module: hr_holidays #: model:process.node,name:hr_holidays.process_node_holidaysdefinition0 msgid "Holidays Definition" -msgstr "" +msgstr "Puhkuste definitsioon" #. module: hr_holidays #: wizard_field:hr.holidays.summary,init,holiday_type:0 #: wizard_field:hr.holidays.summary.employee,init,holiday_type:0 msgid "Select Holiday Type" -msgstr "" +msgstr "Vali Puhkuse Tüüp" #. module: hr_holidays #: field:hr.holidays,case_id:0 msgid "Case" -msgstr "" +msgstr "Juhtum" #. module: hr_holidays #: field:hr.holidays,holiday_user_id:0 @@ -667,22 +667,22 @@ msgstr "" #. module: hr_holidays #: model:process.node,note:hr_holidays.process_node_holidays0 msgid "Encode number of available holidays" -msgstr "" +msgstr "Arvuta saadaolevate puhkuste arv" #. module: hr_holidays #: model:process.node,name:hr_holidays.process_node_legaldeclaration0 msgid "Secretariat Social" -msgstr "" +msgstr "Sotsiaalsekretariaat" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Violet" -msgstr "" +msgstr "Violetne" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Red" -msgstr "" +msgstr "Punane" #. module: hr_holidays #: model:ir.module.module,shortdesc:hr_holidays.module_meta_information @@ -692,34 +692,34 @@ msgstr "" #. module: hr_holidays #: model:process.process,name:hr_holidays.process_process_holidaysprocess0 msgid "Holidays Process" -msgstr "" +msgstr "Holidays Process" #. module: hr_holidays #: wizard_view:hr.holidays.summary,notify:0 msgid "You have to select at least 1 Department. Try again." -msgstr "" +msgstr "Sa pead valima vähemalt ühe osakonna. Proovi uuesti." #. module: hr_holidays #: model:ir.actions.act_window,name:hr_holidays.action_my_holiday_validate msgid "My Holidays Request Validated" -msgstr "" +msgstr "Minu valideeritud puhkusetaotlused" #. module: hr_holidays #: field:hr.holidays.log,holiday_req_id:0 msgid "Holiday Request ID" -msgstr "" +msgstr "Puhkusetaotluse ID" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Light Yellow" -msgstr "" +msgstr "Helekollane" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 msgid "Light Pink" -msgstr "" +msgstr "Heleroosa" #. module: hr_holidays #: model:process.node,note:hr_holidays.process_node_refused0 msgid "His manager refuses the request" -msgstr "" +msgstr "Tema juhataja lükkab taotluse tagasi" diff --git a/addons/idea/i18n/hr.po b/addons/idea/i18n/hr.po index 9083bd8d0aa..97112788aea 100644 --- a/addons/idea/i18n/hr.po +++ b/addons/idea/i18n/hr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-03-24 10:38+0000\n" -"Last-Translator: Drazen Bosak \n" +"PO-Revision-Date: 2010-05-10 06:56+0000\n" +"Last-Translator: nafterburner \n" "Language-Team: Vinteh\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-04-17 04:10+0000\n" +"X-Launchpad-Export-Date: 2010-05-11 04:19+0000\n" "X-Generator: Launchpad (build Unknown)\n" "Language: hr\n" @@ -336,7 +336,7 @@ msgstr "Kreator" #. module: idea #: model:ir.ui.menu,name:idea.menu_tools msgid "Tools" -msgstr "Pomagala" +msgstr "Alati" #. module: idea #: field:idea.comment,idea_id:0 diff --git a/addons/idea/i18n/it.po b/addons/idea/i18n/it.po index c61b98bedeb..55c17dba585 100644 --- a/addons/idea/i18n/it.po +++ b/addons/idea/i18n/it.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2008-10-13 00:48+0000\n" -"Last-Translator: Marius Marolla \n" +"PO-Revision-Date: 2010-05-08 11: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-04-17 04:09+0000\n" +"X-Launchpad-Export-Date: 2010-05-10 04:17+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: idea @@ -44,7 +44,7 @@ msgstr "Le Mie Idee" #. module: idea #: constraint:ir.actions.act_window:0 msgid "Invalid model name in the action definition." -msgstr "" +msgstr "Nome del modello non valido nella definizione dell'azione." #. module: idea #: selection:idea.idea,my_vote:0 diff --git a/addons/mrp/__init__.py b/addons/mrp/__init__.py index 39d97d0ba11..d23cee8d565 100644 --- a/addons/mrp/__init__.py +++ b/addons/mrp/__init__.py @@ -26,5 +26,6 @@ import installer import wizard import report import company -import schedulers +import mrp_procurement + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/__openerp__.py b/addons/mrp/__openerp__.py index a69e8ce4025..0fa66ac7bd1 100644 --- a/addons/mrp/__openerp__.py +++ b/addons/mrp/__openerp__.py @@ -26,7 +26,7 @@ "author" : "Tiny", "website" : "http://www.openerp.com", "category" : "Generic Modules/Production", - "depends" : ["stock", "resource", "purchase", "product","process"], + "depends" : ["mrp_procurement", "stock", "resource", "purchase", "product","process"], "description": """ This is the base module to manage the manufacturing process in Open ERP. @@ -61,15 +61,11 @@ 'mrp_workflow.xml', 'mrp_data.xml', 'wizard/mrp_product_produce_view.xml', - 'wizard/make_procurement_view.xml', - 'wizard/mrp_procurement_view.xml', 'wizard/change_production_qty_view.xml', - 'wizard/orderpoint_procurement_view.xml', 'wizard/mrp_price_view.xml', 'wizard/mrp_workcenter_load_view.xml', # 'wizard/mrp_track_prod_view.xml', 'mrp_view.xml', - 'wizard/schedulers_all_view.xml', 'mrp_wizard.xml', 'mrp_report.xml', 'company_view.xml', @@ -81,6 +77,7 @@ 'report/mrp_production_order_view.xml', ], 'demo_xml': ['mrp_demo.xml', 'mrp_order_point.xml'], +# 'test': ['test/mrp_phantom_bom.yml','test/mrp_production_order.yml'], 'installable': True, 'active': False, 'certificate': '0032052481373', diff --git a/addons/mrp/company.py b/addons/mrp/company.py index 1844fff47eb..22acf4fc5dd 100644 --- a/addons/mrp/company.py +++ b/addons/mrp/company.py @@ -24,22 +24,10 @@ from osv import osv,fields class company(osv.osv): _inherit = 'res.company' _columns = { - 'schedule_range': fields.float('Scheduler Range', required=True, - help="This is the time frame analysed by the scheduler when "\ - "computing procurements. All procurements that are not between "\ - "today and today+range are skipped for futur computation."), - 'po_lead': fields.float('Purchase Lead Time', required=True, - help="This is the leads/security time for each purchase order."), - 'security_lead': fields.float('Security Days', required=True, - help="This is the days added to what you promise to customers "\ - "for security purpose"), 'manufacturing_lead': fields.float('Manufacturing Lead Time', required=True, help="Security days for each manufacturing operation."), } _defaults = { - 'schedule_range': lambda *a: 80.0, - 'po_lead': lambda *a: 1.0, - 'security_lead': lambda *a: 5.0, 'manufacturing_lead': lambda *a: 1.0, } company() diff --git a/addons/mrp/company_view.xml b/addons/mrp/company_view.xml index 1975bf5bb72..e94324f8195 100644 --- a/addons/mrp/company_view.xml +++ b/addons/mrp/company_view.xml @@ -9,12 +9,7 @@ - - - - - diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 675c4a73bb0..d5cea81933b 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -64,35 +64,6 @@ class mrp_workcenter(osv.osv): mrp_workcenter() -class mrp_property_group(osv.osv): - """ - Group of mrp properties. - """ - _name = 'mrp.property.group' - _description = 'Property Group' - _columns = { - 'name': fields.char('Property Group', size=64, required=True), - 'description': fields.text('Description'), - } -mrp_property_group() - -class mrp_property(osv.osv): - """ - Properties of mrp. - """ - _name = 'mrp.property' - _description = 'Property' - _columns = { - 'name': fields.char('Name', size=64, required=True), - 'composition': fields.selection([('min','min'),('max','max'),('plus','plus')], 'Properties composition', required=True, help="Not used in computations, for information purpose only."), - 'group_id': fields.many2one('mrp.property.group', 'Property Group', required=True), - 'description': fields.text('Description'), - } - _defaults = { - 'composition': lambda *a: 'min', - } -mrp_property() - class mrp_routing(osv.osv): """ For specifying the routings of workcenters. @@ -996,520 +967,6 @@ class mrp_production_product_line(osv.osv): } mrp_production_product_line() -# ------------------------------------------------------------------ -# Procurement -# ------------------------------------------------------------------ -# -# Produce, Buy or Find products and place a move -# then wizard for picking lists & move -# -class mrp_procurement(osv.osv): - """ - Procument Orders - """ - _name = "mrp.procurement" - _description = "Procurement" - _order = 'priority,date_planned' - - _columns = { - 'name': fields.char('Reason', size=64, required=True, help='Procurement name.'), - 'origin': fields.char('Source Document', size=64, - help="Reference of the document that created this Procurement.\n" - "This is automatically completed by Open ERP."), - 'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', required=True), - 'date_planned': fields.datetime('Scheduled date', required=True), - 'date_close': fields.datetime('Date Closed'), - 'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True), - 'product_qty': fields.float('Quantity', required=True, states={'draft':[('readonly',False)]}, readonly=True), - 'product_uom': fields.many2one('product.uom', 'Product UoM', required=True, states={'draft':[('readonly',False)]}, readonly=True), - 'product_uos_qty': fields.float('UoS Quantity', states={'draft':[('readonly',False)]}, readonly=True), - 'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True), - 'move_id': fields.many2one('stock.move', 'Reservation', ondelete='set null'), - 'bom_id': fields.many2one('mrp.bom', 'BoM', ondelete='cascade', select=True), - - 'close_move': fields.boolean('Close Move at end', required=True), - 'location_id': fields.many2one('stock.location', 'Location', required=True, states={'draft':[('readonly',False)]}, readonly=True), - 'procure_method': fields.selection([('make_to_stock','from stock'),('make_to_order','on order')], 'Procurement Method', states={'draft':[('readonly',False)], 'confirmed':[('readonly',False)]}, - readonly=True, required=True, help="If you encode manually a Procurement, you probably want to use" \ - " a make to order method."), - - 'purchase_id': fields.many2one('purchase.order', 'Purchase Order'), - 'note': fields.text('Note'), - - 'property_ids': fields.many2many('mrp.property', 'mrp_procurement_property_rel', 'procurement_id','property_id', 'Properties'), - - 'message': fields.char('Latest error', size=64, help="Exception occurred while computing procurement orders."), - 'state': fields.selection([ - ('draft','Draft'), - ('confirmed','Confirmed'), - ('exception','Exception'), - ('running','Running'), - ('cancel','Cancel'), - ('ready','Ready'), - ('done','Done'), - ('waiting','Waiting')], 'State', required=True, - help='When a procurement is created the state is set to \'Draft\'.\n If the procurement is confirmed, the state is set to \'Confirmed\'.\ - \nAfter confirming the state is set to \'Running\'.\n If any exception arises in the order then the state is set to \'Exception\'.\n Once the exception is removed the state becomes \'Ready\'.\n It is in \'Waiting\'. state when the procurement is waiting for another one to finish.'), - 'note': fields.text('Note'), - 'company_id': fields.many2one('res.company','Company',required=True), - } - _defaults = { - 'state': lambda *a: 'draft', - 'priority': lambda *a: '1', - 'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), - 'close_move': lambda *a: 0, - 'procure_method': lambda *a: 'make_to_order', - 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.procurement', context=c) - } - - def unlink(self, cr, uid, ids, context=None): - procurements = self.read(cr, uid, ids, ['state']) - unlink_ids = [] - for s in procurements: - if s['state'] in ['draft','cancel']: - unlink_ids.append(s['id']) - else: - raise osv.except_osv(_('Invalid action !'), _('Cannot delete Procurement Order(s) which are in %s State!' % s['state'])) - return osv.osv.unlink(self, cr, uid, unlink_ids, context=context) - - def onchange_product_id(self, cr, uid, ids, product_id, context={}): - """ Finds UoM and UoS of changed product. - @param product_id: Changed id of product. - @return: Dictionary of values. - """ - if product_id: - w = self.pool.get('product.product').browse(cr, uid, product_id, context) - v = { - 'product_uom': w.uom_id.id, - 'product_uos': w.uos_id and w.uos_id.id or w.uom_id.id - } - return {'value': v} - return {} - - def check_product(self, cr, uid, ids): - """ Checks product type. - @return: True or False - """ - for procurement in self.browse(cr, uid, ids): - if procurement.product_id.type in ('product', 'consu'): - return True - return False - - def check_move_cancel(self, cr, uid, ids, context={}): - """ Checks if move is cancelled or not. - @return: True or False. - """ - res = True - ok = False - for procurement in self.browse(cr, uid, ids, context): - if procurement.move_id: - ok = True - if not procurement.move_id.state == 'cancel': - res = False - return res and ok - - def check_move_done(self, cr, uid, ids, context={}): - """ Checks if move is done or not. - @return: True or False. - """ - res = True - for proc in self.browse(cr, uid, ids, context): - if proc.move_id: - if not proc.move_id.state == 'done': - res = False - return res - - # - # This method may be overrided by objects that override mrp.procurment - # for computing their own purpose - # - def _quantity_compute_get(self, cr, uid, proc, context={}): - """ Finds sold quantity of product. - @param proc: Current procurement. - @return: Quantity or False. - """ - if proc.product_id.type == 'product': - if proc.move_id.product_uos: - return proc.move_id.product_uos_qty - return False - - def _uom_compute_get(self, cr, uid, proc, context={}): - """ Finds UoS if product is Stockable Product. - @param proc: Current procurement. - @return: UoS or False. - """ - if proc.product_id.type == 'product': - if proc.move_id.product_uos: - return proc.move_id.product_uos.id - return False - - # - # Return the quantity of product shipped/produced/served, wich may be - # different from the planned quantity - # - def quantity_get(self, cr, uid, id, context={}): - """ Finds quantity of product used in procurement. - @return: Quantity of product. - """ - proc = self.browse(cr, uid, id, context) - result = self._quantity_compute_get(cr, uid, proc, context) - if not result: - result = proc.product_qty - return result - - def uom_get(self, cr, uid, id, context=None): - """ Finds UoM of product used in procurement. - @return: UoM of product. - """ - proc = self.browse(cr, uid, id, context) - result = self._uom_compute_get(cr, uid, proc, context) - if not result: - result = proc.product_uom.id - return result - - def check_waiting(self, cr, uid, ids, context=[]): - """ Checks state of move. - @return: True or False - """ - for procurement in self.browse(cr, uid, ids, context=context): - if procurement.move_id and procurement.move_id.state == 'auto': - return True - return False - - def check_produce_service(self, cr, uid, procurement, context=[]): - return True - - def check_produce_product(self, cr, uid, procurement, context=[]): - """ Finds BoM of a product if not found writes exception message. - @param procurement: Current procurement. - @return: True or False. - """ - properties = [x.id for x in procurement.property_ids] - bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, procurement.product_id.id, procurement.product_uom.id, properties) - if not bom_id: - cr.execute('update mrp_procurement set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id)) - return False - return True - - def check_make_to_stock(self, cr, uid, ids, context={}): - """ Checks product type. - @return: True or False - """ - ok = True - for procurement in self.browse(cr, uid, ids, context=context): - if procurement.product_id.type == 'service': - ok = ok and self._check_make_to_stock_service(cr, uid, procurement, context) - else: - ok = ok and self._check_make_to_stock_product(cr, uid, procurement, context) - return ok - - def check_produce(self, cr, uid, ids, context={}): - """ Checks product type. - @return: True or Product Id. - """ - res = True - user = self.pool.get('res.users').browse(cr, uid, uid) - for procurement in self.browse(cr, uid, ids): - if procurement.product_id.product_tmpl_id.supply_method <> 'produce': - if procurement.product_id.seller_ids: - partner = procurement.product_id.seller_ids[0].name - if user.company_id and user.company_id.partner_id: - if partner.id == user.company_id.partner_id.id: - return True - return False - if procurement.product_id.product_tmpl_id.type=='service': - res = res and self.check_produce_service(cr, uid, procurement, context) - else: - res = res and self.check_produce_product(cr, uid, procurement, context) - if not res: - return False - return res - - def check_buy(self, cr, uid, ids): - """ Checks product type. - @return: True or Product Id. - """ - user = self.pool.get('res.users').browse(cr, uid, uid) - partner_obj = self.pool.get('res.partner') - for procurement in self.browse(cr, uid, ids): - if procurement.product_id.product_tmpl_id.supply_method <> 'buy': - return False - if not procurement.product_id.seller_ids: - cr.execute('update mrp_procurement set message=%s where id=%s', (_('No supplier defined for this product !'), procurement.id)) - return False - partner = procurement.product_id.seller_ids[0].name - if user.company_id and user.company_id.partner_id: - if partner.id == user.company_id.partner_id.id: - return False - address_id = partner_obj.address_get(cr, uid, [partner.id], ['delivery'])['delivery'] - if not address_id: - cr.execute('update mrp_procurement set message=%s where id=%s', (_('No address defined for the supplier'), procurement.id)) - return False - return True - - def test_cancel(self, cr, uid, ids): - """ Tests whether state of move is cancelled or not. - @return: True or False - """ - for record in self.browse(cr, uid, ids): - if record.move_id and record.move_id.state == 'cancel': - return True - return False - - def action_confirm(self, cr, uid, ids, context={}): - """ Confirms procurement and writes exception message if any. - @return: True - """ - move_obj = self.pool.get('stock.move') - for procurement in self.browse(cr, uid, ids): - if procurement.product_qty <= 0.00: - raise osv.except_osv(_('Data Insufficient !'), _('Please check the Quantity of Procurement Order(s), it should not be less than 1!')) - if procurement.product_id.type in ('product', 'consu'): - if not procurement.move_id: - source = procurement.location_id.id - if procurement.procure_method == 'make_to_order': - source = procurement.product_id.product_tmpl_id.property_stock_procurement.id - id = move_obj.create(cr, uid, { - 'name': 'PROC:' + procurement.name, - 'location_id': source, - 'location_dest_id': procurement.location_id.id, - 'product_id': procurement.product_id.id, - 'product_qty': procurement.product_qty, - 'product_uom': procurement.product_uom.id, - 'date_planned': procurement.date_planned, - 'state': 'confirmed', - 'company_id': procurement.company_id.id, - }) - self.write(cr, uid, [procurement.id], {'move_id': id, 'close_move': 1}) - else: - # TODO: check this - if procurement.procure_method == 'make_to_stock' and procurement.move_id.state in ('waiting',): - id = move_obj.write(cr, uid, [procurement.move_id.id], {'state':'confirmed'}) - self.write(cr, uid, ids, {'state': 'confirmed', 'message': ''}) - return True - - def action_move_assigned(self, cr, uid, ids, context={}): - """ Changes procurement state to Running and writes message. - @return: True - """ - self.write(cr, uid, ids, {'state': 'running', 'message': _('from stock: products assigned.')}) - return True - - def _check_make_to_stock_service(self, cr, uid, procurement, context={}): - return True - - def _check_make_to_stock_product(self, cr, uid, procurement, context={}): - """ Checks procurement move state. - @param procurement: Current procurement. - @return: True or move id. - """ - ok = True - if procurement.move_id: - id = procurement.move_id.id - if not (procurement.move_id.state in ('done','assigned','cancel')): - ok = ok and self.pool.get('stock.move').action_assign(cr, uid, [id]) - cr.execute('select count(id) from stock_warehouse_orderpoint where product_id=%s', (procurement.product_id.id,)) - if not cr.fetchone()[0]: - cr.execute('update mrp_procurement set message=%s where id=%s', (_('from stock and no minimum orderpoint rule defined'), procurement.id)) - return ok - - def action_produce_assign_service(self, cr, uid, ids, context={}): - """ Changes procurement state to Running. - @return: True - """ - for procurement in self.browse(cr, uid, ids): - self.write(cr, uid, [procurement.id], {'state': 'running'}) - return True - - def action_produce_assign_product(self, cr, uid, ids, context={}): - """ This is action which call from workflow to assign production order to procurements - @return: True - """ - res = self.make_mo(cr, uid, ids, context=context) - res = res.values() - return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value - - def make_mo(self, cr, uid, ids, context={}): - """ Make Manufecturing(production) order from procurement - @return: New created Production Orders procurement wise - """ - res = {} - company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id - production_obj = self.pool.get('mrp.production') - move_obj = self.pool.get('stock.move') - wf_service = netsvc.LocalService("workflow") - for procurement in self.browse(cr, uid, ids): - res_id = procurement.move_id.id - loc_id = procurement.location_id.id - newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') - DateTime.RelativeDateTime(days=procurement.product_id.product_tmpl_id.produce_delay or 0.0) - newdate = newdate - DateTime.RelativeDateTime(days=company.manufacturing_lead) - produce_id = production_obj.create(cr, uid, { - 'origin': procurement.origin, - 'product_id': procurement.product_id.id, - 'product_qty': procurement.product_qty, - 'product_uom': procurement.product_uom.id, - 'product_uos_qty': procurement.product_uos and procurement.product_uos_qty or False, - 'product_uos': procurement.product_uos and procurement.product_uos.id or False, - 'location_src_id': procurement.location_id.id, - 'location_dest_id': procurement.location_id.id, - 'bom_id': procurement.bom_id and procurement.bom_id.id or False, - 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'), - 'move_prod_id': res_id, - 'company_id': procurement.company_id.id, - }) - res[procurement.id] = produce_id - self.write(cr, uid, [procurement.id], {'state': 'running'}) - bom_result = production_obj.action_compute(cr, uid, - [produce_id], properties=[x.id for x in procurement.property_ids]) - wf_service.trg_validate(uid, 'mrp.production', produce_id, 'button_confirm', cr) - move_obj.write(cr, uid, [res_id], - {'location_id': procurement.location_id.id}) - return res - - def action_po_assign(self, cr, uid, ids, context={}): - """ This is action which call from workflow to assign purchase order to procuments - @return: True - """ - res = self.make_po(cr, uid, ids, context=context) - res = res.values() - return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value - - def make_po(self, cr, uid, ids, context={}): - """ Make purchase order from procurement - @return: New created Purchase Orders procurement wise - """ - res = {} - company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id - partner_obj = self.pool.get('res.partner') - uom_obj = self.pool.get('product.uom') - pricelist_obj = self.pool.get('product.pricelist') - prod_obj = self.pool.get('product.product') - acc_pos_obj = self.pool.get('account.fiscal.position') - po_obj = self.pool.get('purchase.order') - for procurement in self.browse(cr, uid, ids): - res_id = procurement.move_id.id - partner = procurement.product_id.seller_ids[0].name - partner_id = partner.id - address_id = partner_obj.address_get(cr, uid, [partner_id], ['delivery'])['delivery'] - pricelist_id = partner.property_product_pricelist_purchase.id - - uom_id = procurement.product_id.uom_po_id.id - - qty = uom_obj._compute_qty(cr, uid, procurement.product_uom.id, procurement.product_qty, uom_id) - if procurement.product_id.seller_ids[0].qty: - qty = max(qty,procurement.product_id.seller_ids[0].qty) - - price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, False, {'uom': uom_id})[pricelist_id] - - newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') - newdate = newdate - DateTime.RelativeDateTime(days=company.po_lead) - newdate = newdate - procurement.product_id.seller_ids[0].delay - - #Passing partner_id to context for purchase order line integrity of Line name - context.update({'lang': partner.lang, 'partner_id': partner_id}) - - product = prod_obj.browse(cr, uid, procurement.product_id.id, context=context) - - line = { - 'name': product.partner_ref, - 'product_qty': qty, - 'product_id': procurement.product_id.id, - 'product_uom': uom_id, - 'price_unit': price, - 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'), - 'move_dest_id': res_id, - 'notes': product.description_purchase, - } - - taxes_ids = procurement.product_id.product_tmpl_id.supplier_taxes_id - taxes = acc_pos_obj.map_tax(cr, uid, partner.property_account_position, taxes_ids) - line.update({ - 'taxes_id': [(6,0,taxes)] - }) - purchase_id = po_obj.create(cr, uid, { - 'origin': procurement.origin, - 'partner_id': partner_id, - 'partner_address_id': address_id, - 'location_id': procurement.location_id.id, - 'pricelist_id': pricelist_id, - 'order_line': [(0,0,line)], - 'company_id': procurement.company_id.id, - 'fiscal_position': partner.property_account_position and partner.property_account_position.id or False - }) - res[procurement.id] = purchase_id - self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': purchase_id}) - return res - - def action_cancel(self, cr, uid, ids): - """ Cancels procurement and writes move state to Assigned. - @return: True - """ - todo = [] - todo2 = [] - move_obj = self.pool.get('stock.move') - for proc in self.browse(cr, uid, ids): - if proc.close_move: - if proc.move_id.state not in ('done', 'cancel'): - todo2.append(proc.move_id.id) - else: - if proc.move_id and proc.move_id.state == 'waiting': - todo.append(proc.move_id.id) - if len(todo2): - move_obj.action_cancel(cr, uid, todo2) - if len(todo): - move_obj.write(cr, uid, todo, {'state': 'assigned'}) - self.write(cr, uid, ids, {'state': 'cancel'}) - wf_service = netsvc.LocalService("workflow") - for id in ids: - wf_service.trg_trigger(uid, 'mrp.procurement', id, cr) - return True - - def action_check_finnished(self, cr, uid, ids): - return self.check_move_done(cr, uid, ids) - - def action_check(self, cr, uid, ids): - """ Checks procurement move state whether assigned or done. - @return: True - """ - ok = False - for procurement in self.browse(cr, uid, ids): - if procurement.move_id.state == 'assigned' or procurement.move_id.state == 'done': - self.action_done(cr, uid, [procurement.id]) - ok = True - return ok - - def action_ready(self, cr, uid, ids): - """ Changes procurement state to Ready. - @return: True - """ - res = self.write(cr, uid, ids, {'state': 'ready'}) - return res - - def action_done(self, cr, uid, ids): - """ Changes procurement state to Done and writes Closed date. - @return: True - """ - move_obj = self.pool.get('stock.move') - for procurement in self.browse(cr, uid, ids): - if procurement.move_id: - if procurement.close_move and (procurement.move_id.state <> 'done'): - move_obj.action_done(cr, uid, [procurement.move_id.id]) - res = self.write(cr, uid, ids, {'state': 'done', 'date_close': time.strftime('%Y-%m-%d')}) - wf_service = netsvc.LocalService("workflow") - for id in ids: - wf_service.trg_trigger(uid, 'mrp.procurement', id, cr) - return res - - def run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, context=None): - ''' Runs through scheduler. - @param use_new_cursor: False or the dbname - ''' - if not context: - context={} - self._procure_confirm(cr, uid, use_new_cursor=use_new_cursor, context=context) - self._procure_orderpoint_confirm(cr, uid, automatic=automatic,\ - use_new_cursor=use_new_cursor, context=context) -mrp_procurement() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/mrp_data.xml b/addons/mrp/mrp_data.xml index 2793f84b924..a7db7109e55 100644 --- a/addons/mrp/mrp_data.xml +++ b/addons/mrp/mrp_data.xml @@ -31,18 +31,5 @@ 1 - - Run mrp scheduler - - - 1 - days - -1 - - - - - - diff --git a/addons/mrp/mrp_procurement.py b/addons/mrp/mrp_procurement.py new file mode 100644 index 00000000000..84392b329ea --- /dev/null +++ b/addons/mrp/mrp_procurement.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 mx import DateTime +from osv import fields +from osv import osv +from tools.translate import _ +import ir +import netsvc +import time + +class mrp_procurement(osv.osv): + _inherit = 'mrp.procurement' + _columns = { + 'bom_id': fields.many2one('mrp.bom', 'BoM', ondelete='cascade', select=True), + } + + def check_produce_product(self, cr, uid, procurement, context=[]): + properties = [x.id for x in procurement.property_ids] + bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, procurement.product_id.id, procurement.product_uom.id, properties) + if not bom_id: + cr.execute('update mrp_procurement set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id)) + return False + return True + + def action_produce_assign_product(self, cr, uid, ids, context={}): + """ This is action which call from workflow to assign production order to procurements + @return: True + """ + procurement_obj = self.pool.get('mrp.procurement') + res = procurement_obj.make_mo(cr, uid, ids, context=context) + res = res.values() + return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value + + def make_mo(self, cr, uid, ids, context={}): + """ Make Manufacturing(production) order from procurement + @return: New created Production Orders procurement wise + """ + res = {} + company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id + production_obj = self.pool.get('mrp.production') + move_obj = self.pool.get('stock.move') + wf_service = netsvc.LocalService("workflow") + procurement_obj = self.pool.get('mrp.procurement') + for procurement in procurement_obj.browse(cr, uid, ids): + res_id = procurement.move_id.id + loc_id = procurement.location_id.id + newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') - DateTime.RelativeDateTime(days=procurement.product_id.product_tmpl_id.produce_delay or 0.0) + newdate = newdate - DateTime.RelativeDateTime(days=company.manufacturing_lead) + produce_id = production_obj.create(cr, uid, { + 'origin': procurement.origin, + 'product_id': procurement.product_id.id, + 'product_qty': procurement.product_qty, + 'product_uom': procurement.product_uom.id, + 'product_uos_qty': procurement.product_uos and procurement.product_uos_qty or False, + 'product_uos': procurement.product_uos and procurement.product_uos.id or False, + 'location_src_id': procurement.location_id.id, + 'location_dest_id': procurement.location_id.id, + 'bom_id': procurement.bom_id and procurement.bom_id.id or False, + 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'), + 'move_prod_id': res_id, + 'company_id': procurement.company_id.id, + }) + res[procurement.id] = produce_id + self.write(cr, uid, [procurement.id], {'state': 'running'}) + bom_result = production_obj.action_compute(cr, uid, + [produce_id], properties=[x.id for x in procurement.property_ids]) + wf_service.trg_validate(uid, 'mrp.production', produce_id, 'button_confirm', cr) + move_obj.write(cr, uid, [res_id], + {'location_id': procurement.location_id.id}) + return res + +mrp_procurement() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 5b8b7c41084..ba86fc1facc 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -12,6 +12,7 @@ id="menu_mrp_bom" parent="base.menu_mrp_root" sequence="5" /> + @@ -257,14 +258,14 @@ - - + + - + - + @@ -378,10 +379,27 @@ - + + + + + + + + + + + + + Production Management + --> mrp.production.tree @@ -765,259 +783,22 @@ - - - - - mrp.procurement.tree - mrp.procurement - tree - - - - - - - - - - - + + + mrp.procurement.form.inherit + mrp.procurement + + form + + + + + - - mrp.procurement.form - mrp.procurement - form - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -