[Merge] meged with dev trunk addons team 1

bzr revid: mso@mso-20100316075257-3jp5k2k22f1iddon
bzr revid: mso@mso-20100316120756-2nbr9hen6g9lje8f
This commit is contained in:
mso
2010-03-16 17:37:56 +05:30
26 changed files with 343 additions and 311 deletions
+2 -2
View File
@@ -668,7 +668,7 @@
<field eval="True" name="object"/>
</record>
<wizard id="action_move_journal_line_form" menu="False" model="account.move.line" name="account.move.journal" string="Making Entries by Line"/>
<wizard id="action_move_journal_line_form" menu="False" model="account.move.line" name="account.move.journal" string="Entries by Line"/>
<menuitem icon="STOCK_JUSTIFY_FILL" action="action_move_journal_line_form" id="menu_action_move_journal_line_form" parent="account.menu_finance_entries" type="wizard" sequence="5"/>
<!--
@@ -974,7 +974,7 @@
<menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>
<record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
<field name="name">Making Entries by Move</field>
<field name="name">Entries by Move</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
+179 -166
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-12-23 10:50+0000\n"
"PO-Revision-Date: 2010-03-15 03:12+0000\n"
"Last-Translator: Songpon Phusing <p.songpon@gmail.com>\n"
"Language-Team: Thai <th@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 04:52+0000\n"
"X-Launchpad-Export-Date: 2010-03-16 04:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -25,23 +25,23 @@ msgstr "ชื่อเรียกภายใน"
#. module: account
#: view:account.tax.code:0
msgid "Account Tax Code"
msgstr ""
msgstr "รหัสบัญชีภาษี"
#. module: account
#: model:ir.actions.act_window,name:account.action_invoice_tree9
#: model:ir.ui.menu,name:account.menu_action_invoice_tree9
msgid "Unpaid Supplier Invoices"
msgstr ""
msgstr "ใบแจ้งหนี้ที่ยังไม่จ่าย"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_entries
msgid "Entries Encoding"
msgstr ""
msgstr "กรอกข้อมูล"
#. module: account
#: model:ir.actions.todo,note:account.config_wizard_account_base_setup_form
msgid "Specify The Message for the Overdue Payment Report."
msgstr ""
msgstr "ระบุข้อความสำหรับรายงานของการจ่ายที่เกินกำหนด"
#. module: account
#: model:process.transition,name:account.process_transition_confirmstatementfromdraft0
@@ -66,7 +66,7 @@ msgstr ""
#. module: account
#: wizard_view:account_use_models,init_form:0
msgid "Select Message"
msgstr ""
msgstr "เลือกข้อความ"
#. module: account
#: help:product.category,property_account_income_categ:0
+1 -1
View File
@@ -202,7 +202,7 @@
<field name="view_type">form</field>
<field name="view_id" ref="view_account_analytic_line_tree"/>
</record>
<wizard id="action_account_analytic_line" menu="False" model="account.analytic.line" name="account.analytic.line" string="Making Entries by Line"/>
<wizard id="action_account_analytic_line" menu="False" model="account.analytic.line" name="account.analytic.line" string="Entries by Line"/>
<menuitem id="next_id_41" name="Analytic Entries" parent="account.menu_finance_entries"/>
<menuitem type="wizard" icon="STOCK_JUSTIFY_FILL" action="action_account_analytic_line" id="account_entries_analytic_entries" parent="next_id_41"/>
@@ -39,7 +39,7 @@ def _action_open_window(self, cr, uid, data, context):
id = mod_obj.read(cr, uid, result, ['res_id'])
return {
'name': _('Analytic Entries'),
'name': _('Analytic Entries by line'),
'view_type': 'form',
"view_mode": 'tree,form',
'res_model': 'account.analytic.line',
@@ -71,11 +71,11 @@ class account_analytic_line(wizard.interface):
}
states = {
'init': {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':form1, 'fields':form1_fields, 'state': [('end', 'Cancel','gtk-cancel'),('open', 'Open Entries','gtk-ok')]}
},
'open': {
'open': {
'actions': [],
'result': {'type': 'action', 'action': _action_open_window, 'state':'end'}
}
@@ -114,7 +114,7 @@ class wizard_report(wizard.interface):
sql = """
SELECT f.id, f.date_start, f.date_stop FROM account_fiscalyear f Where %s between f.date_start and f.date_stop """
cr.execute(sql,(data['form']['date1']))
cr.execute(sql,(data['form']['date1'],))
res = cr.dictfetchall()
if res:
if (data['form']['date2'] > res[0]['date_stop'] or data['form']['date2'] < res[0]['date_start']):
+1 -1
View File
@@ -255,7 +255,7 @@ class account_analytic_account(osv.osv):
if not parent_id:
return {}
parent = self.read(cr, uid, [parent_id], ['partner_id','code'])[0]
childs = self.search(cr, uid, [('parent_id', '=', parent_id), ('active', 'in', [True, False])])
childs = self.search(cr, uid, [('parent_id', '=', parent_id)])
numchild = len(childs)
if parent['partner_id']:
partner = parent['partner_id'][0]
+27 -17
View File
@@ -111,15 +111,19 @@ class base_module_record(osv.osv):
return obj.module+'.'+obj.name, obj.noupdate
def _create_record(self, cr, uid, doc, model, data, record_id, noupdate=False):
data_pool = self.pool.get('ir.model.data')
model_pool = self.pool.get(model)
record = doc.createElement('record')
record.setAttribute("id", record_id)
record.setAttribute("model", model)
record_list = [record]
lids = self.pool.get('ir.model.data').search(cr, uid, [('model','=',model)])
res = self.pool.get('ir.model.data').read(cr, uid, lids[:1], ['module'])
lids = data_pool.search(cr, uid, [('model','=',model)])
res = data_pool.read(cr, uid, lids[:1], ['module'])
if res:
self.depends[res[0]['module']]=True
fields = self.pool.get(model).fields_get(cr, uid)
fields = model_pool.fields_get(cr, uid)
for key,val in data.items():
if not (val or (fields[key]['type']=='boolean')):
continue
@@ -142,9 +146,11 @@ class base_module_record(osv.osv):
id,update = self._get_id(cr, uid, fields[key]['relation'], val)
noupdate = noupdate or update
if not id:
relation_pool = self.pool.get(fields[key]['relation'])
field.setAttribute("model", fields[key]['relation'])
fld_nm = self.pool.get(fields[key]['relation'])._rec_name
name = self.pool.get(fields[key]['relation']).read(cr, uid, val,[fld_nm])[fld_nm] or False
fld_nm = relation_pool._rec_name
name = relation_pool.read(cr, uid, val,[fld_nm])[fld_nm] or False
field.setAttribute("search", str([(str(fld_nm) ,'=', name)]))
else:
field.setAttribute("ref", id)
@@ -152,10 +158,10 @@ class base_module_record(osv.osv):
elif fields[key]['type'] in ('one2many',):
for valitem in (val or []):
if valitem[0] in (0,1):
if key in self.pool.get(model)._columns:
fname = self.pool.get(model)._columns[key]._fields_id
if key in model_pool._columns:
fname = model_pool._columns[key]._fields_id
else:
fname = self.pool.get(model)._inherit_fields[key][2]._fields_id
fname = model_pool._inherit_fields[key][2]._fields_id
valitem[2][fname] = record_id
newid,update = self._get_id(cr, uid, fields[key]['relation'], valitem[1])
if not newid:
@@ -190,14 +196,18 @@ class base_module_record(osv.osv):
def _create_yaml_record(self, cr, uid, model, data, record_id):
record={'model': model, 'id': str(record_id)}
lids = self.pool.get('ir.model.data').search(cr, uid, [('model','=',model)])
res = self.pool.get('ir.model.data').read(cr, uid, lids[:1], ['module'])
model_pool = self.pool.get(model)
data_pool = self.pool.get('ir.model.data')
lids = data_pool.search(cr, uid, [('model','=',model)])
res = data_pool.read(cr, uid, lids[:1], ['module'])
attrs={}
if res:
self.depends[res[0]['module']]=True
fields = self.pool.get(model).fields_get(cr, uid)
fields = model_pool.fields_get(cr, uid)
defaults={}
defaults[model] = self.pool.get(model).default_get(cr, uid, data)
defaults[model] = model_pool.default_get(cr, uid, data)
for key,val in data.items():
if ((key in defaults[model]) and (val == defaults[model][key])) and not(fields[key].get('required',False)):
continue
@@ -210,19 +220,19 @@ class base_module_record(osv.osv):
elif fields[key]['type'] in ('integer','float'):
attrs[key] = val
elif fields[key]['type'] in ('many2one',):
if type(val) in (type(''),type(u'')):
if type(val) in (type(''), type(u'')):
id = val
else:
id,update = self._get_id(cr, uid, fields[key]['relation'], val)
id, update = self._get_id(cr, uid, fields[key]['relation'], val)
attrs[key] = str(id)
elif fields[key]['type'] in ('one2many',):
items=[[]]
for valitem in (val or []):
if valitem[0] in (0,1):
if key in self.pool.get(model)._columns:
fname = self.pool.get(model)._columns[key]._fields_id
if key in model_pool._columns:
fname = model_pool._columns[key]._fields_id
else:
fname = self.pool.get(model)._inherit_fields[key][2]._fields_id
fname = model_pool._inherit_fields[key][2]._fields_id
valitem[2][fname] = record_id
newid,update = self._get_id(cr, uid, fields[key]['relation'], valitem[1])
if not newid:
+1 -1
View File
@@ -45,7 +45,7 @@ class ir_action_report_xml(osv.osv):
res[data.get('id')] = False
return res
def _model_search(self, cr, uid, obj, name, args):
def _model_search(self, cr, uid, obj, name, args, context={}):
if not len(args):
return []
model_id= args[0][2]
+3 -1
View File
@@ -77,7 +77,7 @@ class document_file(osv.osv):
# the directory id now is mandatory. It can still be computed automatically.
'parent_id': fields.many2one('document.directory', 'Directory', select=1, required=True),
'file_size': fields.integer('File Size', required=True),
'file_type': fields.char('Content Type', size=32),
'file_type': fields.char('Content Type', size=64),
# If ir.attachment contained any data before document is installed, preserve
# the data, don't drop the column!
'db_datas': fields.binary('Data', oldname='datas'),
@@ -141,6 +141,8 @@ class document_file(osv.osv):
return super(document_file, self).copy(cr, uid, id, default, context)
def write(self, cr, uid, ids, vals, context=None):
if not isinstance(ids, list):
ids = [ids]
res = self.search(cr, uid, [('id', 'in', ids)])
if not len(res):
return False
+5 -6
View File
@@ -64,15 +64,14 @@ class document_directory(osv.osv):
def _get_root_directory(self, cr,uid, context=None):
objid=self.pool.get('ir.model.data')
try:
mid = objid._get_id(cr, uid, 'document', 'dir_root')
return None # TODO: check why not display root dir
mid = objid._get_id(cr, uid, 'document', 'dir_root')
if not mid:
return None
return False
except Exception, e:
import netsvc
logger = netsvc.Logger()
logger.notifyChannel("document", netsvc.LOG_WARNING, 'Cannot set directory root:'+ str(e))
return None
return False
return objid.browse(cr, uid, mid, context=context).res_id
def _get_def_storage(self,cr,uid,context=None):
@@ -199,8 +198,8 @@ class document_directory(osv.osv):
path.append(duri[0])
duri = duri[1:]
did = nid[0]
return (nodes.node_dir(path, nparent,ncontext,self.browse(cr,uid,did, context)), duri)
root_node = did and self.browse(cr,uid,did, context) or False
return (nodes.node_dir(path, nparent,ncontext, root_node), duri)
nid = self.search(cr,uid,[('parent_id','=',did),('name','=',duri[0]),('type','=','ressource')], context=context)
+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: 2009-04-24 14:45+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-03-15 14:11+0000\n"
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 05:03+0000\n"
"X-Launchpad-Export-Date: 2010-03-16 04:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document
@@ -203,7 +203,7 @@ msgstr ""
#. module: document
#: model:ir.ui.menu,name:document.menu_document
msgid "Document Management"
msgstr ""
msgstr "Dokumenthantering"
#. module: document
#: selection:ir.attachment,store_method:0
+10 -11
View File
@@ -49,18 +49,17 @@ class node_context(object):
context """
cached_roots = {}
def __init__(self, cr, uid, context=None):
# we don't cache the cr!
def __init__(self, cr, uid, context=None):
self.dbname = cr.dbname
self.uid = uid
self.context = context
self._dirobj = pooler.get_pool(cr.dbname).get('document.directory')
assert self._dirobj
self.rootdir = self._dirobj._get_root_directory(cr,uid,context)
self.rootdir = False #self._dirobj._get_root_directory(cr,uid,context)
def get_uri(self, cr, uri):
""" Although this fn passes back to doc.dir, it is needed since
it is a potential caching point """
it is a potential caching point """
(ndir, duri) = self._dirobj._locate_child(cr,self.uid, self.rootdir,uri, None, self)
while duri:
ndir = ndir.child(cr, duri[0])
@@ -168,23 +167,23 @@ class node_dir(node_class):
our_type = 'collection'
def __init__(self,path, parent, context, dirr, dctx=None):
super(node_dir,self).__init__(path, parent,context)
self.dir_id = dirr.id
self.dir_id = dirr and dirr.id or False
#todo: more info from dirr
self.mimetype = 'application/x-directory'
# 'httpd/unix-directory'
self.create_date = dirr.create_date
self.domain = dirr.domain
self.res_model = dirr.ressource_type_id and dirr.ressource_type_id.model or False
self.create_date = dirr and dirr.create_date or False
self.domain = dirr and dirr.domain or []
self.res_model = dirr and dirr.ressource_type_id and dirr.ressource_type_id.model or False
# TODO: the write date should be MAX(file.write)..
self.write_date = dirr.write_date or dirr.create_date
self.write_date = dirr and (dirr.write_date or dirr.create_date) or False
self.content_length = 0
if dctx:
self.dctx.update(dctx)
dc2 = self.context.context
dc2.update(self.dctx)
dc2['dir_id'] = self.dir_id
self.displayname = dirr.name
if dirr.dctx_ids:
self.displayname = dirr and dirr.name or False
if dirr and dirr.dctx_ids:
for dfld in dirr.dctx_ids:
try:
self.dctx['dctx_' + dfld.field] = safe_eval(dfld.expr,dc2)
+1 -1
View File
@@ -23,7 +23,7 @@ import StringIO
import odt2txt
from content_index import indexer, cntIndex
from subprocess import Popen, PIPE
def _to_unicode(s):
try:
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -43,7 +43,7 @@ def _create_duplicate(self, cr, uid, data, context):
event_obj=pooler.get_pool(cr.dbname).get('event.event')
project_obj = pooler.get_pool(cr.dbname).get('project.project')
duplicate_project_id= project_obj.copy(cr, uid,data['form']['project_id'], {'active': True})
project_obj.write(cr, uid, [duplicate_project_id], {'name': "copy of " + project_obj.browse(cr, uid, duplicate_project_id, context).name , 'date_start':time.strftime('%Y-%m-%d'),'date_end': event_obj.browse(cr, uid, [data['id']])[0].date_begin[0:10] })
project_obj.write(cr, uid, [duplicate_project_id], {'name': "copy of " + project_obj.browse(cr, uid, duplicate_project_id, context).name , 'date_start':time.strftime('%Y-%m-%d'),'date': event_obj.browse(cr, uid, [data['id']])[0].date_begin[0:10] })
event_obj.write(cr, uid, [data['id']], {'project_id': duplicate_project_id })
return {}
+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: 2009-09-17 09:48+0000\n"
"Last-Translator: Jay (Open ERP) <jvo@tinyerp.com>\n"
"PO-Revision-Date: 2010-03-15 14:12+0000\n"
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 04:54+0000\n"
"X-Launchpad-Export-Date: 2010-03-16 04:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: idea
@@ -157,7 +157,7 @@ msgstr ""
#. module: idea
#: model:ir.ui.menu,name:idea.menu_reporting
msgid "Reporting"
msgstr ""
msgstr "Rapportering"
#. module: idea
#: model:ir.model,name:idea.model_idea_vote_stat
+7 -7
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-02-16 11:17+0000\n"
"Last-Translator: Treecko <Unknown>\n"
"PO-Revision-Date: 2010-03-15 14:14+0000\n"
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-03-16 04:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: membership
@@ -179,7 +179,7 @@ msgstr ""
#. module: membership
#: model:ir.ui.menu,name:membership.menu_reporting
msgid "Reporting"
msgstr ""
msgstr "Rapportering"
#. module: membership
#: view:res.partner:0
@@ -249,7 +249,7 @@ msgstr ""
#: field:report.partner_member.year_new,canceled_amount:0
#: field:report.partner_member.year_new,canceled_number:0
msgid "Canceled"
msgstr ""
msgstr "Avbruten"
#. module: membership
#: model:product.pricelist,name:membership.list1m
@@ -317,7 +317,7 @@ msgstr ""
#: field:report.partner_member.year_new,paid_amount:0
#: field:report.partner_member.year_new,paid_number:0
msgid "Paid"
msgstr ""
msgstr "Betalad"
#. module: membership
#: selection:membership.membership_line,state:0
@@ -510,7 +510,7 @@ msgstr ""
#. module: membership
#: constraint:product.product:0
msgid "Error: Invalid ean code"
msgstr ""
msgstr "Fel: felaktig EAN-kod"
#. module: membership
#: field:report.partner_member.year,year:0
+1 -1
View File
@@ -793,7 +793,7 @@
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Planification"/>
<field name="date_planned" select="1" widget="date"/>
<field name="date_planned" select="1"/>
<field name="procure_method" select="2"/>
<field name="priority" groups="base.group_extended"/>
</group>
+4 -7
View File
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!--
Resource: project.project
-->
<record id="base.main_company" model="res.company">
<field name="project_time_mode_id" ref="product.uom_hour"></field>
</record>
<!-- Task Types -->
<record id="project_tt_specification" model="project.task.type">
<field name="sequence">1</field>
@@ -26,7 +26,7 @@
<field name="sequence">4</field>
<field name="name">Merge</field>
</record>
<!-- Projects -->
<record id="project_project_9" model="project.project">
<field name="warn_manager">1</field>
@@ -39,7 +39,6 @@
<field name="priority">10</field>
<field name="parent_id" ref="project_project_9"/>
<field name="name">Study + Prototype</field>
<field model="account.analytic.account" name="category_id" search="[('name','=', 'Seagate P1')]"/>
<field name="manager" ref="base.user_root"/>
<field eval="[(6, 0, [ref('project_tt_specification'),ref('project_tt_development')])]" name="type_ids"/>
</record>
@@ -47,7 +46,6 @@
<field name="priority">20</field>
<field name="parent_id" ref="project_project_9"/>
<field name="name">Specific Developements</field>
<field model="account.analytic.account" name="category_id" search="[('name','=', 'Seagate P1')]"/>
<field name="manager" ref="base.user_root"/>
<field eval="[(6, 0, [ref('project_tt_specification'), ref('project_tt_development')])]" name="type_ids"/>
</record>
@@ -55,11 +53,10 @@
<field name="priority">30</field>
<field name="parent_id" ref="project_project_9"/>
<field name="name">Install, data import, configuration</field>
<field model="account.analytic.account" name="category_id" search="[('name','=', 'Seagate P1')]"/>
<field name="manager" ref="base.user_root"/>
<field eval="[(6, 0, [ref('project_tt_development')])]" name="type_ids"/>
</record>
<!-- Tasks -->
<record id="project_task_116" model="project.task">
<field name="planned_hours">38.0</field>
+15 -15
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,22 +15,22 @@
# 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/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name" : "Caldav task management",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Others",
"description": """ Synchronize between Project task and Caldav Vtodo.""",
"depends" : ["project", "caldav"],
"init_xml" : ["project_caldav_data.xml"],
"demo_xml" : [],
"update_xml" : ["project_caldav_view.xml",
"project_caldav_wizard.xml"],
"active": False,
"website": "http://www.openerp.com",
"installable": True,
"name" : "Caldav task management",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Others",
"description": """ Synchronize between Project task and Caldav Vtodo.""",
"depends" : ["project", "caldav", "base_calendar"],
"init_xml" : ["project_caldav_data.xml"],
"demo_xml" : [],
"update_xml" : ["project_caldav_view.xml",
"project_caldav_wizard.xml"],
"active": False,
"website": "http://www.openerp.com",
"installable": True,
}
+10 -8
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_project_caldav_task_form" model="ir.ui.view">
<field name="name">project.task.caldav.form</field>
<field name="model">project.task</field>
@@ -46,8 +46,8 @@
</page>
</notebook>
</field>
</record>
</record>
<record id="view_project_caldav_task_form1" model="ir.ui.view">
<field name="name">project.task.caldav.form1</field>
<field name="model">project.task</field>
@@ -58,8 +58,8 @@
<field name="class" />
</field>
</field>
</record>
</record>
<record id="view_project_caldav_task_form2" model="ir.ui.view">
<field name="name">project.task.caldav.form2</field>
<field name="model">project.task</field>
@@ -68,8 +68,10 @@
<field name="arch" type="xml">
<field name="progress" position="after">
<group colspan="2" col="3">
<field name="rrule_type" string="Recurrency"
<!-- <field name="rrule_type" string="Recurrency"
on_change="onchange_rrule_type(rrule_type)" colspan="1" />
--> <field name="rrule_type" string="Recurrency"
colspan="1" />
<button string="Custom" name="101"
icon="gtk-save-as" type="action"
context="{'model' : 'project.task'}"
@@ -78,7 +80,7 @@
</field>
</field>
</record>
<record id="view_project_caldav_task_form3" model="ir.ui.view">
<field name="name">project.task.caldav.form3</field>
<field name="model">project.task</field>
@@ -94,6 +96,6 @@
</field>
</field>
</record>
</data>
</openerp>
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -29,12 +29,12 @@ class project_project(osv.osv):
_description = 'project.project'
def write(self, cr, uid, ids,vals, *args, **kwargs):
if 'date_end' in vals and vals['date_end']:
if 'date' in vals and vals['date']:
data_project = self.browse(cr,uid,ids)
for prj in data_project:
c= date(*time.strptime(vals['date_end'],'%Y-%m-%d')[:3])
if prj.date_end:
d= date(*time.strptime(prj.date_end,'%Y-%m-%d')[:3])
c= date(*time.strptime(vals['date'],'%Y-%m-%d')[:3])
if prj.date:
d= date(*time.strptime(prj.date,'%Y-%m-%d')[:3])
for task in prj.tasks:
start_dt = (datetime(*time.strptime(task.date_start,'%Y-%m-%d %H:%M:%S')[:6])+(c-d)).strftime('%Y-%m-%d %H:%M:%S')
if task.date_deadline:
@@ -42,7 +42,7 @@ class project_project(osv.osv):
self.pool.get('project.task').write(cr,uid,task.id,{'date_start':start_dt, 'date_deadline':deadline_dt})
else:
self.pool.get('project.task').write(cr,uid,task.id,{'date_start':start_dt})
return super(project_project,self).write(cr, uid, ids,vals, *args, **kwargs)
return super(project_project,self).write(cr, uid, ids, vals, *args, **kwargs)
project_project()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+29 -25
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
@@ -58,11 +58,12 @@ class project_work(osv.osv):
res['general_account_id'] = a
res['product_uom_id'] = emp.product_id.uom_id.id
return res
def create(self, cr, uid, vals, *args, **kwargs):
obj = self.pool.get('hr.analytic.timesheet')
obj_timesheet = self.pool.get('hr.analytic.timesheet')
task_obj = self.pool.get('project.task')
vals_line = {}
obj_task = self.pool.get('project.task').browse(cr, uid, vals['task_id'])
obj_task = task_obj.browse(cr, uid, vals['task_id'])
result = self.get_user_related_details(cr, uid, vals.get('user_id', uid))
vals_line['name'] = '%s: %s' % (tools.ustr(obj_task.name), tools.ustr(vals['name']) or '/')
vals_line['user_id'] = vals['user_id']
@@ -71,33 +72,36 @@ class project_work(osv.osv):
vals_line['unit_amount'] = vals['hours']
acc_id = obj_task.project_id.category_id.id
vals_line['account_id'] = acc_id
res = obj.on_change_account_id(cr, uid, False, acc_id)
res = obj_timesheet.on_change_account_id(cr, uid, False, acc_id)
if res.get('value'):
vals_line.update(res['value'])
vals_line['general_account_id'] = result['general_account_id']
vals_line['journal_id'] = result['journal_id']
vals_line['amount'] = 00.0
vals_line['product_uom_id'] = result['product_uom_id']
timeline_id = obj.create(cr, uid, vals_line, {})
amount = vals_line['unit_amount']
prod_id = vals_line['product_id']
unit = False
timeline_id = obj_timesheet.create(cr, uid, vals=vals_line, context=kwargs['context'])
# Compute based on pricetype
amount_unit=obj.on_change_unit_amount(cr, uid, line_id,
vals_line['product_id'], vals_line['unit_amount'], unit, context)
vals_line['amount'] = (-1) * vals['hours']* (unit_amount or 0.0)
obj.write(cr, uid,[timeline_id], vals_line, {})
amount_unit=obj_timesheet.on_change_unit_amount(cr, uid, timeline_id,
prod_id, amount, unit, context=kwargs['context'])
vals_line['amount'] = (-1) * vals['hours']* (amount_unit['value']['amount'] or 0.0)
obj_timesheet.write(cr, uid,[timeline_id], vals_line, {})
vals['hr_analytic_timesheet_id'] = timeline_id
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
def write(self, cr, uid, ids, vals, context=None):
vals_line = {}
task = self.pool.get('project.task.work').browse(cr, uid, ids)[0]
obj = self.pool.get('hr.analytic.timesheet')
timesheet_obj = self.pool.get('hr.analytic.timesheet')
task = self.pool.get('project.task.work').browse(cr, uid, ids, context=context)[0]
line_id = task.hr_analytic_timesheet_id
# in case,if a record is deleted from timesheet,but we change it from tasks!
list_avail_ids = self.pool.get('hr.analytic.timesheet').search(cr, uid, [])
list_avail_ids = timesheet_obj.search(cr, uid, [], context=context)
if line_id in list_avail_ids:
obj = self.pool.get('hr.analytic.timesheet')
if 'name' in vals:
vals_line['name'] = '%s: %s' % (tools.ustr(task.task_id.name), tools.ustr(vals['name']) or '/')
if 'user_id' in vals:
@@ -111,13 +115,13 @@ class project_work(osv.osv):
vals_line['date'] = vals['date'][:10]
if 'hours' in vals:
vals_line['unit_amount'] = vals['hours']
# Compute based on pricetype
amount_unit=obj.on_change_unit_amount(cr, uid, line_id,
vals_line['product_id'], vals_line['unit_amount'], unit, context)
vals_line['amount'] = (-1) * vals['hours'] * (amount_unit or 0.0)
obj.write(cr, uid, [line_id], vals_line, {})
unit = False
amount_unit=obj.on_change_unit_amount(cr, uid, line_id,
vals_line['product_id'], vals_line['unit_amount'], unit, context=context)
vals_line['amount'] = (-1) * vals['hours'] * (amount_unit['value']['amount'] or 0.0)
obj.write(cr, uid, [line_id], vals_line, context=context)
return super(project_work,self).write(cr, uid, ids, vals, context)
@@ -147,9 +151,9 @@ class task(osv.osv):
if task_obj.work_ids:
work_ids = [x.id for x in task_obj.work_ids]
self.pool.get('project.task.work').unlink(cr, uid, work_ids, *args, **kwargs)
return super(task,self).unlink(cr, uid, ids, *args, **kwargs)
def write(self, cr, uid, ids,vals,context={}):
if (vals.has_key('project_id') and vals['project_id']) or (vals.has_key('name') and vals['name']):
vals_line = {}
+4 -4
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-12-29 10:05+0000\n"
"Last-Translator: NightSpirit <Unknown>\n"
"PO-Revision-Date: 2010-03-15 14:30+0000\n"
"Last-Translator: Henri Kovalainen <Unknown>\n"
"Language-Team: Finnish <fi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 04:57+0000\n"
"X-Launchpad-Export-Date: 2010-03-16 04:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: report_sale
@@ -330,4 +330,4 @@ msgstr "Myynti tiloittain"
#. module: report_sale
#: field:report.sale.order.created,amount_untaxed:0
msgid "Untaxed Amount"
msgstr "Veroton määrä"
msgstr "Veroton summa"
+10 -4
View File
@@ -289,9 +289,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Scrum Sprint">
<field name="name" select="1"/>
<field name="date"/>
<field name="sprint_id"/>
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="date"/>
<field name="sprint_id"/>
</group>
<notebook colspan="4">
<page string="Scrum Meeting">
<separator colspan="4" string="What have you accomplished since yesterday ?"/>
@@ -317,8 +319,12 @@
<field name="arch" type="xml">
<search string="Scrum Sprint">
<group col="10" colspan="4">
<filter icon="terp-project" string="Daily" domain="[('date','=',time.strftime(%%Y-%%m-%%d))]" help="Daily Meetings"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="sprint_id" widget="selection"/>
<field name="sprint_id">
<filter icon="terp-project" string="Current" domain="[('sprint_id.state','in',('draft','open'))]" help="Current Sprints" default="1"/>
</field>
<field name="date"/>
</group>
<newline/>
+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: 2009-12-16 20:04+0000\n"
"Last-Translator: Andreas Porevopoulos <Unknown>\n"
"PO-Revision-Date: 2010-03-15 21:55+0000\n"
"Last-Translator: j0hn aka c7p <c7p.admin@gmail.com>\n"
"Language-Team: nls@hellug.gr <nls@hellug.gr>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-11 04:40+0000\n"
"X-Launchpad-Export-Date: 2010-03-16 04:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
@@ -665,7 +665,7 @@ msgstr "Αναμενόμενη Ημερ/νία Αποστολής"
#. module: stock
#: rml:stock.picking.list:0
msgid "Shipping Address :"
msgstr ""
msgstr "Ταχυδρομική Διεύθυνση :"
#. module: stock
#: view:stock.tracking:0