bzr revid: vir@tinyerp.com-20100319084614-iewr4qh9dpgh6rey
This commit is contained in:
Vir (Open ERP) 2010-03-19 14:16:14 +05:30
commit b215eae262
24 changed files with 1219 additions and 735 deletions

View File

@ -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-01-13 11:48+0000\n"
"Last-Translator: Kuvaly [LCT] <kuvaly@seznam.cz>\n"
"PO-Revision-Date: 2010-03-17 20:55+0000\n"
"Last-Translator: mitev.dmitry <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 04:49+0000\n"
"X-Launchpad-Export-Date: 2010-03-18 04:34+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -154,7 +154,7 @@ msgstr "Položky"
#. module: account
#: selection:account.move.line,centralisation:0
msgid "Debit Centralisation"
msgstr ""
msgstr "Debetní Centralizace"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_invoice_state_confirm
@ -257,7 +257,7 @@ msgstr "Celkový dluh"
#. module: account
#: rml:account.tax.code.entries:0
msgid "Accounting Entries-"
msgstr ""
msgstr "Účetní zápisy"
#. module: account
#: help:account.journal,view_id:0
@ -299,7 +299,7 @@ msgstr "Zpožděné platby"
#: wizard_view:account.analytic.account.quantity_cost_ledger.report,init:0
#: wizard_view:account.vat.declaration,init:0
msgid "Select period"
msgstr ""
msgstr "Vyberte období"
#. module: account
#: field:account.invoice,origin:0
@ -384,7 +384,7 @@ msgstr "Celkové částky"
#: field:account.fiscal.position.account,account_src_id:0
#: field:account.fiscal.position.account.template,account_src_id:0
msgid "Account Source"
msgstr ""
msgstr "Zdroj účtu"
#. module: account
#: field:account.journal,update_posted:0
@ -420,7 +420,7 @@ msgstr ""
#. module: account
#: rml:account.partner.balance:0
msgid "(Account/Partner) Name"
msgstr ""
msgstr "(Účet / Partner) Název"
#. module: account
#: selection:account.move,type:0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,64 @@
# Hindi translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-24 12:50+0000\n"
"PO-Revision-Date: 2010-03-16 23:00+0000\n"
"Last-Translator: Neetesh Biswas <Unknown>\n"
"Language-Team: Hindi <hi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-18 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_anglo_saxon
#: view:product.category:0
msgid " Accounting Property"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
msgid ""
"This module will support the Anglo-Saxons accounting methodology by \n"
" changing the accounting logic with stock transactions. The difference "
"between the Anglo-Saxon accounting countries \n"
" and the Rhine or also called Continental accounting countries is the "
"moment of taking the Cost of Goods Sold versus Cost of Sales. \n"
" Anglo-Saxons accounting does take the cost when sales invoice is "
"created, Continental accounting will take the cost at he moment the goods "
"are shipped.\n"
" This module will add this functionality by using a interim account, to "
"store the value of shipped goods and will contra book this interim account \n"
" when the invoice is created to transfer this amount to the debtor or "
"creditor account."
msgstr ""
#. module: account_anglo_saxon
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
msgid "Stock Account"
msgstr ""
#. module: account_anglo_saxon
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "संरचना देखने के लिए अमान्य XML!"
#. module: account_anglo_saxon
#: field:product.category,property_account_creditor_price_difference_categ:0
#: field:product.template,property_account_creditor_price_difference:0
msgid "Price Difference Account"
msgstr ""
#. module: account_anglo_saxon
#: help:product.category,property_account_creditor_price_difference_categ:0
#: help:product.template,property_account_creditor_price_difference:0
msgid ""
"This account will be used to value price difference between purchase price "
"and cost price."
msgstr ""

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 15:49+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-03-18 02:19+0000\n"
"Last-Translator: Zergar <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 04:53+0000\n"
"X-Launchpad-Export-Date: 2010-03-18 04:34+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_balance
@ -24,56 +24,56 @@ msgstr ""
#. module: account_balance
#: selection:account.balance.account.balance.report,init,account_choice:0
msgid "All accounts"
msgstr ""
msgstr "Todas as Contas"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
msgid "Entries Selection Based on"
msgstr ""
msgstr "Seleção de entradas baseada em"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "Notification"
msgstr ""
msgstr "Notificação"
#. module: account_balance
#: selection:account.balance.account.balance.report,init,period_manner:0
msgid "Financial Period"
msgstr ""
msgstr "Período Financeiro"
#. module: account_balance
#: model:ir.actions.report.xml,name:account_balance.account_account_balance
#: model:ir.actions.report.xml,name:account_balance.account_account_balance_landscape
msgid "Account balance"
msgstr ""
msgstr "Saldo da Conta"
#. module: account_balance
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Account Name"
msgstr ""
msgstr "Nome da Conta"
#. module: account_balance
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Debit"
msgstr ""
msgstr "Débito"
#. module: account_balance
#: wizard_button:account.balance.account.balance.report,init,checkyear:0
msgid "Print"
msgstr ""
msgstr "Impressão"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period(s)"
msgstr ""
msgstr "Selecione o(s) Período(s)"
#. module: account_balance
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Percentage"
msgstr ""
msgstr "Porcentagem"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
@ -83,17 +83,17 @@ msgstr ""
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Fiscal Year(s)(Maximum Three Years)"
msgstr ""
msgstr "Selecione Ano(s) Fiscal(is) (máximo três anos)"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,select_account:0
msgid "Select Reference Account(for % comparision)"
msgstr ""
msgstr "Selecione conta de referência (para comparação %)"
#. module: account_balance
#: model:ir.actions.wizard,name:account_balance.wizard_account_balance_report
msgid "Account balance-Compare Years"
msgstr ""
msgstr "Conta Saldo Comparar Anos"
#. module: account_balance
#: model:ir.module.module,description:account_balance.module_meta_information
@ -125,70 +125,70 @@ msgstr ""
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,landscape:0
msgid "Show Report in Landscape Form"
msgstr ""
msgstr "Mostrar relatório em formato de paisagem"
#. module: account_balance
#: help:account.balance.account.balance.report,init,periods:0
msgid "All periods if empty"
msgstr ""
msgstr "Todos os períodos se vazio"
#. module: account_balance
#: selection:account.balance.account.balance.report,init,account_choice:0
msgid "With balance is not equal to 0"
msgstr ""
msgstr "Com saldo diferente de zero"
#. module: account_balance
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Total :"
msgstr ""
msgstr "Total :"
#. module: account_balance
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Account Balance -"
msgstr ""
msgstr "Saldo da conta -"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
msgid "Show Comparision in %"
msgstr ""
msgstr "Mostrar comparação em %"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period"
msgstr ""
msgstr "Selecione o Período"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Report Options"
msgstr ""
msgstr "Opções de Relatório"
#. module: account_balance
#: selection:account.balance.account.balance.report,init,account_choice:0
msgid "With movements"
msgstr ""
msgstr "Com movimentos"
#. module: account_balance
#: wizard_button:account.balance.account.balance.report,backtoinit,end:0
#: wizard_button:account.balance.account.balance.report,zero_years,end:0
msgid "Ok"
msgstr ""
msgstr "Ok"
#. module: account_balance
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Cash"
msgstr ""
msgstr "Dinheiro"
#. module: account_balance
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Don't Compare"
msgstr ""
msgstr "Não Comparar"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
msgid "Show Accounts"
msgstr ""
msgstr "Mostrar Contas"
#. module: account_balance
#: rml:account.account.balance.landscape:0

