[MERGE] Merge with dev3 branch

bzr revid: psi@tinyerp.co.in-20100511135725-i1q98v3rbah7fxss
This commit is contained in:
psi (Open ERP)
2010-05-11 19:27:25 +05:30
210 changed files with 4569 additions and 5003 deletions
+1
View File
@@ -515,6 +515,7 @@ class account_journal(osv.osv):
'company_id': fields.many2one('res.company', 'Company', required=True,select=1),
'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \
help="The sequence used for invoice numbers in this journal."),
'allow_date':fields.boolean('Check Date not in the Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'),
}
_defaults = {
+27 -3
View File
@@ -785,12 +785,35 @@ class account_move_line(osv.osv):
self.pool.get('account.move').validate(cr, uid, [line.move_id.id], context=context)
return result
def check_date(self, cr, uid, vals, context=None, check=True):
if context is None:
context = {}
if 'date' in vals.keys():
if 'journal_id' in vals and 'journal_id' not in context:
journal_id = vals['journal_id']
if 'period_id' in vals and 'period_id' not in context:
period_id = vals['period_id']
elif 'journal_id' not in context and 'move_id' in vals:
m = self.pool.get('account.move').browse(cr, uid, vals['move_id'])
journal_id = m.journal_id.id
period_id = m.period_id.id
else:
journal_id = context['journal_id']
period_id = context['period_id']
journal=self.pool.get('account.journal').browse(cr,uid,[journal_id])[0]
if journal.allow_date:
period=self.pool.get('account.period').browse(cr,uid,[period_id])[0]
if not time.strptime(vals['date'],'%Y-%m-%d')>=time.strptime(period.date_start,'%Y-%m-%d') and time.strptime(vals['date'],'%Y-%m-%d')<=time.strptime(period.date_stop,'%Y-%m-%d'):
raise osv.except_osv(_('Error'),_('The date of your Ledger Posting is not in the defined period !'))
else:
return True
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
if not context:
context={}
if vals.get('account_tax_id', False):
raise osv.except_osv(_('Unable to change tax !'), _('You can not change the tax, you should remove and recreate lines !'))
self.check_date(cr, uid, vals, context, check)
account_obj = self.pool.get('account.account')
if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']:
raise osv.except_osv(_('Bad account!'), _('You can not use an inactive account!'))
@@ -844,10 +867,11 @@ class account_move_line(osv.osv):
return True
def create(self, cr, uid, vals, context=None, check=True):
if not context:
context={}
account_obj = self.pool.get('account.account')
tax_obj=self.pool.get('account.tax')
if context is None:
context = {}
self.check_date(cr, uid, vals, context, check)
if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']:
raise osv.except_osv(_('Bad account!'), _('You can not use an inactive account!'))
if 'journal_id' in vals and 'journal_id' not in context:
+1 -1
View File
@@ -284,11 +284,11 @@
<field name="default_debit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="user_id" groups="base.group_extended"/>
<field name="allow_date" />
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
<field name="centralisation"/>
<field name="group_invoice_lines"/>
<field name="update_posted"/>
<field name="entry_posted"/>
</page>
+4 -4
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-04-26 07:46+0000\n"
"PO-Revision-Date: 2010-05-10 08:37+0000\n"
"Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-28 03:44+0000\n"
"X-Launchpad-Export-Date: 2010-05-11 04:18+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -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
@@ -1,82 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields
from osv import osv
import time
import netsvc
import ir
from mx import DateTime
import pooler
from tools import config
from tools.translate import _
class account_journal(osv.osv):
_inherit='account.journal'
_name='account.journal'
_columns = {
'allow_date':fields.boolean('Allows date not in the period'),
}
_defaults = {
'allow_date': lambda *a: 1,
}
account_journal()
class account_move_line(osv.osv):
_inherit='account.move.line'
_name='account.move.line'
def check_date(self, cr, uid, vals, context=None, check=True):
if not context:
context = {}
if 'date' in vals.keys():
if 'journal_id' in vals and 'journal_id' not in context:
journal_id = vals['journal_id']
if 'period_id' in vals and 'period_id' not in context:
period_id = vals['period_id']
elif 'journal_id' not in context and 'move_id' in vals:
m = self.pool.get('account.move').browse(cr, uid, vals['move_id'])
journal_id = m.journal_id.id
period_id = m.period_id.id
else:
journal_id = context['journal_id']
period_id = context['period_id']
journal=self.pool.get('account.journal').browse(cr,uid,[journal_id])[0]
if not journal.allow_date:
period=self.pool.get('account.period').browse(cr,uid,[period_id])[0]
if not time.strptime(vals['date'],'%Y-%m-%d')>=time.strptime(period.date_start,'%Y-%m-%d') and time.strptime(vals['date'],'%Y-%m-%d')<=time.strptime(period.date_stop,'%Y-%m-%d'):
raise osv.except_osv(_('Error'),_('The date of your Ledger Posting is not in the defined period !'))
else:
return True
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
flag=self.check_date(cr, uid, vals, context, check)
result = super(account_move_line, self).write(cr, uid, ids, vals, context, check, update_check)
return result
def create(self, cr, uid, vals, context=None, check=True):
flag=self.check_date(cr, uid, vals, context, check)
result = super(account_move_line, self).create(cr, uid, vals, context, check)
return result
account_move_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,18 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_account_journal_form_inherit2">
<field name="name">account.journal.form.inherit2</field>
<field name="model">account.journal</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="allow_date" />
</field>
</field>
</record>
</data>
</openerp>
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01:51+0000\n"
"PO-Revision-Date: 2009-08-28 16:01:51+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-02-03 06:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-24 17:36+0000\n"
"Last-Translator: lem0na <nickyk@gmx.net>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Невалиден XML за преглед на архитектурата"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-21 03:57+0000\n"
"Last-Translator: Miro Glavić <glavicmiro@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Neodgovarajući XML za arhitekturu prikaza!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Dozvoli datum koji nije u periodu"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Provjera Datuma Računa"
-33
View File
@@ -1,33 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-29 06:30+0000\n"
"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com "
"<jesteve@zikzakmedia.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invàlid per a la definició de la vista!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Permetre dates fora del període"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Comprovació dates en comptabilitat"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 09:32+0000\n"
"Last-Translator: Kuvaly [LCT] <kuvaly@seznam.cz>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Invalidní XML pro zobrazení architektury!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Povolit data která nejsou v periodě"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Kontrola data účtu"
-33
View File
@@ -1,33 +0,0 @@
# Danish translation for openobject-addons
# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
#
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: 2009-11-17 09:32+0000\n"
"Last-Translator: SmartWi <kurt@smartwi.net>\n"
"Language-Team: Danish <da@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-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Ugyldig XML for View Architecture!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Datoen er uden doe preioden"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Konto data check"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 09:32+0000\n"
"Last-Translator: Ferdinand-chricar <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Fehlerhafter xml Code für diese Ansicht!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Erlaubt Datum außerhalb der Periode"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Konto Datums Check"
-41
View File
@@ -1,41 +0,0 @@
# Greek translation for openobject-addons
# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
#
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: 2009-09-08 12:02+0000\n"
"Last-Translator: Makis Nicolaou <mark.nicolaou@gmail.com>\n"
"Language-Team: Greek <el@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-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Άκυρο XML για την αρχιτεκτονική όψης!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Allows date not in the period"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Account Date check"
#, python-format
#~ msgid "The date of your account move is not in the defined period !"
#~ msgstr "Η ημερομηνία κίνησης λογαριασμού δεν είναι στην καθορισμένη περίοδο!"
#, python-format
#~ msgid "Error"
#~ msgstr "Σφάλμα"
-33
View File
@@ -1,33 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-24 17:37+0000\n"
"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com "
"<jesteve@zikzakmedia.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "¡XML inválido para la definición de la vista!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Permitir fechas fuera del periodo"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Comprobación fechas en contabilidad"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-14 13:58+0000\n"
"Last-Translator: Silvana Herrera <sherrera@thymbra.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML inválido para la definición de la vista!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Permitir fechas fuera del periodo"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Control de fecha contable"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-09 16:21+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Vigane XML vaate arhitektuurile!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Lubab perioodivälist kuupäeva"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Konto kuupäeva kontroll"
-41
View File
@@ -1,41 +0,0 @@
# Finnish translation for openobject-addons
# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
#
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: 2009-09-08 14:54+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\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-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Virheellinen XML näkymäarkkitehtuurille!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Sallii päiväyksen joka ei ole jaksossa"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Tilin päiväys tarkistus"
#, python-format
#~ msgid "The date of your account move is not in the defined period !"
#~ msgstr "Päiväystä tilinsiirrolle ei ole määritellyssä ajanjaksossa"
#, python-format
#~ msgid "Error"
#~ msgstr "Virhe"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-09 16:21+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML non valide pour l'architecture de la vue"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Permet une date hors période"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Vérification de la Date de Compte"
-42
View File
@@ -1,42 +0,0 @@
# translation of account-date-check-es.po to Galego
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
# Frco. Javier Rial Rodríguez <fjrial@cesga.es>, 2009.
msgid ""
msgstr ""
"Project-Id-Version: account-date-check-es\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 16:28+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"Language-Team: Galego <g11n@mancomun.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-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "¡XML non válido para a definición da vista!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Permitir datas fóra do periodo"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Comprobación datas en contabilidade"
#, python-format
#~ msgid "Error"
#~ msgstr "Erro"
#, python-format
#~ msgid "The date of your account move is not in the defined period !"
#~ msgstr "¡A data do asento contábel non está no periodo indicado!"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-12-22 12:13+0000\n"
"Last-Translator: Jožek Prikratki <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Neispravan XML za arhitekturu prikaza!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Dozvoljeno je da datum nije u periodu"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Provjera datuma računa"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-02-03 06:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2008-10-16 03:54+0000\n"
"Last-Translator: opix <inur.opix@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2008-11-13 15:42+0000\n"
"Last-Translator: Marius Marolla <mariusmarolla@areablu.net>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML non valido per Visualizzazione Architettura!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-41
View File
@@ -1,41 +0,0 @@
# Korean translation for openobject-addons
# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
#
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: 2009-09-08 16:49+0000\n"
"Last-Translator: ekodaq <ceo@ekosdaq.com>\n"
"Language-Team: Korean <ko@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-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "유효하지 않은 뷰 아키텍처를 위한 XML !"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "기간을 벗어난 날짜를 허용"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "계정 날짜 체크"
#, python-format
#~ msgid "The date of your account move is not in the defined period !"
#~ msgstr "귀하의 계정 이동 날자가 정의된 기간을 벗어 납니다 !"
#, python-format
#~ msgid "Error"
#~ msgstr "에러"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-01-20 14:02+0000\n"
"Last-Translator: Paulius Sladkevičius <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Netinkamas XML peržiūros struktūrai!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-12-10 10:28+0000\n"
"Last-Translator: Jan Verlaan (Veritos) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Ongeldige XML, kan overzicht niet weergeven!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Datum niet in de periode"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Datum controle op boeking"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-04-24 15:40+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-33
View File
@@ -1,33 +0,0 @@
# Occitan (post 1500) 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-12 13:29+0000\n"
"Last-Translator: Cédric VALMARY (Per Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@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-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 09:32+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Pozwala na datę spoza okresu"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Kontrola daty konta"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-29 00:16+0000\n"
"Last-Translator: Paulino <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML inválido para a arquitectura de vista"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Permitir data fora do período"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Verificar data da conta"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-24 01:05+0000\n"
"Last-Translator: Pedro_Maschio <pedro.bicudo@tgtconsult.com.br>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML inválido para Arquitetura da View"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Permite datas fora do período"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Verificação de Data de Conta"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 09:32+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid pentru arhitectura machetei de afișare !"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Permite date ce nu sunt în perioadă"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Verificare dată cont"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2008-11-03 16:11+0000\n"
"Last-Translator: Sergei Kostigoff <sergei.kostigoff@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Неправильный XML для просмотра архитектуры!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-33
View File
@@ -1,33 +0,0 @@
# Slovak translation for openobject-addons
# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
#
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: 2009-11-18 15:03+0000\n"
"Last-Translator: Radoslav Sloboda <rado.sloboda@gmail.com>\n"
"Language-Team: Slovak <sk@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-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Neplatná XML pre zobrazenie architektúry!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 09:32+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Neveljaven XML za arhitekturo pogleda."
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Dovoli datum, ki ni v obdobju"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "Kontrola datuma konta"
-64
View File
@@ -1,64 +0,0 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 15:23:46+0000\n"
"PO-Revision-Date: 2009-08-28 15:23:46+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 15:23:46+0000\n"
"PO-Revision-Date: 2009-08-28 15:23:46+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 09:32+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Felaktig XML för Vyarkitektur!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Tillåtet datum ej inom period."
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "konto datum kontroll"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
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-02-03 06:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 09:32+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Görüntüleme mimarisi için Geçersiz XML"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "Girilen tarih periyod içinde değil"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "hesap tarihi kontrolü"
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2008-11-17 21:09+0000\n"
"Last-Translator: Yuriy Tkachenko <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Неправильний XML для Архітектури Вигляду!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-64
View File
@@ -1,64 +0,0 @@
# Translation of OpenERP Server.
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:00:38+0000\n"
"PO-Revision-Date: 2009-08-28 16:00:38+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:00:38+0000\n"
"PO-Revision-Date: 2009-08-28 16:00:38+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
-53
View File
@@ -1,53 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
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-03-20 07:01+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.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:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "无效的视图结构XML文件!"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr "允许日期不在这会计期间"
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr "科目日期检查"
#~ msgid ""
#~ "\n"
#~ " * Adds a field on journals: \"Allows date not in the period\"\n"
#~ " * By default, this field is checked.\n"
#~ "\n"
#~ "If this field is not checked, the system control that the date is in the\n"
#~ "period when you create an account entry. Otherwise, it generates an\n"
#~ "error message: \"The date of your account move is not in the defined\n"
#~ "period !\"\n"
#~ " "
#~ msgstr ""
#~ "\n"
#~ " * 在分类帐增加一个字段:允许日期不在会计期间\n"
#~ " * 默认下这字段是已检查\n"
#~ "\n"
#~ " 如果这字段是不检查,系统日期是在这会计期间\n"
#~ "你能创建凭证.\n"
#~ "否则,它会产生一个错误信息:\n"
#~ "你不能在这会计期间凭证\n"
#~ " "
-32
View File
@@ -1,32 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_date_check
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-01-30 12:43+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""
+1
View File
@@ -39,6 +39,7 @@
'security/account_payment_security.xml',
'security/ir.model.access.csv',
'wizard/account_payment_pay_view.xml',
'wizard/account_payment_populate_statement_view.xml',
'wizard/account_payment_create_order_view.xml',
'payment_view.xml',
'payment_workflow.xml',
+1 -2
View File
@@ -2,7 +2,6 @@
<openerp>
<data>
<wizard id="wizard_populate_statement" menu="False" model="account.bank.statement" name="populate_statement" string="Populate Statement with Payment lines"/>
<!-- View used in the wizard -->
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account.move.line.form.inherit</field>
@@ -300,7 +299,7 @@
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<group colspan="2" col="3" position="inside">
<button name="%(wizard_populate_statement)d" string="Import payment lines" type="action" icon="gtk-open"/>
<button name="%(action_account_populate_statement_confirm)d" string="Import payment lines" type="action" icon="gtk-open"/>
</group>
</field>
</record>
+2 -4
View File
@@ -18,10 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import account_payment_order
import account_payment_populate_statement
import account_payment_pay
import wizard_populate_statement
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,110 @@
# -*- 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 lxml import etree
from osv import osv, fields
class account_payment_populate_statement(osv.osv_memory):
_name = "account.payment.populate.statement"
_description = "Account Payment Populate Statement"
_columns = {
'lines': fields.many2many('payment.line', 'payment_line_rel_', 'payment_id', 'line_id', 'Payment Lines')
}
def search_entries(self, cr, uid, ids, context=None):
line_obj = self.pool.get('payment.line')
statement_obj = self.pool.get('account.bank.statement')
mod_obj = self.pool.get('ir.model.data')
data = self.read(cr, uid, ids, [], context=context)[0]
statement = statement_obj.browse(cr, uid, context['active_id'], context=context)
line_ids = line_obj.search(cr, uid, [
('move_line_id.reconcile_id', '=', False),
('order_id.mode.journal.id', '=', statement.journal_id.id)])
line_ids.extend(line_obj.search(cr, uid, [
('move_line_id.reconcile_id', '=', False),
('order_id.mode', '=', False)]))
context.update({'line_ids': line_ids})
model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','account_payment_populate_statement_view')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
return {
'name': ('Entrie Lines'),
'context': context,
'view_type': 'form',
'view_mode': 'form',
'res_model': 'account.payment.populate.statement',
'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new',
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
res = super(account_payment_populate_statement, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
if context and 'line_ids' in context:
view_obj = etree.XML(res['arch'])
child = view_obj.getchildren()[0]
domain = '[("id", "in", '+ str(context['line_ids'])+')]'
field = etree.Element('field', attrib={'domain': domain, 'name':'lines', 'colspan':'4', 'height':'300', 'width':'800', 'nolabel':"1"})
child.addprevious(field)
res['arch'] = etree.tostring(view_obj)
return res
def populate_statement(self, cr, uid, ids, context=None):
line_obj = self.pool.get('payment.line')
statement_obj = self.pool.get('account.bank.statement')
statement_line_obj = self.pool.get('account.bank.statement.line')
currency_obj = self.pool.get('res.currency')
statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile')
if context is None:
context = {}
data = self.read(cr, uid, ids, [])[0]
line_ids = data['lines']
if not line_ids:
return {}
statement = statement_obj.browse(cr, uid, context['active_id'], context=context)
for line in line_obj.browse(cr, uid, line_ids, context=context):
ctx = context.copy()
ctx['date'] = line.ml_maturity_date # was value_date earlier,but this field exists no more now
amount = currency_obj.compute(cr, uid, line.currency.id,
statement.currency.id, line.amount_currency, context=ctx)
if line.move_line_id:
reconcile_id = statement_reconcile_obj.create(cr, uid, {
'line_ids': [(6, 0, [line.move_line_id.id])]
}, context=context)
statement_line_obj.create(cr, uid, {
'name': line.order_id.reference or '?',
'amount': - amount,
'type': 'supplier',
'partner_id': line.partner_id.id,
'account_id': line.move_line_id.account_id.id,
'statement_id': statement.id,
'ref': line.communication,
'reconcile_id': reconcile_id,
}, context=context)
return {'type' : 'ir.actions.act_window_close'}
account_payment_populate_statement()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="account_populate_statement_confirm_view" model="ir.ui.view">
<field name="name">Payment Populate statement</field>
<field name="model">account.payment.populate.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Populate Statement:">
<label string="Are your sure to import Payment Lines!"/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="search_entries" string="Yes" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<record id="action_account_populate_statement_confirm" model="ir.actions.act_window">
<field name="name">Payment Populate statement</field>
<field name="res_model">account.payment.populate.statement</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_populate_statement_confirm_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
</record>
<record id="account_payment_populate_statement_view" model="ir.ui.view">
<field name="name">Payment Populate statement</field>
<field name="model">account.payment.populate.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Populate Statement:">
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="populate_statement" string="ADD" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<record id="action_account_payment_populate_statement" model="ir.actions.act_window">
<field name="name">Payment Populate statement</field>
<field name="res_model">account.payment.populate.statement</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_payment_populate_statement_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
</record>
</data>
</openerp>
@@ -1,121 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
from tools.misc import UpdateableStr
FORM = UpdateableStr()
FIELDS = {
'lines': {'string': 'Payment Lines', 'type': 'many2many',
'relation': 'payment.line'},
}
def _search_entries(obj, cursor, user, data, context):
pool = pooler.get_pool(cursor.dbname)
line_obj = pool.get('payment.line')
statement_obj = pool.get('account.bank.statement')
statement = statement_obj.browse(cursor, user, data['id'], context=context)
line_ids = line_obj.search(cursor, user, [
('move_line_id.reconcile_id', '=', False),
('order_id.mode.journal.id', '=', statement.journal_id.id)])
line_ids.extend(line_obj.search(cursor, user, [
('move_line_id.reconcile_id', '=', False),
('order_id.mode', '=', False)]))
FORM.string = '''<?xml version="1.0"?>
<form string="Populate Statement:">
<field name="lines" colspan="4" height="300" width="800" nolabel="1"
domain="[('id', 'in', [%s])]"/>
</form>''' % (','.join([str(x) for x in line_ids]))
return {}
def _populate_statement(obj, cursor, user, data, context):
line_ids = data['form']['lines'][0][2]
if not line_ids:
return {}
pool = pooler.get_pool(cursor.dbname)
line_obj = pool.get('payment.line')
statement_obj = pool.get('account.bank.statement')
statement_line_obj = pool.get('account.bank.statement.line')
currency_obj = pool.get('res.currency')
statement_reconcile_obj = pool.get('account.bank.statement.reconcile')
statement = statement_obj.browse(cursor, user, data['id'], context=context)
for line in line_obj.browse(cursor, user, line_ids, context=context):
ctx = context.copy()
ctx['date'] = line.ml_maturity_date # was value_date earlier,but this field exists no more now
amount = currency_obj.compute(cursor, user, line.currency.id,
statement.currency.id, line.amount_currency, context=ctx)
if line.move_line_id:
reconcile_id = statement_reconcile_obj.create(cursor, user, {
'line_ids': [(6, 0, [line.move_line_id.id])]
}, context=context)
statement_line_obj.create(cursor, user, {
'name': line.order_id.reference or '?',
'amount': - amount,
'type': 'supplier',
'partner_id': line.partner_id.id,
'account_id': line.move_line_id.account_id.id,
'statement_id': statement.id,
'ref': line.communication,
'reconcile_id': reconcile_id,
}, context=context)
return {}
class PopulateStatement(wizard.interface):
"""
Populate the current statement with selected payement lines
"""
states = {
'init': {
'actions': [_search_entries],
'result': {
'type': 'form',
'arch': FORM,
'fields': FIELDS,
'state': [
('end', '_Cancel'),
('add', '_Add', '', True)
]
},
},
'add': {
'actions': [],
'result': {
'type': 'action',
'action': _populate_statement,
'state': 'end'
},
},
}
PopulateStatement('populate_statement')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1
View File
@@ -38,6 +38,7 @@
'account_report.xml',
'account_wizard.xml',
'wizard/account_report_print_indicators_view.xml',
'wizard/account_report_print_indicators_with_pdf_view.xml',
],
'demo_xml': [],
'installable': True,
+1 -1
View File
@@ -4,7 +4,7 @@
<!-- <wizard id="wizard_print_indicators" name="print.indicators" string="Print Indicators"/>-->
<!-- <menuitem action="wizard_print_indicators" type="wizard" parent="account_report.menu_action_account_report_tree_view" id="menu_wizard_print_indicators"/>-->
<wizard id="wizard_indicators_with_pdf" model="account.report.report" name="print.indicators.pdf" string="Indicators in PDF" keyword="client_action_multi" />
<!-- <wizard id="wizard_indicators_with_pdf" model="account.report.report" name="print.indicators.pdf" string="Indicators in PDF" keyword="client_action_multi" />-->
<!--<menuitem action="wizard_indicators_with_pdf" type="wizard" parent="account_report.menu_action_account_report_tree_view" id="menu_wizard_print_indicators_with_pdf"/>-->
</data>
</openerp>
+1 -1
View File
@@ -20,6 +20,6 @@
##############################################################################
import account_report_print_indicators
import wizard_print_indicators_with_pdf
import account_report_print_indicators_with_pdf
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,107 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from mx.DateTime import *
import os
import base64
import StringIO
from osv import fields, osv
import tools
import pooler
from report.render import render
from report.interface import report_int
class account_report_print_indicators_with_pdf(osv.osv_memory):
_name = "account.report.print.indicators.with.pdf"
_description = "Print Indicators"
_columns = {
'file': fields.binary('Select a PDF File', filters='*.pdf', required=True),
}
def check_report(self, cr, uid, ids, context=None):
datas = {}
if context is None:
context = {}
data = self.read(cr, uid, ids)[0]
datas = {
'ids': context.get('active_ids',[]),
'model': 'account.report.report',
'form': data
}
return {
'type': 'ir.actions.report.xml',
'report_name': 'print.indicator.pdf',
'datas': datas,
}
account_report_print_indicators_with_pdf()
class external_pdf(render):
def __init__(self, pdf):
render.__init__(self)
self.pdf = pdf
self.output_type='pdf'
def _render(self):
return self.pdf
class report_custom(report_int):
def create(self, cr, uid, ids, data, context={}):
pool = pooler.get_pool(cr.dbname)
obj_indicator = pool.get('account.report.report')
code_ids = obj_indicator.browse(cr,uid,context['active_id'])
self.list={}
def find_child(obj):
self.list[str(obj.code)]=str(obj.amount)
if obj.child_ids:
for child in obj.child_ids:
find_child(child)
return True
find_child(code_ids)
file_contents=base64.decodestring(data['form']['file'])
fp = StringIO.StringIO(file_contents)
infile = open(tools.config['addons_path']+"/test.pdf", 'wb')
infile.write(fp.read())
infile.close()
obj_user=pool.get('res.users').browse(cr,uid,uid)
self.list['printing_user']=str(obj_user.name)
self.list['company_name']=(obj_user.company_id.name)
self.list['company_country']=obj_user.company_id.partner_id.country
self.list['company_vat']=obj_user.company_id.partner_id.vat
self.list['printing_time']=time.strftime('%H:%M:%S')
self.list['printing_date']=time.strftime('%D')
tools.pdf_utils.fill_pdf(tools.config['addons_path']+"/test.pdf",'/tmp/output.pdf',self.list)
self.obj = external_pdf(file('/tmp/output.pdf').read())
self.obj.render()
return (self.obj.pdf, 'pdf')
report_custom('report.print.indicator.pdf')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_report_print_indicators_with_pdf_view" model="ir.ui.view">
<field name="name">account.report.print.indicators.with.pdf.form</field>
<field name="model">account.report.print.indicators.with.pdf</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Print Indicators with PDF">
<label string="Select the PDF file on which Indicators will be printed."/>
<newline/>
<field name="file" colspan="4"/>
<separator colspan="4" string=""/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_report_print_indicators_with_pdf" model="ir.actions.act_window">
<field name="name">Indicators in PDF</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.report.print.indicators.with.pdf</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_report_print_indicators_with_pdf_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="account_report_print_indicators_with_pdf_values">
<field name="model_id" ref="account_report.model_account_report_report" />
<field name="object" eval="1" />
<field name="name">Indicators in PDF</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_report_print_indicators_with_pdf'))" />
<field name="key">action</field>
<field name="model">account.report.report</field>
</record>
</data>
</openerp>
@@ -1,109 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
import time
import datetime
import sys
from mx.DateTime import *
import tools
from report.render import render
from report.interface import report_int
import os
import base64
import StringIO
form = '''<?xml version="1.0"?>
<form string="Print Indicators with PDF">
<label string="Select the PDF file on which Indicators will be printed."/>
<newline/>
<field name="file" colspan="4"/>
</form>'''
fields = {
'file': {'string':'Select a PDF File', 'type':'binary','required':True,'filters':'*.pdf'},
}
class external_pdf(render):
def __init__(self, pdf):
render.__init__(self)
self.pdf = pdf
self.output_type='pdf'
def _render(self):
return self.pdf
class report_custom(report_int):
def create(self, cr, uid, ids, data, context={}):
pool = pooler.get_pool(cr.dbname)
obj_indicator = pool.get('account.report.report')
code_ids = obj_indicator.browse(cr,uid,data['id'])
self.list={}
def find_child(obj):
self.list[obj.code]=str(obj.amount)
if obj.child_ids:
for child in obj.child_ids:
find_child(child)
return True
find_child(code_ids)
file_contents=base64.decodestring(data['form']['file'])
fp = StringIO.StringIO(file_contents)
infile = open(tools.config['addons_path']+"/test.pdf", 'wb')
infile.write(fp.read())
infile.close()
obj_user=pool.get('res.users').browse(cr,uid,uid)
self.list['printing_user']=obj_user.name
self.list['company_name']=obj_user.company_id.name
self.list['company_country']=obj_user.company_id.partner_id.country
self.list['company_vat']=obj_user.company_id.partner_id.vat
self.list['printing_time']=time.strftime('%H:%M:%S')
self.list['printing_date']=time.strftime('%D')
tools.pdf_utils.fill_pdf(tools.config['addons_path']+"/test.pdf",'/tmp/output.pdf',self.list)
self.obj = external_pdf(file('/tmp/output.pdf').read())
self.obj.render()
return (self.obj.pdf, 'pdf')
report_custom('report.print.indicator.pdf')
class wizard_print_indicators_with_pdf(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':form, 'fields':fields, 'state':[('end','Cancel'),('print','Print')]}
},
'print': {
'actions':[],
'result' :{'type':'print','report':'print.indicator.pdf', 'state':'end'}
}
}
wizard_print_indicators_with_pdf('print.indicators.pdf')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+32 -22
View File
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# Copyright (C) 2008-2009 B2CK, Cedric Krier, Bertrand Chenal (the methods "check_vat_[a-z]{2}"
# Copyright (C) 2008-2009 B2CK, Cedric Krier, Bertrand Chenal (the methods "check_vat_[a-z]{2}"
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,6 +24,11 @@ from osv import osv
from osv import fields
import string
from tools.func import partial
from tools.translate import _
_ref_vat = {
'be': 'BE0477472701',
}
def mult_add(i, j):
"""Sum each digits of the multiplication of i and j."""
@@ -32,6 +37,10 @@ def mult_add(i, j):
class res_partner(osv.osv):
_inherit = 'res.partner'
def _split_vat(self, vat):
vat_country, vat_number = vat[:2].lower(), vat[2:].replace(' ', '')
return vat_country, vat_number
def check_vat(self, cr, uid, ids):
'''
Check the VAT number depending of the country.
@@ -39,38 +48,39 @@ class res_partner(osv.osv):
'''
for partner in self.browse(cr, uid, ids):
if not partner.vat:
continue #FIXME return False? empty vat numbre is invalid?
vat_country, vat_number = partner.vat[:2].lower(), partner.vat[2:].replace(' ', '')
continue
vat_country, vat_number = self._split_vat(partner.vat)
if not hasattr(self, 'check_vat_' + vat_country):
return False
check = getattr(self, 'check_vat_' + vat_country)
if not check(vat_number):
return False
return True
def __getattr__(self, attr):
if not attr.startswith('check_vat_'):
super(res_partner, self).__getattr__(attr)
def default_vat_check(self, cn, vn):
# by default, a VAT number is valid if:
# it starts with 2 letters
# has more than 3 characters
return len(vn) > 0 and len(cn) == 2 and cn[0] in string.ascii_lowercase and cn[1] in string.ascii_lowercase
return partial(default_vat_check, self, attr[10:])
def vat_change(self, cr, uid, ids, value, context={}):
return {'value': {'vat_subjected': bool(value)}}
_columns = {
'vat_subjected': fields.boolean('VAT Legal Statement', help="Check this box if the partner is subjected to the VAT. It will be used for the VAT legal statement.")
}
_constraints = [(check_vat, "The VAT doesn't seem to be correct.", ["vat"])]
def _construct_constraint_msg(self, cr, uid, ids):
def default_vat_check(cn, vn):
# by default, a VAT number is valid if:
# it starts with 2 letters
# has more than 3 characters
return cn[0] in string.ascii_lowercase and cn[1] in string.ascii_lowercase
vat_country, vat_number = self._split_vat(self.browse(cr, uid, ids)[0].vat)
if default_vat_check(vat_country, vat_number):
return _('The Vat does not seems to be correct. You should have entered something like this %s'), (_ref_vat[vat_country])
return _('The VAT is invalid, it should begin with the country code'), ()
_constraints = [(check_vat, _construct_constraint_msg, ["vat"])]
# code from the following methods come from Tryton (B2CK)
# http://www.tryton.org/hgwebdir.cgi/modules/relationship/file/544d1de586d9/party.py
# http://www.tryton.org/hgwebdir.cgi/modules/relationship/file/544d1de586d9/party.py
def check_vat_at(self, vat):
'''
Check Austria VAT number.
@@ -969,10 +979,10 @@ class res_partner(osv.osv):
if int(vat[9:11]) < 0:
return False
# if int(vat[-2:]) != 1:
# return False
sum = mult_add(2, int(vat[0])) + int(vat[1]) + \
mult_add(2, int(vat[2])) + int(vat[3]) + \
mult_add(2, int(vat[4])) + int(vat[5]) + \
@@ -15,7 +15,7 @@
<child1>
<action colspan="4" height="200" name="%(mrp.mrp_production_action2)d" string="Next production orders" width="510"/>
<action colspan="4" name="%(stock.action_picking_all)d" string="Deliveries (Out picking)" domain="[('state','=','assigned'),('type','=','out')]"/>
<action colspan="4" name="%(mrp.mrp_procurement_action4)d" string="Procurements in Exception"/>
<action colspan="4" name="%(mrp_procurement.mrp_procurement_action4)d" string="Procurements in Exception"/>
</child1>
@@ -23,7 +23,7 @@
<form string="Warehouse board">
<hpaned position="100">
<child1>
<action colspan="4" name="%(mrp.mrp_procurement_action5)d" string="Procurement Exceptions" width="510" />
<action colspan="4" name="%(mrp_procurement.mrp_procurement_action5)d" string="Procurement Exceptions" width="510" />
<action colspan="4" name="%(action_reception_picking_move_board)d" string="Products To Receive" />
</child1>
+1 -1
View File
@@ -774,7 +774,7 @@ class crm_case_history(osv.osv):
"""
res = {}
for hist in self.browse(cursor, user, ids, context or {}):
res[hist.id] = (hist.email or '/') + ' (' + str(hist.date) + ')\n'
res[hist.id] = (hist.email_from or '/') + ' (' + str(hist.date) + ')\n'
res[hist.id] += (hist.description or '')
return res
+1 -1
View File
@@ -141,8 +141,8 @@
<separator string="Dates" colspan="2" col="2"/>
<field name="create_date"/>
<field name="write_date"/>
<field name="date_closed"/>
<field name="date_open"/>
<field name="date_closed"/>
</group>
<group colspan="2" col="2">
<separator string="Statistics" colspan="2" col="2"/>
+4 -3
View File
@@ -92,9 +92,10 @@ class crm_send_new_email(osv.osv_memory):
email_from = data.get('email_from', False)
case_pool._history(cr, uid, [case], _('Send'), history=True, email=data['email_to'], details=body, email_from=email_from, message_id=message_id)
x_headers = {
'Reply-To':"%s" % case.section_id.reply_to,
}
x_headers = dict()
#x_headers = {
# 'Reply-To':"%s" % case.section_id.reply_to,
#}
if message_id:
x_headers['References'] = "%s" % (message_id)
+11 -3
View File
@@ -28,6 +28,17 @@ class delivery_carrier(osv.osv):
_name = "delivery.carrier"
_description = "Carrier and delivery grids"
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []
order_id = context.get('order_id',False)
if not order_id:
res = super(delivery_carrier, self).name_get(cr, uid, ids, context=context)
else:
order = self.pool.get('sale.order').browse(cr, uid, [order_id])[0]
currency = order.pricelist_id.currency_id.name or ''
res = [(r['id'], r['name']+' ('+(str(r['price']))+' '+currency+')') for r in self.read(cr, uid, ids, ['name', 'price'], context)]
return res
def get_price(self, cr, uid, ids, field_name, arg=None, context={}):
res={}
sale_obj=self.pool.get('sale.order')
@@ -94,9 +105,7 @@ class delivery_grid(osv.osv):
}
_order = 'sequence'
def get_price(self, cr, uid, id, order, dt, context):
total = 0
weight = 0
volume = 0
@@ -112,7 +121,6 @@ class delivery_grid(osv.osv):
def get_price_from_picking(self, cr, uid, id, total, weight, volume, context={}):
grid = self.browse(cr, uid, id, context)
price = 0.0
ok = False
+11
View File
@@ -289,5 +289,16 @@
</field>
</record>
<record model="ir.ui.view" id="edit_project_multicompany">
<field name="name">sale.order.multicompany</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Sale Order']/group[1]/button[@name='button_dummy']" position="after">
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-execute" context="{'order_id':id}"/>
</xpath>
</field>
</record>
</data>
</openerp>
@@ -50,7 +50,11 @@ class make_delivery(osv.osv_memory):
res = super(make_delivery, self).default_get(cr, uid, fields, context=context)
order_obj = self.pool.get('sale.order')
for order in order_obj.browse(cr, uid, context.get('active_ids', [])):
res.update({'carrier_id': order.partner_id.property_delivery_carrier.id})
carrier = order.carrier_id.id
if not carrier:
carrier = order.partner_id.property_delivery_carrier.id
res.update({'carrier_id': carrier})
return res
def view_init(self, cr , uid , fields, context=None):
@@ -11,26 +11,28 @@
<field name="arch" type="xml">
<form string="Create Deliveries">
<separator colspan="4" string="Delivery Method" />
<field name="carrier_id"/>
<field name="carrier_id" widget="selection"/>
<newline/>
<separator colspan="4"/>
<group col="2" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="delivery_set" string="Add Delivery Costs"
colspan="1" type="object" icon="gtk-ok" />
string="_Cancel" />
<button name="delivery_set" string="_Apply"
colspan="1" type="object" icon="gtk-apply" />
</group>
</form>
</field>
</record>
<record id="action_delivery_cost" model="ir.actions.act_window">
<field name="name">Delivery Costs</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">delivery.sale.order</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_make_delivery_wizard"/>
<field name="target">new</field>
</record>
<act_window name="Delivery Costs"
res_model="delivery.sale.order"
src_model="sale.order"
view_mode="form"
target="new"
key2="client_action_multi"
id="act_delivery_cost"/>
</data>
</openerp>
+21 -21
View File
@@ -7,25 +7,25 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-09 13:36+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-10 10:27+0000\n"
"Last-Translator: lyyser <logard.1961@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:00+0000\n"
"X-Launchpad-Export-Date: 2010-05-11 04:18+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: event
#: field:event.event,date_end:0
#: field:report.event.registration,date_end:0
msgid "Ending date"
msgstr ""
msgstr "Lõpu kuupäev"
#. module: event
#: field:event.event,register_min:0
msgid "Minimum Registrations"
msgstr ""
msgstr "Miinimum registreerimised"
#. module: event
#: constraint:ir.actions.act_window:0
@@ -35,17 +35,17 @@ msgstr "Vigane mudeli nimi toimingu definitsioonis."
#. module: event
#: field:event.event,mail_registr:0
msgid "Registration Email"
msgstr ""
msgstr "Registreerimise Email"
#. module: event
#: model:crm.case.section,name:event.event_0_crm_case_section
msgid "Concert of Bon Jovi"
msgstr ""
msgstr "Bon Jovi kontsert"
#. module: event
#: field:event.event,mail_confirm:0
msgid "Confirmation Email"
msgstr ""
msgstr "Kinnitus Email"
#. module: event
#: constraint:crm.case.section:0
@@ -55,7 +55,7 @@ msgstr "Viga! Sa ei saa luua rekursiivseid sektsioone."
#. module: event
#: model:ir.model,name:event.model_event_registration
msgid "Event Registration"
msgstr ""
msgstr "Sündmuse registreerimine"
#. module: event
#: model:ir.actions.wizard,name:event.event_reg_invoice
@@ -65,52 +65,52 @@ msgstr ""
#. module: event
#: field:report.event.type.registration,draft_state:0
msgid "Draft Registrations"
msgstr ""
msgstr "Registreerimiste mustand"
#. module: event
#: view:report.event.registration:0
msgid "Event on Registration"
msgstr ""
msgstr "Registreerimise sündmus"
#. module: event
#: wizard_button:event.reg_make_invoice,init,end:0
msgid "Ok"
msgstr ""
msgstr "Ok"
#. module: event
#: field:event.event,mail_auto_confirm:0
msgid "Mail Auto Confirm"
msgstr ""
msgstr "Autokinnituse meil"
#. module: event
#: model:product.template,name:event.event_product_1_product_template
msgid "Ticket for Opera"
msgstr ""
msgstr "Ooperi pilet"
#. module: event
#: wizard_field:event.reg_make_invoice,init,inv_rejected:0
msgid "Invoice Rejected"
msgstr ""
msgstr "Arve väljapraagitud"
#. module: event
#: view:event.event:0
msgid "Confirm Event"
msgstr ""
msgstr "Kinnita sündmus"
#. module: event
#: model:crm.case.section,name:event.event_1_crm_case_section
msgid "Opera of Verdi"
msgstr ""
msgstr "Verdi ooper"
#. module: event
#: field:report.event.registration,draft_state:0
msgid "Draft Registration"
msgstr ""
msgstr "Registreerimise mustand"
#. module: event
#: wizard_view:event.reg_make_invoice,init:0
msgid "Create Invoices"
msgstr ""
msgstr "Loo arved"
#. module: event
#: model:ir.module.module,description:event.module_meta_information
@@ -134,12 +134,12 @@ msgstr ""
#. module: event
#: view:event.registration:0
msgid "Extra Info"
msgstr ""
msgstr "Täiendav info"
#. module: event
#: view:event.registration:0
msgid "Registration"
msgstr ""
msgstr "Registreerimine"
#. module: event
#: field:event.type,name:0
+5 -5
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: 2010-02-14 21:34+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-10 13:18+0000\n"
"Last-Translator: Angel Spy <melissadilara@yahoo.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:16+0000\n"
"X-Launchpad-Export-Date: 2010-05-11 04:19+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr
@@ -62,7 +62,7 @@ msgstr ""
#. module: hr
#: view:hr.department:0
msgid "Department"
msgstr ""
msgstr "Bölüm"
#. module: hr
#: model:process.transition,name:hr.process_transition_contactofemployee0
@@ -340,7 +340,7 @@ msgstr "Firmalar"
#. module: hr
#: selection:hr.timesheet,dayofweek:0
msgid "Wednesday"
msgstr "Carsamba"
msgstr "Çarşamba"
#. module: hr
#: model:ir.actions.act_window,name:hr.open_view_categ_form
+2 -2
View File
@@ -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:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+3 -1
View File
@@ -51,7 +51,9 @@
'process/hr_expense_process.xml',
'report/hr_expense_report_view.xml'
],
'demo_xml': ['hr.expense.expense.csv'],
'demo_xml': ['hr_expense_demo.xml',
# 'hr.expense.expense.csv'
],
'installable': True,
'active': False,
'certificate': '0062479841789',
+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0" ?>
<openerp>
<data noupdate="1">
<record id="hr_expense_expense_septemberexpenses0" model="hr.expense.expense">
<field name="currency_id" ref="base.EUR"/>
<field name="employee_id" ref="hr.employee1"/>
<field name="user_id" ref="base.user_root"/>
<field name="name">September Expenses</field>
<field name="company_id" ref="base.main_company"/>
<field name="date">2010-05-03</field>
<field name="state">draft</field>
</record>
<record id="hr_expense_line_travelbycarcustomerseagatedouble0" model="hr.expense.line">
<field name="name">Travel by Car - Customer Seagate 2 - Double</field>
<field name="date_value">2010-05-03</field>
<field name="analytic_account" ref="account.analytic_thymbra"/>
<field model="hr.expense.expense" name="expense_id" search="[('name', '=', u'September Expenses')]"/>
<field eval="200.0" name="unit_amount"/>
<field eval="130.0" name="unit_quantity"/>
</record>
<record id="hr_expense_line_basicpcserverforseagate0" model="hr.expense.line">
<field name="name">Basic PC - Server for Seagate</field>
<field name="date_value">2010-05-03</field>
<field name="analytic_account" ref="account.analytic_seagate_p2"/>
<field model="hr.expense.expense" name="expense_id" search="[('name', '=', u'September Expenses')]"/>
<field eval="500.0" name="unit_amount"/>
<field eval="1.0" name="unit_quantity"/>
</record>
</data>
<data noupdate="1">
<record id="hr_expense_expense_septemberexpenses1" model="hr.expense.expense">
<field name="currency_id" ref="base.EUR"/>
<field name="employee_id" ref="hr.employee1"/>
<field name="user_id" ref="base.user_root"/>
<field name="name">Hotel Expenses</field>
<field name="company_id" ref="base.main_company"/>
<field name="date">2010-04-20</field>
<field name="state">draft</field>
</record>
<record id="hr_expense_line_hotelexpensesthymbra0" model="hr.expense.line">
<field name="name">Hotel Expenses - Thymbra</field>
<field name="date_value">2010-05-03</field>
<field name="analytic_account" ref="account.analytic_thymbra"/>
<field model="hr.expense.expense" name="expense_id" search="[('name', '=', u'Hotel Expenses')]"/>
<field eval="2000.0" name="unit_amount"/>
<field eval="5.0" name="unit_quantity"/>
</record>
</data>
</openerp>
+1 -2
View File
@@ -66,7 +66,6 @@
<field name="arch" type="xml">
<form string="Expenses Sheet">
<group colspan="4" col="6">
<field name="employee_id" select="1"/>
<field name="name" select="1"/>
<field name="employee_id" select="1"/>
<field name="ref"/>
@@ -99,7 +98,7 @@
<button name="confirm" states="draft" string="Confirm" type="workflow" icon="gtk-apply"/>
<button name="cancel" states="cancel" string="Cancel" type="workflow" icon="gtk-cancel"/>
<button name="validate" states="confirm" string="Accept" type="workflow" icon="gtk-ok"/>
<button name="invoice" states="accepted" string="Invoice" type="workflow" icon="gtk-print"/>
<button name="invoice" states="accepted" string="Invoice" type="workflow" icon="gtk-execute"/>
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" icon="gtk-convert"/>
<button name="refuse" states="confirm,draft,accepted" string="Refuse" type="workflow" icon="gtk-no"/>
</group>
+158 -53
View File
@@ -20,18 +20,35 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx import DateTime
import time
import pooler
import netsvc
import datetime
from osv import fields, osv
from tools.translate import _
class hr_holidays_status(osv.osv):
_name = "hr.holidays.status"
_description = "Leave Types"
def get_days_cat(self, cr, uid, ids, category_id, return_false, context={}):
res = {}
for record in self.browse(cr, uid, ids, context):
res[record.id] = {}
max_leaves = leaves_taken = 0
if not return_false:
cr.execute("""SELECT type, sum(number_of_days) FROM hr_holidays WHERE category_id = %s AND state='validate' AND holiday_status_id = %s GROUP BY type""", (str(category_id), str(record.id)))
for line in cr.fetchall():
if line[0] =='remove':
leaves_taken = -line[1]
if line[0] =='add':
max_leaves = line[1]
res[record.id]['max_leaves'] = max_leaves
res[record.id]['leaves_taken'] = leaves_taken
res[record.id]['remaining_leaves'] = max_leaves - leaves_taken
return res
def get_days(self, cr, uid, ids, employee_id, return_false, context={}):
res = {}
for record in self.browse(cr, uid, ids, context):
@@ -69,21 +86,23 @@ class hr_holidays_status(osv.osv):
res = self.get_days(cr, uid, ids, employee_id, return_false, context=context)
return res
# To do: we can add remaining_leaves_category field to display remaining leaves for particular type
_columns = {
'name' : fields.char('Name', size=64, required=True, translate=True),
'name': fields.char('Name', size=64, required=True, translate=True),
'categ_id': fields.many2one('crm.case.categ', 'Meeting Category', domain="[('object_id.model', '=', 'crm.meeting')]", help='If you link this type of leave with a category in the CRM, it will synchronize each leave asked with a case in this category, to display it in the company shared calendar for example.'),
'color_name' : fields.selection([('red', 'Red'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Departement'),
'limit' : fields.boolean('Allow to Override Limit', help='If you thick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'),
'active' : fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."),
'max_leaves' : fields.function(_user_left_days, method=True, string='Maximum Leaves Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'leaves_taken' : fields.function(_user_left_days, method=True, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'),
'remaining_leaves' : fields.function(_user_left_days, method=True, string='Remaining Leaves', help='Maximum Leaves Allowed - Leaves Already Taken', multi='user_left_days'),
'color_name': fields.selection([('red', 'Red'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Departement'),
'limit': fields.boolean('Allow to Override Limit', help='If you thick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'),
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."),
'max_leaves': fields.function(_user_left_days, method=True, string='Maximum Leaves Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'leaves_taken': fields.function(_user_left_days, method=True, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'),
'remaining_leaves': fields.function(_user_left_days, method=True, string='Remaining Leaves', help='Maximum Leaves Allowed - Leaves Already Taken', multi='user_left_days'),
'double_validation': fields.boolean('Apply Double Validation', help="If its True then its Allocation/Request have to be validated by second validator")
}
_defaults = {
'color_name': lambda *args: 'red',
'active' : lambda *a: True,
'color_name': 'red',
'active': True,
}
hr_holidays_status()
class hr_holidays(osv.osv):
@@ -91,7 +110,7 @@ class hr_holidays(osv.osv):
_description = "Holidays"
_order = "type desc, date_from asc"
def _employee_get(obj,cr,uid,context={}):
def _employee_get(obj, cr, uid, context=None):
ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)])
if ids:
return ids[0]
@@ -99,7 +118,7 @@ class hr_holidays(osv.osv):
_columns = {
'name' : fields.char('Description', required=True, readonly=True, size=64, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Validation'), ('refuse', 'Refused'), ('validate', 'Validated'), ('cancel', 'Cancelled')], 'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Validation\'.\
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Validation'), ('refuse', 'Refused'), ('validate1', 'Waiting Second Validation'), ('validate', 'Validated'), ('cancel', 'Cancelled')], 'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Validation\'.\
If the admin accepts it, the state is \'Validated\'. If it is refused, the state is \'Refused\'.'),
'date_from' : fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}),
'user_id':fields.many2one('res.users', 'User', states={'draft':[('readonly',False)]}, select=True, readonly=True),
@@ -116,24 +135,53 @@ class hr_holidays(osv.osv):
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
}
'category_id': fields.many2one('hr.employee.category', "Employee Category", help='Category Of employee'),
'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Holiday Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category'),
'manager_id2': fields.many2one('hr.employee', 'Second Validator', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)')
}
_defaults = {
'employee_id' : _employee_get ,
'state' : lambda *a: 'draft',
'type': lambda *a: 'remove',
'allocation_type': lambda *a: 'employee',
'state' : 'draft',
'type': 'remove',
'allocation_type': 'employee',
'user_id': lambda obj, cr, uid, context: uid,
'holiday_type': 'employee'
}
_order = 'date_from desc'
def create(self, cr, uid, vals, context={}):
if context:
if context.has_key('type'):
vals['type'] = context['type']
if context.has_key('allocation_type'):
vals['allocation_type'] = context['allocation_type']
return super(osv.osv,self).create(cr, uid, vals, context)
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
if 'holiday_type' in vals:
if vals['holiday_type'] == 'employee':
vals.update({'category_id': False})
else:
vals.update({'employee_id': False})
if context.has_key('type'):
vals['type'] = context['type']
if context.has_key('allocation_type'):
vals['allocation_type'] = context['allocation_type']
return super(hr_holidays, self).create(cr, uid, vals, context=context)
def write(self, cr, uid, ids, vals, context=None):
if context is None:
context = {}
if 'holiday_type' in vals:
if vals['holiday_type'] == 'employee':
vals.update({'category_id': False})
else:
vals.update({'employee_id': False})
return super(hr_holidays, self).write(cr, uid, ids, vals, context=context)
def onchange_type(self, cr, uid, ids, holiday_type):
result = {}
if holiday_type=='employee':
ids_employee = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)])
if ids_employee:
result['value'] = {
'employee_id': ids_employee[0]
}
return result
def onchange_date_from(self, cr, uid, ids, date_to, date_from):
result = {}
@@ -157,27 +205,27 @@ class hr_holidays(osv.osv):
self.pool.get('crm.meeting').unlink(cr,uid,[record.case_id.id])
if record.linked_request_ids:
list_ids = []
for id in record.linked_request_ids:
list_ids.append(id.id)
self.holidays_cancel(cr,uid,list_ids)
self.unlink(cr,uid,list_ids)
[list_ids.append(i) for id in record.linked_request_ids]
self.holidays_cancel(cr, uid, list_ids)
self.unlink(cr, uid, list_ids)
def _check_date(self, cr, uid, ids):
if ids:
cr.execute('select number_of_days_temp from hr_holidays where id in ('+','.join(map(str, ids))+')')
res = cr.fetchall()
if res and res[0][0] < 0:
if res and res[0][0] and res[0][0] < 0:
return False
return True
_constraints = [(_check_date, 'Start date should not be larger than end date! ', ['number_of_days'])]
def unlink(self, cr, uid, ids, context={}):
leave_obj = self.pool.get('resource.calendar.leaves')
self._update_user_holidays(cr, uid, ids)
leave_ids = leave_obj.search(cr, uid, [('holiday_id', 'in', ids)])
leave_obj.unlink(cr, uid, leave_ids)
return super(hr_holidays, self).unlink(cr, uid, ids, context)
def onchange_date_to(self, cr, uid, ids, date_from, date_to):
result = {}
if date_from and date_to:
@@ -216,43 +264,77 @@ class hr_holidays(osv.osv):
wf_service.trg_create(uid, 'hr.holidays', holiday_id, cr)
return True
def holidays_validate2(self, cr, uid, ids, *args):
vals = {'state':'validate'}
data_holiday = self.browse(cr, uid, ids)
ids2 = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)])
if ids2:
vals['manager_id2'] = ids2[0]
else:
raise osv.except_osv(_('Warning !'),_('No user related to the selected employee.'))
self.write(cr, uid, ids, vals)
for record in data_holiday:
if record.holiday_type=='employee' and record.type=='remove':
vals = {
'name':record.name,
'date_from':record.date_from,
'date_to':record.date_to,
'calendar_id':record.employee_id.calendar_id.id,
'company_id':record.employee_id.company_id.id,
'resource_id':record.employee_id.resource_id.id,
'holiday_id':record.id
}
self.pool.get('resource.calendar.leaves').create(cr, uid, vals)
return True
def holidays_validate(self, cr, uid, ids, *args):
self.check_holidays(cr,uid,ids)
vals = {
'state':'validate',
}
data_holiday = self.browse(cr, uid, ids)
self.check_holidays(cr, uid, ids)
if data_holiday[0].holiday_status_id.double_validation:
vals = {'state':'validate1'}
else:
vals = {'state':'validate'}
ids2 = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)])
if ids2:
vals['manager_id'] = ids2[0]
else:
raise osv.except_osv(_('Warning !'),_('No user related to the selected employee.'))
self.write(cr, uid, ids, vals)
for record in self.browse(cr, uid, ids):
if record.type=='remove':
vals= {
if not data_holiday[0].holiday_status_id.double_validation:
for record in data_holiday:
if record.holiday_type=='employee' and record.type=='remove':
vals = {
'name':record.name,
'date_from':record.date_from,
'date_to':record.date_to,
'calendar_id':record.employee_id.calendar_id.id,
'company_id':record.employee_id.company_id.id,
'resource_id':record.employee_id.resource_id.id
}
self.pool.get('resource.calendar.leaves').create(cr,uid,vals)
'resource_id':record.employee_id.resource_id.id,
'holiday_id':record.id
}
self.pool.get('resource.calendar.leaves').create(cr, uid, vals)
return True
def holidays_confirm(self, cr, uid, ids, *args):
for record in self.browse(cr, uid, ids):
user_id = False
leave_asked = record.number_of_days_temp
if record.type == 'remove':
if record.holiday_type=='employee' and record.type == 'remove':
if record.employee_id and not record.holiday_status_id.limit:
leaves_rest = self.pool.get('hr.holidays.status').get_days( cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < leave_asked:
raise osv.except_osv(_('Warning!'),_('You cannot validate leaves for %s while available leaves are less than asked leaves.' %(record.employee_id.name)))
nb = -(record.number_of_days_temp)
elif record.holiday_type=='category' and record.type == 'remove':
if record.category_id and not record.holiday_status_id.limit:
leaves_rest = self.pool.get('hr.holidays.status').get_days_cat( cr, uid, [record.holiday_status_id.id], record.category_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < leave_asked:
raise osv.except_osv(_('Warning!'),_('You cannot validate leaves for %s while available leaves are less than asked leaves.' %(record.category_id.name)))
nb = -(record.number_of_days_temp)
else:
nb = record.number_of_days_temp
if record.employee_id:
if record.holiday_type=='employee' and record.employee_id:
user_id = record.employee_id.user_id and record.employee_id.user_id.id or uid
self.write(cr, uid, [record.id], {
@@ -260,6 +342,7 @@ class hr_holidays(osv.osv):
'number_of_days': nb,
'user_id': user_id
})
cr.commit()
return True
def holidays_refuse(self, cr, uid, ids, *args):
@@ -273,31 +356,41 @@ class hr_holidays(osv.osv):
return True
def holidays_cancel(self, cr, uid, ids, *args):
leave_obj = self.pool.get('resource.calendar.leaves')
self._update_user_holidays(cr, uid, ids)
self.write(cr, uid, ids, {
'state':'cancel'
})
leave_ids = leave_obj.search(cr, uid, [('holiday_id', 'in', ids)])
leave_obj.unlink(cr, uid, leave_ids)
return True
def holidays_draft(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {
'state':'draft'
})
self.pool.get('resource.calendar.leaves')
return True
def check_holidays(self,cr,uid,ids):
def check_holidays(self, cr, uid, ids):
for record in self.browse(cr, uid, ids):
if not record.number_of_days:
raise osv.except_osv(_('Warning!'),_('Wrong leave definition.'))
if record.employee_id:
raise osv.except_osv(_('Warning!'),_('Wrong leave definition.'))
if record.holiday_type=='employee' and record.employee_id:
leave_asked = record.number_of_days
if leave_asked < 0.00:
if not record.holiday_status_id.limit:
leaves_rest = self.pool.get('hr.holidays.status').get_days( cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
leaves_rest = self.pool.get('hr.holidays.status').get_days(cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < -(leave_asked):
raise osv.except_osv(_('Warning!'),_('You Cannot Validate leaves while available leaves are less than asked leaves.'))
else:
elif record.holiday_type=='category' and record.category_id:
leave_asked = record.number_of_days
if leave_asked < 0.00:
if not record.holiday_status_id.limit:
leaves_rest = self.pool.get('hr.holidays.status').get_days_cat(cr, uid, [record.holiday_status_id.id], record.category_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < -(leave_asked):
raise osv.except_osv(_('Warning!'),_('You Cannot Validate leaves while available leaves are less than asked leaves.'))
else:# This condition will never meet!!
holiday_ids = []
vals = {
'name' : record.name,
@@ -322,7 +415,8 @@ class hr_holidays(osv.osv):
self.holidays_confirm(cr, uid, holiday_ids)
self.holidays_validate(cr, uid, holiday_ids)
if record.holiday_status_id.categ_id and record.date_from and record.date_to and record.employee_id:
#if record.holiday_status_id.categ_id and record.date_from and record.date_to and record.employee_id:
if record.holiday_status_id.categ_id and record.date_from and record.date_to:
vals={}
vals['name']=record.name
vals['categ_id']=record.holiday_status_id.categ_id.id
@@ -331,10 +425,21 @@ class hr_holidays(osv.osv):
diff_day = (epoch_c - epoch_d)/(3600*24)
vals['duration'] = (diff_day) * 8
vals['note'] = record.notes
vals['user_id'] = record.user_id.id
# vals['user_id'] = record.user_id.id
vals['date'] = record.date_from
if record.holiday_type=='employee':
vals['user_id'] = record.user_id.id
case_id = self.pool.get('crm.meeting').create(cr,uid,vals)
self.write(cr, uid, ids, {'case_id':case_id})
return True
hr_holidays()
class resource_calendar_leaves(osv.osv):
_inherit = "resource.calendar.leaves"
_description = "Leave Detail"
_columns = {
'holiday_id': fields.many2one("hr.holidays", "Holiday"),
}
resource_calendar_leaves()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+50 -13
View File
@@ -45,14 +45,21 @@
<form string="Leave Request">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="employee_id" select="1" required="1"/>
<field name="holiday_status_id" select="1" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}" />
<field name="date_from" select="1" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="date_to" select="1" on_change="onchange_date_to(date_from, date_to)" required="1"/>
<field name="number_of_days_temp"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}"/>
</group>
<notebook colspan="4">
<page string="General">
<group colspan="4" attrs="{'invisible':[('holiday_type','=','employee')]}">
<field name="category_id" select="1" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
</group>
<group colspan="4" attrs="{'invisible':[('holiday_type','=','category')]}">
<field name="employee_id" select="1" attrs="{'required':[('holiday_type','=','employee')]}"/>
</group>
<field name="holiday_status_id" select="1" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}" />
<newline/>
<field name="date_from" select="1" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="date_to" select="1" on_change="onchange_date_to(date_from, date_to)" required="1"/>
<field name="number_of_days_temp"/>
<field name="manager_id"/>
<field name="department_id"/>
<field name="notes" colspan="4"/>
@@ -61,11 +68,15 @@
<group colspan="2">
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
<button string="Validate" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
<button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no"/>
<button string="Approve" name="second_validate" states="validate1" type="workflow" icon="gtk-apply"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no"/>
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel"/>
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Extra Information">
<field name="manager_id2"/>
</page>
</notebook>
</form>
</field>
@@ -80,11 +91,17 @@
<form string="Allocation Request">
<field name="name" select="1"/>
<field name="holiday_status_id" select="1" />
<field name="employee_id" select="1" required="1"/>
<field name="department_id"/>
<field name="number_of_days_temp"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Type"/>
<notebook colspan="4">
<page string="General">
<group colspan="4" attrs="{'invisible':[('holiday_type','=','employee')]}">
<field name="category_id" select="1" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
</group>
<group colspan="4" attrs="{'invisible':[('holiday_type','=','category')]}">
<field name="employee_id" select="1" attrs="{'required':[('holiday_type','=','employee')]}"/>
</group>
<field name="department_id"/>
<field name="number_of_days_temp"/>
<field name="manager_id"/>
<field name="notes" colspan="4"/>
<newline/>
@@ -92,11 +109,15 @@
<group colspan="2">
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
<button string="Validate" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
<button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no"/>
<button string="Approve" name="second_validate" states="validate1" type="workflow" icon="gtk-apply"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no"/>
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel"/>
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert"/>
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Extra Information">
<field name="manager_id2"/>
</page>
</notebook>
</form>
</field>
@@ -111,7 +132,9 @@
<form string="Leaves Management">
<field name="name" select="1"/>
<field name="holiday_status_id" select="1"/>
<field name="employee_id" select="1" />
<!-- <field name="holiday_type"/>
<field name="category_id" select="1" required="1"/>
--> <field name="employee_id" select="1" />
<!--<field name="department_id"/>-->
<field name="type"/>
<field name="date_from" select="1" on_change="onchange_date_from(date_to, date_from)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
@@ -127,7 +150,7 @@
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
<button string="Validate" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
<button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no"/>
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel"/>
<button string="Cancel" name="cancel" states="validate,refuse,validate1" type="workflow" icon="gtk-cancel"/>
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert"/>
</group>
</page>
@@ -288,6 +311,7 @@
<field name="active"/>
<field name="categ_id" select="1" widget="selection"/>
<field name="color_name"/>
<field name="double_validation" />
</form>
</field>
</record>
@@ -317,6 +341,19 @@
id="menu_open_view_holiday_status"
parent="hr.menu_open_view_attendance_reason_config"/>
<!-- holiday on resource leave -->
<record id="resource_calendar_leave_form_inherit" model="ir.ui.view">
<field name="name">resource.calendar.leaves.form.inherit</field>
<field name="model">resource.calendar.leaves</field>
<field name="type">form</field>
<field name="inherit_id" ref="resource.resource_calendar_leave_form"/>
<field name="arch" type="xml">
<field name="resource_id" on_change="onchange_resource(resource_id)" position="after">
<field name="holiday_id"/>
</field>
</field>
</record>
<!-- Shortcuts -->
<act_window name="Holidays"
domain="[('employee_id', '=', active_id), ('type','=','remove')]"
+30 -4
View File
@@ -37,6 +37,14 @@
<field name="action">holidays_validate()</field>
</record>
<record model="workflow.activity" id="act_validate1">
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">second_validate</field>
<field name="kind">function</field>
<field name="action">holidays_validate2()</field>
</record>
<record model="workflow.activity" id="act_refuse">
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">refuse</field>
@@ -53,8 +61,8 @@
<field name="action">holidays_cancel()</field>
<field name="join_mode">XOR</field>
</record>
<!--
<!--
workflow transition
-->
@@ -63,7 +71,7 @@
<field name="act_to" ref="act_confirm" />
<field name="signal">confirm</field>
</record>
<record model="workflow.transition" id="t2">
<field name="act_from" ref="act_confirm" />
<field name="act_to" ref="act_validate" />
@@ -97,6 +105,24 @@
<field name="act_to" ref="act_draft" />
<field name="signal">set_to_draft</field>
</record>
<record model="workflow.transition" id="t8">
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_validate1" />
<field name="signal">second_validate</field>
</record>
<record model="workflow.transition" id="t9">
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_refuse" />
<field name="signal">refuse</field>
</record>
<record model="workflow.transition" id="t10">
<field name="act_from" ref="act_validate1" />
<field name="act_to" ref="act_cancel" />
<field name="signal">cancel</field>
</record>
</data>
</openerp>
@@ -63,7 +63,8 @@ class hr_holidays_report(osv.osv):
s.state
from
hr_holidays s
where type='remove'
where type='remove' and
s.employee_id is not null
group by
s.create_date,s.state,s.date_from,s.date_to,
s.number_of_days_temp,s.employee_id,s.user_id
@@ -98,7 +99,7 @@ class hr_holidays_remaining_leaves_user(osv.osv):
where
hrs.employee_id = hre.id and
hre.resource_id = rr.id and
hhs.id = hrs.holiday_status_id
hhs.id = hrs.holiday_status_id
group by
rr.name,rr.user_id,hhs.name
)
@@ -81,7 +81,7 @@
</record>
<record id="action_hr_holidays_report_all" model="ir.actions.act_window">
<field name="name">Leaves</field>
<field name="name">Leaves By Employee</field>
<field name="res_model">hr.holidays.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<wizard
id="wizard_hr_job_reschedule_phone_call"
keyword="client_action_multi"
model="hr.applicant"
name="hr.applicant.reschedule_phone_call"
multi="True"
string="Schedule Phone Call" />
<wizard
id="wizard_hr_job_meeting_set"
keyword="client_action_multi"
model="hr.applicant"
name="hr.applicant.meeting_set"
multi="True"
string="Schedule Meeting"/>
<wizard
id="wizard_hr_job_partner_create"
keyword="client_action_multi"
model="hr.applicant"
name="hr.applicant.partner_create"
multi="True"
string="Create Partner"/>
</data>
</openerp>
+3 -1
View File
@@ -42,7 +42,9 @@
'security/idea_security.xml',
'security/ir.model.access.csv',
],
'demo_xml': [],
'demo_xml': [
"idea_data.xml"
],
'installable': True,
'certificate': '0071515601309',
}
+4 -4
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: 2010-03-24 10:38+0000\n"
"Last-Translator: Drazen Bosak <Unknown>\n"
"PO-Revision-Date: 2010-05-10 06:56+0000\n"
"Last-Translator: nafterburner <nafterburner@gmail.com>\n"
"Language-Team: Vinteh\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:10+0000\n"
"X-Launchpad-Export-Date: 2010-05-11 04:19+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: hr\n"
@@ -336,7 +336,7 @@ msgstr "Kreator"
#. module: idea
#: model:ir.ui.menu,name:idea.menu_tools
msgid "Tools"
msgstr "Pomagala"
msgstr "Alati"
#. module: idea
#: field:idea.comment,idea_id:0
+77 -28
View File
@@ -19,7 +19,9 @@
#
##############################################################################
from osv import osv, fields
from osv import osv
from osv import fields
from tools.translate import _
VoteValues = [('-1', 'Not Voted'), ('0', 'Very Bad'), ('25', 'Bad'), \
('50', 'Normal'), ('75', 'Good'), ('100', 'Very Good') ]
@@ -35,7 +37,8 @@ class idea_category(osv.osv):
'name': fields.char('Category', size=64, required=True),
'summary': fields.text('Summary'),
'parent_id': fields.many2one('idea.category', 'Parent Categories', ondelete='set null'),
'child_ids': fields.one2many('idea.category', 'parent_id', 'Child Categories')
'child_ids': fields.one2many('idea.category', 'parent_id', 'Child Categories'),
'visibility':fields.boolean('Open Idea?', required=False),
}
_sql_constraints = [
('name', 'unique(parent_id,name)', 'The name of the category must be unique' )
@@ -44,7 +47,6 @@ class idea_category(osv.osv):
idea_category()
class idea_idea(osv.osv):
""" Idea """
_name = 'idea.idea'
@@ -62,10 +64,10 @@ class idea_idea(osv.osv):
return {}
sql = """SELECT i.id, avg(v.score::integer)
FROM idea_idea i LEFT OUTER JOIN idea_vote v ON i.id = v.idea_id
WHERE i.id = ANY(%s)
GROUP BY i.id
"""
FROM idea_idea i LEFT OUTER JOIN idea_vote v ON i.id = v.idea_id
WHERE i.id = ANY(%s)
GROUP BY i.id
"""
cr.execute(sql, (ids,))
return dict(cr.fetchall())
@@ -82,10 +84,10 @@ class idea_idea(osv.osv):
return {}
sql = """SELECT i.id, COUNT(1)
FROM idea_idea i LEFT OUTER JOIN idea_vote v ON i.id = v.idea_id
WHERE i.id = ANY(%s)
GROUP BY i.id
"""
FROM idea_idea i LEFT OUTER JOIN idea_vote v ON i.id = v.idea_id
WHERE i.id = ANY(%s)
GROUP BY i.id
"""
cr.execute(sql, (ids,))
return dict(cr.fetchall())
@@ -102,10 +104,10 @@ class idea_idea(osv.osv):
return {}
sql = """SELECT i.id, COUNT(1)
FROM idea_idea i LEFT OUTER JOIN idea_comment c ON i.id = c.idea_id
WHERE i.id = ANY(%s)
GROUP BY i.id
"""
FROM idea_idea i LEFT OUTER JOIN idea_comment c ON i.id = c.idea_id
WHERE i.id = ANY(%s)
GROUP BY i.id
"""
cr.execute(sql, (ids,))
return dict(cr.fetchall())
@@ -156,29 +158,77 @@ class idea_idea(osv.osv):
'comment_ids': fields.one2many('idea.comment', 'idea_id', 'Comments'),
'create_date': fields.datetime('Creation date', readonly=True),
'vote_ids': fields.one2many('idea.vote', 'idea_id', 'Vote'),
'my_vote': fields.function(_vote_read, fnct_inv = _vote_save, \
string="My Vote", method=True, type="selection", selection=VoteValues),
'my_vote': fields.function(_vote_read, fnct_inv = _vote_save, string="My Vote", method=True, type="selection", selection=VoteValues),
'vote_avg': fields.function(_vote_avg_compute, method=True, string="Average Score", type="float"),
'count_votes': fields.function(_vote_count, method=True, string="Count of votes", type="integer"),
'count_comments': fields.function(_comment_count, method=True, \
string="Count of comments", type="integer"),
'count_comments': fields.function(_comment_count, method=True, string="Count of comments", type="integer"),
'category_id': fields.many2one('idea.category', 'Category', required=True),
'state': fields.selection([('draft', 'Draft'), ('open', 'Opened'), \
('close', 'Accepted'), ('cancel', 'Cancelled')], \
'State', readonly=True,
help='When the Idea is created the state is \'Draft\'.\n It is \
opened by the user, the state is \'Opened\'.\
\nIf the idea is accepted, the state is \'Accepted\'.'),
'state': fields.selection([('draft', 'Draft'),
('open', 'Opened'),
('close', 'Accepted'),
('cancel', 'Cancelled')],
'State', readonly=True,
help='When the Idea is created the state is \'Draft\'.\n It is \
opened by the user, the state is \'Opened\'.\
\nIf the idea is accepted, the state is \'Accepted\'.'
),
'visibility':fields.boolean('Open Idea?', required=False),
'stat_vote_ids': fields.one2many('idea.vote.stat', 'idea_id', 'Statistics', readonly=True),
}
_defaults = {
'user_id': lambda self,cr,uid,context: uid,
'my_vote': lambda *a: '-1',
'state': lambda *a: 'draft'
'state': lambda *a: 'draft',
'visibility': lambda *a: True,
}
_order = 'id desc'
def create(self, cr, user, vals, context={}):
"""
Create a new record for a model idea_idea
@param cr: A database cursor
@param user: ID of the user currently logged in
@param vals: provides data for new record
@param context: context arguments, like lang, time zone
@return: Returns an id of the new record
"""
visibility = False
if vals.get('category_id', False):
category_pool = self.pool.get('idea.category')
category = category_pool.browse(cr, user, vals.get('category_id'), context)
visibility = category.visibility
vals.update({
'visibility':visibility
})
res_id = super(idea_idea, self).create(cr, user, vals, context)
return res_id
def write(self, cr, user, ids, vals, context=None):
"""
Update redord(s) exist in {ids}, with new value provided in {vals}
@param cr: A database cursor
@param user: ID of the user currently logged in
@param ids: list of record ids to update
@param vals: dict of new values to be set
@param context: context arguments, like lang, time zone
@return: Returns True on success, False otherwise
"""
state = self.browse(cr, user, ids[0]).state
if vals.get('my_vote', False):
if vals.get('state', state) != 'open':
raise osv.except_osv(_("Warning !"), _("Draft/Accepted/Cancelled ideas Could not be voted"))
res = super(idea_idea, self).write(cr, user, ids, vals, context)
return res
def idea_cancel(self, cr, uid, ids):
self.write(cr, uid, ids, { 'state': 'cancel' })
return True
@@ -190,7 +240,7 @@ class idea_idea(osv.osv):
def idea_close(self, cr, uid, ids):
self.write(cr, uid, ids, { 'state': 'close' })
return True
def idea_draft(self, cr, uid, ids):
self.write(cr, uid, ids, { 'state': 'draft' })
return True
@@ -238,7 +288,6 @@ class idea_vote(osv.osv):
idea_vote()
class idea_vote_stat(osv.osv):
""" Idea votes Statistics """
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="idea.category" id="idea_category_general">
<field name="name">General</field>
<field name="summary">General Ideas</field>
<field name="visibility">True</field>
</record>
<record model="idea.idea" id="idea_idea_one">
<field name="title">TODO: Need to put a good idea on OpenERP</field>
<field name="description">TODO: Need to put a good idea on OpenERP</field>
<field name="category_id" ref="idea_category_general"/>
<field name="visibility">True</field>
</record>
</data>
</openerp>
+73 -62
View File
@@ -2,8 +2,7 @@
<openerp>
<data>
<!-- Idea Category Form View -->
<!-- Idea Category Form View -->
<menuitem name="Tools" id="base.menu_tools" icon="STOCK_PREFERENCES" sequence="15"/>
<record model="ir.ui.view" id="view_idea_category_form">
<field name="name">idea.category.form</field>
@@ -11,16 +10,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Category of ideas">
<field name="name" select="1"/>
<field name="parent_id" select="1"/>
<newline/>
<field name="summary" colspan="4"/>
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="parent_id" select="1"/>
<field name="visibility"/>
</group>
<separator string="Description" colspan="4"/>
<field name="summary" colspan="4" nolabel="1"/>
</form>
</field>
</record>
<!-- Idea Category Tree View -->
<!-- Idea Category Tree View -->
<record model="ir.ui.view" id="view_idea_category_tree">
<field name="name">idea.category.tree</field>
<field name="model">idea.category</field>
@@ -33,7 +34,7 @@
</field>
</record>
<!-- Idea Category Action -->
<!-- Idea Category Action -->
<record model="ir.actions.act_window" id="action_idea_category">
<field name="name">Categories</field>
@@ -47,8 +48,7 @@
<menuitem name="Ideas" parent="base.menu_lunch_survey_root" id="menu_ideas"/>
<menuitem name="Categories" parent="menu_ideas"
id="menu_idea_category" action="action_idea_category" />
<menuitem name="Categories" parent="menu_ideas" id="menu_idea_category" action="action_idea_category" />
<!-- Idea Category Action -->
@@ -61,11 +61,6 @@
<menuitem name="Ideas" parent="base.menu_tools" id="menu_ideas1" sequence="4"/>
<menuitem
name="Ideas by Categories" parent="menu_ideas1"
id="menu_idea_category_tree"
action="action_idea_category_tree"/>
<!-- Oepn Ideas Action -->
<record model="ir.actions.act_window" id="action_idea_idea_categ_open">
@@ -137,21 +132,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="New Idea">
<notebook>
<page string="Idea">
<field name="title" select="1" />
<field name="category_id" select="1"/>
<field name="user_id" select="1"/>
<field name="vote_avg" />
<field name="description" colspan="4" widget="text_wiki"/>
<field name="state"/>
<group colspan="2" col="3">
<button name="idea_open" string="Open" states="draft" icon="gtk-go-forward"/>
<button name="idea_close" string="Close" states="open" icon="gtk-close"/>
<button name="idea_cancel" string="Cancel" states="open" icon="gtk-cancel"/>
</group>
<group col="6" colspan="4">
<field name="title" colspan="4" select="1" />
<field name="category_id" select="1"/>
<field name="my_vote"/>
<field name="user_id" attrs="{'invisible':[('visibility','=',False)]}"/>
<field name="vote_avg" widget="progressbar"/>
</group>
<notebook colspan="4">
<page string="Idea Detail">
<field name="description" nolabel="1" colspan="4" widget="text_wiki"/>
</page>
<page string="Comments">
<page string="Comments" groups="base.group_extended">
<field name="comment_ids" nolabel="1" colspan="4">
<form string="Comment">
<separator string="Your comment" colspan="4"/>
@@ -159,27 +151,39 @@
</form>
</field>
</page>
<page string="Vote">
<field name="vote_ids" nolabel="1" colspan="4" />
<page string="Vote" groups="base.group_extended">
<field name="vote_ids" nolabel="1" colspan="4" readonly="True"/>
</page>
<page string="Statistics">
<group col="6" colspan="4">
<field name="count_comments" />
<field name="count_votes" />
</group>
<field name="stat_vote_ids" colspan="4" mode="graph,tree" nolabel="1">
<graph string="vote_stat of ideas" type="bar">
<graph string="Vots Statistics" type="bar">
<field name="score"/>
<field name="nbr"/>
</graph>
<tree string="vote_stat of ideas">
<tree string="Vots Statistics">
<field name="score"/>
<field name="nbr"/>
</tree>
</field>
</page>
</notebook>
<group colspan="4" col="6">
<field name="state"/>
<button name="idea_open" string="Open" states="draft" icon="gtk-go-forward"/>
<button name="%(idea.action_idea_post_vote)d" icon="gtk-execute" states="open" type="action" string="Submit Vote"/>
<button name="idea_close" string="Accept" states="open" icon="gtk-jump-to"/>
<button name="idea_cancel" string="Refuse" states="open" icon="gtk-cancel"/>
</group>
</form>
</field>
</record>
<!-- New Idea Tree View -->
<!-- New Idea Tree View -->
<record model="ir.ui.view" id="view_idea_idea_tree">
<field name="name">idea.idea.tree</field>
@@ -187,40 +191,47 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="All Ideas">
<field name="title"/>
<field name="category_id" />
<field name="create_date"/>
<field name="user_id" />
<field name="title"/>
<field name="vote_avg" />
<field name="vote_avg" widget="progressbar"/>
<field name="count_comments" />
<field name="count_votes" />
<button name="%(action_idea_post_vote)d" icon="gtk-execute"
type="action" states="draft,open" string="Vote" />
<field name="state"/>
<button name="%(action_idea_post_vote)d" icon="gtk-execute" type="action" states="draft,open" string="Vote"/>
<button name="idea_close" string="Accept" states="open" icon="gtk-jump-to"/>
<button name="idea_cancel" string="Refuse" states="open" icon="gtk-cancel"/>
</tree>
</field>
</record>
<!-- Search Idea -->
<!-- Search Idea -->
<record model="ir.ui.view" id="view_idea_idea_search">
<field name="name">idea.idea.search</field>
<field name="model">idea.idea</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Ideas">
<group col="10" colspan="4">
<filter icon="gtk-execute" string="My" domain="[('user_id','=',uid)]" help="My Ideas"/>
<separator orientation="vertical"/>
<filter icon="gtk-execute" string="Draft"
domain="[('state','=','draft')]" help="Draft Ideas" />
<filter icon="gtk-execute" string="Open"
domain="[('state','=','open')]" help="Open Ideas" />
<separator orientation="vertical"/>
<field name="title" select="1"/>
<field name="category_id" select="1"/>
<field name="user_id" select="1"/>
</group>
</search>
<search string="Ideas">
<group col="10" colspan="4">
<filter icon="gtk-execute" string="My Ideas" domain="[('user_id','=',uid)]" help="My Ideas"/>
<separator orientation="vertical"/>
<filter icon="gtk-execute" string="Draft"
domain="[('state','=','draft')]" help="Draft Ideas" />
<filter icon="gtk-execute" string="Open"
domain="[('state','=','open')]" help="Open Ideas" />
<separator orientation="vertical"/>
<field name="title" select="1"/>
<field name="category_id" select="1"/>
<field name="user_id" select="1"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="12" col="10">
<filter icon="gtk-execute" string="Creator" help="By Creators" context="{'group_by':'user_id'}"/>
<filter icon="gtk-execute" string="State" help="By States" context="{'group_by':'state'}"/>
<filter icon="gtk-execute" string="Category" help="By Idea Category" context="{'group_by':'category_id'}"/>
</group>
</search>
</field>
</record>
@@ -314,15 +325,15 @@
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
</record>
<menuitem name="Reporting" parent="base.menu_tools" id="base.menu_lunch_reporting" sequence="5"/>
<menuitem name="Reporting" parent="base.menu_tools" id="base.menu_lunch_reporting" sequence="5"/>
<menuitem name="Idea" parent="base.menu_lunch_reporting" id="menu_idea_reporting"/>
<menuitem name="Idea" parent="base.menu_lunch_reporting" id="menu_idea_reporting"/>
<menuitem name="Vote Statistics" parent="menu_idea_reporting"
id="menu_idea_vote_stat" action="action_idea_vote_stat" />
<menuitem name="Vote Statistics" parent="menu_idea_reporting"
id="menu_idea_vote_stat" action="action_idea_vote_stat" />
<!-- Vote For Idea Action -->
<record model="ir.actions.act_window" id="action_idea_vote">
<!-- Vote For Idea Action -->
<record model="ir.actions.act_window" id="action_idea_vote">
<field name="name">Idea's vote</field>
<field name="res_model">idea.vote</field>
<field name="view_type">form</field>
+49 -19
View File
@@ -29,13 +29,36 @@ class idea_post_vote(osv.osv_memory):
_description = "Post vote"
_columns = {
'vote': fields.selection([('-1', 'Not Voted'),
('0', 'Very Bad'),
('25', 'Bad'),
('50', 'Normal'),
('75', 'Good'),
('100', 'Very Good') ], 'Post Vote', required=True)
}
'vote': fields.selection([('-1', 'Not Voted'),
('0', 'Very Bad'),
('25', 'Bad'),
('50', 'Normal'),
('75', 'Good'),
('100', 'Very Good') ],
'Post Vote', required=True),
'note': fields.text('Description'),
}
def get_default(self, cr, uid, context={}):
"""
This function checks for precondition before wizard executes
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param fields: List of fields for default value
@param context: A standard dictionary for contextual values
"""
idea_obj = self.pool.get('idea.idea')
if context.get('active_id'):
idea = idea_obj.browse(cr, uid, context.get('active_id'))
return idea.my_vote
else:
return 75
_defaults = {
'vote': get_default,
}
def view_init(self, cr, uid, fields, context=None):
"""
@@ -50,16 +73,12 @@ class idea_post_vote(osv.osv_memory):
for idea in idea_obj.browse(cr, uid, context.get('active_ids', [])):
if idea.state in ['draft', 'close', 'cancel']:
raise osv.except_osv(_("Warning !"), _("Draft/Accepted/Cancelled \
ideas Could not be voted"))
raise osv.except_osv(_("Warning !"), _("Draft/Accepted/Cancelled ideas Could not be voted"))
if idea.state != 'open':
raise osv.except_osv(_('Warning !'), _('idea should be in \
\'Open\' state before vote for that idea.'))
raise osv.except_osv(_('Warning !'), _('idea should be in \'Open\' state before vote for that idea.'))
return False
def do_vote(self, cr, uid, ids, context):
"""
Create idea vote.
@param cr: the current row, from the database cursor,
@@ -67,15 +86,26 @@ ideas Could not be voted"))
@param ids: List of Idea Post vote’s IDs.
@return: Dictionary {}
"""
data = context and context.get('active_id', False) or False
vote_obj = self.pool.get('idea.vote')
vote_id = context and context.get('active_id', False) or False
vote_pool = self.pool.get('idea.vote')
comment_pool = self.pool.get('idea.comment')
for do_vote_obj in self.read(cr, uid, ids):
score = str(do_vote_obj['vote'])
dic = {'idea_id': data, 'user_id': uid, 'score': score }
vote = vote_obj.create(cr, uid, dic)
comment = do_vote_obj['note']
vote = {
'idea_id': vote_id,
'user_id': uid,
'score': score
}
comment = {
'user_id':uid,
'idea_id':vote_id,
'content': comment,
}
vote = vote_pool.create(cr, uid, vote)
comment = comment_pool.create(cr, uid, comment)
return {}
idea_post_vote()
+30 -35
View File
@@ -2,43 +2,38 @@
<openerp>
<data>
<!-- Post Idea for vote Form View -->
<!-- Post Idea for vote Form View -->
<record id="view_idea_post_vote" model="ir.ui.view">
<field name="name">idea.post.vote.form</field>
<field name="model">idea.post.vote</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Tasks">
<group colspan="4" >
<field name="vote"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" name="do_vote" string="Post Vote" type="object"/>
</group>
</form>
</field>
</record>
<record id="view_idea_post_vote" model="ir.ui.view">
<field name="name">idea.post.vote.form</field>
<field name="model">idea.post.vote</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Tasks">
<group colspan="4" >
<field name="vote" colspan="4"/>
<separator string="Comment" colspan="4"/>
<field name="note" colspan="4" nolabel="1"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" name="do_vote" string="Post Vote" type="object"/>
</group>
</form>
</field>
</record>
<!-- Post Idea for vote Action -->
<record id="action_idea_post_vote" model="ir.actions.act_window">
<field name="name">Vote</field>
<field name="res_model">idea.post.vote</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_idea_post_vote"/>
<field name="target">new</field>
</record>
<!-- Post Idea for vote Action Window -->
<act_window id="action_idea_post_vote_values"
key2="client_action_multi" name="vote"
res_model="idea.post.vote" src_model="idea.idea"
view_mode="form" target="new" view_type="form" />
<!-- Post Idea for vote Action -->
<record id="action_idea_post_vote" model="ir.actions.act_window">
<field name="name">Vote</field>
<field name="res_model">idea.post.vote</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_idea_post_vote"/>
<field name="target">new</field>
</record>
</data>
</openerp>
@@ -56,9 +56,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
user_cmpny = obj_company.name
vat_no=obj_company.partner_id.vat
if not vat_no:
# raise wizard.except_wizard(_('Data Insufficient'),_('No VAT Number Associated with Main Company!'))
osv.except_osv(_('Data Insufficient'), _('No VAT Number Associated with Main Company!'))
tax_code_ids = obj_tax_code.search(cr, uid, [], context=context)
ctx = context.copy()
@@ -68,8 +66,6 @@ class l10n_be_vat_declaration(osv.osv_memory):
address = post_code = city = country_code = ''
city, post_code, address, country_code =self.pool.get('res.company')._get_default_ad(obj_company.partner_id.address)
year_id = obj_fyear.find(cr, uid)
account_period = obj_acc_period.browse(cr, uid, data['period_id'], context=context)
@@ -80,7 +76,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
data_of_file +='\n\t<DECLARER>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<NAME>'+str(obj_company.name)+'</NAME>\n\t\t<ADDRESS>'+address+'</ADDRESS>'
data_of_file +='\n\t\t<POSTCODE>'+post_code+'</POSTCODE>\n\t\t<CITY>'+city+'</CITY>\n\t\t<COUNTRY>'+country_code+'</COUNTRY>\n\t\t<SENDINGREFERENCE>'+send_ref+'</SENDINGREFERENCE>\n\t</DECLARER>'
data_of_file +='\n\t<VATRECORD>\n\t\t<RECNUM>1</RECNUM>\n\t\t<VATNUMBER>'+((vat_no and str(vat_no[2:])) or '')+'</VATNUMBER>\n\t\t<DPERIODE>\n\t\t\t'
starting_month = account_period.date_start[5:7]
ending_month = account_period.date_stop[5:7]
if starting_month != ending_month:
@@ -105,7 +101,6 @@ class l10n_be_vat_declaration(osv.osv_memory):
data['file_save'] = base64.encodestring(data_of_file)
self.write(cr, uid, ids, {'file_save':data['file_save']}, context=context)
l10n_be_vat_declaration()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -18,7 +18,7 @@
<field name="ask_resitution"/>
<field name="ask_payment"/>
<field name="client_nihil"/>
<button colspan="1" name="create_xml" string="Create XML" type="object" default_focus="1"/>
<button colspan="1" name="create_xml" string="Create XML" type="object"/>
</group>
<separator string="XML Flie has been Created." colspan="4"/>
<group colspan="4" >
+39 -31
View File
@@ -20,21 +20,22 @@
##############################################################################
import time
import base64
from tools.translate import _
from osv import osv, fields
from tools.translate import _
class partner_vat_intra(osv.osv_memory):
""" Partner Vat Intra"""
"""
Partner Vat Intra
"""
_name = "partner.vat.intra"
_description = 'Partner VAT Intra'
def _get_europe_country(self, cursor, user, context={}):
obj_country = self.pool.get('res.country')
return obj_country.search(cursor, user, [('code', 'in', ['AT', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB'])])
def _get_europe_country(self, cursor, user, context=None):
return self.pool.get('res.country').search(cursor, user, [('code', 'in', ['AT', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB'])])
_columns = {
'name': fields.char('File Name', size=32),
'period_code': fields.char('Period Code',size = 6,required = True, help = '''This is where you have to set the period code for the intracom declaration using the format: ppyyyy
PP can stand for a month: from '01' to '12'.
PP can stand for a trimester: '31','32','33','34'
@@ -47,7 +48,8 @@ class partner_vat_intra(osv.osv_memory):
'period_ids': fields.many2many('account.period', 'account_period_rel', 'acc_id', 'period_id', 'Period (s)', help = 'Select here the period(s) you want to include in your intracom declaration'),
'test_xml': fields.boolean('Test XML file', help="Sets the XML output as test file"),
'mand_id' : fields.char('MandataireId', size=14, required=True, help="This identifies the representative of the sending company. This is a string of 14 characters"),
'msg': fields.text('File created', size=64, readonly=True),
'msg': fields.text('File created', size=14, readonly=True),
'no_vat': fields.text('Partner With No VAT', size=14, readonly=True, help="The Partner whose VAT number is not defined they doesn't include in XML File."),
'file_save' : fields.binary('Save File', readonly=True),
'country_ids': fields.many2many('res.country', 'vat_country_rel', 'vat_id', 'country_id', 'European Countries'),
}
@@ -56,13 +58,19 @@ class partner_vat_intra(osv.osv_memory):
'country_ids': _get_europe_country,
}
def create_xml(self, cursor, user, ids, context={}):
def create_xml(self, cursor, user, ids, context=None):
obj_user = self.pool.get('res.users')
obj_fyear = self.pool.get('account.fiscalyear')
obj_sequence = self.pool.get('ir.sequence')
obj_partner = self.pool.get('res.partner')
obj_partner_add = self.pool.get('res.partner.address')
obj_country = self.pool.get('res.country')
street = zip_city = country = p_list = data_clientinfo = ''
error_message = list_partner = []
seq = amount_sum = 0
if context is None:
context = {}
data_cmpny = obj_user.browse(cursor, user, user).company_id
data = self.read(cursor, user, ids)[0]
company_vat = data_cmpny.partner_id.vat
@@ -73,10 +81,9 @@ class partner_vat_intra(osv.osv_memory):
seq_declarantnum = obj_sequence.get(cursor, user, 'declarantnum')
cref = company_vat[2:] + seq_controlref[-4:]
dnum = cref + seq_declarantnum[-5:]
if len(data['form']['period_code']) != 6:
raise wizard.except_wizard(_('Wrong Period Code'), _('The period code you entered is not valid.'))
if len(data['period_code']) != 6:
raise osv.except_osv(_('Wrong Period Code'), _('The period code you entered is not valid.'))
street = zip_city = country = ''
addr = obj_partner.address_get(cursor, user, [data_cmpny.partner_id.id], ['invoice'])
if addr.get('invoice',False):
ads = obj_partner_add.browse(cursor, user, [addr['invoice']])[0]
@@ -99,26 +106,23 @@ class partner_vat_intra(osv.osv_memory):
data_file +='\n\t\t\t<Country>' + str(country) +'</Country>\n\t\t</CompanyInfo>\n\t</AgentRepr>'
data_comp ='\n\t\t<CompanyInfo>\n\t\t\t<VATNum>'+str(company_vat[2:])+'</VATNum>\n\t\t\t<Name>'+str(data_cmpny.name)+'</Name>\n\t\t\t<Street>'+ str(street) +'</Street>\n\t\t\t<CityAndZipCode>'+ str(zip_city) +'</CityAndZipCode>\n\t\t\t<Country>'+ str(country) +'</Country>\n\t\t</CompanyInfo>'
data_period = '\n\t\t<Period>'+ data['period_code'] +'</Period>' #trimester
error_message = []
seq = 0
amount_sum = 0
p_id_list = obj_partner.search(cursor, user, [('vat','!=',False)])
if not p_id_list:
raise osv.except_osv(_('Data Insufficient!'),_('No partner has a VAT Number asociated with him.'))
nb_period = len(data_fiscal.period_ids)
fiscal_periods = data_fiscal.period_ids
list_partner = []
data_clientinfo = ''
cr.execute('''SELECT l.partner_id AS partner_id, p.vat AS vat, t.code AS intra_code, SUM(l.tax_amount) AS amount
FROM account_move_line l
LEFT JOIN account_tax_code t ON (l.tax_code_id = t.id)
LEFT JOIN res_partner p ON (l.partner_id = p.id)
WHERE t.code IN ('44a','44b','88')
AND l.period_id IN %s
GROUP BY l.partner_id, p.vat, t.code''', (tuple(data['form']['period_ids'][0][2]), ))
for row in cr.dictfetchall():
if not data['period_ids']:
raise osv.except_osv(_('Data Insufficient!'),_('Please select at least one Period.'))
cursor.execute('''SELECT p.name As partner_name, l.partner_id AS partner_id, p.vat AS vat, t.code AS intra_code, SUM(l.tax_amount) AS amount
FROM account_move_line l
LEFT JOIN account_tax_code t ON (l.tax_code_id = t.id)
LEFT JOIN res_partner p ON (l.partner_id = p.id)
WHERE t.code IN ('44a','44b','88')
AND l.period_id IN %s
GROUP BY p.name, l.partner_id, p.vat, t.code''', (tuple(data['period_ids']), ))
for row in cursor.dictfetchall():
if not row['vat']:
p_list += str(row['partner_name']) + ', '
continue
seq += 1
amt = row['amount'] or 0
amt = int(amt * 100)
@@ -128,11 +132,15 @@ class partner_vat_intra(osv.osv_memory):
amount_sum = int(amount_sum)
data_decl = '\n\t<DeclarantList SequenceNum="1" DeclarantNum="'+ dnum + '" ClientNbr="'+ str(seq) +'" AmountSum="'+ str(amount_sum) +'" >'
data_file += str(data_decl) + str(data_comp) + str(data_period) + str(data_clientinfo) + '\n\t</DeclarantList>\n</VatIntra>'
data['msg'] = 'XML Flie has been Created. Save the File with '".xml"' extension.'
data['file_save'] = base64.encodestring(data_file)
self.write(cursor, user, ids, {'file_save':data['file_save'], 'msg':data['msg']}, context=context)
data = {
'msg': 'XML Flie has been Created. Save the File with '".xml"' extension.',
'file_save': base64.encodestring(data_file),
'name': 'vat_Intra.xml',
'country_ids': [[6, 0, obj_country.search(cursor, user, [('code', 'in', ['AT', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB'])])]],
}
self.write(cursor, user, ids, {'file_save':data['file_save'], 'msg':data['msg'], 'name':data['name'], 'no_vat':p_list, 'country_ids':data['country_ids']}, context=context)
return True
partner_vat_intra()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -7,38 +7,40 @@
name="Belgium Statements"
parent="account.menu_finance_legal_statement"/>
<record id="view_vat_intra" model="ir.ui.view">
<field name="name">Partner VAT intra</field>
<field name="model">partner.vat.intra</field>
<field name="type">form</field>
<field name="arch" type="xml">
<record id="view_vat_intra" model="ir.ui.view">
<field name="name">Partner VAT intra</field>
<field name="model">partner.vat.intra</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Partner VAT intra">
<notebook>
<page string="General Information">
<label string="This wizard will create an XML file for Vat Intra" colspan="4"/>
<newline/>
<field name="fyear" default_focus="1" />
<field name="period_code"/>
<newline/>
<field name="period_ids"/>
<newline/>
<field name="mand_id"/>
<newline/>
<button colspan="4" name="create_xml" string="Create XML" type="object" icon="gtk-execute"/>
<separator colspan="4"/>
<group colspan="4" >
<field name="msg" nolabel="1" colspan="4"/>
<field name="file_save" readonly="True"/>
</group>
<button special="cancel" colspan="4" string="Cancel" icon="gtk-cancel"/>
</page>
<page string="European Countries">
<field name="country_ids" colspan="4" nolabel="1" />
</page>
</notebook>
<newline/>
<separator string="This wizard will create an XML file for Vat Intra" colspan="4"/>
<notebook>
<page string="General Information">
<newline/>
<field name="period_code" colspan="4"/>
<newline/>
<field name="mand_id" colspan="4"/>
<newline/>
<separator string="Periods" colspan="4"/>
<field name="period_ids" nolabel="1" colspan="4"/>
<newline/>
<button colspan="2" name="create_xml" string="Create XML" type="object" icon="gtk-execute"/>
<separator colspan="4"/>
<field name="msg" colspan="4" nolabel="1"/>
<field name="name" colspan="4"/>
<newline/>
<field name="file_save" colspan="4"/>
<newline/>
<field name="no_vat" colspan="4"/>
<separator colspan="4"/>
<button colspan="2" special="cancel" string="Cancel" icon="gtk-cancel"/>
</page>
<page string="European Countries">
<field name="country_ids" colspan="4" nolabel="1" />
</page>
</notebook>
</form>
</field>
</field>
</record>
<record id="action_vat_intra" model="ir.actions.act_window">
+2 -1
View File
@@ -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:
+2 -5
View File
@@ -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',
-12
View File
@@ -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()
-5
View File
@@ -9,12 +9,7 @@
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<page string="Configuration" position="inside">
<separator string="MRP &amp; Logistic Scheduler" colspan="4"/>
<field name="schedule_range"/>
<field name="po_lead"/>
<field name="security_lead"/>
<field name="manufacturing_lead"/>
<newline/>
</page>
</field>
</record>
-543
View File
@@ -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:
-13
View File
@@ -31,18 +31,5 @@
<field name="number_increment">1</field>
</record>
<record forcecreate="True" id="ir_cron_scheduler_action" model="ir.cron">
<field name="name">Run mrp scheduler</field>
<field eval="False" name="active"/>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field eval="'mrp.procurement'" name="model"/>
<field eval="'run_scheduler'" name="function"/>
<field eval="'(False,)'" name="args"/>
</record>
</data>
</openerp>
+93
View File
@@ -0,0 +1,93 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx import DateTime
from osv import fields
from osv import osv
from tools.translate import _
import ir
import netsvc
import time
class mrp_procurement(osv.osv):
_inherit = 'mrp.procurement'
_columns = {
'bom_id': fields.many2one('mrp.bom', 'BoM', ondelete='cascade', select=True),
}
def check_produce_product(self, cr, uid, procurement, context=[]):
properties = [x.id for x in procurement.property_ids]
bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, procurement.product_id.id, procurement.product_uom.id, properties)
if not bom_id:
cr.execute('update mrp_procurement set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id))
return False
return True
def action_produce_assign_product(self, cr, uid, ids, context={}):
""" This is action which call from workflow to assign production order to procurements
@return: True
"""
procurement_obj = self.pool.get('mrp.procurement')
res = procurement_obj.make_mo(cr, uid, ids, context=context)
res = res.values()
return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value
def make_mo(self, cr, uid, ids, context={}):
""" Make Manufacturing(production) order from procurement
@return: New created Production Orders procurement wise
"""
res = {}
company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id
production_obj = self.pool.get('mrp.production')
move_obj = self.pool.get('stock.move')
wf_service = netsvc.LocalService("workflow")
procurement_obj = self.pool.get('mrp.procurement')
for procurement in procurement_obj.browse(cr, uid, ids):
res_id = procurement.move_id.id
loc_id = procurement.location_id.id
newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') - DateTime.RelativeDateTime(days=procurement.product_id.product_tmpl_id.produce_delay or 0.0)
newdate = newdate - DateTime.RelativeDateTime(days=company.manufacturing_lead)
produce_id = production_obj.create(cr, uid, {
'origin': procurement.origin,
'product_id': procurement.product_id.id,
'product_qty': procurement.product_qty,
'product_uom': procurement.product_uom.id,
'product_uos_qty': procurement.product_uos and procurement.product_uos_qty or False,
'product_uos': procurement.product_uos and procurement.product_uos.id or False,
'location_src_id': procurement.location_id.id,
'location_dest_id': procurement.location_id.id,
'bom_id': procurement.bom_id and procurement.bom_id.id or False,
'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'),
'move_prod_id': res_id,
'company_id': procurement.company_id.id,
})
res[procurement.id] = produce_id
self.write(cr, uid, [procurement.id], {'state': 'running'})
bom_result = production_obj.action_compute(cr, uid,
[produce_id], properties=[x.id for x in procurement.property_ids])
wf_service.trg_validate(uid, 'mrp.production', produce_id, 'button_confirm', cr)
move_obj.write(cr, uid, [res_id],
{'location_id': procurement.location_id.id})
return res
mrp_procurement()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+39 -258
View File
@@ -12,6 +12,7 @@
id="menu_mrp_bom"
parent="base.menu_mrp_root"
sequence="5" />
<!--
Property / Property Group
-->
@@ -257,14 +258,14 @@
<field name="type" groups="base.group_extended"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
<notebook colspan="4" >
<page string="General Information" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
<field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list" />
</page>
<page string="Revisions" groups="base.group_extended">
<page string="Revisions" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
<field colspan="4" name="revision_ids" nolabel="1" widget="one2many_list"/>
</page>
<page string="Properties" groups="base.group_extended">
<page string="Properties" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
<field name="position"/>
<field name="active"/>
<field name="sequence"/>
@@ -378,10 +379,27 @@
</form>
</field>
</record>
<!--
Procurement
-->
<menuitem action="mrp_procurement.mrp_procurement_action" id="menu_mrp_procurement_action"
parent="mrp.menu_mrp_manufacturing" sequence="2" />
<menuitem action="mrp_procurement.mrp_procurement_action5" id="menu_mrp_procurement_exception_action"
parent="mrp.menu_mrp_control" sequence="1" />
<menuitem id="menu_mrp_scheduler" name="Schedulers" parent="base.menu_mrp_root" sequence="4"/>
<menuitem action="mrp_procurement.action_compute_schedulers" id="mrp_Sched_all" parent="mrp.menu_mrp_scheduler" sequence="90"/>
<!--
Order Point
-->
<menuitem action="mrp_procurement.action_orderpoint_form" id="menu_action_orderpoint_form" parent="mrp.menu_mrp_reordering"/>
<!--
Production Management
-->
Production Management
-->
<record id="mrp_production_tree_view" model="ir.ui.view">
<field name="name">mrp.production.tree</field>
@@ -765,259 +783,22 @@
</tree>
</field>
</record>
<!--
Procurement
<!--
Procurements
-->
<record id="mrp_procurement_tree_view" model="ir.ui.view">
<field name="name">mrp.procurement.tree</field>
<field name="model">mrp.procurement</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Procurement Lines" colors="red:state=='draft';black:state=='running';green:state=='confirmed';gray:state in ['done','cancel']">
<field name="date_planned" widget="date"/>
<field name="origin"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom" string="UOM"/>
<field name="procure_method"/>
<field name="state"/>
</tree>
</field>
<record id="view_procurement_form_inherit" model="ir.ui.view">
<field name="name">mrp.procurement.form.inherit</field>
<field name="model">mrp.procurement</field>
<field name="inherit_id" ref="mrp_procurement.mrp_procurement_form_view"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='move_id']" position="before">
<field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
</xpath>
</field>
</record>
<record id="mrp_procurement_form_view" model="ir.ui.view">
<field name="name">mrp.procurement.form</field>
<field name="model">mrp.procurement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Procurement">
<group col="2" colspan="2">
<separator colspan="2" string="References"/>
<field name="name" select="1" string="Procurement Reason"/>
<field name="origin"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Planification"/>
<field name="date_planned" select="1"/>
<field name="procure_method"/>
<field name="priority" groups="base.group_extended"/>
</group>
<notebook colspan="4">
<page string="Procurement Details">
<separator colspan="4" string="Product &amp; Location"/>
<field name="product_id" select="1" on_change="onchange_product_id(product_id)"/>
<field name="location_id" domain="[('usage','=','internal')]"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
<separator colspan="4" string="Status"/>
<field colspan="4" name="message" readonly="1"/>
<field name="state" readonly="1"/>
<group col="7" colspan="2">
<button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
<button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
<button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
<button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/>
</group>
</page>
<page string="Extra Information">
<separator colspan="4" string="Details"/>
<field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
<field name="move_id" groups="base.group_extended"/>
<field name="date_close"/>
<field name="close_move" groups="base.group_extended"/>
<field name="purchase_id"/>
<group colspan="4" groups="base.group_extended">
<separator colspan="4" string="Properties" />
<field colspan="4" name="property_ids" nolabel="1"/>
</group>
</page>
<page string="Notes">
<separator colspan="4" string="Note" />
<field name="note" colspan="4" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="view_mrp_procurement_filter" model="ir.ui.view">
<field name="name">mrp.procurement.select</field>
<field name="model">mrp.procurement</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Procurement">
<group col='10' colspan='4'>
<filter icon="terp-mrp" string="Current" domain="[('state','in',('draft','confirmed'))]" default="1" help="Procurement Orders in draft or open state."/>
<filter icon="terp-mrp" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/>
<filter icon="terp-mrp" string="Late"
domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed'))]"
help="Procurement started late" />
<separator orientation="vertical"/>
<field name="name"/>
<field name="origin"/>
<field name="product_id" />
<field name="date_planned" widget="date"/>
<field name="state" />
</group>
<newline/>
<group expand="1" string="Group By" colspan="4" col="8">
<filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Reason" icon="terp-mrp" domain="[]" context="{'group_by':'name'}"/>
<filter string="Scheduled Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/>
</group>
</search>
</field>
</record>
<record id="mrp_procurement_action" model="ir.actions.act_window">
<field name="name">Procurement Orders</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.procurement</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_procurement_filter"/>
</record>
<menuitem action="mrp_procurement_action" id="menu_mrp_procurement_action" parent="mrp.menu_mrp_manufacturing"
sequence="2" />
<record id="mrp_procurement_action3" model="ir.actions.act_window">
<field name="name">Procurements</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.procurement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_mrp_procurement_filter"/>
<field name="domain">[]</field>
<field name="context">{}</field>
</record>
<record id="mrp_procurement_action5" model="ir.actions.act_window">
<field name="name">Procurement Exceptions</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.procurement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','exception')]</field>
</record>
<menuitem action="mrp_procurement_action5" id="menu_mrp_procurement_exception_action" parent="mrp.menu_mrp_control"
sequence="1" />
<record id="mrp_procurement_action4" model="ir.actions.act_window">
<field name="name">Procurement Exceptions to Fix</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.procurement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','exception'), ('message', '&lt;&gt;', '')]</field>
<field name="filter" eval="True"/>
</record>
<record id="mrp_procurement_action11" model="ir.actions.act_window">
<field name="name">Temporary Procurement Exceptions</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.procurement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','exception'), ('message', '=', '')]</field>
</record>
<!-- Order Point -->
<record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
<field name="name">stock.warehouse.orderpoint.tree</field>
<field name="model">stock.warehouse.orderpoint</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Minimum Stock Rules">
<field name="name"/>
<field name="warehouse_id"/>
<field name="location_id"/>
<field name="product_id"/>
<field name="product_uom"/>
<field name="product_min_qty"/>
<field name="product_max_qty"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="warehouse_orderpoint_search">
<field name="name">stock.warehouse.orderpoint.search</field>
<field name="model">stock.warehouse.orderpoint</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Minimum Stock Rules Search">
<group col="10" colspan="4">
<field name="name" select="1" />
<field name="warehouse_id" select="1" widget="selection"/>
<field name="location_id" select="1" />
<field name="company_id" select="1" widget="selection"/>
<field name="product_id" select="1"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="10">
<filter string="Warehouse" icon="terp-stock" domain="[]" context="{'group_by':'warehouse_id'}"/>
<filter string="Location" icon="terp-stock" domain="[]" context="{'group_by':'location_id'}"/>
</group>
</search>
</field>
</record>
<record id="view_warehouse_orderpoint_form" model="ir.ui.view">
<field name="name">stock.warehouse.orderpoint.form</field>
<field name="model">stock.warehouse.orderpoint</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Minimum Stock Rules">
<group col="2" colspan="2">
<separator string="General Information" colspan="2" />
<field name="name" />
<field name="product_id" on_change="onchange_product_id(product_id)"/>
<field name="product_uom"/>
</group>
<group col="2" colspan="2">
<separator string="Locations" colspan="2" />
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
<field name="location_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group col="2" colspan="2">
<separator string="Quantity Rules" colspan="2" />
<field name="product_min_qty"/>
<field name="product_max_qty"/>
<field name="qty_multiple"/>
</group>
<group col="2" colspan="2" groups="base.group_extended">
<separator string="Misc" colspan="2" />
<field name="procurement_id" readonly="1"/>
<field name="active" />
</group>
</form>
</field>
</record>
<record id="action_orderpoint_form" model="ir.actions.act_window">
<field name="name">Minimum Stock Rules</field>
<field name="res_model">stock.warehouse.orderpoint</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_warehouse_orderpoint_tree"/>
<field name="search_view_id" ref="warehouse_orderpoint_search" />
</record>
<menuitem action="action_orderpoint_form" id="menu_action_orderpoint_form" parent="menu_mrp_reordering"/>
<act_window domain="[('warehouse_id', '=', active_id)]" id="act_stock_warehouse_2_stock_warehouse_orderpoint" name="Minimum Stock Rules" res_model="stock.warehouse.orderpoint" src_model="stock.warehouse"/>
<!-- add product_uom to context to be the default value when adding new orderpoints -->
<act_window
context="{'product_uom': locals().has_key('uom_id') and uom_id}"
domain="[('product_id', '=', active_id)]"
id="act_product_product_2_stock_warehouse_orderpoint"
name="Minimum Stock Rules"
res_model="stock.warehouse.orderpoint"
src_model="product.product"/>
<act_window
id="action_product_bom_structure"
+27 -202
View File
@@ -113,241 +113,66 @@
<field name="act_to" ref="prod_act_cancel"/>
<field name="signal">button_cancel</field>
</record>
<!-- Procurement -->
<record id="wkf" model="workflow">
<field name="name">mrp.procurement.basic</field>
<field name="osv">mrp.procurement</field>
<field name="on_create">True</field>
</record>
<record id="act_draft" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="flow_start">True</field>
<field name="name">draft</field>
</record>
<record id="act_cancel" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">cancel</field>
<field name="kind">function</field>
<field name="action">action_cancel()</field>
<field name="flow_stop">True</field>
</record>
<record id="act_confirm" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">confirm</field>
<field name="kind">function</field>
<field name="action">action_confirm()</field>
</record>
<record id="act_confirm_wait" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">confirm_wait</field>
<field name="kind">function</field>
<field name="action">write({'state':'exception'})</field>
</record>
<record id="act_confirm_mts" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">confirm_mts</field>
</record>
<record id="act_confirm_mto" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">confirm_mto</field>
</record>
<record id="act_make_to_stock" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">make_to_stock</field>
<field name="kind">function</field>
<field name="action">action_move_assigned()</field>
</record>
<record id="act_produce" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="wkf_id" ref="mrp_procurement.wkf_procurement"/>
<field name="name">produce</field>
<field name="kind">subflow</field>
<field name="subflow_id" search="[('osv','=','mrp.production')]"/>
<field name="action">action_produce_assign_product()</field>
</record>
<record id="act_produce_check" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="wkf_id" ref="mrp_procurement.wkf_procurement"/>
<field name="name">produce_check</field>
</record>
<record id="act_produce_service" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="wkf_id" ref="mrp_procurement.wkf_procurement"/>
<field name="name">produce_service</field>
<field name="kind">function</field>
<field name="action">action_produce_assign_service()</field>
</record>
<record id="act_buy" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">buy</field>
<field name="kind">subflow</field>
<field name="subflow_id" search="[('osv','=','purchase.order')]"/>
<field name="action">action_po_assign()</field>
</record>
<record id="act_make_done" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">ready</field>
<field name="kind">function</field>
<field name="action">action_ready()</field>
</record>
<record id="act_wait_done" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">wait_done</field>
<field name="kind">function</field>
<field name="action">write({'state':'waiting'})</field>
</record>
<record id="act_done" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="flow_stop">True</field>
<field name="name">done</field>
<field name="kind">function</field>
<field name="action">action_done()</field>
</record>
<record id="trans_draft_confirm" model="workflow.transition">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_confirm"/>
<field name="signal">button_confirm</field>
</record>
<record id="trans_confirm_cancel2" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_wait_done"/>
<field name="signal">button_wait_done</field>
<field name="condition">True</field>
</record>
<record id="trans_confirm_wait_done" model="workflow.transition">
<field name="act_from" ref="act_wait_done"/>
<field name="act_to" ref="act_done"/>
<field name="condition">check_move_done()</field>
<field name="trigger_model">stock.move</field>
<field name="trigger_expr_id">[move_id.id]</field>
</record>
<record id="trans_confirm_cancel" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">button_check</field>
<field name="condition">test_cancel()</field>
</record>
<record id="trans_confirm_confirm_wait" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_confirm_wait"/>
<field name="signal">button_check</field>
<field name="condition">not test_cancel()</field>
</record>
<record id="trans_confirm_wait_confirm_mto" model="workflow.transition">
<field name="act_from" ref="act_confirm_wait"/>
<field name="act_to" ref="act_confirm_mto"/>
<field name="condition">procure_method=='make_to_order'</field>
</record>
<record id="trans_confirm_wait_confirm_mts" model="workflow.transition">
<field name="act_from" ref="act_confirm_wait"/>
<field name="act_to" ref="act_confirm_mts"/>
<field name="condition">procure_method=='make_to_stock'</field>
</record>
<record id="trans_confirm_mts_cancel" model="workflow.transition">
<field name="act_from" ref="act_confirm_mts"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">button_cancel</field>
</record>
<record id="trans_confirm_waiting_cancel" model="workflow.transition">
<field name="act_from" ref="act_wait_done"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">button_cancel</field>
</record>
<record id="trans_confirm_mts_confirm" model="workflow.transition">
<field name="act_from" ref="act_confirm_mts"/>
<field name="act_to" ref="act_confirm"/>
<field name="signal">button_restart</field>
</record>
<record id="trans_confirm_mto_cancel" model="workflow.transition">
<field name="act_from" ref="act_confirm_mto"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">button_cancel</field>
</record>
<record id="trans_confirm_mto_confirm" model="workflow.transition">
<field name="act_from" ref="act_confirm_mto"/>
<field name="act_to" ref="act_confirm"/>
<field name="signal">button_restart</field>
</record>
<record id="trans_draft_cancel" model="workflow.transition">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">button_cancel</field>
</record>
<record id="trans_confirm_mts_make_to_stock" model="workflow.transition">
<field name="act_from" ref="act_confirm_mts"/>
<field name="act_to" ref="act_make_to_stock"/>
<field name="condition">check_make_to_stock()</field>
</record>
<record id="trans_confirm_mto_produce_check" model="workflow.transition">
<field name="act_from" ref="act_confirm_mto"/>
<field name="act_from" ref="mrp_procurement.act_confirm_mto"/>
<field name="act_to" ref="act_produce_check"/>
<field name="condition">check_produce()</field>
</record>
<record id="trans_product_check_produce" model="workflow.transition">
<field name="act_from" ref="act_produce_check"/>
<field name="act_to" ref="act_produce"/>
<field name="condition">check_product()</field>
</record>
<record id="trans_product_check_produce_service" model="workflow.transition">
<field name="act_from" ref="act_produce_check"/>
<field name="act_to" ref="act_produce_service"/>
<field name="condition">not check_product()</field>
</record>
<record id="trans_confirm_mto_buy" model="workflow.transition">
<field name="act_from" ref="act_confirm_mto"/>
<field name="act_to" ref="act_buy"/>
<field name="condition">check_buy()</field>
</record>
<record id="trans_make_to_stock_make_done" model="workflow.transition">
<field name="act_from" ref="act_make_to_stock"/>
<field name="act_to" ref="act_make_done"/>
<field name="condition">True</field>
<field name="trigger_model" eval="False"/>
<field name="trigger_expr_id" eval="False"/>
</record>
<record id="trans_produce_cancel" model="workflow.transition">
<field name="act_from" ref="act_produce"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">subflow.cancel</field>
</record>
<record id="trans_produce_service_cancel" model="workflow.transition">
<field name="act_from" ref="act_produce_service"/>
<field name="act_to" ref="act_cancel"/>
<field name="act_to" ref="mrp_procurement.act_cancel"/>
<field name="signal">subflow.cancel</field>
</record>
<record id="trans_buy_cancel" model="workflow.transition">
<field name="act_from" ref="act_buy"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">subflow.cancel</field>
</record>
<record id="trans_produce_make_done" model="workflow.transition">
<field name="act_from" ref="act_produce"/>
<field name="act_to" ref="act_make_done"/>
<field name="signal">subflow.done</field>
</record>
<record id="trans_produce_service_make_done" model="workflow.transition">
<field name="act_from" ref="act_produce_service"/>
<field name="act_to" ref="act_make_done"/>
<field name="act_to" ref="mrp_procurement.act_make_done"/>
</record>
<record id="trans_buy_make_done" model="workflow.transition">
<field name="act_from" ref="act_buy"/>
<field name="act_to" ref="act_make_done"/>
<field name="signal">subflow.delivery_done</field>
<record id="trans_product_check_produce" model="workflow.transition">
<field name="act_from" ref="act_produce_check"/>
<field name="act_to" ref="act_produce"/>
<field name="condition">check_product()</field>
</record>
<record id="trans_make_done_done" model="workflow.transition">
<field name="act_from" ref="act_make_done"/>
<field name="act_to" ref="act_done"/>
<field name="condition">action_check_finnished()</field>
<record id="trans_produce_cancel" model="workflow.transition">
<field name="act_from" ref="act_produce"/>
<field name="act_to" ref="mrp_procurement.act_cancel"/>
<field name="signal">subflow.cancel</field>
</record>
<record id="trans_make_done_confirm" model="workflow.transition">
<field name="act_from" ref="act_make_done"/>
<field name="act_to" ref="act_cancel"/>
<field name="condition">check_move_cancel()</field>
<record id="trans_produce_make_done" model="workflow.transition">
<field name="act_from" ref="act_produce"/>
<field name="act_to" ref="mrp_procurement.act_make_done"/>
<field name="signal">subflow.done</field>
</record>
</data>
</openerp>
+48 -51
View File
@@ -1,43 +1,16 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process
-->
<record id="process_process_procurementprocess0" model="process.process">
<field eval="&quot;&quot;&quot;Procurement&quot;&quot;&quot;" name="name"/>
<field name="model_id" ref="mrp.model_mrp_procurement"/>
<field eval="1" name="active"/>
</record>
<!--
Process Node
-->
<record id="process_node_stockproduct1" model="process.node">
<record id="process_node_procureproducts0" model="process.node">
<field name="menu_id" ref="mrp.menu_mrp_procurement_action"/>
<field name="model_id" ref="mrp.model_mrp_procurement"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;For stockable products and consumables&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Stockable Product&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="mrp.process_process_stockableproductprocess0"/>
<field name="subflow_id" ref="process_process_procurementprocess0"/>
<field name="model_id" ref="mrp_procurement.model_mrp_procurement"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;The way to procurement depends on the product type.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Procure Products&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_serviceproduct1" model="process.node">
<field name="menu_id" ref="mrp.menu_mrp_procurement_action"/>
<field name="model_id" ref="mrp.model_mrp_procurement"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;For Services.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Service&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="mrp.process_process_serviceproductprocess0"/>
<field name="subflow_id" ref="process_process_procurementprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_productionorder0" model="process.node">
@@ -46,31 +19,31 @@
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Drives the procurement orders for raw material.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Production Order&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="process_process_procurementprocess0"/>
<field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'picking_except', 'confirmed', 'ready', 'in_production', 'cancel', 'done')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_minimumstockrule0" model="process.node">
<field name="menu_id" ref="mrp.menu_action_orderpoint_form"/>
<field name="model_id" ref="mrp.model_stock_warehouse_orderpoint"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Linked to the 'Minimum stock rule' supplying method.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Minimum Stock&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="process_process_procurementprocess0"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_procureproducts0" model="process.node">
<field name="menu_id" ref="mrp.menu_mrp_procurement_action"/>
<field name="model_id" ref="mrp.model_mrp_procurement"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;The way to procurement depends on the product type.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Procure Products&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="process_process_procurementprocess0"/>
<field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_minimumstockrule0" model="process.node">
<field name="menu_id" ref="mrp.menu_action_orderpoint_form"/>
<field name="model_id" ref="mrp_procurement.model_stock_warehouse_orderpoint"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Linked to the 'Minimum stock rule' supplying method.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Minimum Stock&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_stockproduct0" model="process.node">
<field name="menu_id" ref="mrp.menu_mrp_procurement_action"/>
@@ -79,10 +52,22 @@
<field eval="&quot;&quot;&quot;Product type is Stockable or Consumable.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Stockable Product&quot;&quot;&quot;" name="name"/>
<field name="subflow_id" ref="process_process_stockableproductprocess0"/>
<field name="process_id" ref="process_process_procurementprocess0"/>
<field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_stockproduct1" model="process.node">
<field name="menu_id" ref="mrp.menu_mrp_procurement_action"/>
<field name="model_id" ref="mrp.model_mrp_procurement"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;For stockable products and consumables&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Stockable Product&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="mrp.process_process_stockableproductprocess0"/>
<field name="subflow_id" ref="mrp_procurement.process_process_procurementprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_serviceproduct0" model="process.node">
<field name="menu_id" ref="mrp.menu_mrp_procurement_action"/>
@@ -91,10 +76,22 @@
<field eval="&quot;&quot;&quot;Product type is service&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Service&quot;&quot;&quot;" name="name"/>
<field name="subflow_id" ref="process_process_serviceproductprocess0"/>
<field name="process_id" ref="process_process_procurementprocess0"/>
<field name="process_id" ref="mrp_procurement.process_process_procurementprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_serviceproduct1" model="process.node">
<field name="menu_id" ref="mrp.menu_mrp_procurement_action"/>
<field name="model_id" ref="mrp.model_mrp_procurement"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;For Services.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Service&quot;&quot;&quot;" name="name"/>
<field name="process_id" ref="mrp.process_process_serviceproductprocess0"/>
<field name="subflow_id" ref="mrp_procurement.process_process_procurementprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_purchaseprocure0" model="process.node">
<field name="menu_id" ref="mrp.menu_mrp_procurement_action"/>
@@ -102,14 +99,14 @@
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Procurement Orders&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;For purchased material&quot;&quot;&quot;" name="note"/>
<field name="subflow_id" ref="process_process_procurementprocess0"/>
<field name="subflow_id" ref="mrp_procurement.process_process_procurementprocess0"/>
<field name="process_id" ref="purchase.process_process_purchaseprocess0"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_productminimumstockrule0" model="process.node">
<field name="menu_id" ref="mrp.menu_action_orderpoint_form"/>
<field name="model_id" ref="mrp.model_stock_warehouse_orderpoint"/>
<field name="model_id" ref="mrp_procurement.model_stock_warehouse_orderpoint"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Minimum Stock&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Automatic procurement rule&quot;&quot;&quot;" name="note"/>

Some files were not shown because too many files have changed in this diff Show More