View File

@ -0,0 +1,53 @@
# Finnish translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-17 10:06+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-18 04:34+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_tax_include
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Virheellinen XML näkymä-arkkitehtuurille!"
#. module: account_tax_include
#: field:account.invoice,price_type:0
msgid "Price method"
msgstr "Hinnan tyyppi"
#. module: account_tax_include
#: model:ir.module.module,shortdesc:account_tax_include.module_meta_information
msgid "Invoices and prices with taxes included"
msgstr "Laskut ja hinnat veroilla"
#. module: account_tax_include
#: selection:account.invoice,price_type:0
msgid "Tax included"
msgstr "Vero sisältyy"
#. module: account_tax_include
#: selection:account.invoice,price_type:0
msgid "Tax excluded"
msgstr "Ilman veroa"
#. module: account_tax_include
#: view:account.tax:0
msgid "Compute Code for Taxes included prices"
msgstr "Laske koodi hinnoille joissa on vero mukana"
#. module: account_tax_include
#: field:account.invoice.line,price_subtotal_incl:0
msgid "Subtotal"
msgstr "Välisumma"

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-12-01 15:33+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"PO-Revision-Date: 2010-03-17 14:08+0000\n"
"Last-Translator: 英华 <wantinghard@gmail.com>\n"
"Language-Team: Simplified Chinese <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 05:04+0000\n"
"X-Launchpad-Export-Date: 2010-03-18 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_quality
@ -86,7 +86,7 @@ msgstr "已跳过"
msgid ""
"The test will be completed only if the module is installed or if the test "
"may be processed on uninstalled module."
msgstr ""
msgstr "只有模块已经安装或测试能在已卸载的模块上运行的情况下测试才能完成。"
#. module: base_module_quality
#: constraint:ir.ui.view:0
@ -132,7 +132,7 @@ msgstr "概要"
#. module: base_module_quality
#: model:ir.actions.wizard,name:base_module_quality.quality_detail_save
msgid "Report Save"
msgstr ""
msgstr "保存报告"
#. module: base_module_quality
#: wizard_view:quality_detail_save,init:0

View File

@ -372,6 +372,13 @@ class base_module_record(osv.osv):
self.ids[(rec[2], result)] = id
record = self._create_yaml_record(cr, uid, rec[2], rec[4], id)
return record
if self.mode=="workflow":
id,update = self._get_id(cr, uid, rec[2], rec[4])
data = {}
data['model'] = rec[2]
data['action'] = rec[3]
data['ref'] = id
return data
data=self.get_copy_data(cr,uid,rec[2],rec[4],rec[5])
copy_rec=(rec[0],rec[1],rec[2],rec[3],rec[4],data,rec[5])
rec=copy_rec
@ -394,7 +401,7 @@ class base_module_record(osv.osv):
doc.appendChild(terp)
for rec in self.recording_data:
if rec[0]=='workflow':
rec_id,noupdate = self._get_id(cr, uid, rec[1][3], rec[1][5])
rec_id,noupdate = self._get_id(cr, uid, rec[1][2], rec[1][4])
if not rec_id:
continue
data = doc.createElement("data")
@ -433,6 +440,15 @@ class record(yaml.YAMLObject):
def __repr__(self):
return '!record {model: %s, id: %s}:' % (str(self.model,), str(self.id,))
class workflow(yaml.YAMLObject):
yaml_tag = u'!workflow'
def __init__(self, model, action, ref=None):
self.model = model
self.ref = ref
self.action=action
def __repr__(self):
return '!workflow {model: %s, action: %s, ref: %s}' % (str(self.model,), str(self.action,), str(self.ref,))
class ref(yaml.YAMLObject):
yaml_tag = u'!ref'
def __init__(self, expr="False"):
@ -453,11 +469,20 @@ class eval(yaml.YAMLObject):
self.mode="create"
elif rec[1][3] == 'copy':
self.mode="copy"
elif rec[0] == 'workflow':
self.mode="workflow"
else:
continue
record= self._generate_object_yaml(cr, uid, rec[1],rec[3])
strg+="object=yaml.load(unicode('''\n !record %s \n''','iso-8859-1'))"%record
strg+='''
if self.mode == "workflow":
record= self._generate_object_yaml(cr, uid, rec[1],rec[0])
strg+="object=yaml.load(unicode('''\n !workflow %s \n''','iso-8859-1'))"%record
strg+='''
print object
'''
else:
record= self._generate_object_yaml(cr, uid, rec[1],rec[3])
strg+="object=yaml.load(unicode('''\n !record %s \n''','iso-8859-1'))"%record
strg+='''
print object
attrs=yaml.dump(object.attrs, default_flow_style=False)
print attrs \n\n'''
@ -476,6 +501,8 @@ print attrs \n\n'''
line=line.replace("''","'")
if line.find('!record') == 0:
line = "- \n" + " " + line
elif line.find('!workflow') == 0:
line = "- \n" + " " + line
elif line.find('- -') != -1:
line=line.replace('- -',' -')
line = " " + line

View File

@ -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-18 06:19+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-03-16 14:28+0000\n"
"Last-Translator: goranc <goranc@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 05:00+0000\n"
"X-Launchpad-Export-Date: 2010-03-18 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_report_creator
@ -23,6 +23,8 @@ msgid ""
"records.\n"
" e.g. res_partner.id=3"
msgstr ""
"Unesite izraz za polje po kojem želite filtrirati zapise.\n"
"npr. res_partner.id=3"
#. module: base_report_creator
#: field:base_report_creator.report,view_graph_type:0
@ -47,7 +49,7 @@ msgstr "Grafički"
#. module: base_report_creator
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Pogrešno ime modela u definiciji akcije."
#. module: base_report_creator
#: view:base_report_creator.report:0
@ -158,7 +160,7 @@ msgstr "Kreiraj izbornik izvještaja"
#: selection:base_report_creator.report,view_type2:0
#: selection:base_report_creator.report,view_type3:0
msgid "Form"
msgstr ""
msgstr "Ekran"
#. module: base_report_creator
#: selection:base_report_creator.report,view_type3:0
@ -335,7 +337,7 @@ msgstr "Potvrdi filter"
#. module: base_report_creator
#: field:base_report_creator.report.filter,name:0
msgid "Filter Name"
msgstr ""
msgstr "Filter"
#. module: base_report_creator
#: model:ir.actions.wizard,name:base_report_creator.wizard_report_open

View File

@ -7,19 +7,19 @@ 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-02-03 06:25+0000\n"
"Last-Translator: <>\n"
"PO-Revision-Date: 2010-03-16 08:14+0000\n"
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\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-03-11 05:01+0000\n"
"X-Launchpad-Export-Date: 2010-03-18 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_account
#: view:board.board:0
msgid "Analytic accounts to close"
msgstr ""
msgstr "Objektkonton att stänga"
#. module: board_account
#: view:board.board:0

View File

@ -56,11 +56,7 @@ def _mass_mail_send(self, cr, uid, data, context):
model = hist_obj.log_id.model_id.model
model_pool = pool.get(model)
case = model_pool.browse(cr, uid, hist_obj.log_id.res_id)
model_pool._history(cr, uid, [case], _('Send'), history=True, email=False)
model_pool.write(cr, uid, [case.id], {
'som': False,
'canal_id': False,
})
model_pool._history(cr, uid, [case], _('Send'), history=True, email=False)
emails = [data['form']['to']] + (data['form']['cc'] or '').split(',')
emails = filter(None, emails)
body = data['form']['text']

View File

@ -157,6 +157,8 @@ class document_file(osv.osv):
context = {}
vals['title'] = vals['name']
vals['parent_id'] = context.get('parent_id', False) or vals.get('parent_id', False)
if not vals['parent_id']:
vals['parent_id'] = self.pool.get('document.directory')._get_root_directory(cr,uid, context)
if not vals.get('res_id', False) and context.get('default_res_id', False):
vals['res_id'] = context.get('default_res_id', False)
if not vals.get('res_model', False) and context.get('default_res_model', False):

View File

@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-01-15 13:24+0000\n"
"Last-Translator: vir (Open ERP) <vir@tinyerp.com>\n"
"PO-Revision-Date: 2010-03-16 22:57+0000\n"
"Last-Translator: Neetesh Biswas <Unknown>\n"
"Language-Team: Hindi <hi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 05:03+0000\n"
"X-Launchpad-Export-Date: 2010-03-18 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: event_project
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "संरचना देखने के लिए अमान्य XML"
#. module: event_project
#: model:ir.actions.wizard,name:event_project.wizard_event_task

View File

@ -32,7 +32,6 @@
"update_xml" : [
"security/ir.model.access.csv",
"hr_evaluation_view.xml",
"hr_evaluation_data.xml",
"report/hr_evaluation_report_view.xml"],
"active": False,
"installable": True

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 06:57+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-03-16 13:31+0000\n"
"Last-Translator: George Dumitrescu <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 04:54+0000\n"
"X-Launchpad-Export-Date: 2010-03-18 04:34+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: idea
@ -380,7 +380,7 @@ msgstr "Punctaj mediu"
#. module: idea
#: view:idea.idea:0
msgid "Open"
msgstr "Deschidere"
msgstr "Deschide"
#. module: idea
#: help:idea.idea,description:0

View File

@ -20,6 +20,7 @@
##############################################################################
import mrp
import stock
import installer
import mrp_wizard
import wizard

View File

@ -607,11 +607,15 @@ class mrp_production(osv.osv):
consumed_products = {}
produced_qty = 0
for consumed_product in production.move_lines2:
if consumed_product.scraped:
continue
if not consumed_products.get(consumed_product.product_id.id, False):
consumed_products[consumed_product.product_id.id] = 0
consumed_products[consumed_product.product_id.id] += consumed_product.product_qty
for produced_product in production.move_created_ids2:
if produced_product.scraped:
continue
produced_qty += produced_product.product_qty
for raw_product in production.move_lines:
@ -621,7 +625,7 @@ class mrp_production(osv.osv):
if rest_qty > production.product_qty:
rest_qty = production.product_qty
if rest_qty > 0:
stock_mov_obj.consume_moves(cr, uid, [raw_product.id], rest_qty, production.location_src_id.id, context=context)
stock_mov_obj.action_consume(cr, uid, [raw_product.id], rest_qty, production.location_src_id.id, context=context)
if production_mode == 'consume_produce':
vals = {'state':'confirmed'}
@ -629,6 +633,8 @@ class mrp_production(osv.osv):
stock_mov_obj.write(cr, uid, final_product_todo, vals)
produced_products = {}
for produced_product in production.move_created_ids2:
if produced_product.scraped:
continue
if not produced_products.get(produced_product.product_id.id, False):
produced_products[produced_product.product_id.id] = 0
produced_products[produced_product.product_id.id] += produced_product.product_qty
@ -639,7 +645,7 @@ class mrp_production(osv.osv):
if rest_qty <= production_qty:
production_qty = rest_qty
if rest_qty > 0 :
stock_mov_obj.consume_moves(cr, uid, [produce_product.id], production_qty, production.location_dest_id.id, context=context)
stock_mov_obj.action_consume(cr, uid, [produce_product.id], production_qty, production.location_dest_id.id, context=context)
for raw_product in production.move_lines2:
@ -811,15 +817,6 @@ class mrp_production(osv.osv):
mrp_production()
class stock_move(osv.osv):
_name = 'stock.move'
_inherit = 'stock.move'
_columns = {
'production_id': fields.many2one('mrp.production', 'Production', select=True),
}
stock_move()
class mrp_production_workcenter_line(osv.osv):
_name = 'mrp.production.workcenter.line'
_description = 'Work Orders'
@ -1257,183 +1254,5 @@ class mrp_procurement(osv.osv):
self._procure_orderpoint_confirm(cr, uid, automatic=automatic,\
use_new_cursor=use_new_cursor, context=context)
mrp_procurement()
class stock_warehouse_orderpoint(osv.osv):
_name = "stock.warehouse.orderpoint"
_description = "Orderpoint minimum rule"
_columns = {
'name': fields.char('Name', size=32, required=True),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the orderpoint without removing it."),
'logic': fields.selection([('max','Order to Max'),('price','Best price (not yet active!)')], 'Reordering Mode', required=True),
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True),
'location_id': fields.many2one('stock.location', 'Location', required=True),
'product_id': fields.many2one('product.product', 'Product', required=True, domain=[('type','=','product')]),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True ),
'product_min_qty': fields.float('Min Quantity', required=True,
help="When the virtual stock goes belong the Min Quantity, Open ERP generates "\
"a requisition to bring the virtual stock to the Max Quantity."),
'product_max_qty': fields.float('Max Quantity', required=True,
help="When the virtual stock goes belong the Min Quantity, Open ERP generates "\
"a requisition to bring the virtual stock to the Max Quantity."),
'qty_multiple': fields.integer('Qty Multiple', required=True,
help="The requisition quantity will by rounded up to this multiple."),
'procurement_id': fields.many2one('mrp.procurement', 'Purchase Order'),
'company_id': fields.many2one('res.company','Company',required=True),
}
_defaults = {
'active': lambda *a: 1,
'logic': lambda *a: 'max',
'qty_multiple': lambda *a: 1,
'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'mrp.warehouse.orderpoint') or '',
'product_uom': lambda sel, cr, uid, context: context.get('product_uom', False),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.warehouse.orderpoint', context=c)
}
def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context={}):
if warehouse_id:
w=self.pool.get('stock.warehouse').browse(cr,uid,warehouse_id, context)
v = {'location_id':w.lot_stock_id.id}
return {'value': v}
return {}
def onchange_product_id(self, cr, uid, ids, product_id, context={}):
if product_id:
prod=self.pool.get('product.product').browse(cr,uid,product_id)
v = {'product_uom':prod.uom_id.id}
return {'value': v}
return {}
def copy(self, cr, uid, id, default=None,context={}):
if not default:
default = {}
default.update({
'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.warehouse.orderpoint') or '',
})
return super(stock_warehouse_orderpoint, self).copy(cr, uid, id, default, context)
stock_warehouse_orderpoint()
class StockMove(osv.osv):
_inherit = 'stock.move'
_columns = {
'procurements': fields.one2many('mrp.procurement', 'move_id', 'Requisitions'),
}
def copy(self, cr, uid, id, default=None, context=None):
default = default or {}
default['procurements'] = []
return super(StockMove, self).copy(cr, uid, id, default, context)
def _action_explode(self, cr, uid, move, context={}):
if move.product_id.supply_method=='produce' and move.product_id.procure_method=='make_to_order':
bis = self.pool.get('mrp.bom').search(cr, uid, [
('product_id','=',move.product_id.id),
('bom_id','=',False),
('type','=','phantom')])
if bis:
factor = move.product_qty
bom_point = self.pool.get('mrp.bom').browse(cr, uid, bis[0])
res = self.pool.get('mrp.bom')._bom_explode(cr, uid, bom_point, factor, [])
dest = move.product_id.product_tmpl_id.property_stock_production.id
state = 'confirmed'
if move.state=='assigned':
state='assigned'
for line in res[0]:
valdef = {
'picking_id': move.picking_id.id,
'product_id': line['product_id'],
'product_uom': line['product_uom'],
'product_qty': line['product_qty'],
'product_uos': line['product_uos'],
'product_uos_qty': line['product_uos_qty'],
'move_dest_id': move.id,
'state': state,
'name': line['name'],
'location_dest_id': dest,
'move_history_ids': [(6,0,[move.id])],
'move_history_ids2': [(6,0,[])],
'procurements': [],
}
mid = self.pool.get('stock.move').copy(cr, uid, move.id, default=valdef)
prodobj = self.pool.get('product.product').browse(cr, uid, line['product_id'], context=context)
proc_id = self.pool.get('mrp.procurement').create(cr, uid, {
'name': (move.picking_id.origin or ''),
'origin': (move.picking_id.origin or ''),
'date_planned': move.date_planned,
'product_id': line['product_id'],
'product_qty': line['product_qty'],
'product_uom': line['product_uom'],
'product_uos_qty': line['product_uos'] and line['product_uos_qty'] or False,
'product_uos': line['product_uos'],
'location_id': move.location_id.id,
'procure_method': prodobj.procure_method,
'move_id': mid,
'company_id': line['company_id'],
})
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.procurement', proc_id, 'button_confirm', cr)
self.pool.get('stock.move').write(cr, uid, [move.id], {
'location_id': move.location_dest_id.id,
'auto_validate': True,
'picking_id': False,
'location_id': dest,
'state': 'waiting'
})
for m in self.pool.get('mrp.procurement').search(cr, uid, [('move_id','=',move.id)], context):
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.procurement', m, 'button_wait_done', cr)
return True
def consume_moves(self, cr, uid, ids, product_qty, location_id=False, location_dest_id=False, consume=True, context=None):
res = []
production_obj = self.pool.get('mrp.production')
for move in self.browse(cr, uid, ids):
new_moves = super(StockMove, self).consume_moves(cr, uid, [move.id], product_qty, location_id, location_dest_id, consume, context=context)
production_ids = production_obj.search(cr, uid, [('move_lines', 'in', [move.id])])
for new_move in new_moves:
production_obj.write(cr, uid, production_ids, {'move_lines': [(4, new_move)]})
res.append(new_move)
return res
StockMove()
class StockPicking(osv.osv):
_inherit = 'stock.picking'
def test_finnished(self, cursor, user, ids):
wf_service = netsvc.LocalService("workflow")
res = super(StockPicking, self).test_finnished(cursor, user, ids)
for picking in self.browse(cursor, user, ids):
for move in picking.move_lines:
if move.state == 'done' and move.procurements:
for procurement in move.procurements:
wf_service.trg_validate(user, 'mrp.procurement',
procurement.id, 'button_check', cursor)
return res
#
# Explode picking by replacing phantom BoMs
#
def action_explode(self, cr, uid, picks, *args):
for move in self.pool.get('stock.move').browse(cr, uid, picks):
self.pool.get('stock.move')._action_explode(cr, uid, move)
return picks
StockPicking()
class spilt_in_production_lot(osv.osv_memory):
_inherit = "stock.move.split"
def split(self, cr, uid, ids, move_ids, context=None):
production_obj = self.pool.get('mrp.production')
move_obj = self.pool.get('stock.move')
res = []
for move in move_obj.browse(cr, uid, move_ids, context=context):
new_moves = super(spilt_in_production_lot, self).split(cr, uid, ids, move_ids, context=context)
production_ids = production_obj.search(cr, uid, [('move_lines', 'in', [move.id])])
for new_move in new_moves:
production_obj.write(cr, uid, production_ids, {'move_lines': [(4, new_move)]})
return res
spilt_in_production_lot()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -462,7 +462,9 @@
<field name="product_qty"/>
<group colspan="2" col="3">
<field name="product_uom"/>
<button type="action" name="%(mrp.wizard_change_production_qty)d" string="Change Qty" states="ready,confirmed,in_production"/>
<button type="action"
name="%(mrp.wizard_change_production_qty)d"
string="Change Qty" states="ready,confirmed" />
</group>
<label string="" colspan="2"/>
<field name="product_uos_qty" groups="product.group_uos"/>
@ -484,35 +486,31 @@
mode="tree,form" height="275" domain="[('state','&lt;&gt;', ('done', 'cancel'))]">
<tree string="Products to Consume">
<field name="product_id" />
<field name="product_qty" />
<field name="product_uom" />
<field name="state" invisible="1" />
<button
name="%(stock.move_consume)d"
string=">" type="action"
icon="gtk-go-forward" context="{'consume': True}"
states="draft,waiting,confirmed,assigned"/>
<button name="%(stock.move_scrap)d"
string="D" type="action"
icon="gtk-justify-fill" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="location_id" string="Source Loc."/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"
icon="gtk-go-forward" context="{'consume': True}"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
</tree>
<form string="Products to Consume">
<field name="product_id" />
<field name="product_qty" />
<field name="product_uom" />
</form>
</field>
<field colspan="2" name="move_lines2" nolabel="1" domain="[('state','in', ('done', 'cancel'))]"
widget="one2many_list" mode="tree,form" height="275">
<tree string="Consumed Products" editable="bottom">
<tree string="Consumed Products" editable="bottom" colors="red:scraped==True">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1"/>
<field name="product_uom" readonly="1" />
<field name="state" invisible="1" />
<field name="location_id" readonly="1"/>
<field name="prodlot_id" />
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
<field name="location_dest_id" readonly="1" string="Destination Loc."/>
<field name="prodlot_id" />
<field name="state" invisible="1"/>
<field name="scraped" invisible="1"/>
<button
name="%(stock.track_line)d"
string="Split in production lots"
@ -520,15 +518,11 @@
states="done,cancel" />
<button
name="%(stock.move_scrap)d"
string="D" type="action"
string="Scrap Products" type="action"
icon="gtk-convert"
states="done,cancel" />
states="done,cancel" />
</tree>
<form string="Consumed Products">
<field name="product_id" />
<field name="product_qty" />
<field name="product_uom" />
</form>
</field>
<group col="9" colspan="4">
@ -547,46 +541,37 @@
mode="tree,form" height="275" domain="[('state','&lt;&gt;', ('done', 'cancel'))]">
<tree string="Products to Finish">
<field name="product_id" />
<field name="product_qty" />
<field name="product_uom" />
<field name="state" invisible="1" />
<button
name="%(stock.move_consume)d"
string=">" type="action"
icon="gtk-go-forward"
states="draft,waiting,confirmed,assigned"/>
<button name="%(stock.move_scrap)d"
string="D" type="action"
icon="gtk-justify-fill" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="location_id" string="Source Loc."/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"
icon="gtk-go-forward" context="{'consume': True}"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
</tree>
<form string="Products to Finish">
<field name="product_id" />
<field name="product_qty" />
<field name="product_uom" />
</form>
</field>
<field colspan="2" name="move_created_ids2" nolabel="1" domain="[('state','in', ('done', 'cancel'))]"
widget="one2many_list" mode="tree,form" height="275">
<tree string="Finished Products" editable="bottom">
<tree string="Finished Products" editable="bottom" colors="red:scraped==True">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1"/>
<field name="product_uom" readonly="1" />
<field name="state" invisible="1" />
<field name="location_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
<field name="location_dest_id" readonly="1" string="Destination Loc."/>
<field name="prodlot_id" />
<field name="state" invisible="1"/>
<field name="scraped" invisible="1"/>
<button name="%(stock.track_line)d"
string="Split in production lots" type="action" icon="gtk-justify-fill" states="done,cancel"/>
<button name="%(stock.move_scrap)d"
string="D" type="action" icon="gtk-go-forward"
string="Scrap Products" type="action" icon="gtk-convert"
states="done,cancel" />
</tree>
<form string="Finished Products">
<field name="product_id" />
<field name="product_qty" />
<field name="product_uom" />
</form>
</field>
</page>
<page string="Work Orders">

225
addons/mrp/stock.py Normal file
View File

@ -0,0 +1,225 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx import DateTime
from osv import fields
from osv import osv
from tools.translate import _
import ir
import netsvc
import time
class stock_warehouse_orderpoint(osv.osv):
_name = "stock.warehouse.orderpoint"
_description = "Orderpoint minimum rule"
_columns = {
'name': fields.char('Name', size=32, required=True),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the orderpoint without removing it."),
'logic': fields.selection([('max','Order to Max'),('price','Best price (not yet active!)')], 'Reordering Mode', required=True),
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True),
'location_id': fields.many2one('stock.location', 'Location', required=True),
'product_id': fields.many2one('product.product', 'Product', required=True, domain=[('type','=','product')]),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True ),
'product_min_qty': fields.float('Min Quantity', required=True,
help="When the virtual stock goes belong the Min Quantity, Open ERP generates "\
"a requisition to bring the virtual stock to the Max Quantity."),
'product_max_qty': fields.float('Max Quantity', required=True,
help="When the virtual stock goes belong the Min Quantity, Open ERP generates "\
"a requisition to bring the virtual stock to the Max Quantity."),
'qty_multiple': fields.integer('Qty Multiple', required=True,
help="The requisition quantity will by rounded up to this multiple."),
'procurement_id': fields.many2one('mrp.procurement', 'Latest Requisition'),
'company_id': fields.many2one('res.company','Company',required=True),
}
_defaults = {
'active': lambda *a: 1,
'logic': lambda *a: 'max',
'qty_multiple': lambda *a: 1,
'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'mrp.warehouse.orderpoint') or '',
'product_uom': lambda sel, cr, uid, context: context.get('product_uom', False),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.warehouse.orderpoint', context=c)
}
def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context={}):
if warehouse_id:
w=self.pool.get('stock.warehouse').browse(cr,uid,warehouse_id, context)
v = {'location_id':w.lot_stock_id.id}
return {'value': v}
return {}
def onchange_product_id(self, cr, uid, ids, product_id, context={}):
if product_id:
prod=self.pool.get('product.product').browse(cr,uid,product_id)
v = {'product_uom':prod.uom_id.id}
return {'value': v}
return {}
def copy(self, cr, uid, id, default=None,context={}):
if not default:
default = {}
default.update({
'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.warehouse.orderpoint') or '',
})
return super(stock_warehouse_orderpoint, self).copy(cr, uid, id, default, context)
stock_warehouse_orderpoint()
class StockMove(osv.osv):
_inherit = 'stock.move'
_columns = {
'production_id': fields.many2one('mrp.production', 'Production', select=True),
'procurements': fields.one2many('mrp.procurement', 'move_id', 'Requisitions'),
}
def copy(self, cr, uid, id, default=None, context=None):
default = default or {}
default['procurements'] = []
return super(StockMove, self).copy(cr, uid, id, default, context)
def _action_explode(self, cr, uid, move, context={}):
if move.product_id.supply_method=='produce' and move.product_id.procure_method=='make_to_order':
bis = self.pool.get('mrp.bom').search(cr, uid, [
('product_id','=',move.product_id.id),
('bom_id','=',False),
('type','=','phantom')])
if bis:
factor = move.product_qty
bom_point = self.pool.get('mrp.bom').browse(cr, uid, bis[0])
res = self.pool.get('mrp.bom')._bom_explode(cr, uid, bom_point, factor, [])
dest = move.product_id.product_tmpl_id.property_stock_production.id
state = 'confirmed'
if move.state=='assigned':
state='assigned'
for line in res[0]:
valdef = {
'picking_id': move.picking_id.id,
'product_id': line['product_id'],
'product_uom': line['product_uom'],
'product_qty': line['product_qty'],
'product_uos': line['product_uos'],
'product_uos_qty': line['product_uos_qty'],
'move_dest_id': move.id,
'state': state,
'name': line['name'],
'location_dest_id': dest,
'move_history_ids': [(6,0,[move.id])],
'move_history_ids2': [(6,0,[])],
'procurements': [],
}
mid = self.pool.get('stock.move').copy(cr, uid, move.id, default=valdef)
prodobj = self.pool.get('product.product').browse(cr, uid, line['product_id'], context=context)
proc_id = self.pool.get('mrp.procurement').create(cr, uid, {
'name': (move.picking_id.origin or ''),
'origin': (move.picking_id.origin or ''),
'date_planned': move.date_planned,
'product_id': line['product_id'],
'product_qty': line['product_qty'],
'product_uom': line['product_uom'],
'product_uos_qty': line['product_uos'] and line['product_uos_qty'] or False,
'product_uos': line['product_uos'],
'location_id': move.location_id.id,
'procure_method': prodobj.procure_method,
'move_id': mid,
'company_id': line['company_id'],
})
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.procurement', proc_id, 'button_confirm', cr)
self.pool.get('stock.move').write(cr, uid, [move.id], {
'location_id': move.location_dest_id.id,
'auto_validate': True,
'picking_id': False,
'location_id': dest,
'state': 'waiting'
})
for m in self.pool.get('mrp.procurement').search(cr, uid, [('move_id','=',move.id)], context):
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.procurement', m, 'button_wait_done', cr)
return True
def action_consume(self, cr, uid, ids, product_qty, location_id=False, context=None):
res = []
production_obj = self.pool.get('mrp.production')
wf_service = netsvc.LocalService("workflow")
for move in self.browse(cr, uid, ids):
new_moves = super(StockMove, self).action_consume(cr, uid, [move.id], product_qty, location_id, context=context)
production_ids = production_obj.search(cr, uid, [('move_lines', 'in', [move.id])])
for prod in production_obj.browse(cr, uid, production_ids, context=context):
if prod.state == 'confirmed':
production_obj.force_production(cr, uid, [prod.id])
wf_service.trg_validate(uid, 'mrp.production', prod.id, 'button_produce', cr)
for new_move in new_moves:
production_obj.write(cr, uid, production_ids, {'move_lines': [(4, new_move)]})
res.append(new_move)
return res
def action_scrap(self, cr, uid, ids, product_qty, location_id, context=None):
res = []
production_obj = self.pool.get('mrp.production')
wf_service = netsvc.LocalService("workflow")
for move in self.browse(cr, uid, ids):
new_moves = super(StockMove, self).action_scrap(cr, uid, [move.id], product_qty, location_id, context=context)
production_ids = production_obj.search(cr, uid, [('move_lines', 'in', [move.id])])
for prod_id in production_ids:
wf_service.trg_validate(uid, 'mrp.production', prod_id, 'button_produce', cr)
for new_move in new_moves:
production_obj.write(cr, uid, production_ids, {'move_lines': [(4, new_move)]})
res.append(new_move)
return {}
StockMove()
class StockPicking(osv.osv):
_inherit = 'stock.picking'
def test_finnished(self, cursor, user, ids):
wf_service = netsvc.LocalService("workflow")
res = super(StockPicking, self).test_finnished(cursor, user, ids)
for picking in self.browse(cursor, user, ids):
for move in picking.move_lines:
if move.state == 'done' and move.procurements:
for procurement in move.procurements:
wf_service.trg_validate(user, 'mrp.procurement',
procurement.id, 'button_check', cursor)
return res
#
# Explode picking by replacing phantom BoMs
#
def action_explode(self, cr, uid, picks, *args):
for move in self.pool.get('stock.move').browse(cr, uid, picks):
self.pool.get('stock.move')._action_explode(cr, uid, move)
return picks
StockPicking()
class spilt_in_production_lot(osv.osv_memory):
_inherit = "stock.move.split"
def split(self, cr, uid, ids, move_ids, context=None):
production_obj = self.pool.get('mrp.production')
move_obj = self.pool.get('stock.move')
res = []
for move in move_obj.browse(cr, uid, move_ids, context=context):
new_moves = super(spilt_in_production_lot, self).split(cr, uid, ids, move_ids, context=context)
production_ids = production_obj.search(cr, uid, [('move_lines', 'in', [move.id])])
for new_move in new_moves:
production_obj.write(cr, uid, production_ids, {'move_lines': [(4, new_move)]})
return res
spilt_in_production_lot()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,89 @@
# Finnish translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-16 10:41+0000\n"
"Last-Translator: smii <Unknown>\n"
"Language-Team: Finnish <fi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-18 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp_subproduct
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Virheellinen XML näkymä-arkkitehtuurille!"
#. module: mrp_subproduct
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr "Objektin nimen tulee alkaa x_ ja se ei saa sisältää erikoismerkkejä!"
#. module: mrp_subproduct
#: view:mrp.bom:0
msgid "sub products"
msgstr ""
#. module: mrp_subproduct
#: field:mrp.subproduct,product_id:0
msgid "Product"
msgstr "Tuote"
#. module: mrp_subproduct
#: model:ir.model,name:mrp_subproduct.model_mrp_subproduct
msgid "Mrp Sub Product"
msgstr ""
#. module: mrp_subproduct
#: field:mrp.subproduct,subproduct_type:0
msgid "Quantity Type"
msgstr ""
#. module: mrp_subproduct
#: field:mrp.subproduct,product_qty:0
msgid "Product Qty"
msgstr "Tuotteen määrä"
#. module: mrp_subproduct
#: field:mrp.subproduct,product_uom:0
msgid "Product UOM"
msgstr ""
#. module: mrp_subproduct
#: field:mrp.subproduct,bom_id:0
msgid "BoM"
msgstr ""
#. module: mrp_subproduct
#: view:mrp.bom:0
msgid "Sub Products"
msgstr ""
#. module: mrp_subproduct
#: selection:mrp.subproduct,subproduct_type:0
msgid "Variable"
msgstr ""
#. module: mrp_subproduct
#: field:mrp.bom,sub_products:0
msgid "sub_products"
msgstr ""
#. module: mrp_subproduct
#: selection:mrp.subproduct,subproduct_type:0
msgid "Fixed"
msgstr "Ennalta määrätty"
#. module: mrp_subproduct
#: model:ir.module.module,shortdesc:mrp_subproduct.module_meta_information
msgid "MRP Sub Product"
msgstr ""

View File

@ -0,0 +1,192 @@
# Finnish translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-08 11:46+0000\n"
"PO-Revision-Date: 2010-03-16 10:12+0000\n"
"Last-Translator: smii <Unknown>\n"
"Language-Team: Finnish <fi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-18 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
#: help:multi_company.default,object_id:0
msgid "Object affect by this rules"
msgstr ""
#. module: multi_company
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr "Objektin nimen tulee alkaa x_ ja se ei saa sisältää erikoismerkkejä!"
#. module: multi_company
#: constraint:product.template:0
msgid ""
"Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
#. module: multi_company
#: constraint:res.partner:0
msgid "The VAT doesn't seem to be correct."
msgstr "ALV ei vaikuta olevan oikea."
#. module: multi_company
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Virheellinen mallin nimi toiminnon määrittelyssä."
#. module: multi_company
#: model:res.company,overdue_msg:multi_company.res_company_odoo
#: model:res.company,overdue_msg:multi_company.res_company_oerp_be
#: model:res.company,overdue_msg:multi_company.res_company_oerp_editor
#: model:res.company,overdue_msg:multi_company.res_company_oerp_in
#: model:res.company,overdue_msg:multi_company.res_company_oerp_us
msgid ""
"Would your payment have been carried out after this mail was sent, please "
"consider the present one as void. Do not hesitate to contact our accounting "
"department"
msgstr ""
#. module: multi_company
#: field:multi_company.default,company_dest_id:0
msgid "Default Company"
msgstr ""
#. module: multi_company
#: field:multi_company.default,object_id:0
msgid "Object"
msgstr "Objekti"
#. module: multi_company
#: model:ir.module.module,shortdesc:multi_company.module_meta_information
#: view:multi_company.default:0
msgid "Multi Company"
msgstr ""
#. module: multi_company
#: model:ir.module.module,description:multi_company.module_meta_information
msgid ""
"This module add the possibility to easily manage \n"
" the default value for each object\n"
" "
msgstr ""
#. module: multi_company
#: field:multi_company.default,company_id:0
msgid "Main Company"
msgstr "Pääyritys"
#. module: multi_company
#: view:multi_company.default:0
msgid "Condition"
msgstr "Ehto"
#. module: multi_company
#: help:multi_company.default,company_dest_id:0
msgid "Company to store the current record"
msgstr ""
#. module: multi_company
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: multi_company
#: field:multi_company.default,name:0
msgid "Name"
msgstr "Nimi"
#. module: multi_company
#: constraint:product.template:0
msgid "Error: UOS must be in a different category than the UOM"
msgstr ""
#. module: multi_company
#: model:product.category,name:multi_company.Odoo1
msgid "Odoo Offers"
msgstr ""
#. module: multi_company
#: constraint:res.company:0
msgid "Error! You can not create recursive companies."
msgstr ""
#. module: multi_company
#: help:multi_company.default,name:0
msgid "Name it to easily find a record"
msgstr ""
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_custom_multicompany
msgid "Multi company"
msgstr ""
#. module: multi_company
#: model:ir.model,name:multi_company.model_multi_company_default
msgid "multi_company.default"
msgstr ""
#. module: multi_company
#: help:multi_company.default,company_id:0
msgid "Company where the user is connected"
msgstr ""
#. module: multi_company
#: model:ir.actions.act_window,name:multi_company.action_inventory_form
msgid "Default Company per Object"
msgstr ""
#. module: multi_company
#: field:multi_company.default,expression:0
msgid "Expression"
msgstr "Ilmaus"
#. module: multi_company
#: model:product.template,name:multi_company.product_product_odoo1_product_template
msgid "Odoo Offer"
msgstr ""
#. module: multi_company
#: field:multi_company.default,sequence:0
msgid "Sequence"
msgstr "Jakso"
#. module: multi_company
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
msgstr "Virhe! Et voi luoda rekursiivisia kategorioita."
#. module: multi_company
#: constraint:product.product:0
msgid "Error: Invalid ean code"
msgstr "Virhe: Virheellinen EAN-koodi"
#. module: multi_company
#: help:multi_company.default,expression:0
msgid "Expression, must be True to match"
msgstr ""
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_action_inventory_form
msgid "Default company per Object"
msgstr ""
#. module: multi_company
#: code:addons/multi_company/multi_company.py:0
#, python-format
msgid " (copy)"
msgstr " (kopio)"
#. module: multi_company
#: view:multi_company.default:0
msgid "Matching"
msgstr "Vastaavuus"

View File

@ -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:50+0000\n"
"Last-Translator: LucaSub <subluca@gmail.com>\n"
"PO-Revision-Date: 2010-03-16 16:02+0000\n"
"Last-Translator: yoruk <yoruk87@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 05:01+0000\n"
"X-Launchpad-Export-Date: 2010-03-18 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: report_document
@ -40,7 +40,7 @@ msgstr ""
#: model:ir.ui.menu,name:report_document.menu_action_view_my_document_report_shame
#: view:report.document.wall:0
msgid "Wall of Shame"
msgstr ""
msgstr "Muro della vergogna"
#. module: report_document
#: model:ir.model,name:report_document.model_report_files_partner
@ -52,7 +52,7 @@ msgstr ""
#: field:report.document.user,file_size:0
#: field:report.files.partner,file_size:0
msgid "File Size"
msgstr ""
msgstr "Dimensione file"
#. module: report_document
#: constraint:ir.actions.act_window:0
@ -68,7 +68,7 @@ msgstr "Tutti i Mesi"
#: model:ir.ui.menu,name:report_document.menu_action_view_my_document_report_all_myfile
#: model:ir.ui.menu,name:report_document.menu_action_view_my_document_report_this_myfile
msgid "My files"
msgstr ""
msgstr "I Miei File"
#. module: report_document
#: view:report.document.user:0
@ -78,7 +78,7 @@ msgstr ""
#. module: report_document
#: view:report.document.user:0
msgid "Files"
msgstr ""
msgstr "Files"
#. module: report_document
#: view:report.files.partner:0
@ -157,7 +157,7 @@ msgstr ""
#: field:report.document.user,user_id:0
#: field:report.document.wall,user_id:0
msgid "Owner"
msgstr ""
msgstr "Propietario"
#. module: report_document
#: field:report.document.file,nbr:0

View File

@ -225,7 +225,7 @@
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2"/>
<field name="create_date"/>
<field name="create_date" widget="datetime"/>
<field name="date_confirm"/>
</group>
<separator colspan="4" string="Notes"/>

View File

@ -1035,6 +1035,7 @@ class stock_move(osv.osv):
'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Orders"),
'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin"),
'move_stock_return_history': fields.many2many('stock.move', 'stock_move_return_history', 'move_id', 'return_move_id', 'Move Return History',readonly=True),
'scraped': fields.boolean('Scraped'),
}
_constraints = [
(_check_tracking,
@ -1071,6 +1072,7 @@ class stock_move(osv.osv):
'location_dest_id': _default_location_destination,
'state': lambda *a: 'draft',
'priority': lambda *a: '1',
'scraped' : lambda *a:False,
'product_qty': lambda *a: 1.0,
'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
@ -1450,8 +1452,52 @@ class stock_move(osv.osv):
prodlot_obj.write(cr, uid, [prodlot_id], {'ref': ref})
return prodlot_id
def split_lines(self, cr, uid, ids, quantity, split_by_qty=1, prefix=False, with_lot=True, context=None):
def action_scrap(self, cr, uid, ids, quantity, location_id, context=None):
'''
Move the scrap/damaged product into scrap location
@ param cr: the database cursor
@ param uid: the user id
@ param ids: ids of stock move object to be scraped
@ param quantity : specify scrap qty
@ param location_id : specify scrap location
@ param context: context arguments
@ return: Scraped lines
'''
if quantity <= 0:
raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !'))
res = []
for move in self.browse(cr, uid, ids, context=context):
move_qty = move.product_qty
uos_qty = quantity / move_qty * move.product_uos_qty
default_val = {
'product_qty': quantity,
'product_uos_qty': uos_qty,
'state': move.state,
'scraped' : True,
'location_dest_id': location_id
}
new_move = self.copy(cr, uid, move.id, default_val)
#self.write(cr, uid, [new_move], {'move_history_ids':[(4,move.id)]}) #TODO : to track scrap moves
res += [new_move]
self.action_done(cr, uid, res)
return res
def action_split(self, cr, uid, ids, quantity, split_by_qty=1, prefix=False, with_lot=True, context=None):
'''
Split Stock Move lines into production lot which specified split by quantity.
@ param cr: the database cursor
@ param uid: the user id
@ param ids: ids of stock move object to be splited
@ param split_by_qty : specify split by qty
@ param prefix : specify prefix of production lot
@ param with_lot : if true, prodcution lot will assign for split line otherwise not.
@ param context: context arguments
@ return: splited move lines
'''
if quantity <= 0:
raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !'))
@ -1501,7 +1547,19 @@ class stock_move(osv.osv):
self.write(cr, uid, [current_move], update_val)
return res
def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None):
def action_consume(self, cr, uid, ids, quantity, location_id=False, context=None):
'''
Consumed product with specific quatity from specific source location
@ param cr: the database cursor
@ param uid: the user id
@ param ids: ids of stock move object to be consumed
@ param quantity : specify consume quantity
@ param location_id : specify source location
@ param context: context arguments
@ return: Consumed lines
'''
if not context:
context = {}
@ -1513,8 +1571,10 @@ class stock_move(osv.osv):
move_qty = move.product_qty
quantity_rest = move.product_qty
quantity_rest -= quantity
uos_qty_rest = quantity_rest / move_qty * move.product_uos_qty
if quantity_rest <= 0:
quantity_rest = 0
uos_qty_rest = 0
@ -1527,14 +1587,11 @@ class stock_move(osv.osv):
'product_qty': quantity,
'product_uos_qty': uos_qty,
'state': move.state,
'location_id': location_id
}
if location_dest_id:
default_val.update({'location_dest_id': location_dest_id})
if location_id:
default_val.update({'location_id': location_id})
if move.product_id.track_production and location_id:
res += self.split_lines(cr, uid, [move.id], quantity, split_by_qty=1, context=context)
# IF product has checked track for production lot, move lines will be split by 1
res += self.action_split(cr, uid, [move.id], quantity, split_by_qty=1, context=context)
else:
current_move = self.copy(cr, uid, move.id, default_val)
res += [current_move]
@ -1550,25 +1607,20 @@ class stock_move(osv.osv):
if move.product_id.track_production and location_id:
res += self.split_lines(cr, uid, [move.id], quantity_rest, split_by_qty=1, context=context)
else:
res += [move.id]
update_val = {}
update_val['product_qty'] = quantity_rest
update_val['product_uos_qty'] = uos_qty_rest
if location_dest_id:
update_val.update({'location_dest_id': location_dest_id})
if location_id:
update_val.update({'location_id': location_id})
update_val = {
'product_qty' : quantity_rest,
'product_uos_qty' : uos_qty_rest,
'location_id': location_id
}
self.write(cr, uid, [move.id], update_val)
if consume:
self.action_done(cr, uid, res)
return res
def scrap_moves(self, cr, uid, ids, quantity, location_dest_id, context=None):
return self.consume_moves(cr, uid, ids, quantity, location_id=False, location_dest_id=location_dest_id, consume=False, context=context)
stock_move()

View File

@ -81,7 +81,7 @@ class stock_move_consume(osv.osv_memory):
move_obj = self.pool.get('stock.move')
move_ids = context['active_ids']
for data in self.read(cr, uid, ids):
move_obj.consume_moves(cr, uid, move_ids,
move_obj.action_consume(cr, uid, move_ids,
data['product_qty'], data['location_id'],
context=context)
return {}
@ -102,7 +102,7 @@ class stock_move_scrap(osv.osv_memory):
move_obj = self.pool.get('stock.move')
move_ids = context['active_ids']
for data in self.read(cr, uid, ids):
move_obj.scrap_moves(cr, uid, move_ids,
move_obj.action_scrap(cr, uid, move_ids,
data['product_qty'], data['location_id'],
context=context)
return {}
@ -172,7 +172,7 @@ class split_in_production_lot(osv.osv_memory):
{'product_id': move.product_id.id})
move_obj.write(cr, uid, [current_move], {'prodlot_id': prodlot_id})
prodlot = prodlot_obj.browse(cr, uid, prodlot_id)
ref = '%d' % (current_move)
ref = '%d' % (move.id)
if prodlot.ref:
ref = '%s, %s' % (prodlot.ref, ref)
prodlot_obj.write(cr, uid, [prodlot_id], {'ref': ref})