diff --git a/addons/account/account.py b/addons/account/account.py
index 0229297c2de..02f79a6dfc5 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -641,7 +641,7 @@ class account_period(osv.osv):
#CHECKME: shouldn't we check the state of the period?
ids = self.search(cr, uid, [('date_start','<=',dt),('date_stop','>=',dt)])
if not ids:
- raise osv.except_osv(_('Error !'), _('No period defined for this date !\nPlease create a fiscal year.'))
+ raise osv.except_osv(_('Error !'), _('No period defined for this date: %s !\nPlease create a fiscal year.')%dt)
return ids
def action_draft(self, cr, uid, ids, *args):
@@ -1049,11 +1049,11 @@ class account_move(osv.osv):
'state': 'draft'
}, context, check=False)
ok = False
- if ok:
- list_ids = []
- for tmp in move.line_id:
- list_ids.append(tmp.id)
- self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context)
+ if ok:
+ list_ids = []
+ for tmp in move.line_id:
+ list_ids.append(tmp.id)
+ self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context)
return ok
account_move()
@@ -1814,11 +1814,13 @@ class account_account_template(osv.osv):
'parent_id': fields.many2one('account.account.template','Parent Account Template', ondelete='cascade'),
'child_parent_ids':fields.one2many('account.account.template','parent_id','Children'),
'tax_ids': fields.many2many('account.tax.template', 'account_account_template_tax_rel','account_id','tax_id', 'Default Taxes'),
+ 'nocreate': fields.boolean('Optional create', help="If checked, the new chart of accounts will not contain this by default."),
}
_defaults = {
'reconcile': lambda *a: False,
'type' : lambda *a :'view',
+ 'nocreate': lambda *a: False,
}
def _check_recursion(self, cr, uid, ids):
@@ -1850,6 +1852,67 @@ class account_account_template(osv.osv):
account_account_template()
+class account_add_tmpl_wizard(osv.osv_memory):
+ """Add one more account from the template.
+
+ With the 'nocreate' option, some accounts may not be created. Use this to add them later."""
+ _name = 'account.addtmpl.wizard'
+
+ def _get_def_cparent(self, cr, uid, context):
+ acc_obj=self.pool.get('account.account')
+ tmpl_obj=self.pool.get('account.account.template')
+ #print "Searching for ",context
+ tids=tmpl_obj.read(cr, uid, [context['tmpl_ids']],['parent_id'])
+ if not tids or not tids[0]['parent_id']:
+ return False
+ ptids = tmpl_obj.read(cr, uid, [tids[0]['parent_id'][0]],['code'])
+ if not ptids or not ptids[0]['code']:
+ raise osv.except_osv(_('Error !'), _('Cannot locate parent code for template account!'))
+ res = acc_obj.search(cr,uid,[('code','=',ptids[0]['code'])])
+ if res:
+ return res[0]
+ else:
+ return False
+
+ _columns = {
+ 'cparent_id':fields.many2one('account.account', 'Parent target', help="Create an account with the selected template under this existing parent.", required=True),
+ }
+ _defaults = {
+ 'cparent_id': _get_def_cparent,
+ }
+
+ def action_create(self,cr,uid,ids,context=None):
+ acc_obj=self.pool.get('account.account')
+ tmpl_obj=self.pool.get('account.account.template')
+ data= self.read(cr,uid,ids)
+ company_id = acc_obj.read(cr,uid,[data[0]['cparent_id']],['company_id'])[0]['company_id'][0]
+ account_template = tmpl_obj.browse(cr,uid,context['tmpl_ids'])
+ #tax_ids = []
+ #for tax in account_template.tax_ids:
+ # tax_ids.append(tax_template_ref[tax.id])
+ vals={
+ 'name': account_template.name,
+ #'sign': account_template.sign,
+ 'currency_id': account_template.currency_id and account_template.currency_id.id or False,
+ 'code': account_template.code,
+ 'type': account_template.type,
+ 'user_type': account_template.user_type and account_template.user_type.id or False,
+ 'reconcile': account_template.reconcile,
+ 'shortcut': account_template.shortcut,
+ 'note': account_template.note,
+ 'parent_id': data[0]['cparent_id'],
+ # 'tax_ids': [(6,0,tax_ids)], todo!!
+ 'company_id': company_id,
+ }
+ # print "Creating:", vals
+ new_account = acc_obj.create(cr,uid,vals)
+ return {'type':'state', 'state': 'end' }
+
+ def action_cancel(self,cr,uid,ids,context=None):
+ return { 'type': 'state', 'state': 'end' }
+
+account_add_tmpl_wizard()
+
class account_tax_code_template(osv.osv):
_name = 'account.tax.code.template'
@@ -2145,7 +2208,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
#deactivate the parent_store functionnality on account_account for rapidity purpose
self.pool._init = True
- children_acc_template = obj_acc_template.search(cr, uid, [('parent_id','child_of',[obj_acc_root.id])])
+ children_acc_template = obj_acc_template.search(cr, uid, [('parent_id','child_of',[obj_acc_root.id]),('nocreate','!=',True)])
children_acc_template.sort()
for account_template in obj_acc_template.browse(cr, uid, children_acc_template):
tax_ids = []
diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py
index 5f13160dfd9..3e3266044b4 100644
--- a/addons/account/account_analytic_line.py
+++ b/addons/account/account_analytic_line.py
@@ -97,9 +97,11 @@ class account_analytic_line(osv.osv):
def view_header_get(self, cr, user, view_id, view_type, context):
if context.get('account_id', False):
+ # account_id in context may also be pointing to an account.account.id
cr.execute('select name from account_analytic_account where id=%s', (context['account_id'],))
res = cr.fetchone()
- res = _('Entries: ')+ (res[0] or '')
+ if res:
+ res = _('Entries: ')+ (res[0] or '')
return res
return False
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index d728eed9ffc..f5beac34601 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -63,6 +63,7 @@
+
@@ -288,7 +289,7 @@
-
+
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index f472b73f198..1fa6df738c5 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -792,9 +792,9 @@
-
-
- account.move.line.select
+
+
+ Entry Lines
account.move.line
search
@@ -1479,8 +1479,28 @@
+
+ Account Add wizard
+ account.addtmpl.wizard
+ form
+
+
+
+
-
+
diff --git a/addons/account/i18n/ca.po b/addons/account/i18n/ca.po
index 06d1fe9f5d2..7dfa296a5d8 100644
--- a/addons/account/i18n/ca.po
+++ b/addons/account/i18n/ca.po
@@ -7,13 +7,14 @@ 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 10:12+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 01:35+0000\n"
+"Last-Translator: Jordi Esteve - http://www.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: 2009-11-18 04:36+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -24,7 +25,7 @@ msgstr "Nom intern"
#. module: account
#: view:account.tax.code:0
msgid "Account Tax Code"
-msgstr "Codi compte impostos"
+msgstr "Codi impost comptable"
#. module: account
#: model:ir.actions.act_window,name:account.action_invoice_tree9
@@ -415,7 +416,7 @@ msgstr "Conciliació del pagament"
#. module: account
#: model:account.journal,name:account.expenses_journal
msgid "Journal de frais"
-msgstr ""
+msgstr "Diari de despeses"
#. module: account
#: model:ir.actions.act_window,name:account.act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal
@@ -1169,7 +1170,7 @@ msgstr "wizard.multi.charts.accounts"
#. module: account
#: model:account.journal,name:account.sales_journal
msgid "Journal de vente"
-msgstr ""
+msgstr "Diari de vendes"
#. module: account
#: help:account.model.line,amount_currency:0
@@ -1596,7 +1597,7 @@ msgstr "Obre per la conciliació"
#. module: account
#: model:account.journal,name:account.bilan_journal
msgid "Journal d'ouverture"
-msgstr ""
+msgstr "Diari d'obertura"
#. module: account
#: selection:account.tax,tax_group:0
@@ -1934,7 +1935,7 @@ msgstr "Paga factura"
#. module: account
#: constraint:account.invoice:0
msgid "Error: Invalid Bvr Number (wrong checksum)."
-msgstr ""
+msgstr "Error: Número BVR no vàlid (checksum erroni)."
#. module: account
#: model:ir.actions.act_window,name:account.action_invoice_tree5
@@ -2394,7 +2395,7 @@ msgstr "Plantilla del pla comptable"
#. module: account
#: model:account.journal,name:account.refund_sales_journal
msgid "Journal d'extourne"
-msgstr ""
+msgstr "Diari d'inversió"
#. module: account
#: rml:account.journal.period.print:0
@@ -3228,7 +3229,7 @@ msgstr "Compte"
#. module: account
#: model:account.journal,name:account.bank_journal
msgid "Journal de Banque CHF"
-msgstr ""
+msgstr "Diari de banc"
#. module: account
#: selection:account.account.balance.report,checktype,state:0
@@ -3361,7 +3362,7 @@ msgstr "Codi impost arrel"
#. module: account
#: constraint:account.invoice:0
msgid "Error: BVR reference is required."
-msgstr ""
+msgstr "Error: La referència BVR és necessària."
#. module: account
#: field:account.tax.code,notprintable:0
diff --git a/addons/account/i18n/pt.po b/addons/account/i18n/pt.po
index 8362ec21977..fcab33df1f1 100644
--- a/addons/account/i18n/pt.po
+++ b/addons/account/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
diff --git a/addons/account/i18n/sl.po b/addons/account/i18n/sl.po
index 7ed77c6498e..2c0087c186b 100644
--- a/addons/account/i18n/sl.po
+++ b/addons/account/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-26 13:54+0000\n"
+"PO-Revision-Date: 2009-11-30 12:59+0000\n"
"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -2978,7 +2978,7 @@ msgstr "Davčna stopnja"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "Analytic Journal -"
-msgstr ""
+msgstr "Analitični dnevnik"
#. module: account
#: rml:account.analytic.account.analytic.check:0
@@ -4756,7 +4756,7 @@ msgstr ""
#: selection:account.partner.balance.report,init,result_selection:0
#: selection:account.third_party_ledger.report,init,result_selection:0
msgid "Receivable Accounts"
-msgstr ""
+msgstr "Konti terjatev"
#. module: account
#: wizard_button:account.move.line.unreconcile.select,init,open:0
@@ -5292,7 +5292,7 @@ msgstr "Poslovno leto"
#. module: account
#: wizard_button:account.analytic.line,init,open:0
msgid "Open Entries"
-msgstr ""
+msgstr "Odprte postavke"
#. module: account
#: selection:account.analytic.account,type:0
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index fa55c444dd1..3fe324bd69c 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -226,7 +226,7 @@ class account_invoice(osv.osv):
('in_invoice','Supplier Invoice'),
('out_refund','Customer Refund'),
('in_refund','Supplier Refund'),
- ],'Type', readonly=True, select=True),
+ ],'Type', readonly=True, select=True, change_default=True),
'number': fields.char('Invoice Number', size=32, readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
'reference': fields.char('Invoice Reference', size=64, help="The partner reference of this invoice."),
@@ -284,7 +284,7 @@ class account_invoice(osv.osv):
multi='all'),
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'journal_id': fields.many2one('account.journal', 'Journal', required=True,readonly=True, states={'draft':[('readonly',False)]}),
- 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True),
'check_total': fields.float('Total', digits=(16, int(config['price_accuracy'])), states={'open':[('readonly',True)],'close':[('readonly',True)]}),
'reconciled': fields.function(_reconciled, method=True, string='Paid/Reconciled', type='boolean',
store={
@@ -314,9 +314,7 @@ class account_invoice(osv.osv):
'state': lambda *a: 'draft',
'journal_id': _get_journal,
'currency_id': _get_currency,
- 'company_id': lambda self, cr, uid, context: \
- self.pool.get('res.users').browse(cr, uid, uid,
- context=context).company_id.id,
+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.invoice', c),
'reference_type': lambda *a: 'none',
'check_total': lambda *a: 0.0,
}
@@ -1015,7 +1013,10 @@ class account_invoice(osv.osv):
line_ids = []
total = 0.0
line = self.pool.get('account.move.line')
- cr.execute('select id from account_move_line where move_id in ('+str(move_id)+','+str(invoice.move_id.id)+')')
+ move_ids = [move_id,]
+ if invoice.move_id:
+ move_ids.append(invoice.move_id.id)
+ cr.execute('SELECT id FROM account_move_line WHERE move_id = ANY(%s)',(move_ids,))
lines = line.browse(cr, uid, map(lambda x: x[0], cr.fetchall()) )
for l in lines+invoice.payment_ids:
if l.account_id.id==src_account_id:
@@ -1079,7 +1080,7 @@ class account_invoice_line(osv.osv):
'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]),
'note': fields.text('Notes'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
- 'company_id': fields.related('invoice_id','company_id',type='many2one',object='res.company',string='Company')
+ 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company')
}
_defaults = {
'quantity': lambda *a: 1,
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml
index 716f182c948..accbbf52d53 100644
--- a/addons/account/project/project_view.xml
+++ b/addons/account/project/project_view.xml
@@ -53,7 +53,7 @@
-
+
diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml
index 396e195ac5a..f551d77ccaa 100644
--- a/addons/account/security/account_security.xml
+++ b/addons/account/security/account_security.xml
@@ -46,6 +46,7 @@
child_of
user.company_id.id
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
@@ -59,6 +60,7 @@
child_of
user.company_id.id
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
@@ -70,6 +72,7 @@
child_of
user.company_id.id
+ ['|','|',('company_id','=',False),('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id])]
@@ -82,6 +85,7 @@
child_of
user.company_id.id
+ ['|','|',('company_id','=',False),('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id])]
@@ -93,6 +97,7 @@
child_of
user.company_id.id
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
@@ -105,6 +110,7 @@
=
False
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
@@ -117,6 +123,7 @@
child_of
user.company_id.id
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
@@ -130,6 +137,7 @@
child_of
user.company_id.id
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
@@ -142,6 +150,7 @@
child_of
user.company_id.id
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
@@ -154,6 +163,7 @@
child_of
user.company_id.id
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
@@ -166,6 +176,7 @@
child_of
user.company_id.id
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
@@ -178,6 +189,7 @@
child_of
user.company_id.id
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv
index 5dce667920e..3d135317b71 100644
--- a/addons/account/security/ir.model.access.csv
+++ b/addons/account/security/ir.model.access.csv
@@ -67,6 +67,8 @@
"access_res_currency_rate_account_manager","res.currency.rate account manager","base.model_res_currency_rate","group_account_manager",1,1,1,1
"access_account_config_wizard_account_manager","account.config.wizard account manager","model_account_config_wizard","group_account_manager",1,1,1,1
"access_account_config_wizard_system_manager","account.config.wizard system manager","model_account_config_wizard","base.group_system",1,1,1,1
+"access_account_add_tmpl_wizard_account_manager","account.addtmpl.wizard account manager","model_account_addtmpl_wizard","group_account_manager",1,1,1,1
+"access_account_add_tmpl_wizard_system_manager","account.addtmpl.wizard system manager","model_account_addtmpl_wizard","base.group_system",1,1,1,1
"access_account_invoice_user","account.invoice user","model_account_invoice","base.group_user",1,0,0,0
"access_account_invoice_user","account.invoice.line user","model_account_invoice_line","base.group_user",1,0,0,0
"access_account_invoice_user","account.invoice.tax user","model_account_invoice_tax","base.group_user",1,0,0,0
diff --git a/addons/account_analytic_analysis/i18n/pt.po b/addons/account_analytic_analysis/i18n/pt.po
index 2c1553d6e03..81f0e6ae6a0 100644
--- a/addons/account_analytic_analysis/i18n/pt.po
+++ b/addons/account_analytic_analysis/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_analysis
diff --git a/addons/account_analytic_default/account_analytic_default.py b/addons/account_analytic_default/account_analytic_default.py
index 026fcbe2d82..ad73ad0d403 100644
--- a/addons/account_analytic_default/account_analytic_default.py
+++ b/addons/account_analytic_default/account_analytic_default.py
@@ -70,7 +70,7 @@ account_analytic_default()
class account_invoice_line(osv.osv):
_inherit = 'account.invoice.line'
_description = 'account invoice line'
- def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, context={}):
+ def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, context=None):
res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition, price_unit, address_invoice_id, context)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context)
if rec:
diff --git a/addons/account_analytic_default/i18n/pt.po b/addons/account_analytic_default/i18n/pt.po
index 79d6cddcb21..73b43541375 100644
--- a/addons/account_analytic_default/i18n/pt.po
+++ b/addons/account_analytic_default/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_default
diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py
index bf6272e3ccc..6ad98453719 100644
--- a/addons/account_analytic_plans/account_analytic_plans.py
+++ b/addons/account_analytic_plans/account_analytic_plans.py
@@ -253,12 +253,12 @@ class account_invoice_line(osv.osv):
vals['analytics_id'] = vals['analytics_id'][0]
return super(account_invoice_line, self).create(cr, uid, vals, context)
- def move_line_get_item(self, cr, uid, line, context={}):
+ def move_line_get_item(self, cr, uid, line, context=None):
res= super(account_invoice_line,self).move_line_get_item(cr, uid, line, context={})
res ['analytics_id']=line.analytics_id and line.analytics_id.id or False
return res
- def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, context={}):
+ def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, context=None):
res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, context)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context)
if rec and rec.analytics_id:
diff --git a/addons/account_analytic_plans/i18n/pt.po b/addons/account_analytic_plans/i18n/pt.po
index 575a7de31ff..94eb18275fc 100644
--- a/addons/account_analytic_plans/i18n/pt.po
+++ b/addons/account_analytic_plans/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_plans
diff --git a/addons/account_balance/i18n/pt.po b/addons/account_balance/i18n/pt.po
index 2cc438a20b4..b04214fca54 100644
--- a/addons/account_balance/i18n/pt.po
+++ b/addons/account_balance/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_balance
diff --git a/addons/account_budget/crossovered_budget.py b/addons/account_budget/crossovered_budget.py
index 694ac6c1a8d..b350b15e9f3 100644
--- a/addons/account_budget/crossovered_budget.py
+++ b/addons/account_budget/crossovered_budget.py
@@ -49,7 +49,7 @@ class account_budget_post(osv.osv):
}
_defaults = {
'sequence': lambda *a: 1,
- 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.budget.post', c)
}
_order = "sequence, name"
diff --git a/addons/account_budget/i18n/pt.po b/addons/account_budget/i18n/pt.po
index 805477896b8..f50123e42f9 100644
--- a/addons/account_budget/i18n/pt.po
+++ b/addons/account_budget/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_budget
diff --git a/addons/account_chart/i18n/pt.po b/addons/account_chart/i18n/pt.po
index a99497a184b..ff837af4135 100644
--- a/addons/account_chart/i18n/pt.po
+++ b/addons/account_chart/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_chart
diff --git a/addons/account_date_check/i18n/pt.po b/addons/account_date_check/i18n/pt.po
index fd95e5db502..230ce03ea74 100644
--- a/addons/account_date_check/i18n/pt.po
+++ b/addons/account_date_check/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
diff --git a/addons/account_followup/i18n/es.po b/addons/account_followup/i18n/es.po
index 472b8c0ebb4..102ca0ea1d4 100644
--- a/addons/account_followup/i18n/es.po
+++ b/addons/account_followup/i18n/es.po
@@ -7,20 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 09:32+0000\n"
-"Last-Translator: Jordi Esteve - http://www.zikzakmedia.com "
-"\n"
+"PO-Revision-Date: 2009-11-30 18:05+0000\n"
+"Last-Translator: Hesed Franquet \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: 2009-11-18 04:36+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Date :"
-msgstr ""
+msgstr "Fecha :"
#. module: account_followup
#: wizard_field:account_followup.followup.print.all,next,partner_ids:0
@@ -30,7 +29,7 @@ msgstr "Empresas"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Customer Ref :"
-msgstr ""
+msgstr "Ref. cliente :"
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.act_account_partner_account_move_payable_all
@@ -51,7 +50,7 @@ msgstr "Mensaje impreso"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Amount In Currency"
-msgstr ""
+msgstr "Importe en divisa"
#. module: account_followup
#: rml:account_followup.followup.print:0
@@ -88,7 +87,7 @@ msgstr "Debe"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "Email Settings"
-msgstr ""
+msgstr "Configuración de correo electrónico"
#. module: account_followup
#: field:account_followup.stat,account_type:0
@@ -125,7 +124,7 @@ msgstr "Seguimientos"
#. module: account_followup
#: wizard_field:account_followup.followup.print.all,init,date:0
msgid "Follow-up Sending Date"
-msgstr ""
+msgstr "Fecha envío del seguimiento"
#. module: account_followup
#: view:account_followup.followup:0
@@ -202,7 +201,7 @@ msgstr "Tipo de plazo"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,init:0
msgid "Follow-up and Date Selection"
-msgstr ""
+msgstr "Selección seguimiento y fecha"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
@@ -231,6 +230,19 @@ msgid ""
"Best Regards,\n"
"\t\t\t"
msgstr ""
+"\n"
+"Estimado %(partner_name)s,\n"
+"\n"
+"Salvo si hubiera un error por parte nuestra, parece que los siguientes "
+"importes están pendientes de pago. Por favor, tome las medidas apropiadas "
+"para llevar a cabo este pago en los próximos 8 días.\n"
+"\n"
+"Si el pago hubiera sido realizado después de enviar este correo, por favor "
+"no lo tenga en cuenta. No dude en ponerse en contacto con nuestro "
+"departamento de contabilidad.\n"
+"\n"
+"Saludos cordiales,\n"
+"\t\t\t"
#. module: account_followup
#: constraint:ir.model:0
@@ -243,7 +255,7 @@ msgstr ""
#. module: account_followup
#: wizard_button:account_followup.followup.print.all,summary,end:0
msgid "Ok"
-msgstr ""
+msgstr "Ok"
#. module: account_followup
#: field:account_followup.followup,name:0
diff --git a/addons/account_followup/i18n/pt.po b/addons/account_followup/i18n/pt.po
index 2ac980d3a2f..c026bb55350 100644
--- a/addons/account_followup/i18n/pt.po
+++ b/addons/account_followup/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_followup
diff --git a/addons/account_invoice_layout/account_invoice_layout_view.xml b/addons/account_invoice_layout/account_invoice_layout_view.xml
index 04fc554b05a..18e7996a7cd 100644
--- a/addons/account_invoice_layout/account_invoice_layout_view.xml
+++ b/addons/account_invoice_layout/account_invoice_layout_view.xml
@@ -46,6 +46,8 @@
form
+
+
diff --git a/addons/account_invoice_layout/i18n/pt.po b/addons/account_invoice_layout/i18n/pt.po
index 8a0b6788110..57f1824241d 100644
--- a/addons/account_invoice_layout/i18n/pt.po
+++ b/addons/account_invoice_layout/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_invoice_layout
diff --git a/addons/account_payment/i18n/pt.po b/addons/account_payment/i18n/pt.po
index 069b2634d76..aa26adc1901 100644
--- a/addons/account_payment/i18n/pt.po
+++ b/addons/account_payment/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
diff --git a/addons/account_report/i18n/pt.po b/addons/account_report/i18n/pt.po
index 8227b79861e..3574dce3fa1 100644
--- a/addons/account_report/i18n/pt.po
+++ b/addons/account_report/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_report
diff --git a/addons/account_reporting/i18n/pt.po b/addons/account_reporting/i18n/pt.po
index ed4fa271f78..53e13cc9216 100644
--- a/addons/account_reporting/i18n/pt.po
+++ b/addons/account_reporting/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_reporting
diff --git a/addons/account_tax_include/i18n/pt.po b/addons/account_tax_include/i18n/pt.po
index dc2bb66632d..f6a20674d76 100644
--- a/addons/account_tax_include/i18n/pt.po
+++ b/addons/account_tax_include/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_tax_include
diff --git a/addons/account_tax_include/invoice_tax_incl.py b/addons/account_tax_include/invoice_tax_incl.py
index 51ee9c740ed..dde3bed2566 100644
--- a/addons/account_tax_include/invoice_tax_incl.py
+++ b/addons/account_tax_include/invoice_tax_incl.py
@@ -141,10 +141,14 @@ class account_invoice_line(osv.osv):
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, context=None):
# note: will call product_id_change_unit_price_inv with context...
- if context is None:
- context = {}
- context.update({'price_type': context.get('price_type','tax_excluded')})
- return super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, context=context)
+
+ # Temporary trap, for bad context that came from koo:
+ # if isinstance(context, str):
+ # print "str context:", context
+
+ ctx = (context and context.copy()) or {}
+ ctx.update({'price_type': ctx.get('price_type','tax_excluded')})
+ return super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, context=ctx)
account_invoice_line()
class account_invoice_tax(osv.osv):
diff --git a/addons/account_voucher/i18n/pt.po b/addons/account_voucher/i18n/pt.po
index 91f1d7377c7..8adb2eb14da 100644
--- a/addons/account_voucher/i18n/pt.po
+++ b/addons/account_voucher/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_voucher
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 7493f24c18a..4c550cc11bd 100755
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -133,9 +133,7 @@ class account_voucher(osv.osv):
'type': _get_type,
'reference_type': lambda *a: 'none',
'journal_id':_get_journal,
- 'company_id': lambda self, cr, uid, context: \
- self.pool.get('res.users').browse(cr, uid, uid,
- context=context).company_id.id,
+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher', c),
'currency_id': _get_currency,
}
diff --git a/addons/addons/account_budget_crossover/i18n/pt.po b/addons/addons/account_budget_crossover/i18n/pt.po
index 15a5ba8d5fe..5679dff68c3 100644
--- a/addons/addons/account_budget_crossover/i18n/pt.po
+++ b/addons/addons/account_budget_crossover/i18n/pt.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_budget_crossover
diff --git a/addons/addons/association_vertical/i18n/pt.po b/addons/addons/association_vertical/i18n/pt.po
index c65ad36e829..63bc8c139db 100644
--- a/addons/addons/association_vertical/i18n/pt.po
+++ b/addons/addons/association_vertical/i18n/pt.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: association_vertical
diff --git a/addons/addons/base_module_doc_rst/i18n/pt.po b/addons/addons/base_module_doc_rst/i18n/pt.po
index a4349d1f025..63c1c575bee 100644
--- a/addons/addons/base_module_doc_rst/i18n/pt.po
+++ b/addons/addons/base_module_doc_rst/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_doc_rst
diff --git a/addons/analytic_journal_billing_rate/i18n/pt.po b/addons/analytic_journal_billing_rate/i18n/pt.po
index 8b190352800..82b2d810113 100644
--- a/addons/analytic_journal_billing_rate/i18n/pt.po
+++ b/addons/analytic_journal_billing_rate/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic_journal_billing_rate
diff --git a/addons/analytic_user_function/i18n/pt.po b/addons/analytic_user_function/i18n/pt.po
index ce1fc23d198..d58d556b42b 100644
--- a/addons/analytic_user_function/i18n/pt.po
+++ b/addons/analytic_user_function/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic_user_function
diff --git a/addons/auction/i18n/pt.po b/addons/auction/i18n/pt.po
index 899c6e2995a..c8f9efb6c61 100644
--- a/addons/auction/i18n/pt.po
+++ b/addons/auction/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: auction
diff --git a/addons/audittrail/__terp__.py b/addons/audittrail/__terp__.py
index fd5252c1552..b640f4cf6b1 100644
--- a/addons/audittrail/__terp__.py
+++ b/addons/audittrail/__terp__.py
@@ -28,7 +28,7 @@
Subscribe Rules for read, write, create and delete on objects and check logs""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
- 'depends': ['base', 'account', 'purchase', 'mrp'],
+ 'depends': ['base'],
'init_xml': [],
'update_xml': [
'audittrail_view.xml',
diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py
index dd4ab92e980..a1b8b2a6ffd 100644
--- a/addons/audittrail/audittrail.py
+++ b/addons/audittrail/audittrail.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL ().
#
@@ -15,18 +15,19 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
-import ir
from osv import fields, osv
+from osv.osv import osv_pool
+from tools.translate import _
+import ir
import netsvc
import pooler
import string
import time, copy
-from tools.translate import _
class audittrail_rule(osv.osv):
_name = 'audittrail.rule'
@@ -38,8 +39,8 @@ class audittrail_rule(osv.osv):
"log_write": fields.boolean("Log writes"),
"log_unlink": fields.boolean("Log deletes"),
"log_create": fields.boolean("Log creates"),
- "state": fields.selection((("draft", "Draft"),("subscribed", "Subscribed")), "State", required=True),
- "action_id":fields.many2one('ir.actions.act_window',"Action ID"),
+ "state": fields.selection((("draft", "Draft"), ("subscribed", "Subscribed")), "State", required=True),
+ "action_id":fields.many2one('ir.actions.act_window', "Action ID"),
}
_defaults = {
@@ -67,13 +68,13 @@ class audittrail_rule(osv.osv):
"res_model":'audittrail.log',
"src_model":thisrule.object_id.model,
"domain":"[('object_id','=',"+str(thisrule.object_id.id)+"),('res_id', '=', active_id)]"
-
+
}
id=self.pool.get('ir.actions.act_window').create(cr, uid, val)
- self.write(cr, uid, [thisrule.id], {"state": "subscribed","action_id":id})
+ self.write(cr, uid, [thisrule.id], {"state": "subscribed", "action_id":id})
keyword = 'client_action_relate'
value = 'ir.actions.act_window,'+str(id)
- res=self.pool.get('ir.model.data').ir_set(cr, uid, 'action', keyword,'View_log_'+thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
+ res=self.pool.get('ir.model.data').ir_set(cr, uid, 'action', keyword, 'View_log_'+thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
return True
@@ -83,11 +84,11 @@ class audittrail_rule(osv.osv):
if thisrule.id in self.__functions :
for function in self.__functions[thisrule.id]:
setattr(function[0], function[1], function[2])
- w_id=self.pool.get('ir.actions.act_window').search(cr, uid, [('name','=','View Log'),('res_model','=','audittrail.log'),('src_model','=',thisrule.object_id.model)])
- self.pool.get('ir.actions.act_window').unlink(cr, uid,w_id )
+ w_id=self.pool.get('ir.actions.act_window').search(cr, uid, [('name', '=', 'View Log'), ('res_model', '=', 'audittrail.log'), ('src_model', '=', thisrule.object_id.model)])
+ self.pool.get('ir.actions.act_window').unlink(cr, uid, w_id)
val_obj=self.pool.get('ir.values')
value="ir.actions.act_window"+','+str(w_id[0])
- val_id=val_obj.search(cr, uid, [('model','=',thisrule.object_id.model),('value','=',value)])
+ val_id=val_obj.search(cr, uid, [('model', '=', thisrule.object_id.model), ('value', '=', value)])
if val_id:
res = ir.ir_del(cr, uid, val_id[0])
self.write(cr, uid, [thisrule.id], {"state": "draft"})
@@ -98,7 +99,7 @@ audittrail_rule()
class audittrail_log(osv.osv):
_name = 'audittrail.log'
-
+
_columns = {
"name": fields.char("Name", size=32),
"object_id": fields.many2one('ir.model', 'Object'),
@@ -106,7 +107,7 @@ class audittrail_log(osv.osv):
"method": fields.selection((('read', 'Read'), ('write', 'Write'), ('unlink', 'Delete'), ('create', 'Create')), "Method"),
"timestamp": fields.datetime("Date"),
"res_id":fields.integer('Resource Id'),
- "line_ids":fields.one2many('audittrail.log.line','log_id','Log lines'),
+ "line_ids":fields.one2many('audittrail.log.line', 'log_id', 'Log lines'),
}
_defaults = {
"timestamp": lambda *a: time.strftime("%Y-%m-%d %H:%M:%S")
@@ -118,102 +119,100 @@ audittrail_log()
class audittrail_log_line(osv.osv):
_name='audittrail.log.line'
_columns={
- 'field_id': fields.many2one('ir.model.fields','Fields', required=True),
- 'log_id':fields.many2one('audittrail.log','Log'),
+ 'field_id': fields.many2one('ir.model.fields', 'Fields', required=True),
+ 'log_id':fields.many2one('audittrail.log', 'Log'),
'log':fields.integer("Log ID"),
'old_value':fields.text("Old Value"),
'new_value':fields.text("New Value"),
- 'old_value_text':fields.text('Old value Text' ),
- 'new_value_text':fields.text('New value Text' ),
- 'field_description':fields.char('Field Description' ,size=64),
+ 'old_value_text':fields.text('Old value Text'),
+ 'new_value_text':fields.text('New value Text'),
+ 'field_description':fields.char('Field Description' , size=64),
}
audittrail_log_line()
-
-objects_proxy = netsvc.SERVICES['object'].__class__
-
-class audittrail_objects_proxy(objects_proxy):
-
+class audittrail_objects_proxy(osv_pool):
def get_value_text(self, cr, uid, field_name, values, object, context={}):
pool = pooler.get_pool(cr.dbname)
obj=pool.get(object.model)
- object_name=obj._name
- obj_ids= pool.get('ir.model').search(cr, uid,[('model','=',object_name)])
- model_object=pool.get('ir.model').browse(cr,uid,obj_ids)[0]
- f_id= pool.get('ir.model.fields').search(cr, uid,[('name','=',field_name),('model_id','=',object.id)])
+ obj_ids= pool.get('ir.model').search(cr, uid, [('model', '=', object.model)])
+ model_object=pool.get('ir.model').browse(cr, uid, obj_ids)[0]
+ f_id= pool.get('ir.model.fields').search(cr, uid, [('name', '=', field_name), ('model_id', '=', object.id)])
if f_id:
- field=pool.get('ir.model.fields').read(cr, uid,f_id)[0]
+ field=pool.get('ir.model.fields').read(cr, uid, f_id)[0]
model=field['relation']
if field['ttype']=='many2one':
if values:
if type(values)==tuple:
values=values[0]
- val=pool.get(model).read(cr,uid,[values],[pool.get(model)._rec_name])
+ val=pool.get(model).read(cr, uid, [values], [pool.get(model)._rec_name])
if len(val):
return val[0][pool.get(model)._rec_name]
elif field['ttype'] == 'many2many':
value=[]
if values:
for id in values:
- val=pool.get(model).read(cr,uid,[id],[pool.get(model)._rec_name])
+ val=pool.get(model).read(cr, uid, [id], [pool.get(model)._rec_name])
if len(val):
value.append(val[0][pool.get(model)._rec_name])
return value
elif field['ttype'] == 'one2many':
-
if values:
value=[]
for id in values:
- val=pool.get(model).read(cr,uid,[id],[pool.get(model)._rec_name])
+ val=pool.get(model).read(cr, uid, [id], [pool.get(model)._rec_name])
if len(val):
value.append(val[0][pool.get(model)._rec_name])
return value
return values
-
+
def create_log_line(self, cr, uid, id, object, lines=[]):
pool = pooler.get_pool(cr.dbname)
obj=pool.get(object.model)
- object_name=obj._name
- obj_ids= pool.get('ir.model').search(cr, uid,[('model','=',object_name)])
- model_object=pool.get('ir.model').browse(cr,uid,obj_ids)[0]
+ obj_ids= pool.get('ir.model').search(cr, uid, [('model', '=', object.model)])
+ model_object=pool.get('ir.model').browse(cr, uid, obj_ids)[0]
for line in lines:
- f_id= pool.get('ir.model.fields').search(cr, uid,[('name','=',line['name']),('model_id','=',object.id)])
+ if obj._inherits:
+ inherits_ids= pool.get('ir.model').search(cr, uid, [('model', '=', obj._inherits.keys()[0])])
+ f_id= pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (object.id, inherits_ids[0]))])
+ else:
+ f_id= pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', '=', object.id)])
if len(f_id):
- fields=pool.get('ir.model.fields').read(cr, uid,f_id)
+ fields=pool.get('ir.model.fields').read(cr, uid, f_id)
old_value='old_value' in line and line['old_value'] or ''
new_value='new_value' in line and line['new_value'] or ''
old_value_text='old_value_text' in line and line['old_value_text'] or ''
new_value_text='new_value_text' in line and line['new_value_text'] or ''
-
+
+ if old_value_text == new_value_text:
+ continue
if fields[0]['ttype']== 'many2one':
if type(old_value)==tuple:
old_value=old_value[0]
if type(new_value)==tuple:
new_value=new_value[0]
- log_line_id = pool.get('audittrail.log.line').create(cr, uid, {"log_id": id, "field_id": f_id[0] ,"old_value":old_value ,"new_value":new_value,"old_value_text":old_value_text ,"new_value_text":new_value_text,"field_description":fields[0]['field_description']})
+ log_line_id = pool.get('audittrail.log.line').create(cr, uid, {"log_id": id, "field_id": f_id[0] , "old_value":old_value , "new_value":new_value, "old_value_text":old_value_text , "new_value_text":new_value_text, "field_description":fields[0]['field_description']})
cr.commit()
return True
- def log_fct(self, db, uid, passwd, object, method, fct_src, *args):
+ def log_fct(self, db, uid, object, method, fct_src, *args):
logged_uids = []
pool = pooler.get_pool(db)
cr = pooler.get_db(db).cursor()
obj=pool.get(object)
- object_name=obj._name
- obj_ids= pool.get('ir.model').search(cr, uid,[('model','=',object_name)])
- model_object=pool.get('ir.model').browse(cr,uid,obj_ids)[0]
+ obj_ids= pool.get('ir.model').search(cr, uid, [('model', '=', object)])
+ model_object=pool.get('ir.model').browse(cr, uid, obj_ids)[0]
if method in ('create'):
- res_id = fct_src( db, uid, passwd, object, method, *args)
+ res_id = fct_src(db, uid, object, method, *args)
cr.commit()
- new_value=pool.get(model_object.model).read(cr,uid,[res_id],args[0].keys())[0]
+ new_value=pool.get(model_object.model).read(cr, uid, [res_id], args[0].keys())[0]
if 'id' in new_value:
del new_value['id']
if not len(logged_uids) or uid in logged_uids:
- resource_name = pool.get(model_object.model).name_get(cr,uid,[res_id])
+ resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
resource_name = resource_name and resource_name[0][1] or ''
id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
lines=[]
@@ -222,10 +221,10 @@ class audittrail_objects_proxy(objects_proxy):
line={
'name':field,
'new_value':new_value[field],
- 'new_value_text': self.get_value_text(cr,uid,field,new_value[field],model_object)
+ 'new_value_text': self.get_value_text(cr, uid, field, new_value[field], model_object)
}
lines.append(line)
- self.create_log_line(cr,uid,id,model_object,lines)
+ self.create_log_line(cr, uid, id, model_object, lines)
cr.commit()
cr.close()
return res_id
@@ -233,18 +232,18 @@ class audittrail_objects_proxy(objects_proxy):
if method in ('write'):
res_ids=args[0]
for res_id in res_ids:
- old_values=pool.get(model_object.model).read(cr,uid,res_id,args[1].keys())
+ old_values=pool.get(model_object.model).read(cr, uid, res_id, args[1].keys())
old_values_text={}
for field in args[1].keys():
- old_values_text[field] = self.get_value_text(cr,uid,field,old_values[field],model_object)
- res =fct_src( db, uid, passwd, object, method, *args)
+ old_values_text[field] = self.get_value_text(cr, uid, field, old_values[field], model_object)
+ res =fct_src(db, uid, object, method, *args)
cr.commit()
if res:
- new_values=pool.get(model_object.model).read(cr,uid,res_ids,args[1].keys())[0]
+ new_values=pool.get(model_object.model).read(cr, uid, res_ids, args[1].keys())[0]
if not len(logged_uids) or uid in logged_uids:
- resource_name = pool.get(model_object.model).name_get(cr,uid,[res_id])
+ resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
resource_name = resource_name and resource_name[0][1] or ''
- id=pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id,"name": resource_name})
+ id=pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
lines=[]
for field in args[1].keys():
if args[1].keys():
@@ -252,19 +251,19 @@ class audittrail_objects_proxy(objects_proxy):
'name':field,
'new_value':field in new_values and new_values[field] or '',
'old_value':field in old_values and old_values[field] or '',
- 'new_value_text': self.get_value_text(cr,uid,field,new_values[field],model_object),
+ 'new_value_text': self.get_value_text(cr, uid, field, new_values[field], model_object),
'old_value_text':old_values_text[field]
}
lines.append(line)
cr.commit()
- self.create_log_line(cr,uid,id,model_object,lines)
+ self.create_log_line(cr, uid, id, model_object, lines)
cr.close()
return res
if method in ('read'):
res_ids=args[0]
old_values={}
- res =fct_src( db, uid, passwd, object, method, *args)
+ res =fct_src(db, uid, object, method, *args)
if type(res)==list:
for v in res:
@@ -273,84 +272,82 @@ class audittrail_objects_proxy(objects_proxy):
old_values[res['id']]=res
for res_id in old_values:
if not len(logged_uids) or uid in logged_uids:
- resource_name = pool.get(model_object.model).name_get(cr,uid,[res_id])
+ resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
resource_name = resource_name and resource_name[0][1] or ''
- id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id,"name": resource_name})
+ id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
lines=[]
for field in old_values[res_id]:
if old_values[res_id][field]:
line={
'name':field,
'old_value':old_values[res_id][field],
- 'old_value_text': self.get_value_text(cr,uid,field,old_values[res_id][field],model_object)
+ 'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model_object)
}
lines.append(line)
cr.commit()
- self.create_log_line(cr,uid,id,model_object,lines)
+ self.create_log_line(cr, uid, id, model_object, lines)
cr.close()
return res
-
+
if method in ('unlink'):
res_ids=args[0]
old_values={}
for res_id in res_ids:
- old_values[res_id]=pool.get(model_object.model).read(cr,uid,res_id,[])
+ old_values[res_id]=pool.get(model_object.model).read(cr, uid, res_id, [])
for res_id in res_ids:
if not len(logged_uids) or uid in logged_uids:
- resource_name = pool.get(model_object.model).name_get(cr,uid,[res_id])
+ resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
resource_name = resource_name and resource_name[0][1] or ''
- id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id,"name": resource_name})
+ id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
lines=[]
for field in old_values[res_id]:
if old_values[res_id][field]:
line={
'name':field,
'old_value':old_values[res_id][field],
- 'old_value_text': self.get_value_text(cr,uid,field,old_values[res_id][field],model_object)
+ 'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model_object)
}
lines.append(line)
cr.commit()
- self.create_log_line(cr,uid,id,model_object,lines)
- res =fct_src( db, uid, passwd, object, method, *args)
+ self.create_log_line(cr, uid, id, model_object, lines)
+ res =fct_src(db, uid, object, method, *args)
cr.close()
return res
cr.close()
- def execute(self, db, uid, passwd, object, method, *args):
+ def execute(self, db, uid, object, method, *args, **kw):
pool = pooler.get_pool(db)
cr = pooler.get_db(db).cursor()
cr.autocommit(True)
obj=pool.get(object)
logged_uids = []
- object_name=obj._name
-
fct_src = super(audittrail_objects_proxy, self).execute
-
- def my_fct(db, uid, passwd, object, method, *args):
+
+ def my_fct(db, uid, object, method, *args):
field = method
rule = False
- obj_ids= pool.get('ir.model').search(cr, uid,[('model','=',object_name)])
+ obj_ids= pool.get('ir.model').search(cr, uid, [('model', '=', object)])
for obj_name in pool.obj_list():
if obj_name == 'audittrail.rule':
rule = True
if not rule:
- return fct_src(db, uid, passwd, object, method, *args)
+ return fct_src(db, uid, object, method, *args)
if not len(obj_ids):
- return fct_src(db, uid, passwd, object, method, *args)
- rule_ids=pool.get('audittrail.rule').search(cr, uid, [('object_id','=',obj_ids[0]),('state','=','subscribed')])
+ return fct_src(db, uid, object, method, *args)
+ rule_ids=pool.get('audittrail.rule').search(cr, uid, [('object_id', '=', obj_ids[0]), ('state', '=', 'subscribed')])
if not len(rule_ids):
- return fct_src(db, uid, passwd, object, method, *args)
+ return fct_src(db, uid, object, method, *args)
for thisrule in pool.get('audittrail.rule').browse(cr, uid, rule_ids):
for user in thisrule.user_id:
logged_uids.append(user.id)
if not len(logged_uids) or uid in logged_uids:
- if field in ('read','write','create','unlink'):
+ if field in ('read', 'write', 'create', 'unlink'):
if getattr(thisrule, 'log_'+field):
- return self.log_fct(db, uid, passwd, object, method, fct_src, *args)
- return fct_src(db, uid, passwd, object, method, *args)
- res = my_fct(db, uid, passwd, object, method, *args)
+ return self.log_fct(db, uid, object, method, fct_src, *args)
+ return fct_src(db, uid, object, method, *args)
+ res = my_fct(db, uid, object, method, *args)
cr.close()
return res
diff --git a/addons/audittrail/i18n/pt.po b/addons/audittrail/i18n/pt.po
index bd6d45bdff7..c09e6576380 100644
--- a/addons/audittrail/i18n/pt.po
+++ b/addons/audittrail/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: audittrail
diff --git a/addons/base_contact/base_contact_view.xml b/addons/base_contact/base_contact_view.xml
index 3667024a39f..755ec0af079 100644
--- a/addons/base_contact/base_contact_view.xml
+++ b/addons/base_contact/base_contact_view.xml
@@ -36,6 +36,7 @@
+
@@ -50,6 +51,9 @@
+
+
+
@@ -163,6 +167,8 @@
+
+
diff --git a/addons/base_contact/i18n/pt.po b/addons/base_contact/i18n/pt.po
index 448e8273b2e..d1cf58022bb 100644
--- a/addons/base_contact/i18n/pt.po
+++ b/addons/base_contact/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_contact
diff --git a/addons/base_iban/i18n/pt.po b/addons/base_iban/i18n/pt.po
index b371a920d19..25645c5a118 100644
--- a/addons/base_iban/i18n/pt.po
+++ b/addons/base_iban/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_iban
diff --git a/addons/base_module_merge/i18n/pt.po b/addons/base_module_merge/i18n/pt.po
index d2d2d4d957a..99b82ed8cc7 100644
--- a/addons/base_module_merge/i18n/pt.po
+++ b/addons/base_module_merge/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_merge
diff --git a/addons/base_module_publish/i18n/pt.po b/addons/base_module_publish/i18n/pt.po
index 08e867ef8dd..ce0b981794e 100644
--- a/addons/base_module_publish/i18n/pt.po
+++ b/addons/base_module_publish/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_publish
diff --git a/addons/base_module_quality/i18n/pt.po b/addons/base_module_quality/i18n/pt.po
index d142cbadbad..cf54b56015c 100644
--- a/addons/base_module_quality/i18n/pt.po
+++ b/addons/base_module_quality/i18n/pt.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_quality
diff --git a/addons/base_module_record/base_module_record.py b/addons/base_module_record/base_module_record.py
index 93d9dc7bd1d..002a3254143 100644
--- a/addons/base_module_record/base_module_record.py
+++ b/addons/base_module_record/base_module_record.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL ().
#
@@ -15,19 +15,19 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
from xml.dom import minidom
+from osv.osv import osv_pool
from osv import fields,osv
import netsvc
import pooler
import string
import tools
-objects_proxy = netsvc.SERVICES['object'].__class__
-
+objects_proxy = netsvc.ExportService.getService('object').__class__
class recording_objects_proxy(objects_proxy):
def execute(self, *args, **argv):
if len(args) >= 6 and isinstance(args[5], dict):
@@ -55,6 +55,22 @@ class recording_objects_proxy(objects_proxy):
recording_objects_proxy()
+class xElement(minidom.Element):
+ """dom.Element with compact print
+ The Element in minidom has a problem: if printed, adds whitespace
+ around the text nodes. The standard will not ignore that whitespace.
+ This class simply prints the contained nodes in their compact form, w/o
+ added spaces.
+ """
+ def writexml(self, writer, indent="", addindent="", newl=""):
+ writer.write(indent)
+ minidom.Element.writexml(self, writer, indent='', addindent='', newl='')
+ writer.write(newl)
+
+def doc_createXElement(xdoc, tagName):
+ e = xElement(tagName)
+ e.ownerDocument = xdoc
+ return e
class base_module_record(osv.osv):
_name = "ir.module.record"
@@ -145,7 +161,7 @@ class base_module_record(osv.osv):
if not newid:
newid = self._create_id(cr, uid, fields[key]['relation'], valitem[2])
self.ids[(fields[key]['relation'], valitem[1])] = newid
-
+
childrecord, update = self._create_record(cr, uid, doc, fields[key]['relation'],valitem[2], newid)
noupdate = noupdate or update
record_list += childrecord
@@ -165,15 +181,11 @@ class base_module_record(osv.osv):
field.setAttribute("eval", "[(6,0,["+','.join(map(lambda x: "ref('%s')" % (x,), res))+'])]')
record.appendChild(field)
else:
- field = doc.createElement('field')
+ field = doc_createXElement(doc, 'field')
field.setAttribute("name", key)
-
- if not isinstance(val, basestring):
- val = str(val)
-
- val = val and ('"""%s"""' % val.replace('\\', '\\\\').replace('"', '\"')) or 'False'
- field.setAttribute(u"eval", tools.ustr(val))
+ field.appendChild(doc.createTextNode(val))
record.appendChild(field)
+
return record_list, noupdate
def get_copy_data(self, cr, uid, model, id, result):
@@ -198,7 +210,7 @@ class base_module_record(osv.osv):
if type(data[key])==type(True) or type(data[key])==type(1):
result[key]=data[key]
elif not data[key]:
- result[key] = False
+ result[key] = False
else:
result[key]=data[key][0]
diff --git a/addons/base_module_record/base_module_record_wizard.xml b/addons/base_module_record/base_module_record_wizard.xml
index 8eb9c48fac9..b0a7d84a89c 100644
--- a/addons/base_module_record/base_module_record_wizard.xml
+++ b/addons/base_module_record/base_module_record_wizard.xml
@@ -21,5 +21,18 @@
action="wizard_base_module_record_objects"
id="menu_wizard_base_module_record_objects"/>
+
+
+
diff --git a/addons/base_module_record/i18n/pt.po b/addons/base_module_record/i18n/pt.po
index 177ac903fb9..5950f43fdf8 100644
--- a/addons/base_module_record/i18n/pt.po
+++ b/addons/base_module_record/i18n/pt.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_record
diff --git a/addons/base_module_record/i18n/sl.po b/addons/base_module_record/i18n/sl.po
index 0d24949fa6e..4560d37d733 100644
--- a/addons/base_module_record/i18n/sl.po
+++ b/addons/base_module_record/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-23 10:08+0000\n"
+"PO-Revision-Date: 2009-11-30 13:44+0000\n"
"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-24 04:38+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_record
@@ -61,7 +61,7 @@ msgstr "Ime imenika"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,init,filter_cond:0
msgid "Records only"
-msgstr ""
+msgstr "Samo posnetki"
#. module: base_module_record
#: selection:base_module_record.module_record_objects,intro,data_kind:0
@@ -89,13 +89,13 @@ msgstr "Zapisovanje predmetov"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,init,check_date:0
msgid "Record from Date"
-msgstr ""
+msgstr "Posnami od dne"
#. module: base_module_record
#: wizard_view:base_module_record.module_record,stop:0
#: wizard_view:base_module_record.module_save,init:0
msgid "Recording Information"
-msgstr ""
+msgstr "Podatki o posnetku"
#. module: base_module_record
#: wizard_field:base_module_record.module_save,init,info_status:0
@@ -118,7 +118,7 @@ msgstr "Snemanje modulov"
#: model:ir.actions.wizard,name:base_module_record.wizard_base_module_record_objects
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_module_record_objects
msgid "Export Customizations As a Module"
-msgstr ""
+msgstr "Izvozi prilagoditev kot moduk"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save:0
@@ -129,7 +129,7 @@ msgstr "Vnaprej hvala za vaš prispevek."
#. module: base_module_record
#: help:base_module_record.module_record_objects,init,objects:0
msgid "List of objects to be recorded"
-msgstr ""
+msgstr "Seznam predmetov za snemanje"
#. module: base_module_record
#: wizard_button:base_module_record.module_record,start,start_confirm:0
@@ -190,12 +190,12 @@ msgstr "Ustvarjeno"
#: wizard_view:base_module_record.module_record_objects,end:0
#: wizard_view:base_module_record.module_save,end:0
msgid "Thanks For using Module Recorder"
-msgstr ""
+msgstr "Hvala ker uporabljate snemalnik modulov"
#. module: base_module_record
#: wizard_field:base_module_record.module_record,start,continue:0
msgid "Continue Previous Session"
-msgstr ""
+msgstr "Nadaljuj prejšnjo sejo"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,intro,website:0
@@ -230,7 +230,7 @@ msgstr "Nadaljuj"
#: model:ir.module.module,shortdesc:base_module_record.module_meta_information
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_mod_rec_rec
msgid "Module Recorder"
-msgstr ""
+msgstr "Snemalnik modulov"
#. module: base_module_record
#: selection:base_module_record.module_record_objects,intro,data_kind:0
@@ -267,12 +267,12 @@ msgstr ""
#. module: base_module_record
#: model:ir.actions.wizard,name:base_module_record.wizard_base_module_record
msgid "Record module"
-msgstr ""
+msgstr "Posnemi modul"
#. module: base_module_record
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_mod_rec
msgid "Module Creation"
-msgstr ""
+msgstr "Izdelava modula"
#. module: base_module_record
#: wizard_view:base_module_record.module_record,stop:0
@@ -297,13 +297,13 @@ msgstr "Informacije o modulu"
#: model:ir.actions.wizard,name:base_module_record.wizard_base_module_save
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_module_save
msgid "Save Recorded Module"
-msgstr ""
+msgstr "Shrani posneti modul"
#. module: base_module_record
#: wizard_view:base_module_record.module_record,stop:0
msgid ""
"Open ERP recording is stopped. Don't forget to save the recorded module."
-msgstr ""
+msgstr "Snemanje OpenERP je zaustavljeno. Ne pozabite posneti modula."
#. module: base_module_record
#: wizard_button:base_module_record.module_record,start,end:0
diff --git a/addons/base_module_record/wizard/__init__.py b/addons/base_module_record/wizard/__init__.py
index ae8a079fbbd..927d1b62b29 100644
--- a/addons/base_module_record/wizard/__init__.py
+++ b/addons/base_module_record/wizard/__init__.py
@@ -21,5 +21,6 @@
import base_module_save
import base_module_record_objects
+import base_module_record_data
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_module_record/wizard/base_module_record_data.py b/addons/base_module_record/wizard/base_module_record_data.py
new file mode 100644
index 00000000000..279b43ced3e
--- /dev/null
+++ b/addons/base_module_record/wizard/base_module_record_data.py
@@ -0,0 +1,148 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import wizard
+import osv
+import pooler
+import time
+
+info = '''
+'''
+
+intro_start_form = '''
+'''
+
+intro_start_fields = {
+ 'check_date': {'string':"Record from Date",'type':'datetime','required':True, 'default': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S')},
+ 'objects':{'string': 'Objects', 'type': 'many2many', 'relation': 'ir.model', 'help': 'List of objects to be recorded'},
+ 'filter_cond':{'string':'Records only', 'type':'selection','selection':[('created','Created'),('modified','Modified'),('created_modified','Created & Modified')], 'required':True, 'default': lambda *args:'created'},
+
+}
+
+exp_form = '''
+'''
+
+exp_fields = {
+ 'res_text': {'string':"Result",'type':'text', },
+}
+
+def _info_default(self, cr, uid, data, context):
+ pool = pooler.get_pool(cr.dbname)
+ mod = pool.get('ir.model')
+ list=('ir.ui.view','ir.ui.menu','ir.model','ir.model.fields','ir.model.access',\
+ 'res.partner','res.partner.address','res.partner.category','workflow',\
+ 'workflow.activity','workflow.transition','ir.actions.server','ir.server.object.lines')
+ data['form']['objects']=mod.search(cr,uid,[('model','in',list)])
+ cr.execute('select max(create_date) from ir_model_data')
+ c=(cr.fetchone())[0].split('.')[0]
+ c = time.strptime(c,"%Y-%m-%d %H:%M:%S")
+ sec=c.tm_sec + 1
+ c=(c[0],c[1],c[2],c[3],c[4],sec,c[6],c[7],c[8])
+ data['form']['check_date']=time.strftime("%Y-%m-%d %H:%M:%S",c)
+ return data['form']
+
+def _record_objects(self, cr, uid, data, context):
+ check_date=data['form']['check_date']
+ filter=data['form']['filter_cond']
+ pool = pooler.get_pool(cr.dbname)
+ user=(pool.get('res.users').browse(cr,uid,uid)).login
+ mod = pool.get('ir.module.record')
+ mod_obj = pool.get('ir.model')
+ mod.recording_data = []
+
+ for id in data['form']['objects'][0][2]:
+ obj_name=(mod_obj.browse(cr,uid,id)).model
+ obj_pool=pool.get(obj_name)
+ if filter =='created':
+ search_condition =[('create_date','>',check_date)]
+ elif filter =='modified':
+ search_condition =[('write_date','>',check_date)]
+ elif filter =='created_modified':
+ search_condition =['|',('create_date','>',check_date),('write_date','>',check_date)]
+ if '_log_access' in dir(obj_pool):
+ if not (obj_pool._log_access):
+ search_condition=[]
+ if '_auto' in dir(obj_pool):
+ if not obj_pool._auto:
+ continue
+ search_ids=obj_pool.search(cr,uid,search_condition)
+ for s_id in search_ids:
+ args=(cr.dbname,uid,user,obj_name,'copy',s_id,{},context)
+ mod.recording_data.append(('query',args, {}, s_id))
+ return {}
+
+def _create_xml(self, cr, uid, data, context):
+ pool = pooler.get_pool(cr.dbname)
+ mod = pool.get('ir.module.record')
+ res_xml = mod.generate_xml(cr, uid)
+ return { 'res_text': res_xml }
+
+class base_module_record_objects(wizard.interface):
+ states = {
+ 'init': {
+ 'actions': [_info_default],
+ 'result': {
+ 'type':'form',
+ 'arch':intro_start_form,
+ 'fields': intro_start_fields,
+ 'state':[
+ ('end', 'Cancel', 'gtk-cancel'),
+ ('record', 'Record', 'gtk-ok'),
+ ]
+ }
+ },
+ 'record': {
+ 'actions': [],
+ 'result': {'type':'action','action':_record_objects,'state':'intro'}
+ },
+ 'intro': {
+ 'actions': [ _create_xml ],
+ 'result': {
+ 'type':'form',
+ 'arch': exp_form,
+ 'fields':exp_fields,
+ 'state':[
+ ('end', 'End', 'gtk-cancel'),
+ ]
+ },
+ },
+ 'end': {
+ 'actions': [],
+ 'result': {'type':'form', 'arch':info, 'fields':{}, 'state':[('end','OK')]}
+ },
+ }
+base_module_record_objects('base_module_record.module_record_data')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 0fe267751ba..84cf9a29498 100755
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -802,7 +802,9 @@ class crm_case(osv.osv):
raise osv.except_osv(_('Error!'),("Partner Email is not specified in Case"))
if case.section_id.reply_to and case.email_from:
src = case.email_from
-
+ if not src:
+ raise osv.except_osv(_('Error!'),
+ _("No E-Mail ID Found for the Responsible Partner or missing reply address in section!"))
dest = case.section_id.reply_to
body = case.email_last or case.description
if not destination:
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 87617aa9549..0a163b37a19 100755
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -706,6 +706,5 @@
-
diff --git a/addons/crm/i18n/sl.po b/addons/crm/i18n/sl.po
index 647305cef6d..71ca19eddc5 100644
--- a/addons/crm/i18n/sl.po
+++ b/addons/crm/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:49+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 14:01+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:36+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -25,12 +25,12 @@ msgstr ""
#: wizard_field:crm.case.section.menu,design_menu,menu7:0
#: wizard_field:crm.case.section.menu,design_menu,menu7_option:0
msgid "My Draft "
-msgstr ""
+msgstr "Moj osnutek "
#. module: crm
#: view:crm.case:0
msgid "Add Last Mail for Replying"
-msgstr ""
+msgstr "Dodaj zadnje sporočilo v odgovor"
#. module: crm
#: view:crm.segmentation:0
@@ -42,7 +42,7 @@ msgstr ""
#: model:ir.ui.menu,name:crm.menu_crm_case_categ0-act
#: model:ir.ui.menu,name:crm.next_id_52
msgid "All Cases"
-msgstr ""
+msgstr "Vsi primeri"
#. module: crm
#: wizard_view:crm.case.section.menu,init:0
@@ -52,7 +52,7 @@ msgstr ""
#. module: crm
#: field:crm.case.rule,act_remind_partner:0
msgid "Remind Partner"
-msgstr ""
+msgstr "Opomni partnerja"
#. module: crm
#: wizard_view:crm.case.section.menu,init:0
@@ -68,7 +68,7 @@ msgstr ""
#. module: crm
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Napačno ime modela v definiciji dejanja."
#. module: crm
#: field:crm.segmentation,sales_purchase_active:0
@@ -79,7 +79,7 @@ msgstr ""
#: wizard_field:crm.case.section.menu,design_menu,menu13:0
#: wizard_field:crm.case.section.menu,design_menu,menu13_option:0
msgid "All Open "
-msgstr ""
+msgstr "Vse odprto "
#. module: crm
#: help:crm.segmentation,som_interval_default:0
@@ -101,7 +101,7 @@ msgstr "E-pošta"
#. module: crm
#: selection:crm.segmentation.line,expr_name:0
msgid "Purchase Amount"
-msgstr ""
+msgstr "Unesek nakupa"
#. module: crm
#: model:ir.actions.wizard,name:crm.wizard_case_section_menu
@@ -112,17 +112,17 @@ msgstr ""
#. module: crm
#: view:crm.case.rule:0
msgid "Template of Email to Send"
-msgstr ""
+msgstr "Predloga za pošiljanje poštnega sporočila"
#. module: crm
#: field:crm.case.rule,trg_state_to:0
msgid "Button Pressed"
-msgstr ""
+msgstr "Pritisnjeni gumb"
#. module: crm
#: view:crm.case:0
msgid "Planned costs"
-msgstr ""
+msgstr "Načrtovani stroški"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm
@@ -142,7 +142,7 @@ msgstr ""
#. module: crm
#: field:crm.case.section,allow_unlink:0
msgid "Allow Delete"
-msgstr ""
+msgstr "Dovoli brisanje"
#. module: crm
#: field:crm.case.rule,act_email_cc:0
@@ -153,14 +153,14 @@ msgstr ""
#: wizard_field:crm.case.section.menu,design_menu,menu1:0
#: wizard_field:crm.case.section.menu,design_menu,menu1_option:0
msgid "My "
-msgstr ""
+msgstr "Moj "
#. module: crm
#: view:crm.case:0
#: view:crm.case.history:0
#: model:ir.ui.menu,name:crm.next_id_51
msgid "Cases"
-msgstr ""
+msgstr "Primeri"
#. module: crm
#: selection:crm.case,priority:0
@@ -204,17 +204,17 @@ msgstr "Vrednost"
#. module: crm
#: field:crm.case,planned_cost:0
msgid "Planned Costs"
-msgstr ""
+msgstr "Načrtovani stroški"
#. module: crm
#: model:ir.model,name:crm.model_crm_case_history
msgid "Case history"
-msgstr ""
+msgstr "Zgodovina primera"
#. module: crm
#: field:crm.case.rule,act_state:0
msgid "Set state to"
-msgstr ""
+msgstr "Nastavi stanje na"
#. module: crm
#: field:crm.case.categ,name:0
@@ -245,7 +245,7 @@ msgstr "Minut"
#: wizard_field:crm.case.section.menu,design_menu,menu16:0
#: wizard_field:crm.case.section.menu,design_menu,menu16_option:0
msgid "All Unclosed and Unassigned "
-msgstr ""
+msgstr "Vsi nezaprti in nerazporejeni "
#. module: crm
#: view:crm.case.rule:0
@@ -278,7 +278,7 @@ msgstr "Nov "
#. module: crm
#: view:res.partner.events:0
msgid "Partner Events"
-msgstr ""
+msgstr "Partnerjevi dogodki"
#. module: crm
#: view:crm.case.rule:0
@@ -299,12 +299,12 @@ msgstr ""
#: field:crm.case,date_deadline:0
#: selection:crm.case.rule,trg_date_type:0
msgid "Deadline"
-msgstr ""
+msgstr "Rok"
#. module: crm
#: field:crm.segmentation.line,expr_operator:0
msgid "Operator"
-msgstr ""
+msgstr "Operater"
#. module: crm
#: selection:crm.case,state:0
@@ -332,7 +332,7 @@ msgstr ""
#. module: crm
#: view:crm.case:0
msgid "Extra Info"
-msgstr ""
+msgstr "Dodatne informacije"
#. module: crm
#: view:crm.case.rule:0
@@ -372,7 +372,7 @@ msgstr ""
#: wizard_field:crm.case.section.menu,design_menu,menu5:0
#: wizard_field:crm.case.section.menu,design_menu,menu5_option:0
msgid "My Open "
-msgstr ""
+msgstr "Moji odprti "
#. module: crm
#: wizard_view:crm.case.section.menu,init:0
@@ -394,7 +394,7 @@ msgstr ""
#. module: crm
#: field:crm.case.rule,act_mail_to_email:0
msgid "Mail to these emails"
-msgstr ""
+msgstr "Pošlji na te naslove"
#. module: crm
#: constraint:ir.ui.view:0
@@ -430,7 +430,7 @@ msgstr "Pogoji"
#. module: crm
#: field:crm.case,description:0
msgid "Your action"
-msgstr ""
+msgstr "Vaše dejanje"
#. module: crm
#: view:crm.segmentation:0
@@ -519,7 +519,7 @@ msgstr ""
#. module: crm
#: selection:crm.case.rule,trg_date_type:0
msgid "Last Action Date"
-msgstr ""
+msgstr "Datum zadnjega dejanja"
#. module: crm
#: selection:crm.case.rule,trg_date_range_type:0
@@ -530,7 +530,7 @@ msgstr "Ur"
#: model:ir.actions.act_window,name:crm.crm_case_categ0-act_my_open
#: model:ir.ui.menu,name:crm.menu_crm_case_categ0-act_my_open
msgid "My Open Cases"
-msgstr ""
+msgstr "Moje odprte zadeve"
#. module: crm
#: field:crm.case.rule,act_remind_attach:0
@@ -541,13 +541,13 @@ msgstr ""
#: wizard_field:crm.case.section.menu,design_menu,menu10:0
#: wizard_field:crm.case.section.menu,design_menu,menu10_option:0
msgid "All Late "
-msgstr ""
+msgstr "Vse pozne "
#. module: crm
#: wizard_field:crm.case.section.menu,design_menu,menu3:0
#: wizard_field:crm.case.section.menu,design_menu,menu3_option:0
msgid "My Late "
-msgstr ""
+msgstr "Moje pozne "
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm_configuration
@@ -561,7 +561,7 @@ msgstr "Konfiguracija"
#: model:ir.actions.act_window,name:crm.act_res_partner_canal_2_crm_case_opened
#: model:ir.actions.act_window,name:crm.act_res_users_2_crm_case_opened
msgid "Open cases"
-msgstr ""
+msgstr "Odprti primeri"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_categ-act
@@ -573,7 +573,7 @@ msgstr "Kategorije"
#: wizard_field:crm.case.section.menu,design_menu,menu2:0
#: wizard_field:crm.case.section.menu,design_menu,menu2_option:0
msgid "My Unclosed "
-msgstr ""
+msgstr "Moji nezaprti "
#. module: crm
#: view:crm.case:0
@@ -657,7 +657,7 @@ msgstr ""
#. module: crm
#: field:crm.case,history_line:0
msgid "Communication"
-msgstr ""
+msgstr "Sporočanje"
#. module: crm
#: field:crm.segmentation,partner_id:0
@@ -687,7 +687,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm.crm_case_rule-act
#: model:ir.ui.menu,name:crm.menu_crm_case_rule-act
msgid "Rules"
-msgstr ""
+msgstr "Pravila"
#. module: crm
#: field:crm.case.rule,act_method:0
@@ -698,7 +698,7 @@ msgstr ""
#: view:crm.segmentation:0
#: field:crm.segmentation.line,segmentation_id:0
msgid "Segmentation"
-msgstr ""
+msgstr "Razčlenjenost"
#. module: crm
#: field:crm.segmentation,som_interval:0
@@ -724,17 +724,17 @@ msgstr ""
#: selection:crm.case.section.menu,design_menu,menu8_option:0
#: selection:crm.case.section.menu,design_menu,menu9_option:0
msgid "Calendar"
-msgstr ""
+msgstr "Koledar"
#. module: crm
#: field:crm.case,ref:0
msgid "Reference"
-msgstr ""
+msgstr "Sklic"
#. module: crm
#: field:crm.case,ref2:0
msgid "Reference 2"
-msgstr ""
+msgstr "Sklic 2"
#. module: crm
#: view:crm.segmentation:0
@@ -745,12 +745,12 @@ msgstr ""
#: field:crm.case,categ_id:0
#: field:crm.case.rule,trg_categ_id:0
msgid "Category"
-msgstr ""
+msgstr "Kategorija"
#. module: crm
#: field:crm.case.history,log_id:0
msgid "Log"
-msgstr ""
+msgstr "Dnevnik"
#. module: crm
#: help:crm.case.rule,act_email_cc:0
@@ -824,7 +824,7 @@ msgstr ""
#. module: crm
#: wizard_field:crm.case.section.menu,init,view_calendar:0
msgid "Calendar View"
-msgstr ""
+msgstr "Pogled koledarja"
#. module: crm
#: selection:crm.case,priority:0
@@ -832,12 +832,12 @@ msgstr ""
#: selection:crm.case.rule,trg_priority_from:0
#: selection:crm.case.rule,trg_priority_to:0
msgid "Low"
-msgstr ""
+msgstr "Nizko"
#. module: crm
#: field:crm.case,date_closed:0
msgid "Closed"
-msgstr ""
+msgstr "Zaprto"
#. module: crm
#: view:crm.case.rule:0
@@ -859,7 +859,7 @@ msgstr ""
#. module: crm
#: view:crm.case.rule:0
msgid "Conditions"
-msgstr ""
+msgstr "Pogoji"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_categ0-act_open
@@ -874,7 +874,7 @@ msgstr ""
#: selection:crm.case.rule,trg_state_from:0
#: selection:crm.case.rule,trg_state_to:0
msgid "Pending"
-msgstr ""
+msgstr "Na čakanju"
#. module: crm
#: wizard_view:crm.case.section.menu,init:0
@@ -885,7 +885,7 @@ msgstr ""
#. module: crm
#: field:crm.case,state:0
msgid "Status"
-msgstr ""
+msgstr "Stanje"
#. module: crm
#: field:crm.case.rule,act_remind_user:0
@@ -918,7 +918,7 @@ msgstr ""
#: selection:crm.case.rule,trg_priority_from:0
#: selection:crm.case.rule,trg_priority_to:0
msgid "Normal"
-msgstr ""
+msgstr "Navadno"
#. module: crm
#: view:crm.case:0
@@ -950,14 +950,14 @@ msgstr ""
#. module: crm
#: field:crm.case,planned_revenue:0
msgid "Planned Revenue"
-msgstr ""
+msgstr "Načrtovani prihodki"
#. module: crm
#: field:crm.case,active:0
#: field:crm.case.rule,active:0
#: field:crm.case.section,active:0
msgid "Active"
-msgstr ""
+msgstr "Aktivno"
#. module: crm
#: wizard_field:crm.case.section.menu,design_menu,menu9:0
@@ -980,7 +980,7 @@ msgstr ""
#. module: crm
#: selection:crm.segmentation.line,expr_operator:0
msgid ">"
-msgstr ""
+msgstr ">"
#. module: crm
#: field:crm.case.section,parent_id:0
@@ -990,17 +990,17 @@ msgstr ""
#. module: crm
#: wizard_field:crm.case.section.menu,init,menu_parent_id:0
msgid "Parent Menu"
-msgstr ""
+msgstr "Nadmenu"
#. module: crm
#: field:crm.segmentation,exclusif:0
msgid "Exclusive"
-msgstr ""
+msgstr "Ekskluzivno"
#. module: crm
#: view:crm.segmentation:0
msgid "Included Answers :"
-msgstr ""
+msgstr "Vključeni odgovori:"
#. module: crm
#: view:crm.case.rule:0
@@ -1010,7 +1010,7 @@ msgstr ""
#. module: crm
#: selection:crm.case.rule,trg_date_type:0
msgid "Creation Date"
-msgstr ""
+msgstr "Ustvarjeno dne"
#. module: crm
#: selection:crm.case.section.menu,design_menu,menu10_option:0
@@ -1031,7 +1031,7 @@ msgstr ""
#: selection:crm.case.section.menu,design_menu,menu8_option:0
#: selection:crm.case.section.menu,design_menu,menu9_option:0
msgid "Don't Create"
-msgstr ""
+msgstr "Ne izdelaj"
#. module: crm
#: wizard_field:crm.case.section.menu,init,menu_name:0
@@ -1048,7 +1048,7 @@ msgstr ""
#: field:crm.case.log,date:0
#: selection:crm.case.rule,trg_date_type:0
msgid "Date"
-msgstr ""
+msgstr "Datum"
#. module: crm
#: wizard_view:crm.case.section.menu,design_menu:0
@@ -1058,7 +1058,7 @@ msgstr ""
#. module: crm
#: field:crm.case.log,name:0
msgid "Action"
-msgstr ""
+msgstr "Dejanje"
#. module: crm
#: view:crm.case.categ:0
@@ -1078,12 +1078,12 @@ msgstr ""
#. module: crm
#: view:crm.case:0
msgid "History"
-msgstr ""
+msgstr "Zgodovina"
#. module: crm
#: field:crm.case,partner_address_id:0
msgid "Partner Contact"
-msgstr ""
+msgstr "Stik partnerja"
#. module: crm
#: wizard_field:crm.case.section.menu,design_menu,menu12:0
@@ -1095,7 +1095,7 @@ msgstr ""
#: field:crm.case.rule,sequence:0
#: field:crm.case.section,sequence:0
msgid "Sequence"
-msgstr ""
+msgstr "Zaporedje"
#. module: crm
#: view:crm.case.rule:0
@@ -1105,7 +1105,7 @@ msgstr ""
#. module: crm
#: view:crm.case:0
msgid "General"
-msgstr ""
+msgstr "Splošno"
#. module: crm
#: view:crm.case:0
@@ -1127,7 +1127,7 @@ msgstr ""
#. module: crm
#: view:crm.case:0
msgid "Communication history"
-msgstr ""
+msgstr "Zgodovina komunikacije"
#. module: crm
#: view:crm.case:0
@@ -1138,7 +1138,7 @@ msgstr ""
#: wizard_button:crm.case.section.menu,design_menu,end:0
#: wizard_button:crm.case.section.menu,init,end:0
msgid "Cancel"
-msgstr ""
+msgstr "Prekliči"
#. module: crm
#: view:crm.case:0
@@ -1147,12 +1147,12 @@ msgstr ""
#: selection:crm.case.rule,trg_state_from:0
#: selection:crm.case.rule,trg_state_to:0
msgid "Close"
-msgstr ""
+msgstr "Zapri"
#. module: crm
#: model:ir.actions.report.xml,name:crm.crm_business_opportunities_report
msgid "Business Opportunities"
-msgstr ""
+msgstr "Poslovne priložnosti"
#. module: crm
#: view:crm.case:0
@@ -1161,12 +1161,12 @@ msgstr ""
#: selection:crm.case.rule,trg_state_from:0
#: selection:crm.case.rule,trg_state_to:0
msgid "Open"
-msgstr ""
+msgstr "Odpri"
#. module: crm
#: wizard_field:crm.case.section.menu,init,view_tree:0
msgid "Tree View"
-msgstr ""
+msgstr "Drevesni prikaz"
#. module: crm
#: view:crm.case.rule:0
@@ -1181,7 +1181,7 @@ msgstr ""
#. module: crm
#: field:crm.case.section,user_id:0
msgid "Responsible User"
-msgstr ""
+msgstr "Odgovorni uporabnik"
#. module: crm
#: constraint:ir.model:0
@@ -1193,13 +1193,13 @@ msgstr ""
#. module: crm
#: view:res.partner.events:0
msgid "General Description"
-msgstr ""
+msgstr "Splošni opis"
#. module: crm
#: field:crm.case,user_id:0
#: field:crm.case.rule,trg_user_id:0
msgid "Responsible"
-msgstr ""
+msgstr "Odgovoren"
#. module: crm
#: wizard_view:crm.case.section.menu,init:0
@@ -1233,7 +1233,7 @@ msgstr ""
#: field:crm.case.log,som:0
#: selection:crm.segmentation.line,expr_name:0
msgid "State of Mind"
-msgstr ""
+msgstr "Razpoloženje partnerja"
#. module: crm
#: field:crm.case.rule,act_priority:0
@@ -1246,7 +1246,7 @@ msgstr ""
#: field:crm.case.history,note:0
#: field:crm.segmentation,description:0
msgid "Description"
-msgstr ""
+msgstr "Opis"
#. module: crm
#: field:crm.case.rule,trg_max_history:0
@@ -1320,19 +1320,19 @@ msgstr ""
#. module: crm
#: selection:crm.segmentation.line,expr_operator:0
msgid "="
-msgstr ""
+msgstr "="
#. module: crm
#: field:crm.case.log,case_id:0
#: model:ir.model,name:crm.model_crm_case
#: model:res.request.link,name:crm.req_link_case
msgid "Case"
-msgstr ""
+msgstr "Primer"
#. module: crm
#: selection:crm.case.rule,trg_date_range_type:0
msgid "Months"
-msgstr ""
+msgstr "Meseci"
#. module: crm
#: view:crm.case.rule:0
@@ -1342,7 +1342,7 @@ msgstr ""
#. module: crm
#: field:crm.segmentation,name:0
msgid "Name"
-msgstr ""
+msgstr "Naziv"
#. module: crm
#: help:crm.segmentation,som_interval_decrease:0
@@ -1355,7 +1355,7 @@ msgstr ""
#: wizard_field:crm.case.section.menu,design_menu,menu8:0
#: wizard_field:crm.case.section.menu,design_menu,menu8_option:0
msgid "All "
-msgstr ""
+msgstr "Vse "
#. module: crm
#: view:crm.case.rule:0
@@ -1386,7 +1386,7 @@ msgstr ""
#: selection:crm.case.section.menu,design_menu,menu8_option:0
#: selection:crm.case.section.menu,design_menu,menu9_option:0
msgid "List"
-msgstr ""
+msgstr "Seznam"
#. module: crm
#: view:crm.case:0
@@ -1428,7 +1428,7 @@ msgstr ""
#. module: crm
#: field:crm.case,id:0
msgid "ID"
-msgstr ""
+msgstr "Oznaka"
#. module: crm
#: help:crm.segmentation,exclusif:0
@@ -1446,7 +1446,7 @@ msgstr ""
#. module: crm
#: wizard_field:crm.case.section.menu,init,view_form:0
msgid "Form View"
-msgstr ""
+msgstr "Prikaz obrazca"
#. module: crm
#: view:crm.case.rule:0
@@ -1456,7 +1456,7 @@ msgstr ""
#. module: crm
#: view:crm.case:0
msgid "Planned revenue"
-msgstr ""
+msgstr "Načrtovani prihodki"
#. module: crm
#: view:crm.segmentation:0
@@ -1482,7 +1482,7 @@ msgstr ""
#: view:crm.case:0
#: view:crm.case.rule:0
msgid "Actions"
-msgstr ""
+msgstr "Dejanja"
#. module: crm
#: selection:crm.case,priority:0
@@ -1490,7 +1490,7 @@ msgstr ""
#: selection:crm.case.rule,trg_priority_from:0
#: selection:crm.case.rule,trg_priority_to:0
msgid "High"
-msgstr ""
+msgstr "Visoka"
#. module: crm
#: field:crm.segmentation.line,expr_name:0
@@ -1512,7 +1512,7 @@ msgstr ""
#: field:crm.case,partner_id:0
#: field:crm.case.rule,trg_partner_id:0
msgid "Partner"
-msgstr ""
+msgstr "Partner"
#. module: crm
#: view:crm.case.rule:0
@@ -1527,4 +1527,4 @@ msgstr ""
#. module: crm
#: field:crm.case.rule,trg_date_type:0
msgid "Trigger Date"
-msgstr ""
+msgstr "Sproženo dne"
diff --git a/addons/crm/i18n/zh_CN.po b/addons/crm/i18n/zh_CN.po
index b9c2cbfeeb7..941b2783c2d 100644
--- a/addons/crm/i18n/zh_CN.po
+++ b/addons/crm/i18n/zh_CN.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-09 17:02+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-29 05:22+0000\n"
+"Last-Translator: Jeroen Vet \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: 2009-11-17 04:56+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -47,7 +47,7 @@ msgstr ""
#. module: crm
#: wizard_view:crm.case.section.menu,init:0
msgid "this wizard will create all sub-menus, within the selected menu."
-msgstr ""
+msgstr "该向导会创建属于选定菜单的所有子菜单"
#. module: crm
#: field:crm.case.rule,act_remind_partner:0
@@ -880,7 +880,7 @@ msgstr "待命"
#: wizard_view:crm.case.section.menu,init:0
msgid ""
"You may want to create a new parent menu to put all the created menus in."
-msgstr ""
+msgstr "为了包含所创建的菜单,您可能要建立一份母菜单。"
#. module: crm
#: field:crm.case,state:0
@@ -1314,7 +1314,7 @@ msgstr "事务规则"
#. module: crm
#: help:crm.case,date_deadline:0
msgid "Deadline Date is automatically computed from Start Date + Duration"
-msgstr ""
+msgstr "截止日期是根据开始日期+持续期间被自动计算"
#. module: crm
#: selection:crm.segmentation.line,expr_operator:0
diff --git a/addons/crm_configuration/i18n/sl.po b/addons/crm_configuration/i18n/sl.po
index 6f41d9587be..52ea4286264 100644
--- a/addons/crm_configuration/i18n/sl.po
+++ b/addons/crm_configuration/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:41+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 14:09+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:43+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm_configuration
@@ -40,7 +40,7 @@ msgstr ""
#. module: crm_configuration
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Napačno ime modela v definiciji dejanja."
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_categ0_act_all3
@@ -51,7 +51,7 @@ msgstr ""
#. module: crm_configuration
#: help:crm.menu.config_wizard,helpdesk:0
msgid "Manages an Helpdesk service."
-msgstr ""
+msgstr "Upravlja s storitvijo pomoči uporabnikom"
#. module: crm_configuration
#: field:crm.case.stage,name:0
@@ -78,7 +78,7 @@ msgstr "Znesek"
#: model:crm.case.stage,name:crm_configuration.stage_claim2
#: model:crm.case.stage,name:crm_configuration.stage_meet1
msgid "Fixed"
-msgstr ""
+msgstr "Popravljeno"
#. module: crm_configuration
#: model:crm.case.categ,name:crm_configuration.categ_oppor5
@@ -95,7 +95,7 @@ msgstr ""
#. module: crm_configuration
#: wizard_field:crm.case.meeting,init,duration:0
msgid "Duration (Hours)"
-msgstr ""
+msgstr "Trajanje (v urah)"
#. module: crm_configuration
#: view:crm.case:0
@@ -164,7 +164,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_all2
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ0_act_all2
msgid "Open Bugs"
-msgstr ""
+msgstr "Odpre napake"
#. module: crm_configuration
#: view:crm.case:0
@@ -189,7 +189,7 @@ msgstr "Stik"
#. module: crm_configuration
#: view:crm.case:0
msgid "Next Interview"
-msgstr ""
+msgstr "Naslednji intervju"
#. module: crm_configuration
#: model:process.transition,name:crm_configuration.process_transition_opportunitymeeting0
@@ -212,7 +212,7 @@ msgstr ""
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ_phone_incoming2
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ_phone_outgoing2
msgid "Planned Calls"
-msgstr ""
+msgstr "Načrtovani klici"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_helpdesk_act_all0
@@ -245,7 +245,7 @@ msgstr "Domov"
#: model:ir.actions.act_window,name:crm_configuration.crm_case_categ_phone_incoming1
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ_phone_incoming1
msgid "New Incoming Call"
-msgstr ""
+msgstr "Novi prejeti klic"
#. module: crm_configuration
#: view:crm.case:0
@@ -317,12 +317,12 @@ msgstr ""
#. module: crm_configuration
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ_meet
msgid "All Meetings"
-msgstr ""
+msgstr "Vsi sestanki"
#. module: crm_configuration
#: model:crm.case.section,name:crm_configuration.section_support_help
msgid "HelpDesk"
-msgstr ""
+msgstr "Pomoč uporabnikom"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_categ_phone_outgoing4
@@ -474,7 +474,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_oppor
#: model:ir.ui.menu,name:crm_configuration.menu_action_report_crm_case_oppor
msgid "Opportunity"
-msgstr ""
+msgstr "Priložnost"
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.category_lead7
@@ -515,7 +515,7 @@ msgstr "Popravki"
#. module: crm_configuration
#: view:crm.case:0
msgid "Add Last Mail for Replying"
-msgstr ""
+msgstr "Dodaj zadnje sporočilo v odgovor"
#. module: crm_configuration
#: view:crm.case:0
@@ -528,7 +528,7 @@ msgstr ""
#. module: crm_configuration
#: field:crm.menu.config_wizard,document_ics:0
msgid "Shared Calendar"
-msgstr ""
+msgstr "Deljeni koledar"
#. module: crm_configuration
#: view:crm.case:0
@@ -565,7 +565,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_fund_my1
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_category_act_fund_my1
msgid "My Funds"
-msgstr ""
+msgstr "Moja sredstva"
#. module: crm_configuration
#: field:crm.case,partner_mobile:0
@@ -784,7 +784,7 @@ msgstr ""
#: view:crm.case:0
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_fund1
msgid "Funds"
-msgstr ""
+msgstr "Sredstva"
#. module: crm_configuration
#: model:crm.case.stage,name:crm_configuration.stage5
@@ -885,7 +885,7 @@ msgstr "Drugo"
#. module: crm_configuration
#: help:crm.menu.config_wizard,bugs:0
msgid "Used by companies to track bugs and support requests on softwares"
-msgstr ""
+msgstr "Uporabljajo programerska podjetja za sledenje napakam in zahtevkom"
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.category_lead2
@@ -950,7 +950,7 @@ msgstr ""
#: field:crm.menu.config_wizard,bugs:0
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_bug_track
msgid "Bug Tracking"
-msgstr ""
+msgstr "Sledenje napakam"
#. module: crm_configuration
#: view:crm.case:0
@@ -996,7 +996,7 @@ msgstr ""
#. module: crm_configuration
#: model:ir.ui.menu,name:crm_configuration.menu_hr
msgid "Human Resources"
-msgstr ""
+msgstr "Človeški viri"
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.category_job1
@@ -1030,7 +1030,7 @@ msgstr "Vhodno"
#. module: crm_configuration
#: constraint:crm.case.section:0
msgid "Error ! You cannot create recursive sections."
-msgstr ""
+msgstr "Napaka! Ne morete oblikovati rekurzivnih oddelkov."
#. module: crm_configuration
#: help:crm.menu.config_wizard,document_ics:0
@@ -1082,7 +1082,7 @@ msgstr ""
#: field:report.crm.case.section.categ2,nbr:0
#: field:report.crm.case.section.stage,nbr:0
msgid "# of Cases"
-msgstr ""
+msgstr "# primerov"
#. module: crm_configuration
#: field:report.crm.case.section.categ2,amount_revenue:0
@@ -1099,7 +1099,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_my0
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ0_act_my0
msgid "My Bugs"
-msgstr ""
+msgstr "Moji napake"
#. module: crm_configuration
#: view:crm.case:0
@@ -1294,7 +1294,7 @@ msgstr ""
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.categ2_fund3
msgid "Credit Card"
-msgstr ""
+msgstr "Kreditna kartica"
#. module: crm_configuration
#: view:crm.case:0
@@ -1321,7 +1321,7 @@ msgstr ""
#. module: crm_configuration
#: field:crm.case,note:0
msgid "Note"
-msgstr ""
+msgstr "Opomba"
#. module: crm_configuration
#: field:report.crm.case.section.categ.categ2,delay_close:0
@@ -1337,7 +1337,7 @@ msgstr ""
#: selection:report.crm.case.section.categ2,state:0
#: selection:report.crm.case.section.stage,state:0
msgid "Closed"
-msgstr ""
+msgstr "Zaprto"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_all4
@@ -1374,7 +1374,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm_configuration.crm_case_categ_phone0
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_phone
msgid "Phone Calls"
-msgstr ""
+msgstr "Telefonski klici"
#. module: crm_configuration
#: view:crm.case:0
@@ -1390,12 +1390,12 @@ msgstr ""
#. module: crm_configuration
#: field:crm.case,partner_phone:0
msgid "Phone"
-msgstr ""
+msgstr "Telefon"
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.categ2_fund2
msgid "Cheque"
-msgstr ""
+msgstr "Ček"
#. module: crm_configuration
#: model:process.node,note:crm_configuration.process_node_opportunities0
@@ -1415,7 +1415,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_claim1
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_claims
msgid "Claims"
-msgstr ""
+msgstr "Zahtevki"
#. module: crm_configuration
#: model:ir.model,name:crm_configuration.model_crm_case_category2
@@ -1436,32 +1436,32 @@ msgstr ""
#. module: crm_configuration
#: model:ir.ui.menu,name:crm_configuration.menu_presale
msgid "Sales"
-msgstr ""
+msgstr "Prodaja"
#. module: crm_configuration
#: view:crm.case:0
msgid "General"
-msgstr ""
+msgstr "Splošno"
#. module: crm_configuration
#: model:crm.case.stage,name:crm_configuration.stage_lead2
msgid "Assigned"
-msgstr ""
+msgstr "Dodeljeno"
#. module: crm_configuration
#: model:crm.case.stage,name:crm_configuration.stage_lead5
msgid "Recycled"
-msgstr ""
+msgstr "Recikliran"
#. module: crm_configuration
#: view:crm.case:0
msgid "Done"
-msgstr ""
+msgstr "Zaključeno"
#. module: crm_configuration
#: view:crm.case:0
msgid "Communication"
-msgstr ""
+msgstr "Sporočanje"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_oppor11
@@ -1476,7 +1476,7 @@ msgstr ""
#: selection:report.crm.case.section.categ2,state:0
#: selection:report.crm.case.section.stage,state:0
msgid "Open"
-msgstr ""
+msgstr "Odpri"
#. module: crm_configuration
#: constraint:ir.model:0
@@ -1488,12 +1488,12 @@ msgstr ""
#. module: crm_configuration
#: field:crm.menu.config_wizard,helpdesk:0
msgid "Helpdesk"
-msgstr ""
+msgstr "Pomoč uporabnikom"
#. module: crm_configuration
#: view:crm.case:0
msgid "Responsible"
-msgstr ""
+msgstr "Odgovoren"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_leads_my1
@@ -1506,7 +1506,7 @@ msgstr ""
#: model:crm.case.stage,name:crm_configuration.stage_claim4
#: model:crm.case.stage,name:crm_configuration.stage_meet3
msgid "Invalid"
-msgstr ""
+msgstr "Neveljaveno"
#. module: crm_configuration
#: wizard_button:crm.case.meeting,init,order:0
@@ -1516,7 +1516,7 @@ msgstr ""
#. module: crm_configuration
#: field:crm.menu.config_wizard,meeting:0
msgid "Calendar of Meetings"
-msgstr ""
+msgstr "Koledar sestankov"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_oppor2
@@ -1601,7 +1601,7 @@ msgstr ""
#. module: crm_configuration
#: field:crm.case,duration:0
msgid "Duration"
-msgstr ""
+msgstr "Trajanje"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_f1
@@ -1622,7 +1622,7 @@ msgstr ""
#. module: crm_configuration
#: field:crm.menu.config_wizard,jobs:0
msgid "Jobs Hiring Process"
-msgstr ""
+msgstr "Proces zaposlovanja"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_categ0_act_all2
@@ -1639,7 +1639,7 @@ msgstr ""
#. module: crm_configuration
#: view:crm.case:0
msgid "Deadlines"
-msgstr ""
+msgstr "Roki"
#. module: crm_configuration
#: model:ir.ui.menu,name:crm_configuration.menu_action_report_crm_case_lead_categ
@@ -1672,7 +1672,7 @@ msgstr ""
#. module: crm_configuration
#: model:crm.case.stage,name:crm_configuration.stage_lead3
msgid "In Process"
-msgstr ""
+msgstr "V obdelavi"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_leads_unassigned
@@ -1712,7 +1712,7 @@ msgstr ""
#. module: crm_configuration
#: view:crm.case:0
msgid "Relevant"
-msgstr ""
+msgstr "Pomembno"
#. module: crm_configuration
#: view:crm.case:0
@@ -1765,17 +1765,17 @@ msgstr ""
#: model:crm.case.categ,name:crm_configuration.categ_lead3
#: model:crm.case.categ,name:crm_configuration.categ_oppor3
msgid "Employee"
-msgstr ""
+msgstr "Zaposlenec"
#. module: crm_configuration
#: model:crm.case.stage,name:crm_configuration.stage_lead1
msgid "New"
-msgstr ""
+msgstr "Novo"
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.category_lead3
msgid "Email"
-msgstr ""
+msgstr "E-pošta"
#. module: crm_configuration
#: view:crm.case:0
@@ -1799,7 +1799,7 @@ msgstr ""
#: selection:report.crm.case.section.categ2,state:0
#: selection:report.crm.case.section.stage,state:0
msgid "Pending"
-msgstr ""
+msgstr "Na čakanju"
#. module: crm_configuration
#: view:crm.case:0
@@ -1838,7 +1838,7 @@ msgstr ""
#. module: crm_configuration
#: model:crm.case.stage,name:crm_configuration.stage_phone1
msgid "Planned"
-msgstr ""
+msgstr "Načrtovano"
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.category_meet3
@@ -1874,7 +1874,7 @@ msgstr ""
#. module: crm_configuration
#: view:crm.case:0
msgid "Communication history"
-msgstr ""
+msgstr "Zgodovina komunikacije"
#. module: crm_configuration
#: view:crm.case:0
@@ -1887,7 +1887,7 @@ msgstr ""
#: selection:report.crm.case.section.categ2,state:0
#: selection:report.crm.case.section.stage,state:0
msgid "Canceled"
-msgstr ""
+msgstr "Preklicano"
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.category_oppor1
@@ -1898,17 +1898,17 @@ msgstr ""
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_fund_all1
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ0_act_fund_all1
msgid "All Funds"
-msgstr ""
+msgstr "Vsa sredstva"
#. module: crm_configuration
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_category_act_meetings
msgid "Calendar"
-msgstr ""
+msgstr "Koledar"
#. module: crm_configuration
#: model:crm.case.categ,name:crm_configuration.categ_job1
msgid "Salesman"
-msgstr ""
+msgstr "Prodajalec"
#. module: crm_configuration
#: model:crm.case.stage,name:crm_configuration.stage_oppor6
@@ -1937,7 +1937,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm_configuration.crm_case_categ_phone_outgoing0
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ_phone_outgoing0
msgid "Outbound"
-msgstr ""
+msgstr "Izhodno"
#. module: crm_configuration
#: model:ir.actions.todo,note:crm_configuration.config_wizard_step_case_section_menu
@@ -1957,13 +1957,13 @@ msgstr ""
#. module: crm_configuration
#: field:crm.case,category2_id:0
msgid "Category Name"
-msgstr ""
+msgstr "Naziv kategorije"
#. module: crm_configuration
#: view:crm.case:0
#: model:process.node,name:crm_configuration.process_node_meeting0
msgid "Meeting"
-msgstr ""
+msgstr "Sestanek"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_f2
@@ -1992,7 +1992,7 @@ msgstr ""
#: field:report.crm.case.section.categ2,user_id:0
#: field:report.crm.case.section.stage,user_id:0
msgid "User"
-msgstr ""
+msgstr "Uporabnik"
#. module: crm_configuration
#: model:ir.ui.menu,name:crm_configuration.menu_action_report_crm_case_lead_categ_categ2
@@ -2039,7 +2039,7 @@ msgstr ""
#. module: crm_configuration
#: model:crm.case.categ,name:crm_configuration.categ_fund3
msgid "Healthcare"
-msgstr ""
+msgstr "Zdravstveno varstvo"
#. module: crm_configuration
#: model:crm.case.stage,name:crm_configuration.stage1
@@ -2060,7 +2060,7 @@ msgstr ""
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.category_meet1
msgid "Office"
-msgstr ""
+msgstr "Pisarna"
#. module: crm_configuration
#: model:ir.model,name:crm_configuration.model_crm_case_stage
@@ -2109,18 +2109,18 @@ msgstr ""
#: selection:report.crm.case.section.categ2,state:0
#: selection:report.crm.case.section.stage,state:0
msgid "Draft"
-msgstr ""
+msgstr "Osnutek"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_categ_claim0
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ_claim0
msgid "All Claims"
-msgstr ""
+msgstr "Vsi zahtevki"
#. module: crm_configuration
#: view:crm.case:0
msgid "Description"
-msgstr ""
+msgstr "Opis"
#. module: crm_configuration
#: view:crm.case:0
@@ -2130,7 +2130,7 @@ msgstr ""
#. module: crm_configuration
#: model:crm.case.section,name:crm_configuration.section_support0
msgid "Jobs"
-msgstr ""
+msgstr "Zaposlitve"
#. module: crm_configuration
#: wizard_view:crm.case.meeting,init:0
@@ -2156,23 +2156,23 @@ msgstr ""
#: model:crm.case.stage,name:crm_configuration.stage7
#: model:crm.case.stage,name:crm_configuration.stage_meet5
msgid "Future"
-msgstr ""
+msgstr "Prihodnost"
#. module: crm_configuration
#: model:ir.actions.act_window,name:crm_configuration.crm_case_category_act_all8
#: model:ir.ui.menu,name:crm_configuration.menu_crm_case_categ0_act_all8
msgid "Old Bugs"
-msgstr ""
+msgstr "Stare napake"
#. module: crm_configuration
#: model:ir.model,name:crm_configuration.model_crm_menu_config_wizard
msgid "crm.menu.config_wizard"
-msgstr ""
+msgstr "crm.menu.config_wizard"
#. module: crm_configuration
#: field:crm.case.stage,sequence:0
msgid "Sequence"
-msgstr ""
+msgstr "Zaporedje"
#. module: crm_configuration
#: model:crm.case.category2,name:crm_configuration.category_lead8
diff --git a/addons/crm_profiling/i18n/sl.po b/addons/crm_profiling/i18n/sl.po
index 6b08e9c7a2c..8b1dd6c2901 100644
--- a/addons/crm_profiling/i18n/sl.po
+++ b/addons/crm_profiling/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-26 13:48+0000\n"
+"PO-Revision-Date: 2009-11-30 13:48+0000\n"
"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm_profiling
@@ -33,7 +33,7 @@ msgstr "Vprašanje"
#. module: crm_profiling
#: wizard_button:open_questionnaire,init,open:0
msgid "Open Questionnaire"
-msgstr ""
+msgstr "Odpri vprašalnik"
#. module: crm_profiling
#: field:crm.segmentation,child_ids:0
diff --git a/addons/debian/po/sl.po b/addons/debian/po/sl.po
deleted file mode 100644
index 4bb62d9c492..00000000000
--- a/addons/debian/po/sl.po
+++ /dev/null
@@ -1,41 +0,0 @@
-# Slovenian 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 , 2009.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME \n"
-"POT-Creation-Date: 2009-08-24 22:41+0300\n"
-"PO-Revision-Date: 2009-11-26 12:58+0000\n"
-"Last-Translator: Simon Vidmar \n"
-"Language-Team: Slovenian \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
-"X-Generator: Launchpad (build Unknown)\n"
-
-#. Type: string
-#. Description
-#: ../openerp-server.templates:1001
-msgid "Dedicated system account for the Open ERP server:"
-msgstr "Posebni sistemski račun za strežnik OpenERP:"
-
-#. Type: string
-#. Description
-#: ../openerp-server.templates:1001
-msgid ""
-"The Open ERP server must use a dedicated account for its operation so that "
-"the system's security is not compromised by running it with superuser "
-"privileges."
-msgstr ""
-"Strežnik OpenERP mora uporabljati posebni račun zato, da varnost strežnika "
-"ni ogrožena pri delovanju s posebnimi sistemskimi pravicami."
-
-#. Type: string
-#. Description
-#: ../openerp-server.templates:1001
-msgid "Please choose that account's username."
-msgstr "Prosim, izberite uporabniško ime tega računa."
diff --git a/addons/document/i18n/pt.po b/addons/document/i18n/pt.po
index 76d8ee4c583..6428b223681 100644
--- a/addons/document/i18n/pt.po
+++ b/addons/document/i18n/pt.po
@@ -7,51 +7,52 @@ 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-16 15:41+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-29 23:37+0000\n"
+"Last-Translator: Paulino \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: 2009-11-17 05:18+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document
#: field:document.directory,create_date:0
msgid "Date Created"
-msgstr ""
+msgstr "Data de criação"
#. module: document
#: field:document.directory,ressource_id:0
msgid "Resource ID"
-msgstr ""
+msgstr "Id do recurso"
#. module: document
#: field:document.directory.content,include_name:0
msgid "Include Record Name"
-msgstr ""
+msgstr "Incluir Nome do Registo"
#. module: document
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
-"O nome do objecto deve começar com x_ e não pode conter um carácter especial!"
+"O nome do objecto deve começar com x_ e não pode conter nenhum caracter "
+"especial!"
#. module: document
#: field:ir.actions.report.xml,model_id:0
msgid "Model Id"
-msgstr ""
+msgstr "ID do Modelo"
#. module: document
#: constraint:document.directory:0
msgid "Error! You can not create recursive Directories."
-msgstr "Erro! Não é possível criar directorias recursivos."
+msgstr "Erro! Não é possível criar pastas recursivamente."
#. module: document
#: model:ir.ui.menu,name:document.menu_document_configuration
msgid "Document Configuration"
-msgstr ""
+msgstr "Configuração de Documento"
#. module: document
#: view:ir.attachment:0
@@ -61,17 +62,17 @@ msgstr "Pré-visualizar"
#. module: document
#: field:ir.attachment,store_method:0
msgid "Storing Method"
-msgstr ""
+msgstr "Método de armazenamento"
#. module: document
#: model:ir.actions.act_window,name:document.action_config_auto_directory
msgid "Auto Configure Directory"
-msgstr ""
+msgstr "Auto-configurar pastas"
#. module: document
#: field:ir.attachment,file_size:0
msgid "File Size"
-msgstr ""
+msgstr "Tamanho do ficheiro"
#. module: document
#: help:document.directory.content,include_name:0
@@ -79,21 +80,23 @@ msgid ""
"Check this field if you want that the name of the file start by the record "
"name."
msgstr ""
+"Assinale este campo se quer que o nome dos ficheiros comece pelo nome do "
+"registo."
#. module: document
#: selection:document.directory,type:0
msgid "Other Resources"
-msgstr ""
+msgstr "Outros recursos"
#. module: document
#: field:document.directory,ressource_parent_type_id:0
msgid "Parent Model"
-msgstr ""
+msgstr "Modelo-Pai"
#. module: document
#: view:document.configuration.wizard:0
msgid "Document Management System."
-msgstr ""
+msgstr "Sistema de gestão documental"
#. module: document
#: view:ir.attachment:0
@@ -103,23 +106,23 @@ msgstr "Anexo"
#. module: document
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nome de modelo inválido na definição da acção"
#. module: document
#: selection:document.directory,type:0
msgid "Static Directory"
-msgstr ""
+msgstr "Pasta estática"
#. module: document
#: model:ir.model,name:document.model_document_directory_content_type
msgid "Directory Content Type"
-msgstr ""
+msgstr "Tipo de conteúdo da pasta"
#. module: document
#: help:document.directory,domain:0
msgid ""
"Use a domain if you want to apply an automatic filter on visible resources."
-msgstr ""
+msgstr "Use um domínio se quer um filtro automático aos recursos visíveis"
#. module: document
#: help:document.directory,ressource_tree:0
@@ -127,59 +130,61 @@ msgid ""
"Check this if you want to use the same tree structure as the object selected "
"in the system."
msgstr ""
+"Assinale aqui se quer usar a mesma estrutura em árvore como a do objecto "
+"seleccionado no sistema"
#. module: document
#: field:document.directory,type:0
msgid "Type"
-msgstr ""
+msgstr "Tipo"
#. module: document
#: model:ir.actions.act_window,name:document.action_document_directory_tree
#: model:ir.ui.menu,name:document.menu_document_directories_tree
msgid "Directorie's Structure"
-msgstr ""
+msgstr "Estrutura de pastas"
#. module: document
#: field:document.directory,parent_id:0
msgid "Parent Item"
-msgstr ""
+msgstr "Item-pai"
#. module: document
#: view:ir.attachment:0
msgid "File Information"
-msgstr ""
+msgstr "Informação do Ficheiro"
#. module: document
#: field:document.directory,file_ids:0
#: view:ir.attachment:0
msgid "Files"
-msgstr ""
+msgstr "Ficheiros"
#. module: document
#: field:ir.attachment,store_fname:0
msgid "Stored Filename"
-msgstr ""
+msgstr "Ficheiro guardado"
#. module: document
#: field:document.directory,write_uid:0
#: field:ir.attachment,write_uid:0
msgid "Last Modification User"
-msgstr ""
+msgstr "Utilizador da última modificação"
#. module: document
#: view:document.configuration.wizard:0
msgid "Configure"
-msgstr ""
+msgstr "Configurar"
#. module: document
#: field:document.directory,ressource_tree:0
msgid "Tree Structure"
-msgstr ""
+msgstr "Estrutura em árvore"
#. module: document
#: field:ir.attachment,title:0
msgid "Resource Title"
-msgstr ""
+msgstr "Título do recurso"
#. module: document
#: model:ir.actions.todo,note:document.config_auto_directory
@@ -187,11 +192,13 @@ msgid ""
"This wizard will configure the URL of the server of the document management "
"system."
msgstr ""
+"Este assistente vai configurar o URL do servidor do sistema de gestão "
+"documental."
#. module: document
#: model:ir.model,name:document.model_document_directory_content
msgid "Directory Content"
-msgstr ""
+msgstr "Conteúdo da pasta"
#. module: document
#: help:document.directory,ressource_parent_type_id:0
@@ -199,32 +206,34 @@ msgid ""
"If you put an object here, this directory template will appear bellow all of "
"these objects. Don't put a parent directory if you select a parent model."
msgstr ""
+"Se colocar um objecto aqui, este modelo de pasta vai aparecer abaixo destes "
+"objectos. Não atribua uma pasta-mãe se seleccionou um modelo-pai."
#. module: document
#: model:ir.ui.menu,name:document.menu_document
msgid "Document Management"
-msgstr ""
+msgstr "Gestão documental"
#. module: document
#: selection:ir.attachment,store_method:0
msgid "Link"
-msgstr ""
+msgstr "Ligação"
#. module: document
#: view:document.directory:0
msgid "Directory Type"
-msgstr ""
+msgstr "Tipo de pasta"
#. module: document
#: field:document.directory,group_ids:0
#: field:ir.attachment,group_ids:0
msgid "Groups"
-msgstr ""
+msgstr "Grupos"
#. module: document
#: field:document.directory.content,report_id:0
msgid "Report"
-msgstr ""
+msgstr "Relatório"
#. module: document
#: help:document.configuration.wizard,host:0
@@ -232,6 +241,8 @@ msgid ""
"Put here the server address or IP. Keep localhost if you don't know what to "
"write."
msgstr ""
+"Coloque aqui o endereço do servidor ou o IP. Se não sabe, Deixe ficar "
+"\"localhost\"."
#. module: document
#: view:document.configuration.wizard:0
@@ -239,6 +250,8 @@ msgid ""
"This wizard will automatically configure the document management system "
"according to modules installed on your system."
msgstr ""
+"O assistente vai configurar automaticamente o sistema de gestão documental, "
+"de acordo com os módulos instalados."
#. module: document
#: view:ir.attachment:0
@@ -254,12 +267,12 @@ msgstr "Notas"
#: view:ir.attachment:0
#: field:ir.attachment,index_content:0
msgid "Indexed Content"
-msgstr ""
+msgstr "Conteúdo indexado"
#. module: document
#: view:document.directory:0
msgid "Definition"
-msgstr ""
+msgstr "Definição"
#. module: document
#: constraint:ir.ui.view:0
@@ -274,59 +287,63 @@ msgid ""
" * User Authentication\n"
" * Document Indexation\n"
msgstr ""
+"Este é um Sistema de gestão Documental completo:\n"
+" * Interface FTP\n"
+" * Autenticação dos utilizadores\n"
+" * Indexação dos documentos\n"
#. module: document
#: field:document.directory,name:0
msgid "Name"
-msgstr ""
+msgstr "Nome"
#. module: document
#: field:document.directory.content.type,code:0
msgid "Extension"
-msgstr ""
+msgstr "Extensão"
#. module: document
#: selection:ir.attachment,store_method:0
msgid "Database"
-msgstr ""
+msgstr "Base de dados"
#. module: document
#: field:document.directory,content_ids:0
msgid "Virtual Files"
-msgstr ""
+msgstr "Ficheiros virtuais"
#. module: document
#: view:document.directory:0
#: model:ir.ui.menu,name:document.menu_document_directories
msgid "Directories"
-msgstr ""
+msgstr "Pastas"
#. module: document
#: view:document.directory:0
msgid "Seq."
-msgstr ""
+msgstr "Seq."
#. module: document
#: model:ir.module.module,shortdesc:document.module_meta_information
msgid "Integrated Document Management System"
-msgstr ""
+msgstr "Sistema de gestão documental Integrado"
#. module: document
#: field:document.directory.content,directory_id:0
#: field:ir.attachment,parent_id:0
msgid "Directory"
-msgstr ""
+msgstr "Pasta"
#. module: document
#: field:document.directory,user_id:0
#: field:ir.attachment,user_id:0
msgid "Owner"
-msgstr ""
+msgstr "Dono"
#. module: document
#: model:ir.model,name:document.model_document_configuration_wizard
msgid "document.configuration.wizard"
-msgstr ""
+msgstr "document.configuration.wizard"
#. module: document
#: view:ir.attachment:0
@@ -336,35 +353,35 @@ msgstr "Ligado a"
#. module: document
#: selection:ir.attachment,store_method:0
msgid "Filesystem"
-msgstr ""
+msgstr "Sistema de ficheiros"
#. module: document
#: field:document.directory,file_type:0
#: field:document.directory.content.type,name:0
#: field:ir.attachment,file_type:0
msgid "Content Type"
-msgstr ""
+msgstr "Tipo de conteúdo"
#. module: document
#: view:document.directory:0
#: view:ir.attachment:0
msgid "Security"
-msgstr ""
+msgstr "Segurança"
#. module: document
#: model:ir.ui.menu,name:document.menu_document_browse
msgid "Browse Files Using FTP"
-msgstr ""
+msgstr "Navegue pelos ficheiros via FTP"
#. module: document
#: field:document.directory,ressource_type_id:0
msgid "Directories Mapped to Objects"
-msgstr ""
+msgstr "Pastas mapeadas aos objectos"
#. module: document
#: view:ir.attachment:0
msgid "History"
-msgstr ""
+msgstr "Histórico"
#. module: document
#: help:document.directory,ressource_type_id:0
@@ -372,100 +389,102 @@ msgid ""
"Select an object here and Open ERP will create a mapping for each of these "
"objects, using the given domain, when browsing through FTP."
msgstr ""
+"Seleccione um objecto aqui para o OpenERP mapear cada um destes objectos, "
+"usando o domínio dado, ao navegar por FTP."
#. module: document
#: view:ir.attachment:0
msgid "Others Info"
-msgstr ""
+msgstr "Outras Informações"
#. module: document
#: field:document.directory,domain:0
msgid "Domain"
-msgstr ""
+msgstr "Domínio"
#. module: document
#: field:document.directory,write_date:0
#: field:ir.attachment,write_date:0
msgid "Date Modified"
-msgstr ""
+msgstr "Data da modificação"
#. module: document
#: field:document.directory.content,suffix:0
msgid "Suffix"
-msgstr ""
+msgstr "Sufixo"
#. module: document
#: field:document.configuration.wizard,host:0
msgid "Server Address"
-msgstr ""
+msgstr "Endereço do servidor"
#. module: document
#: model:ir.actions.url,name:document.action_document_browse
msgid "Browse Files"
-msgstr ""
+msgstr "Naveguar pelos ficheiros"
#. module: document
#: field:document.directory.content,name:0
msgid "Content Name"
-msgstr ""
+msgstr "Nome do conteúdo"
#. module: document
#: model:ir.model,name:document.model_document_directory
#: field:process.node,directory_id:0
msgid "Document directory"
-msgstr ""
+msgstr "Pasta de documentos"
#. module: document
#: field:document.directory,create_uid:0
msgid "Creator"
-msgstr ""
+msgstr "Autor"
#. module: document
#: view:document.directory:0
msgid "Auto-Generated Files"
-msgstr ""
+msgstr "Ficheiros auto-gerados"
#. module: document
#: field:document.directory.content,sequence:0
msgid "Sequence"
-msgstr ""
+msgstr "Sequência"
#. module: document
#: model:ir.ui.menu,name:document.menu_document_files
msgid "Search a File"
-msgstr ""
+msgstr "Procure um ficheiro"
#. module: document
#: view:document.configuration.wizard:0
msgid "Auto Configure"
-msgstr ""
+msgstr "Auto-configurar"
#. module: document
#: view:document.configuration.wizard:0
msgid "Cancel"
-msgstr ""
+msgstr "Cancelar"
#. module: document
#: field:ir.attachment,partner_id:0
msgid "Partner"
-msgstr ""
+msgstr "Parceiro"
#. module: document
#: view:document.directory:0
msgid "PDF Report"
-msgstr ""
+msgstr "Relatório PDF"
#. module: document
#: field:document.directory.content,extension:0
msgid "Document Type"
-msgstr ""
+msgstr "Tipo de documento"
#. module: document
#: field:document.directory,child_ids:0
msgid "Children"
-msgstr ""
+msgstr "Dependentes"
#. module: document
#: view:document.directory:0
msgid "Contents"
-msgstr ""
+msgstr "Conteúdo"
diff --git a/addons/document_webdav/DAV/BufferingHTTPServer.py b/addons/document_webdav/DAV/BufferingHTTPServer.py
new file mode 100644
index 00000000000..37520421432
--- /dev/null
+++ b/addons/document_webdav/DAV/BufferingHTTPServer.py
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+
+"""
+ Buffering HTTP Server
+ Copyright (C) 1999 Christian Scholz (ruebe@aachen.heimat.de)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+"""
+
+
+from utils import VERSION, AUTHOR
+__version__ = VERSION
+__author__ = AUTHOR
+
+from BaseHTTPServer import BaseHTTPRequestHandler
+import os
+class BufferedHTTPRequestHandler(BaseHTTPRequestHandler):
+ """
+ Buffering HTTP Request Handler
+
+ This class is an extension to the BaseHTTPRequestHandler
+ class which buffers the whole output and sends it at once
+ after the processing if the request is finished.
+
+ This makes it possible to work together with some clients
+ which otherwise would break (e.g. cadaver)
+
+ """
+
+
+ def _init_buffer(self):
+ """initialize the buffer.
+
+ If you override the handle() method remember to call
+ this (see below)
+ """
+ self.__buffer=""
+ self.__outfp=os.tmpfile()
+
+ def _append(self,s):
+ """ append a string to the buffer """
+ self.__buffer=self.__buffer+s
+
+ def _flush(self):
+ """ flush the buffer to wfile """
+ self.wfile.write(self.__buffer)
+ self.__outfp.write(self.__buffer)
+ self.__outfp.flush()
+ self.wfile.flush()
+ self.__buffer=""
+
+ def handle(self):
+ """ Handle a HTTP request """
+ self._init_buffer()
+ BaseHTTPRequestHandler.handle(self)
+ self._flush()
+
+ def send_header(self, keyword, value):
+ """Send a MIME header."""
+ if self.request_version != 'HTTP/0.9':
+ self._append("%s: %s\r\n" % (keyword, value))
+
+ def end_headers(self):
+ """Send the blank line ending the MIME headers."""
+ if self.request_version != 'HTTP/0.9':
+ self._append("\r\n")
+
+ def send_response(self, code, message=None):
+ self.log_request(code)
+
+ if message is None:
+ if self.responses.has_key(code):
+ message = self.responses[code][0]
+ else:
+ message = ''
+
+ if self.request_version != 'HTTP/0.9':
+ self._append("%s %s %s\r\n" %
+ (self.protocol_version, str(code), message))
+
+ self.send_header('Server', self.version_string())
+ self.send_header('Connection', 'close')
+ self.send_header('Date', self.date_time_string())
+
+ protocol_version="HTTP/1.1"
+
diff --git a/addons/document_webdav/DAV/WebDAVServer.py b/addons/document_webdav/DAV/WebDAVServer.py
new file mode 100644
index 00000000000..cb4db2c0204
--- /dev/null
+++ b/addons/document_webdav/DAV/WebDAVServer.py
@@ -0,0 +1,379 @@
+"""
+ Python WebDAV Server.
+ Copyright (C) 1999 Christian Scholz (ruebe@aachen.heimat.de)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+This module builds on AuthServer by implementing the standard DAV
+methods.
+
+Subclass this class and specify an IFACE_CLASS. See example.
+
+"""
+
+DEBUG=None
+
+from utils import VERSION, AUTHOR
+__version__ = VERSION
+__author__ = AUTHOR
+
+
+import os
+import sys
+import time
+import socket
+import string
+import posixpath
+import base64
+import urlparse
+import urllib
+
+from propfind import PROPFIND
+from delete import DELETE
+from davcopy import COPY
+from davmove import MOVE
+
+from string import atoi,split
+from status import STATUS_CODES
+from errors import *
+
+import BaseHTTPServer
+
+class DAVRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+ """Simple DAV request handler with
+
+ - GET
+ - HEAD
+ - PUT
+ - OPTIONS
+ - PROPFIND
+ - PROPPATCH
+ - MKCOL
+
+ It uses the resource/collection classes for serving and
+ storing content.
+
+ """
+
+ server_version = "DAV/" + __version__
+ protocol_version = 'HTTP/1.1'
+
+ ### utility functions
+ def _log(self, message):
+ pass
+
+ def _append(self,s):
+ """ write the string to wfile """
+ self.wfile.write(s)
+
+ def send_body(self,DATA,code,msg,desc,ctype='application/octet-stream',headers=None):
+ """ send a body in one part """
+
+ if not headers:
+ headers = {}
+ self.send_response(code,message=msg)
+ self.send_header("Connection", "keep-alive")
+ self.send_header("Accept-Ranges", "bytes")
+
+ for a,v in headers.items():
+ self.send_header(a,v)
+
+ if DATA:
+ self.send_header("Content-Length", str(len(DATA)))
+ self.send_header("Content-Type", ctype)
+ else:
+ self.send_header("Content-Length", "0")
+
+ self.end_headers()
+ if DATA:
+ self._append(DATA)
+
+ def send_body_chunks(self,DATA,code,msg,desc,ctype='text/xml; encoding="utf-8"'):
+ """ send a body in chunks """
+
+ self.responses[207]=(msg,desc)
+ self.send_response(code,message=msg)
+ self.send_header("Content-type", ctype)
+ self.send_header("Connection", "keep-alive")
+ self.send_header("Transfer-Encoding", "chunked")
+ self.end_headers()
+ self._append(hex(len(DATA))[2:]+"\r\n")
+ self._append(DATA)
+ self._append("\r\n")
+ self._append("0\r\n")
+ self._append("\r\n")
+
+ ### HTTP METHODS
+
+ def do_OPTIONS(self):
+ """return the list of capabilities """
+ self.send_response(200)
+ self.send_header("Allow", "GET, HEAD, COPY, MOVE, POST, PUT, PROPFIND, PROPPATCH, OPTIONS, MKCOL, DELETE, TRACE")
+ self.send_header("Content-Type", "text/plain")
+ self.send_header("Connection", "keep-alive")
+ self.send_header("DAV", "1")
+ self.end_headers()
+
+ def do_PROPFIND(self):
+
+ dc=self.IFACE_CLASS
+ # read the body
+ body=None
+ if self.headers.has_key("Content-Length"):
+ l=self.headers['Content-Length']
+ body=self.rfile.read(atoi(l))
+ alt_body = """
+
+
+
+
+
+
+
+
+
+ """
+ #self.wfile.write(body)
+
+ # which Depth?
+ if self.headers.has_key('Depth'):
+ d=self.headers['Depth']
+ else:
+ d="infinity"
+
+ uri=self.geturi()
+ pf=PROPFIND(uri,dc,d)
+
+ if body:
+ pf.read_propfind(body)
+
+ try:
+ DATA=pf.createResponse()
+ DATA=DATA+"\n"
+ # print "Data:", DATA
+ except DAV_NotFound,(ec,dd):
+ return self.send_notFound(dd, uri)
+ except DAV_Error, (ec,dd):
+ return self.send_error(ec,dd)
+
+ self.send_body_chunks(DATA,207,"Multi-Status","Multiple responses")
+
+ def geturi(self):
+ buri = self.IFACE_CLASS.baseuri
+ if buri[-1] == '/':
+ return urllib.unquote(buri[:-1]+self.path)
+ else:
+ return urllib.unquote(buri+self.path)
+
+ def do_GET(self):
+ """Serve a GET request."""
+ dc=self.IFACE_CLASS
+ uri=self.geturi()
+
+ # get the last modified date
+ try:
+ lm=dc.get_prop(uri,"DAV:","getlastmodified")
+ except:
+ lm="Sun, 01 Dec 2014 00:00:00 GMT" # dummy!
+ headers={"Last-Modified":lm , "Connection": "keep-alive"}
+
+ # get the content type
+ try:
+ ct=dc.get_prop(uri,"DAV:","getcontenttype")
+ except:
+ ct="application/octet-stream"
+
+ # get the data
+ try:
+ data=dc.get_data(uri)
+ except DAV_Error, (ec,dd):
+ self.send_status(ec)
+ return
+
+ # send the data
+ self.send_body(data,200,"OK","OK",ct,headers)
+
+ def do_HEAD(self):
+ """ Send a HEAD response """
+ dc=self.IFACE_CLASS
+ uri=self.geturi()
+
+ # get the last modified date
+ try:
+ lm=dc.get_prop(uri,"DAV:","getlastmodified")
+ except:
+ lm="Sun, 01 Dec 2014 00:00:00 GMT" # dummy!
+
+ headers={"Last-Modified":lm, "Connection": "keep-alive"}
+
+ # get the content type
+ try:
+ ct=dc.get_prop(uri,"DAV:","getcontenttype")
+ except:
+ ct="application/octet-stream"
+
+ try:
+ data=dc.get_data(uri)
+ headers["Content-Length"]=str(len(data))
+ except DAV_NotFound:
+ self.send_body(None,404,"Not Found","")
+ return
+
+ self.send_body(None,200,"OK","OK",ct,headers)
+
+ def do_POST(self):
+ self.send_error(404,"File not found")
+
+ def do_MKCOL(self):
+ """ create a new collection """
+
+ dc=self.IFACE_CLASS
+ uri=self.geturi()
+ try:
+ res = dc.mkcol(uri)
+ if res:
+ self.send_body(None,201,"Created",'')
+ else:
+ self.send_body(None,415,"Cannot create",'')
+ #self.send_header("Connection", "keep-alive")
+ # Todo: some content, too
+ except DAV_Error, (ec,dd):
+ self.send_body(None,int(ec),dd,dd)
+
+ def do_DELETE(self):
+ """ delete an resource """
+ dc=self.IFACE_CLASS
+ uri=self.geturi()
+ dl=DELETE(uri,dc)
+ if dc.is_collection(uri):
+ res=dl.delcol()
+ else:
+ res=dl.delone()
+
+ if res:
+ self.send_status(207,body=res)
+ else:
+ self.send_status(204)
+
+ def do_PUT(self):
+ dc=self.IFACE_CLASS
+
+ # read the body
+ body=None
+ if self.headers.has_key("Content-Length"):
+ l=self.headers['Content-Length']
+ body=self.rfile.read(atoi(l))
+ uri=self.geturi()
+
+ ct=None
+ if self.headers.has_key("Content-Type"):
+ ct=self.headers['Content-Type']
+ try:
+ dc.put(uri,body,ct)
+ except DAV_Error, (ec,dd):
+ self.send_status(ec)
+ return
+ self.send_status(201)
+
+ def do_COPY(self):
+ """ copy one resource to another """
+ try:
+ self.copymove(COPY)
+ except DAV_Error, (ec,dd):
+ self.send_status(ec)
+
+ def do_MOVE(self):
+ """ move one resource to another """
+ try:
+ self.copymove(MOVE)
+ except DAV_Error, (ec,dd):
+ self.send_status(ec)
+
+ def copymove(self,CLASS):
+ """ common method for copying or moving objects """
+ dc=self.IFACE_CLASS
+
+ # get the source URI
+ source_uri=self.geturi()
+
+ # get the destination URI
+ dest_uri=self.headers['Destination']
+ dest_uri=urllib.unquote(dest_uri)
+
+ # Overwrite?
+ overwrite=1
+ result_code=204
+ if self.headers.has_key("Overwrite"):
+ if self.headers['Overwrite']=="F":
+ overwrite=None
+ result_code=201
+
+ # instanciate ACTION class
+ cp=CLASS(dc,source_uri,dest_uri,overwrite)
+
+ # Depth?
+ d="infinity"
+ if self.headers.has_key("Depth"):
+ d=self.headers['Depth']
+
+ if d!="0" and d!="infinity":
+ self.send_status(400)
+ return
+
+ if d=="0":
+ res=cp.single_action()
+ self.send_status(res)
+ return
+
+ # now it only can be "infinity" but we nevertheless check for a collection
+ if dc.is_collection(source_uri):
+ try:
+ res=cp.tree_action()
+ except DAV_Error, (ec,dd):
+ self.send_status(ec)
+ return
+ else:
+ try:
+ res=cp.single_action()
+ except DAV_Error, (ec,dd):
+ self.send_status(ec)
+ return
+
+ if res:
+ self.send_body_chunks(res,207,STATUS_CODES[207],STATUS_CODES[207],
+ ctype='text/xml; charset="utf-8"')
+ else:
+ self.send_status(result_code)
+
+ def get_userinfo(self,user,pw):
+ """ Dummy method which lets all users in """
+
+ return 1
+
+ def send_status(self,code=200,mediatype='text/xml; charset="utf-8"', \
+ msg=None,body=None):
+
+ if not msg: msg=STATUS_CODES[code]
+ self.send_body(body,code,STATUS_CODES[code],msg,mediatype)
+
+ def send_notFound(self,descr,uri):
+ body = """
+
+ %s
+
+ %s
+
+ """
+ return self.send_status(404,descr, body=body % (uri,descr))
diff --git a/addons/document_webdav/DAV/__init__.py b/addons/document_webdav/DAV/__init__.py
new file mode 100644
index 00000000000..10abdb40014
--- /dev/null
+++ b/addons/document_webdav/DAV/__init__.py
@@ -0,0 +1,20 @@
+"""
+ python davserver
+ Copyright (C) 1999 Christian Scholz (ruebe@aachen.heimat.de)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+"""
+
+
diff --git a/addons/document_webdav/DAV/constants.py b/addons/document_webdav/DAV/constants.py
new file mode 100644
index 00000000000..e858ac519c2
--- /dev/null
+++ b/addons/document_webdav/DAV/constants.py
@@ -0,0 +1,18 @@
+"""
+
+constants definition
+
+
+"""
+
+# definition for resourcetype
+COLLECTION=1
+OBJECT=None
+DAV_PROPS=['creationdate', 'displayname', 'getcontentlanguage', 'getcontentlength', 'getcontenttype', 'getetag', 'getlastmodified', 'lockdiscovery', 'resourcetype', 'source', 'supportedlock']
+
+
+# Request classes in propfind
+
+RT_ALLPROP=1
+RT_PROPNAME=2
+RT_PROP=3
diff --git a/addons/document_webdav/DAV/davcmd.py b/addons/document_webdav/DAV/davcmd.py
new file mode 100644
index 00000000000..5c6be3ff9f7
--- /dev/null
+++ b/addons/document_webdav/DAV/davcmd.py
@@ -0,0 +1,218 @@
+"""
+
+davcmd.py
+---------
+
+containts commands like copy, move, delete for normal
+resources and collections
+
+"""
+
+from string import split,replace,joinfields
+import urlparse
+
+from utils import create_treelist, is_prefix
+from errors import *
+
+def deltree(dc,uri,exclude={}):
+ """ delete a tree of resources
+
+ dc -- dataclass to use
+ uri -- root uri to delete
+ exclude -- an optional list of uri:error_code pairs which should not
+ be deleted.
+
+ returns dict of uri:error_code tuples from which
+ another method can create a multistatus xml element.
+
+ Also note that we only know Depth=infinity thus we don't have
+ to test for it.
+
+ """
+
+ tlist=create_treelist(dc,uri)
+ result={}
+
+ for i in range(len(tlist),0,-1):
+ problem_uris=result.keys()
+ element=tlist[i-1]
+
+ # test here, if an element is a prefix of an uri which
+ # generated an error before.
+ # note that we walk here from childs to parents, thus
+ # we cannot delete a parent if a child made a problem.
+ # (see example in 8.6.2.1)
+ ok=1
+ for p in problem_uris:
+ if is_prefix(element,p):
+ ok=None
+ break
+
+ if not ok: continue
+
+ # here we test for the exclude list which is the other way round!
+ for p in exclude.keys():
+ if is_prefix(p,element):
+ ok=None
+ break
+
+ if not ok: continue
+
+ # now delete stuff
+ try:
+ delone(dc,element)
+ except DAV_Error, (ec,dd):
+ result[element]=ec
+
+ return result
+
+def delone(dc,uri):
+ """ delete a single object """
+ if dc.is_collection(uri):
+ dc.rmcol(uri) # should be empty
+ else:
+ dc.rm(uri)
+
+###
+### COPY
+###
+
+# helper function
+
+def copy(dc,src,dst):
+ """ only copy the element
+
+ This is just a helper method factored out from copy and
+ copytree. It will not handle the overwrite or depth header.
+
+ """
+
+ # destination should have been deleted before
+ if dc.exists(dst): raise DAV_Error, 412
+
+ # source should exist also
+ if not dc.exists(src): raise DAV_NotFound
+
+ if dc.is_collection(src):
+ dc.copycol(src,dst) # an exception will be passed thru
+ else:
+ dc.copy(src,dst) # an exception will be passed thru
+
+
+# the main functions
+
+def copyone(dc,src,dst,overwrite=None):
+ """ copy one resource to a new destination """
+
+ if overwrite and dc.exists(dst):
+ delres=deltree(dc,dst)
+ else:
+ delres={}
+
+ # if we cannot delete everything, then do not copy!
+ if delres: return delres
+
+ try:
+ copy(dc,src,dst) # pass thru exceptions
+ except DAV_Error, (ec,dd):
+ return ec
+
+def copytree(dc,src,dst,overwrite=None):
+ """ copy a tree of resources to another location
+
+ dc -- dataclass to use
+ src -- src uri from where to copy
+ dst -- dst uri
+ overwrite -- if 1 then delete dst uri before
+
+ returns dict of uri:error_code tuples from which
+ another method can create a multistatus xml element.
+
+ """
+
+
+ # first delete the destination resource
+ if overwrite and dc.exists(dst):
+ delres=deltree(dc,dst)
+ else:
+ delres={}
+
+ # if we cannot delete everything, then do not copy!
+ if delres: return delres
+
+ # get the tree we have to copy
+ tlist=create_treelist(dc,src)
+ result={}
+
+ # prepare destination URIs (get the prefix)
+ dpath=urlparse.urlparse(dst)[2]
+
+ for element in tlist:
+ problem_uris=result.keys()
+
+ # now URIs get longer and longer thus we have
+ # to test if we had a parent URI which we were not
+ # able to copy in problem_uris which is the prefix
+ # of the actual element. If it is, then we cannot
+ # copy this as well but do not generate another error.
+ ok=1
+ for p in problem_uris:
+ if is_prefix(p,element):
+ ok=None
+ break
+
+ if not ok: continue
+
+ # now create the destination URI which corresponds to
+ # the actual source URI. -> actual_dst
+ # ("subtract" the base src from the URI and prepend the
+ # dst prefix to it.)
+ esrc=replace(element,src,"")
+ actual_dst=dpath+esrc
+
+ # now copy stuff
+ try:
+ copy(dc,element,actual_dst)
+ except DAV_Error, (ec,dd):
+ result[element]=ec
+
+ return result
+
+
+
+###
+### MOVE
+###
+
+
+def moveone(dc,src,dst,overwrite=None):
+ """ move a single resource
+
+ This is done by first copying it and then deleting
+ the original.
+ """
+
+ # first copy it
+ copyone(dc,src,dst,overwrite)
+
+ # then delete it
+ dc.rm(src)
+
+def movetree(dc,src,dst,overwrite=None):
+ """ move a collection
+
+ This is done by first copying it and then deleting
+ the original.
+
+ PROBLEM: if something did not copy then we have a problem
+ when deleting as the original might get deleted!
+ """
+
+ # first copy it
+ res=copytree(dc,src,dst,overwrite)
+
+ # then delete it
+ res=deltree(dc,src,exclude=res)
+
+ return res
+
diff --git a/addons/document_webdav/DAV/davcopy.py b/addons/document_webdav/DAV/davcopy.py
new file mode 100755
index 00000000000..ec44931b107
--- /dev/null
+++ b/addons/document_webdav/DAV/davcopy.py
@@ -0,0 +1,133 @@
+#!/usr/bin/env python
+
+"""
+ python davserver
+ Copyright (C) 1999 Christian Scholz (ruebe@aachen.heimat.de)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+"""
+
+
+from xml.dom import ext
+from xml.dom.Document import Document
+
+import sys
+import string
+import urlparse
+import urllib
+from StringIO import StringIO
+
+import utils
+from constants import COLLECTION, OBJECT, DAV_PROPS, RT_ALLPROP, RT_PROPNAME, RT_PROP
+from errors import *
+from utils import create_treelist, quote_uri, gen_estring
+
+class COPY:
+ """ copy resources and eventually create multistatus responses
+
+ This module implements the COPY class which is responsible for
+ copying resources. Usually the normal copy work is done in the
+ interface class. This class only creates error messages if error
+ occur.
+
+ """
+
+
+ def __init__(self,dataclass,src_uri,dst_uri,overwrite):
+ self.__dataclass=dataclass
+ self.__src=src_uri
+ self.__dst=dst_uri
+ self.__overwrite=overwrite
+
+
+ def single_action(self):
+ """ copy a normal resources.
+
+ We try to copy it and return the result code.
+ This is for Depth==0
+
+ """
+
+ dc=self.__dataclass
+ base=self.__src
+
+ ### some basic tests
+ # test if dest exists and overwrite is false
+ if dc.exists(self.__dst) and not self.__overwrite: raise DAV_Error, 412
+ # test if src and dst are the same
+ # (we assume that both uris are on the same server!)
+ ps=urlparse.urlparse(self.__src)[2]
+ pd=urlparse.urlparse(self.__dst)[2]
+ if ps==pd: raise DAV_Error, 403
+
+ return dc.copyone(self.__src,self.__dst,self.__overwrite)
+
+ #return copyone(dc,self.__src,self.__dst,self.__overwrite)
+
+ def tree_action(self):
+ """ copy a tree of resources (a collection)
+
+ Here we return a multistatus xml element.
+
+ """
+ dc=self.__dataclass
+ base=self.__src
+
+ ### some basic tests
+ # test if dest exists and overwrite is false
+ if dc.exists(self.__dst) and not self.__overwrite: raise DAV_Error, 412
+ # test if src and dst are the same
+ # (we assume that both uris are on the same server!)
+ ps=urlparse.urlparse(self.__src)[2]
+ pd=urlparse.urlparse(self.__dst)[2]
+ if ps==pd: raise DAV_Error, 403
+
+
+ result=dc.copytree(self.__src,self.__dst,self.__overwrite)
+ #result=copytree(dc,self.__src,self.__dst,self.__overwrite)
+
+ if not result: return None
+
+ ###
+ ### create the multistatus XML element
+ ### (this is also the same as in delete.py.
+ ### we might make a common method out of it)
+ ###
+
+ doc = Document(None)
+ ms=doc.createElement("D:multistatus")
+ ms.setAttribute("xmlns:D","DAV:")
+ doc.appendChild(ms)
+
+ for el,ec in result.items():
+ re=doc.createElement("D:response")
+ hr=doc.createElement("D:href")
+ st=doc.createElement("D:status")
+ huri=doc.createTextNode(quote_uri(el))
+ t=doc.createTextNode(gen_estring(ec))
+ st.appendChild(t)
+ hr.appendChild(huri)
+ re.appendChild(hr)
+ re.appendChild(st)
+ ms.appendChild(re)
+
+ sfile=StringIO()
+ ext.PrettyPrint(doc,stream=sfile)
+ s=sfile.getvalue()
+ sfile.close()
+ return s
+
diff --git a/addons/document_webdav/DAV/davmove.py b/addons/document_webdav/DAV/davmove.py
new file mode 100755
index 00000000000..78c1e649389
--- /dev/null
+++ b/addons/document_webdav/DAV/davmove.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+
+"""
+ python davserver
+ Copyright (C) 1999 Christian Scholz (ruebe@aachen.heimat.de)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+"""
+
+
+import sys
+import string
+import urlparse
+import urllib
+from StringIO import StringIO
+
+import utils
+from constants import COLLECTION, OBJECT, DAV_PROPS
+from constants import RT_ALLPROP, RT_PROPNAME, RT_PROP
+from errors import *
+from utils import create_treelist, quote_uri, gen_estring, make_xmlresponse
+from davcmd import moveone, movetree
+
+class MOVE:
+ """ move resources and eventually create multistatus responses
+
+ This module implements the MOVE class which is responsible for
+ moving resources.
+
+ MOVE is implemented by a COPY followed by a DELETE of the old
+ resource.
+
+ """
+
+
+ def __init__(self,dataclass,src_uri,dst_uri,overwrite):
+ self.__dataclass=dataclass
+ self.__src=src_uri
+ self.__dst=dst_uri
+ self.__overwrite=overwrite
+
+
+ def single_action(self):
+ """ move a normal resources.
+
+ We try to move it and return the result code.
+ This is for Depth==0
+
+ """
+
+ dc=self.__dataclass
+ base=self.__src
+
+ ### some basic tests
+ # test if dest exists and overwrite is false
+ if dc.exists(self.__dst) and not self.__overwrite: raise DAV_Error, 412
+ # test if src and dst are the same
+ # (we assume that both uris are on the same server!)
+ ps=urlparse.urlparse(self.__src)[2]
+ pd=urlparse.urlparse(self.__dst)[2]
+ if ps==pd: raise DAV_Error, 403
+
+ return dc.moveone(self.__src,self.__dst,self.__overwrite)
+
+ def tree_action(self):
+ """ move a tree of resources (a collection)
+
+ Here we return a multistatus xml element.
+
+ """
+ dc=self.__dataclass
+ base=self.__src
+
+ ### some basic tests
+ # test if dest exists and overwrite is false
+ if dc.exists(self.__dst) and not self.__overwrite: raise DAV_Error, 412
+ # test if src and dst are the same
+ # (we assume that both uris are on the same server!)
+ ps=urlparse.urlparse(self.__src)[2]
+ pd=urlparse.urlparse(self.__dst)[2]
+ if ps==pd: raise DAV_Error, 403
+
+ result=dc.movetree(self.__src,self.__dst,self.__overwrite)
+ if not result: return None
+
+ # create the multistatus XML element
+ return make_xmlresponse(result)
+
diff --git a/addons/document_webdav/DAV/delete.py b/addons/document_webdav/DAV/delete.py
new file mode 100755
index 00000000000..ed017e53b6d
--- /dev/null
+++ b/addons/document_webdav/DAV/delete.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+
+"""
+
+ python davserver
+ Copyright (C) 1999 Christian Scholz (ruebe@aachen.heimat.de)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+"""
+import os
+import string
+import urllib
+from StringIO import StringIO
+
+from status import STATUS_CODES
+from utils import gen_estring, quote_uri, make_xmlresponse
+from davcmd import deltree
+
+class DELETE:
+
+ def __init__(self,uri,dataclass):
+ self.__dataclass=dataclass
+ self.__uri=uri
+
+ def delcol(self):
+ """ delete a collection """
+
+ dc=self.__dataclass
+ result=dc.deltree(self.__uri)
+
+ if not len(result.items()):
+ return None # everything ok
+
+ # create the result element
+ return make_xmlresponse(result)
+
+ def delone(self):
+ """ delete a resource """
+
+ dc=self.__dataclass
+ result=dc.delone(self.__uri)
+
+ if not result: return None
+ if not len(result.items()):
+ return None # everything ok
+
+ # create the result element
+ return make_xmlresponse(result)
+
diff --git a/addons/document_webdav/DAV/errors.py b/addons/document_webdav/DAV/errors.py
new file mode 100755
index 00000000000..9c0e7667913
--- /dev/null
+++ b/addons/document_webdav/DAV/errors.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+"""
+
+ Exceptions for the DAVserver implementation
+
+"""
+
+class DAV_Error(Exception):
+ """ in general we can have the following arguments:
+
+ 1. the error code
+ 2. the error result element, e.g. a element
+ """
+
+ def __init__(self,*args):
+ if len(args)==1:
+ self.args=(args[0],"")
+ else:
+ self.args=args
+
+class DAV_Secret(DAV_Error):
+ """ the user is not allowed to know anything about it
+
+ returning this for a property value means to exclude it
+ from the response xml element.
+ """
+
+ def __init__(self):
+ DAV_Error.__init__(self,0)
+ pass
+
+class DAV_NotFound(DAV_Error):
+ """ a requested property was not found for a resource """
+
+ def __init__(self,*args):
+ if len(args):
+ if isinstance(args[0],list):
+ stre = "Path %s not found!"%('/'.join(args[0]))
+ else:
+ stre = args[0]
+ DAV_Error.__init__(self,404,stre)
+ else:
+ DAV_Error.__init__(self,404)
+
+ pass
+
+class DAV_Forbidden(DAV_Error):
+ """ a method on a resource is not allowed """
+
+ def __init__(self,*args):
+ if len(args):
+ DAV_Error.__init__(self,403,args[0])
+ else:
+ DAV_Error.__init__(self,403)
+ pass
+
diff --git a/addons/document_webdav/DAV/iface.py b/addons/document_webdav/DAV/iface.py
new file mode 100644
index 00000000000..8f6daa5eaa8
--- /dev/null
+++ b/addons/document_webdav/DAV/iface.py
@@ -0,0 +1,263 @@
+"""
+
+basic interface class
+
+use this for subclassing when writing your own interface
+class.
+
+"""
+
+from errors import *
+
+import time
+from string import lower
+
+class dav_interface:
+ """ interface class for implementing DAV servers """
+
+ ### defined properties (modify this but let the DAV stuff there!)
+ ### the format is namespace: [list of properties]
+
+ PROPS={"DAV:" : ('creationdate',
+ 'displayname',
+ 'getcontentlanguage',
+ 'getcontentlength',
+ 'getcontenttype',
+ 'getetag',
+ 'getlastmodified',
+ 'lockdiscovery',
+ 'resourcetype',
+ 'source',
+ 'supportedlock'),
+ "NS2" : ("p1","p2")
+ }
+
+ # here we define which methods handle which namespace
+ # the first item is the namespace URI and the second one
+ # the method prefix
+ # e.g. for DAV:getcontenttype we call dav_getcontenttype()
+ M_NS={"DAV:" : "_get_dav",
+ "NS2" : "ns2" }
+
+ def get_propnames(self,uri):
+ """ return the property names allowed for the given URI
+
+ In this method we simply return the above defined properties
+ assuming that they are valid for any resource.
+ You can override this in order to return a different set
+ of property names for each resource.
+
+ """
+ return self.PROPS
+
+ def get_prop2(self,uri,ns,pname):
+ """ return the value of a property
+ """
+ if lower(ns)=="dav:": return self.get_dav(uri,pname)
+
+ raise DAV_NotFound
+
+ def get_prop(self,uri,ns,propname):
+ """ return the value of a given property
+
+ uri -- uri of the object to get the property of
+ ns -- namespace of the property
+ pname -- name of the property
+ """
+ if self.M_NS.has_key(ns):
+ prefix=self.M_NS[ns]
+ else:
+ print "No namespace:",ns
+ raise DAV_NotFound
+ mname=prefix+"_"+propname
+ if not hasattr(self,mname):
+ raise DAV_NotFound
+
+ try:
+ m=getattr(self,mname)
+ r=m(uri)
+ return r
+ except AttributeError, e:
+ print 'Property %s not supported' % propname
+ print "Exception:", e
+ raise DAV_NotFound
+
+ ###
+ ### DATA methods (for GET and PUT)
+ ###
+
+ def get_data(self,uri):
+ """ return the content of an object
+
+ return data or raise an exception
+
+ """
+ raise DAV_NotFound
+
+ def put(self,uri,data):
+ """ write an object to the repository
+
+ return a result code or raise an exception
+ """
+
+ raise DAV_Forbidden
+
+ ###
+ ### Methods for DAV properties
+ ###
+
+ def _get_dav_creationdate(self,uri):
+ """ return the creationdate of a resource """
+ d=self.get_creationdate(uri)
+ # format it
+ if isinstance(d, int) or isinstance(d, float):
+ d = time.localtimetime(d)
+ return time.strftime("%Y-%m-%dT%H:%M:%S%Z",d)
+
+ def _get_dav_getlastmodified(self,uri):
+ """ return the last modified date of a resource """
+ d=self.get_lastmodified(uri)
+ if isinstance(d, int) or isinstance(d, float):
+ d = time.localtime(d)
+ # format it
+ return time.asctime(d)
+
+
+ ###
+ ### OVERRIDE THESE!
+ ###
+
+ def get_creationdate(self,uri):
+ """ return the creationdate of the resource """
+ return time.time()
+
+ def get_lastmodified(self,uri):
+ """ return the last modification date of the resource """
+ return time.time()
+
+
+ ###
+ ### COPY MOVE DELETE
+ ###
+
+ ### methods for deleting a resource
+
+ def rmcol(self,uri):
+ """ delete a collection
+
+ This should not delete any children! This is automatically done
+ before by the DELETE class in DAV/delete.py
+
+ return a success code or raise an exception
+
+ """
+ raise DAV_NotFound
+
+ def rm(self,uri):
+ """ delete a single resource
+
+ return a success code or raise an exception
+
+ """
+ raise DAV_NotFound
+
+ """
+
+ COPY/MOVE HANDLER
+
+ These handler are called when a COPY or MOVE method is invoked by
+ a client. In the default implementation it works as follows:
+
+ - the davserver receives a COPY/MOVE method
+ - the davcopy or davmove module will be loaded and the corresponding
+ class will be initialized
+ - this class parses the query and decides which method of the interface class
+ to call:
+
+ copyone for a single resource to copy
+ copytree for a tree to copy (collection)
+ (the same goes for move of course).
+
+ - the interface class has now two options:
+ 1. to handle the action directly (e.g. cp or mv on filesystems)
+ 2. to let it handle via the copy/move methods in davcmd.
+
+ ad 1) The first approach can be used when we know that no error can
+ happen inside a tree or when the action can exactly tell which
+ element made which error. We have to collect these and return
+ it in a dict of the form {uri: error_code, ...}
+
+ ad 2) The copytree/movetree/... methods of davcmd.py will do the recursion
+ themselves and call for each resource the copy/move method of the
+ interface class. Thus method will then only act on a single resource.
+ (Thus a copycol on a normal unix filesystem actually only needs to do
+ an mkdir as the content will be copied by the davcmd.py function.
+ The davcmd.py method will also automatically collect all errors and
+ return the dictionary described above.
+ When you use 2) you also have to implement the copy() and copycol()
+ methods in your interface class. See the example for details.
+
+ To decide which approach is the best you have to decide if your application
+ is able to generate errors inside a tree. E.g. a function which completely
+ fails on a tree if one of the tree's childs fail is not what we need. Then
+ 2) would be your way of doing it.
+ Actually usually 2) is the better solution and should only be replaced by
+ 1) if you really need it.
+
+ The remaining question is if we should do the same for the DELETE method.
+
+ """
+
+ ### MOVE handlers
+
+ def moveone(self,src,dst,overwrite):
+ """ move one resource with Depth=0 """
+ return moveone(self,src,dst,overwrite)
+
+ def movetree(self,src,dst,overwrite):
+ """ move a collection with Depth=infinity """
+ return movetree(self,src,dst,overwrite)
+
+ ### COPY handlers
+
+ def copyone(self,src,dst,overwrite):
+ """ copy one resource with Depth=0 """
+ return copyone(self,src,dst,overwrite)
+
+ def copytree(self,src,dst,overwrite):
+ """ copy a collection with Depth=infinity """
+ return copytree(self,src,dst,overwrite)
+
+
+ ### low level copy methods (you only need these for method 2)
+ def copy(self,src,dst):
+ """ copy a resource with depth==0
+
+ You don't need to bother about overwrite or not.
+ This has been done already.
+
+ return a success code or raise an exception if something fails
+ """
+ return 201
+
+
+ def copycol(self,src,dst):
+ """ copy a resource with depth==infinity
+
+ You don't need to bother about overwrite or not.
+ This has been done already.
+
+ return a success code or raise an exception if something fails
+ """
+ return 201
+
+ ### some utility functions you need to implement
+
+ def exists(self,uri):
+ """ return 1 or None depending on if a resource exists """
+ return None # no
+
+ def is_collection(self,uri):
+ """ return 1 or None depending on if a resource is a collection """
+ return None # no
+
diff --git a/addons/document_webdav/DAV/propfind.py b/addons/document_webdav/DAV/propfind.py
new file mode 100755
index 00000000000..0fb9c229c03
--- /dev/null
+++ b/addons/document_webdav/DAV/propfind.py
@@ -0,0 +1,372 @@
+#!/usr/bin/env python
+
+"""
+ python davserver
+ Copyright (C) 1999 Christian Scholz (ruebe@aachen.heimat.de)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+"""
+
+
+from xml.dom import ext
+from xml.dom.Document import Document
+
+import sys
+import string
+import urlparse
+import urllib
+from StringIO import StringIO
+
+import utils
+from constants import COLLECTION, OBJECT, DAV_PROPS, RT_ALLPROP, RT_PROPNAME, RT_PROP
+from errors import *
+
+def utf8str(st):
+ if isinstance(st,unicode):
+ return st.encode('utf8')
+ else:
+ return str(st)
+
+class PROPFIND:
+ """ parse a propfind xml element and extract props
+
+ It will set the following instance vars:
+
+ request_class : ALLPROP | PROPNAME | PROP
+ proplist : list of properties
+ nsmap : map of namespaces
+
+ The list of properties will contain tuples of the form
+ (element name, ns_prefix, ns_uri)
+
+
+ """
+
+
+ def __init__(self,uri,dataclass,depth):
+ self.request_type=None
+ self.nsmap={}
+ self.proplist={}
+ self.default_ns=None
+ self.__dataclass=dataclass
+ self.__depth=str(depth)
+ self.__uri=uri
+ self.use_full_urls=True
+ self.__has_body=None # did we parse a body?
+
+ def read_propfind(self,xml_doc):
+ self.request_type,self.proplist,self.namespaces=utils.parse_propfind(xml_doc)
+
+ # a violation of the expected logic: client (korganizer) will ask for DAV:resourcetype
+ # but we also have to return the http://groupdav.org/:resourcetype property!
+ if self.proplist.has_key('DAV:') and 'resourcetype' in self.proplist['DAV:']:
+ if not self.proplist.has_key('http://groupdav.org/'):
+ self.proplist['http://groupdav.org/'] = []
+ self.proplist['http://groupdav.org/'].append('resourcetype')
+ if 'DAV:' in self.namespaces: #TMP
+ self.namespaces.append('http://groupdav.org/')
+
+ def createResponse(self):
+ """ create the multistatus response
+
+ This will be delegated to the specific method
+ depending on which request (allprop, propname, prop)
+ was found.
+
+ If we get a PROPNAME then we simply return the list with empty
+ values which we get from the interface class
+
+ If we get an ALLPROP we first get the list of properties and then
+ we do the same as with a PROP method.
+
+ If the uri doesn't exist, return an xml response with a 404 status
+
+ """
+
+ if not self.__dataclass.exists(self.__uri):
+ raise DAV_NotFound("Path %s doesn't exist" % self.__uri)
+
+ if self.request_type==RT_ALLPROP:
+ return self.create_allprop()
+
+ if self.request_type==RT_PROPNAME:
+ return self.create_propname()
+
+ if self.request_type==RT_PROP:
+ return self.create_prop()
+
+ # no body means ALLPROP!
+ return self.create_allprop()
+
+ def create_propname(self):
+ """ create a multistatus response for the prop names """
+
+ dc=self.__dataclass
+ # create the document generator
+ doc = Document(None)
+ ms=doc.createElement("D:multistatus")
+ ms.setAttribute("xmlns:D","DAV:")
+ doc.appendChild(ms)
+
+ if self.__depth=="0":
+ pnames=dc.get_propnames(self.__uri)
+ re=self.mk_propname_response(self.__uri,pnames,doc)
+ ms.appendChild(re)
+
+ elif self.__depth=="1":
+ pnames=dc.get_propnames(self.__uri)
+ re=self.mk_propname_response(self.__uri,pnames,doc)
+ ms.appendChild(re)
+
+ for newuri in dc.get_childs(self.__uri):
+ pnames=dc.get_propnames(newuri)
+ re=self.mk_propname_response(newuri,pnames,doc)
+ ms.appendChild(re)
+ # *** depth=="infinity"
+
+ sfile=StringIO()
+ ext.PrettyPrint(doc,stream=sfile)
+ s=sfile.getvalue()
+ sfile.close()
+ return s
+
+ def create_allprop(self):
+ """ return a list of all properties """
+ self.proplist={}
+ self.namespaces=[]
+ for ns,plist in self.__dataclass.get_propnames(self.__uri).items():
+ self.proplist[ns]=plist
+ self.namespaces.append(ns)
+
+ return self.create_prop()
+
+ def create_prop(self):
+ """ handle a request
+
+ This will
+
+ 1. set up the -Framework
+
+ 2. read the property values for each URI
+ (which is dependant on the Depth header)
+ This is done by the get_propvalues() method.
+
+ 3. For each URI call the append_result() method
+ to append the actual -Tag to the result
+ document.
+
+ We differ between "good" properties, which have been
+ assigned a value by the interface class and "bad"
+ properties, which resulted in an error, either 404
+ (Not Found) or 403 (Forbidden).
+
+ """
+
+
+ # create the document generator
+ doc = Document(None)
+ ms=doc.createElement("D:multistatus")
+ ms.setAttribute("xmlns:D","DAV:")
+ doc.appendChild(ms)
+
+ if self.__depth=="0":
+ gp,bp=self.get_propvalues(self.__uri)
+ res=self.mk_prop_response(self.__uri,gp,bp,doc)
+ ms.appendChild(res)
+
+ elif self.__depth=="1":
+ gp,bp=self.get_propvalues(self.__uri)
+ res=self.mk_prop_response(self.__uri,gp,bp,doc)
+ ms.appendChild(res)
+
+ try:
+ for newuri in self.__dataclass.get_childs(self.__uri):
+ gp,bp=self.get_propvalues(newuri)
+ res=self.mk_prop_response(newuri,gp,bp,doc)
+ ms.appendChild(res)
+ except DAV_NotFound:
+ # If no children, never mind.
+ pass
+
+ sfile=StringIO()
+ ext.PrettyPrint(doc,stream=sfile)
+ s=sfile.getvalue()
+ sfile.close()
+ return s
+
+
+ def mk_propname_response(self,uri,propnames,doc):
+ """ make a new result element for a PROPNAME request
+
+ This will simply format the propnames list.
+ propnames should have the format {NS1 : [prop1, prop2, ...], NS2: ...}
+
+ """
+ re=doc.createElement("D:response")
+
+ # write href information
+ href=doc.createElement("D:href")
+ if self.use_full_urls:
+ huri=doc.createTextNode(uri)
+ else:
+ uparts=urlparse.urlparse(uri)
+ fileloc=uparts[2]
+ huri=doc.createTextNode(urllib.quote(fileloc.encode('utf8')))
+ href.appendChild(huri)
+ re.appendChild(href)
+
+ ps=doc.createElement("D:propstat")
+ nsnum=0
+
+ for ns,plist in propnames.items():
+ # write prop element
+ pr=doc.createElement("D:prop")
+ nsp="ns"+str(nsnum)
+ pr.setAttribute("xmlns:"+nsp,ns)
+ nsnum=nsnum+1
+
+ # write propertynames
+ for p in plist:
+ pe=doc.createElement(nsp+":"+p)
+ pr.appendChild(pe)
+
+ ps.appendChild(pr)
+
+ re.appendChild(ps)
+
+ return re
+
+ def mk_prop_response(self,uri,good_props,bad_props,doc):
+ """ make a new result element
+
+ We differ between the good props and the bad ones for
+ each generating an extra -Node (for each error
+ one, that means).
+
+ """
+ re=doc.createElement("D:response")
+ # append namespaces to response
+ nsnum=0
+ for nsname in self.namespaces:
+ re.setAttribute("xmlns:ns"+str(nsnum),nsname)
+ nsnum=nsnum+1
+
+ # write href information
+ href=doc.createElement("D:href")
+ if self.use_full_urls:
+ huri=doc.createTextNode(uri)
+ else:
+ uparts=urlparse.urlparse(uri)
+ fileloc=uparts[2]
+ huri=doc.createTextNode(urllib.quote(fileloc.encode('utf8')))
+ href.appendChild(huri)
+ re.appendChild(href)
+
+ # write good properties
+ if good_props and len(good_props.items()):
+ ps=doc.createElement("D:propstat")
+
+ gp=doc.createElement("D:prop")
+ for ns in good_props.keys():
+ ns_prefix="ns"+str(self.namespaces.index(ns))+":"
+ for p,v in good_props[ns].items():
+ pe=doc.createElement(ns_prefix+str(p))
+ if v == None:
+ pass
+ elif ns=='DAV:' and p=="resourcetype":
+ if v == 1:
+ ve=doc.createElement("D:collection")
+ pe.appendChild(ve)
+ elif isinstance(v,tuple) and v[1] == ns:
+ ve=doc.createElement(ns_prefix+v[0])
+ pe.appendChild(ve)
+ else:
+ ve=doc.createTextNode(utf8str(v))
+ pe.appendChild(ve)
+
+ gp.appendChild(pe)
+ if gp.hasChildNodes():
+ re.appendChild(ps)
+ ps.appendChild(gp)
+ s=doc.createElement("D:status")
+ t=doc.createTextNode("HTTP/1.1 200 OK")
+ s.appendChild(t)
+ ps.appendChild(s)
+ re.appendChild(ps)
+
+ # now write the errors!
+ if len(bad_props.items()):
+
+ # write a propstat for each error code
+ for ecode in bad_props.keys():
+ ps=doc.createElement("D:propstat")
+ re.appendChild(ps)
+ bp=doc.createElement("D:prop")
+ ps.appendChild(bp)
+
+ for ns in bad_props[ecode].keys():
+ ns_prefix="ns"+str(self.namespaces.index(ns))+":"
+
+ for p in bad_props[ecode][ns]:
+ pe=doc.createElement(ns_prefix+str(p))
+ bp.appendChild(pe)
+
+ s=doc.createElement("D:status")
+ t=doc.createTextNode(utils.gen_estring(ecode))
+ s.appendChild(t)
+ ps.appendChild(s)
+ re.appendChild(ps)
+
+ # return the new response element
+ return re
+
+ def get_propvalues(self,uri):
+ """ create lists of property values for an URI
+
+ We create two lists for an URI: the properties for
+ which we found a value and the ones for which we
+ only got an error, either because they haven't been
+ found or the user is not allowed to read them.
+
+ """
+ good_props={}
+ bad_props={}
+
+ for (ns,plist) in self.proplist.items():
+ good_props[ns]={}
+ bad_props={}
+ ec = 0
+ for prop in plist:
+ try:
+ ec = 0
+ r=self.__dataclass.get_prop(uri,ns,prop)
+ good_props[ns][prop]=r
+ except DAV_Error, error_code:
+ ec=error_code[0]
+
+ # ignore props with error_code if 0 (invisible)
+ if ec==0: continue
+
+ if bad_props.has_key(ec):
+ if bad_props[ec].has_key(ns):
+ bad_props[ec][ns].append(prop)
+ else:
+ bad_props[ec][ns]=[prop]
+ else:
+ bad_props[ec]={ns:[prop]}
+
+ return good_props, bad_props
+
diff --git a/addons/document_webdav/DAV/status.py b/addons/document_webdav/DAV/status.py
new file mode 100644
index 00000000000..62cb323c4fb
--- /dev/null
+++ b/addons/document_webdav/DAV/status.py
@@ -0,0 +1,31 @@
+"""
+
+status codes for DAV services
+
+
+"""
+
+
+STATUS_CODES={
+ 102: "Processing",
+ 200: "Ok",
+ 201: "Created",
+ 204: "No Content",
+ 207: "Multi-Status",
+ 201: "Created",
+ 400: "Bad Request",
+ 403: "Forbidden",
+ 404: "Not Found",
+ 405: "Method Not Allowed",
+ 409: "Conflict",
+ 412: "Precondition failed",
+ 423: "Locked",
+ 415: "Unsupported Media Type",
+ 507: "Insufficient Storage",
+ 422: "Unprocessable Entity",
+ 423: "Locked",
+ 424: "Failed Dependency",
+ 502: "Bad Gateway",
+ 507: "Insufficient Storage",
+ 999: "Some error in Create Method please check the data of create method"
+}
diff --git a/addons/document_webdav/DAV/utils.py b/addons/document_webdav/DAV/utils.py
new file mode 100755
index 00000000000..a764a6d96c9
--- /dev/null
+++ b/addons/document_webdav/DAV/utils.py
@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+
+"""
+
+UTILITIES
+
+- parse a propfind request body into a list of props
+
+"""
+
+from xml.dom import ext
+from xml.dom.Document import Document
+from xml.dom.ext.reader import PyExpat
+from xml.dom import Node
+from xml.dom import NodeIterator, NodeFilter
+
+from string import lower, split, atoi, joinfields
+import urlparse
+from StringIO import StringIO
+
+from constants import RT_ALLPROP, RT_PROPNAME, RT_PROP
+from status import STATUS_CODES
+
+VERSION = '0.6'
+AUTHOR = 'Simon Pamies '
+
+
+def gen_estring(ecode):
+ """ generate an error string from the given code """
+ ec=atoi(str(ecode))
+ if STATUS_CODES.has_key(ec):
+ return "HTTP/1.1 %s %s" %(ec,STATUS_CODES[ec])
+ else:
+ return "HTTP/1.1 %s" %(ec)
+
+def parse_propfind(xml_doc):
+ """ parse an propfind xml file and return a list of props
+
+ returns:
+
+ request_type -- ALLPROP, PROPNAME, PROP
+ proplist -- list of properties found
+ namespaces -- list of namespaces found
+
+ """
+ doc = PyExpat.Reader().fromString(xml_doc)
+ snit = doc.createNodeIterator(doc, NodeFilter.NodeFilter.SHOW_ELEMENT, None, None)
+
+ request_type=None
+ props={}
+ namespaces=[]
+
+ while 1:
+ curr_elem = snit.nextNode()
+ if not curr_elem: break
+ ename=fname=lower(curr_elem.nodeName)
+ if ":" in fname:
+ ename=split(fname,":")[1]
+ if ename=="prop": request_type=RT_PROP; continue
+ if ename=="propfind": continue
+ if ename=="allprop": request_type=RT_ALLPROP; continue
+ if ename=="propname": request_type=RT_PROPNAME; continue
+
+ # rest should be names of attributes
+
+ ns = curr_elem.namespaceURI
+ if props.has_key(ns):
+ props[ns].append(ename)
+ else:
+ props[ns]=[ename]
+ namespaces.append(ns)
+
+ return request_type,props,namespaces
+
+
+def create_treelist(dataclass,uri):
+ """ create a list of resources out of a tree
+
+ This function is used for the COPY, MOVE and DELETE methods
+
+ uri - the root of the subtree to flatten
+
+ It will return the flattened tree as list
+
+ """
+ queue=[uri]
+ list=[uri]
+ while len(queue):
+ element=queue[-1]
+ if dataclass.is_collection(element):
+ childs=dataclass.get_childs(element)
+ else:
+ childs=[]
+ if len(childs):
+ list=list+childs
+ # update queue
+ del queue[-1]
+ if len(childs):
+ queue=queue+childs
+ return list
+
+def is_prefix(uri1,uri2):
+ """ returns 1 of uri1 is a prefix of uri2 """
+ if uri2[:len(uri1)]==uri1:
+ return 1
+ else:
+ return None
+
+def quote_uri(uri):
+ """ quote an URL but not the protocol part """
+ import urlparse
+ import urllib
+
+ up=urlparse.urlparse(uri)
+ np=urllib.quote(up[2])
+ return urlparse.urlunparse((up[0],up[1],np,up[3],up[4],up[5]))
+
+def get_uriparentpath(uri):
+ """ extract the uri path and remove the last element """
+ up=urlparse.urlparse(uri)
+ return joinfields(split(up[2],"/")[:-1],"/")
+
+def get_urifilename(uri):
+ """ extract the uri path and return the last element """
+ up=urlparse.urlparse(uri)
+ return split(up[2],"/")[-1]
+
+def get_parenturi(uri):
+ """ return the parent of the given resource"""
+ up=urlparse.urlparse(uri)
+ np=joinfields(split(up[2],"/")[:-1],"/")
+ return urlparse.urlunparse((up[0],up[1],np,up[3],up[4],up[5]))
+
+### XML utilities
+
+def make_xmlresponse(result):
+ """ construct a response from a dict of uri:error_code elements """
+ doc = Document.Document(None)
+ ms=doc.createElement("D:multistatus")
+ ms.setAttribute("xmlns:D","DAV:")
+ doc.appendChild(ms)
+
+ for el,ec in result.items():
+ re=doc.createElement("D:response")
+ hr=doc.createElement("D:href")
+ st=doc.createElement("D:status")
+ huri=doc.createTextNode(quote_uri(el))
+ t=doc.createTextNode(gen_estring(ec))
+ st.appendChild(t)
+ hr.appendChild(huri)
+ re.appendChild(hr)
+ re.appendChild(st)
+ ms.appendChild(re)
+
+ sfile=StringIO()
+ ext.PrettyPrint(doc,stream=sfile)
+ s=sfile.getvalue()
+ sfile.close()
+ return s
+
diff --git a/addons/document_webdav/__init__.py b/addons/document_webdav/__init__.py
new file mode 100644
index 00000000000..08701e920d2
--- /dev/null
+++ b/addons/document_webdav/__init__.py
@@ -0,0 +1,29 @@
+##############################################################################
+#
+# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
+# Fabien Pinckaers
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+import webdav_server
diff --git a/addons/document_webdav/__terp__.py b/addons/document_webdav/__terp__.py
new file mode 100644
index 00000000000..ce11511d0fa
--- /dev/null
+++ b/addons/document_webdav/__terp__.py
@@ -0,0 +1,47 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2004 TINY SPRL. (http://tiny.be), 2009 P. Christeas
+# All Rights Reserved.
+# Fabien Pinckaers
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+{
+ "name" : "WebDAV server for Document Management",
+ "version" : "2.0",
+ "author" : "Tiny",
+ "category" : "Generic Modules/Others",
+ "website": "http://www.openerp.com",
+ "description": """ With this module, the WebDAV server for the documents is activated. You can then use any compatible browser to remotely see the attachments of OpenObject.
+
+ After installation, the webDAV server can be controlled by a [webdav] section in the server's config.
+""",
+ "depends" : ["base", "document"],
+ "init_xml" : [],
+ "update_xml" : [],
+ "demo_xml" : [],
+ "active": False,
+ "installable": True
+}
diff --git a/addons/document_webdav/cache.py b/addons/document_webdav/cache.py
new file mode 100644
index 00000000000..bc75114c4ae
--- /dev/null
+++ b/addons/document_webdav/cache.py
@@ -0,0 +1,39 @@
+import time
+import heapq
+
+def memoize(maxsize):
+ """decorator to 'memoize' a function - caching its results"""
+ def decorating_function(f):
+ cache = {} # map from key to value
+ heap = [] # list of keys, in LRU heap
+ cursize = 0 # because len() is slow
+ def wrapper(*args):
+ key = repr(args)
+ # performance crap
+ _cache=cache
+ _heap=heap
+ _heappop = heapq.heappop
+ _heappush = heapq.heappush
+ _time = time.time
+ _cursize = cursize
+ _maxsize = maxsize
+ if not _cache.has_key(key):
+ if _cursize == _maxsize:
+ # pop oldest element
+ (_,oldkey) = _heappop(_heap)
+ _cache.pop(oldkey)
+ else:
+ _cursize += 1
+ # insert this element
+ _cache[key] = f(*args)
+ _heappush(_heap,(_time(),key))
+ wrapper.misses += 1
+ else:
+ wrapper.hits += 1
+ return cache[key]
+ wrapper.__doc__ = f.__doc__
+ wrapper.__name__ = f.__name__
+ wrapper.hits = wrapper.misses = 0
+ return wrapper
+ return decorating_function
+
diff --git a/addons/document_webdav/dav_fs.py b/addons/document_webdav/dav_fs.py
new file mode 100644
index 00000000000..4cd4b2d6405
--- /dev/null
+++ b/addons/document_webdav/dav_fs.py
@@ -0,0 +1,653 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
+# Fabien Pinckaers
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+import pooler
+
+import base64
+import sys
+import os
+import time
+from string import joinfields, split, lower
+
+from service import security
+
+import netsvc
+import urlparse
+
+from DAV.constants import COLLECTION, OBJECT
+from DAV.errors import *
+from DAV.iface import *
+import urllib
+
+from DAV.davcmd import copyone, copytree, moveone, movetree, delone, deltree
+
+from cache import memoize
+
+CACHE_SIZE=20000
+
+#hack for urlparse: add webdav in the net protocols
+urlparse.uses_netloc.append('webdav')
+urlparse.uses_netloc.append('webdavs')
+
+class tinydav_handler(dav_interface):
+ """
+ This class models a Tiny ERP interface for the DAV server
+ """
+ PROPS={'DAV:': dav_interface.PROPS['DAV:'], }
+
+ M_NS={ "DAV:" : dav_interface.M_NS['DAV:'], }
+
+ def __init__(self, parent, verbose=False):
+ self.db_name = False
+ self.directory_id=False
+ self.db_name_list=[]
+ self.parent = parent
+ self.baseuri = parent.baseuri
+
+ def get_propnames(self,uri):
+ props = self.PROPS
+ self.parent.log_message('get propnames: %s' % uri)
+ if uri[-1]=='/':uri=uri[:-1]
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ if not dbname:
+ cr.close()
+ return props
+ node = self.uri2object(cr,uid,pool, uri2)
+ if node:
+ props.update(node.get_dav_props(cr))
+ cr.close()
+ return props
+
+ def get_prop(self,uri,ns,propname):
+ """ return the value of a given property
+
+ uri -- uri of the object to get the property of
+ ns -- namespace of the property
+ pname -- name of the property
+ """
+ if self.M_NS.has_key(ns):
+ return dav_interface.get_prop(self,uri,ns,propname)
+
+ if uri[-1]=='/':uri=uri[:-1]
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ if not dbname:
+ cr.close()
+ raise DAV_NotFound
+ node = self.uri2object(cr,uid,pool, uri2)
+ if not node:
+ cr.close()
+ raise DAV_NotFound
+ res = node.get_dav_eprop(cr,ns,propname)
+ cr.close()
+ return res
+
+#
+# def get_db(self,uri):
+# names=self.uri2local(uri).split('/')
+# self.db_name=False
+# if len(names) > 1:
+# self.db_name=self.uri2local(uri).split('/')[1]
+# if self.db_name=='':
+# raise Exception,'Plese specify Database name in folder'
+# return self.db_name
+#
+
+ def later_get_db_from_path(self,path):
+ return "aaa"
+
+ def urijoin(self,*ajoin):
+ """ Return the base URI of this request, or even join it with the
+ ajoin path elements
+ """
+ return self.baseuri+ '/'.join(ajoin)
+
+ @memoize(4)
+ def db_list(self):
+ s = netsvc.LocalService('db')
+ result = s.list()
+ self.db_name_list=[]
+ for db_name in result:
+ db = pooler.get_db_only(db_name)
+ cr = db.cursor()
+ cr.execute("select id from ir_module_module where name = 'document' and state='installed' ")
+ res=cr.fetchone()
+ if res and len(res):
+ self.db_name_list.append(db_name)
+ cr.close()
+ return self.db_name_list
+
+ def get_childs(self,uri):
+ """ return the child objects as self.baseuris for the given URI """
+ self.parent.log_message('get childs: %s' % uri)
+ if uri[-1]=='/':uri=uri[:-1]
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+
+ if not dbname:
+ s = netsvc.LocalService('db')
+ return map(lambda x: self.urijoin(x), self.db_list())
+ result = []
+ node = self.uri2object(cr,uid,pool, uri2[:])
+ if not node:
+ cr.close()
+ raise DAV_NotFound(uri2)
+ else:
+ fp = node.full_path()
+ if fp and len(fp):
+ self.parent.log_message('childs: @%s' % fp)
+ fp = '/'.join(fp)
+ else:
+ fp = None
+ for d in node.children(cr):
+ self.parent.log_message('child: %s' % d.path)
+ if fp:
+ result.append( self.urijoin(dbname,fp,d.path) )
+ else:
+ result.append( self.urijoin(dbname,d.path) )
+ cr.close()
+ return result
+
+ def uri2local(self, uri):
+ uparts=urlparse.urlparse(uri)
+ reluri=uparts[2]
+ if reluri and reluri[-1]=="/":
+ reluri=reluri[:-1]
+ return reluri
+
+ #
+ # pos: -1 to get the parent of the uri
+ #
+ def get_cr(self, uri):
+ pdb = self.parent.auth_proxy.last_auth
+ reluri = self.uri2local(uri)
+ try:
+ dbname = reluri.split('/')[2]
+ except:
+ dbname = False
+ if not dbname:
+ return None, None, None, False, None
+ if not pdb and dbname:
+ # if dbname was in our uri, we should have authenticated
+ # against that.
+ raise Exception("Programming error")
+ assert pdb == dbname, " %s != %s" %(pdb, dbname)
+ user, passwd, dbn2, uid = self.parent.auth_proxy.auth_creds[pdb]
+ db,pool = pooler.get_db_and_pool(dbname)
+ cr = db.cursor()
+ uri2 = reluri.split('/')[3:]
+ return cr, uid, pool, dbname, uri2
+
+ def uri2object(self, cr,uid, pool,uri):
+ if not uid:
+ return None
+ return pool.get('document.directory').get_object(cr, uid, uri)
+
+ def get_data(self,uri):
+ self.parent.log_message('GET: %s' % uri)
+ if uri[-1]=='/':uri=uri[:-1]
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ try:
+ if not dbname:
+ raise DAV_Error, 409
+ node = self.uri2object(cr,uid,pool, uri2)
+ if not node:
+ raise DAV_NotFound(uri2)
+ try:
+ datas = node.get_data(cr)
+ except TypeError,e:
+ import traceback
+ self.parent.log_error("GET typeError: %s", str(e))
+ self.parent.log_message("Exc: %s",traceback.format_exc())
+ raise DAV_Forbidden
+ except IndexError,e :
+ self.parent.log_error("GET IndexError: %s", str(e))
+ raise DAV_NotFound(uri2)
+ except Exception,e:
+ import traceback
+ self.parent.log_error("GET exception: %s",str(e))
+ self.parent.log_message("Exc: %s", traceback.format_exc())
+ raise DAV_Error, 409
+ return datas
+ finally:
+ cr.close()
+
+ @memoize(CACHE_SIZE)
+ def _get_dav_resourcetype(self,uri):
+ """ return type of object """
+ self.parent.log_message('get RT: %s' % uri)
+ if uri[-1]=='/':uri=uri[:-1]
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ try:
+ if not dbname:
+ return COLLECTION
+ node = self.uri2object(cr,uid,pool, uri2)
+ if not node:
+ raise DAV_NotFound(uri2)
+ if node.type in ('collection','database'):
+ return COLLECTION
+ return OBJECT
+ finally:
+ cr.close()
+
+ def _get_dav_displayname(self,uri):
+ self.parent.log_message('get DN: %s' % uri)
+ if uri[-1]=='/':uri=uri[:-1]
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ if not dbname:
+ cr.close()
+ return COLLECTION
+ node = self.uri2object(cr,uid,pool, uri2)
+ if not node:
+ cr.close()
+ raise DAV_NotFound(uri2)
+ cr.close()
+ return node.displayname
+
+ @memoize(CACHE_SIZE)
+ def _get_dav_getcontentlength(self,uri):
+ """ return the content length of an object """
+ self.parent.log_message('get length: %s' % uri)
+ if uri[-1]=='/':uri=uri[:-1]
+ result = 0
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ if not dbname:
+ cr.close()
+ return '0'
+ node = self.uri2object(cr, uid, pool, uri2)
+ if not node:
+ cr.close()
+ raise DAV_NotFound(uri2)
+ result = node.content_length or 0
+ cr.close()
+ return str(result)
+
+ @memoize(CACHE_SIZE)
+ def _get_dav_getetag(self,uri):
+ """ return the ETag of an object """
+ self.parent.log_message('get etag: %s' % uri)
+ if uri[-1]=='/':uri=uri[:-1]
+ result = 0
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ if not dbname:
+ cr.close()
+ return '0'
+ node = self.uri2object(cr, uid, pool, uri2)
+ if not node:
+ cr.close()
+ raise DAV_NotFound(uri2)
+ result = node.get_etag(cr)
+ cr.close()
+ return str(result)
+
+ @memoize(CACHE_SIZE)
+ def get_lastmodified(self,uri):
+ """ return the last modified date of the object """
+ if uri[-1]=='/':uri=uri[:-1]
+ today = time.time()
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ try:
+ if not dbname:
+ return today
+ node = self.uri2object(cr,uid,pool, uri2)
+ if not node:
+ raise DAV_NotFound(uri2)
+ if node.write_date:
+ return time.mktime(time.strptime(node.write_date,'%Y-%m-%d %H:%M:%S'))
+ else:
+ return today
+ finally:
+ cr.close()
+
+ @memoize(CACHE_SIZE)
+ def get_creationdate(self,uri):
+ """ return the last modified date of the object """
+
+ if uri[-1]=='/':uri=uri[:-1]
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ try:
+ if not dbname:
+ raise DAV_Error, 409
+ node = self.uri2object(cr,uid,pool, uri2)
+ if not node:
+ raise DAV_NotFound(uri2)
+ if node.create_date:
+ result = time.strptime(node.create_date,'%Y-%m-%d %H:%M:%S')
+ else:
+ result = time.gmtime()
+ return result
+ finally:
+ cr.close()
+
+ @memoize(CACHE_SIZE)
+ def _get_dav_getcontenttype(self,uri):
+ self.parent.log_message('get contenttype: %s' % uri)
+ if uri[-1]=='/':uri=uri[:-1]
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ try:
+ if not dbname:
+ return 'httpd/unix-directory'
+ node = self.uri2object(cr,uid,pool, uri2)
+ if not node:
+ raise DAV_NotFound(uri2)
+
+ result = 'application/octet-stream'
+ #if node.type=='collection':
+ #result ='httpd/unix-directory'
+ #else:
+ result = node.mimetype
+ return result
+ #raise DAV_NotFound, 'Could not find %s' % path
+ finally:
+ cr.close()
+
+ def mkcol(self,uri):
+ """ create a new collection """
+ self.parent.log_message('MKCOL: %s' % uri)
+ if uri[-1]=='/':uri=uri[:-1]
+ parent='/'.join(uri.split('/')[:-1])
+ if not parent.startswith(self.baseuri):
+ parent=self.baseuri + ''.join(parent[1:])
+ if not uri.startswith(self.baseuri):
+ uri=self.baseuri + ''.join(uri[1:])
+
+
+ cr, uid, pool,dbname, uri2 = self.get_cr(uri)
+ if not dbname:
+ raise DAV_Error, 409
+ node = self.uri2object(cr,uid,pool, uri2[:-1])
+ object2=node and node.object2 or False
+ object=node and node.object or False
+
+ objname = uri2[-1]
+ if not object:
+ pool.get('document.directory').create(cr, uid, {
+ 'name': objname,
+ 'parent_id': False,
+ 'ressource_type_id': False,
+ 'ressource_id': False
+ })
+ else:
+ pool.get('document.directory').create(cr, uid, {
+ 'name': objname,
+ 'parent_id': object.id,
+ 'ressource_type_id': object.ressource_type_id.id,
+ 'ressource_id': object2 and object2.id or False
+ })
+
+ cr.commit()
+ cr.close()
+ return True
+
+ def put(self,uri,data,content_type=None):
+ """ put the object into the filesystem """
+ self.parent.log_message('Putting %s (%d), %s'%( unicode(uri,'utf8'), len(data), content_type))
+ parent='/'.join(uri.split('/')[:-1])
+ cr, uid, pool,dbname, uri2 = self.get_cr(uri)
+ if not dbname:
+ raise DAV_Forbidden
+ try:
+ node = self.uri2object(cr,uid,pool, uri2[:])
+ except:
+ node = False
+ objname = uri2[-1]
+ ext = objname.find('.') >0 and objname.split('.')[1] or False
+
+ if not node:
+ dir_node = self.uri2object(cr,uid,pool, uri2[:-1])
+ if not dir_node:
+ raise DAV_NotFound('Parent folder not found')
+ try:
+ dir_node.create_child(cr,objname,data)
+ except Exception,e:
+ import traceback
+ self.parent.log_error("Cannot create %s: %s", objname, str(e))
+ self.parent.log_message("Exc: %s",traceback.format_exc())
+ raise DAV_Forbidden
+ else:
+ try:
+ node.set_data(cr,data)
+ except Exception,e:
+ import traceback
+ self.parent.log_error("Cannot save %s: %s", objname, str(e))
+ self.parent.log_message("Exc: %s",traceback.format_exc())
+ raise DAV_Forbidden
+
+ cr.commit()
+
+ return 201
+
+ def rmcol(self,uri):
+ """ delete a collection """
+ if uri[-1]=='/':uri=uri[:-1]
+
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ if True or not dbname: # *-*
+ raise DAV_Error, 409
+ node = self.uri2object(cr,uid,pool, uri2)
+ object2=node and node.object2 or False
+ object=node and node.object or False
+ if object._table_name=='document.directory':
+ if object.child_ids:
+ raise DAV_Forbidden # forbidden
+ if object.file_ids:
+ raise DAV_Forbidden # forbidden
+ res = pool.get('document.directory').unlink(cr, uid, [object.id])
+
+ cr.commit()
+ cr.close()
+ return 204
+
+ def rm(self,uri):
+ if uri[-1]=='/':uri=uri[:-1]
+
+ object=False
+ cr, uid, pool,dbname, uri2 = self.get_cr(uri)
+ #if not dbname:
+ if True:
+ raise DAV_Error, 409
+ node = self.uri2object(cr,uid,pool, uri2)
+ object2=node and node.object2 or False
+ object=node and node.object or False
+ if not object:
+ raise DAV_NotFound
+
+ self.parent.log_message(' rm %s "%s"'%(object._table_name,uri))
+ if object._table_name=='ir.attachment':
+ res = pool.get('ir.attachment').unlink(cr, uid, [object.id])
+ else:
+ raise DAV_Forbidden # forbidden
+ parent='/'.join(uri.split('/')[:-1])
+ cr.commit()
+ cr.close()
+ return 204
+
+ ### DELETE handlers (examples)
+ ### (we use the predefined methods in davcmd instead of doing
+ ### a rm directly
+ ###
+
+ def delone(self,uri):
+ """ delete a single resource
+
+ You have to return a result dict of the form
+ uri:error_code
+ or None if everything's ok
+
+ """
+ if uri[-1]=='/':uri=uri[:-1]
+ res=delone(self,uri)
+ parent='/'.join(uri.split('/')[:-1])
+ return res
+
+ def deltree(self,uri):
+ """ delete a collection
+
+ You have to return a result dict of the form
+ uri:error_code
+ or None if everything's ok
+ """
+ if uri[-1]=='/':uri=uri[:-1]
+ res=deltree(self,uri)
+ parent='/'.join(uri.split('/')[:-1])
+ return res
+
+
+ ###
+ ### MOVE handlers (examples)
+ ###
+
+ def moveone(self,src,dst,overwrite):
+ """ move one resource with Depth=0
+
+ an alternative implementation would be
+
+ result_code=201
+ if overwrite:
+ result_code=204
+ r=os.system("rm -f '%s'" %dst)
+ if r: return 412
+ r=os.system("mv '%s' '%s'" %(src,dst))
+ if r: return 412
+ return result_code
+
+ (untested!). This would not use the davcmd functions
+ and thus can only detect errors directly on the root node.
+ """
+ res=moveone(self,src,dst,overwrite)
+ return res
+
+ def movetree(self,src,dst,overwrite):
+ """ move a collection with Depth=infinity
+
+ an alternative implementation would be
+
+ result_code=201
+ if overwrite:
+ result_code=204
+ r=os.system("rm -rf '%s'" %dst)
+ if r: return 412
+ r=os.system("mv '%s' '%s'" %(src,dst))
+ if r: return 412
+ return result_code
+
+ (untested!). This would not use the davcmd functions
+ and thus can only detect errors directly on the root node"""
+
+ res=movetree(self,src,dst,overwrite)
+ return res
+
+ ###
+ ### COPY handlers
+ ###
+
+ def copyone(self,src,dst,overwrite):
+ """ copy one resource with Depth=0
+
+ an alternative implementation would be
+
+ result_code=201
+ if overwrite:
+ result_code=204
+ r=os.system("rm -f '%s'" %dst)
+ if r: return 412
+ r=os.system("cp '%s' '%s'" %(src,dst))
+ if r: return 412
+ return result_code
+
+ (untested!). This would not use the davcmd functions
+ and thus can only detect errors directly on the root node.
+ """
+ res=copyone(self,src,dst,overwrite)
+ return res
+
+ def copytree(self,src,dst,overwrite):
+ """ copy a collection with Depth=infinity
+
+ an alternative implementation would be
+
+ result_code=201
+ if overwrite:
+ result_code=204
+ r=os.system("rm -rf '%s'" %dst)
+ if r: return 412
+ r=os.system("cp -r '%s' '%s'" %(src,dst))
+ if r: return 412
+ return result_code
+
+ (untested!). This would not use the davcmd functions
+ and thus can only detect errors directly on the root node"""
+ res=copytree(self,src,dst,overwrite)
+ return res
+
+ ###
+ ### copy methods.
+ ### This methods actually copy something. low-level
+ ### They are called by the davcmd utility functions
+ ### copytree and copyone (not the above!)
+ ### Look in davcmd.py for further details.
+ ###
+
+ def copy(self,src,dst):
+ src=urllib.unquote(src)
+ dst=urllib.unquote(dst)
+ ct = self._get_dav_getcontenttype(src)
+ data = self.get_data(src)
+ self.put(dst,data,ct)
+ return 201
+
+ def copycol(self,src,dst):
+ """ copy a collection.
+
+ As this is not recursive (the davserver recurses itself)
+ we will only create a new directory here. For some more
+ advanced systems we might also have to copy properties from
+ the source to the destination.
+ """
+ print " copy a collection."
+ return self.mkcol(dst)
+
+
+ def exists(self,uri):
+ """ test if a resource exists """
+ result = False
+ cr, uid, pool,dbname, uri2 = self.get_cr(uri)
+ if not dbname:
+ return True
+ try:
+ node = self.uri2object(cr,uid,pool, uri2)
+ if node:
+ result = True
+ except:
+ pass
+ cr.close()
+ return result
+
+ @memoize(CACHE_SIZE)
+ def is_collection(self,uri):
+ """ test if the given uri is a collection """
+ return self._get_dav_resourcetype(uri)==COLLECTION
diff --git a/addons/document_webdav/i18n/document_webdav.pot b/addons/document_webdav/i18n/document_webdav.pot
new file mode 100644
index 00000000000..e5ebe893fc7
--- /dev/null
+++ b/addons/document_webdav/i18n/document_webdav.pot
@@ -0,0 +1,26 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * document_webdav_old
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.0\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-05-30 15:14:08+0000\n"
+"PO-Revision-Date: 2009-05-30 15:14:08+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: document_webdav_old
+#: model:ir.module.module,description:document_webdav_old.module_meta_information
+msgid "This is a complete document management system:\n"
+" * WebDav Interface\n"
+" * User Authentification\n"
+" * Document Indexation\n"
+""
+msgstr ""
+
diff --git a/addons/document_webdav/webdav_server.py b/addons/document_webdav/webdav_server.py
new file mode 100644
index 00000000000..f04315e13c9
--- /dev/null
+++ b/addons/document_webdav/webdav_server.py
@@ -0,0 +1,80 @@
+# -*- encoding: utf-8 -*-
+
+#
+# Copyright P. Christeas 2008,2009
+#
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+###############################################################################
+
+
+import netsvc
+from dav_fs import tinydav_handler
+from tools.config import config
+from DAV.WebDAVServer import DAVRequestHandler
+from service.websrv_lib import HTTPDir,FixSendError
+
+class DAVHandler(FixSendError,DAVRequestHandler):
+ verbose = False
+
+ def get_userinfo(self,user,pw):
+ print "get_userinfo"
+ return False
+ def _log(self, message):
+ netsvc.Logger().notifyChannel("webdav",netsvc.LOG_DEBUG,message)
+
+ def handle(self):
+ pass
+
+ def finish(self):
+ pass
+
+ def setup(self):
+ davpath = '/'+config.get_misc('webdav','vdir','webdav')+'/'
+ self.baseuri = "http://%s:%d%s"% (self.server.server_name,self.server.server_port,davpath)
+ self.IFACE_CLASS = tinydav_handler(self)
+ pass
+
+ def log_message(self, format, *args):
+ netsvc.Logger().notifyChannel('webdav',netsvc.LOG_DEBUG_RPC,format % args)
+
+ def log_error(self, format, *args):
+ netsvc.Logger().notifyChannel('xmlrpc',netsvc.LOG_WARNING,format % args)
+
+
+try:
+ from service.http_server import reg_http_service,OpenERPAuthProvider
+ if (config.get_misc('webdav','enable',False)):
+ davpath = '/'+config.get_misc('webdav','vdir','webdav')+'/'
+ handler = DAVHandler
+ handler.verbose = config.get_misc('webdav','verbose',True)
+ handler.debug = config.get_misc('webdav','debug',True)
+ reg_http_service(HTTPDir(davpath,DAVHandler,OpenERPAuthProvider()))
+ netsvc.Logger().notifyChannel('webdav',netsvc.LOG_INFO,"WebDAV service registered at path: %s/ "% davpath)
+except Exception, e:
+ logger = netsvc.Logger()
+ logger.notifyChannel('webdav', netsvc.LOG_ERROR, 'Cannot launch webdav: %s' % e)
+
+#eof
+
+
+
diff --git a/addons/hr/hr_department.py b/addons/hr/hr_department.py
index 8c424fab8a6..907bc55a435 100644
--- a/addons/hr/hr_department.py
+++ b/addons/hr/hr_department.py
@@ -150,4 +150,4 @@ class res_users(osv.osv):
res_users()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/hr/i18n/pt.po b/addons/hr/i18n/pt.po
index 65a02fa4e19..f4dafca741c 100644
--- a/addons/hr/i18n/pt.po
+++ b/addons/hr/i18n/pt.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:23+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-29 23:21+0000\n"
+"Last-Translator: Paulino \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: 2009-11-18 04:42+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr
@@ -57,7 +57,7 @@ msgstr "Ascendentes"
#. module: hr
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nome de modelo inválido na definição da acção"
#. module: hr
#: view:hr.department:0
diff --git a/addons/hr/i18n/sl.po b/addons/hr/i18n/sl.po
index 7c060790e03..60aa7a7cbb5 100644
--- a/addons/hr/i18n/sl.po
+++ b/addons/hr/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:23+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 13:24+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:42+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr
@@ -42,7 +42,7 @@ msgstr ""
#: model:ir.module.module,shortdesc:hr.module_meta_information
#: model:ir.ui.menu,name:hr.menu_hr_root
msgid "Human Resources"
-msgstr ""
+msgstr "Človeški viri"
#. module: hr
#: selection:hr.timesheet,dayofweek:0
@@ -67,7 +67,7 @@ msgstr "Oddelek"
#. module: hr
#: model:process.transition,name:hr.process_transition_contactofemployee0
msgid "Contact of employee"
-msgstr ""
+msgstr "Stik za zaposlenega"
#. module: hr
#: field:hr.employee,work_email:0
@@ -174,7 +174,7 @@ msgstr ""
#. module: hr
#: field:hr.employee,child_ids:0
msgid "Subordinates"
-msgstr ""
+msgstr "Podrejeni"
#. module: hr
#: model:ir.ui.menu,name:hr.menu_hr_reporting
@@ -242,7 +242,7 @@ msgstr "Moški"
#. module: hr
#: model:process.transition,note:hr.process_transition_employeeuser0
msgid "Create openerp user"
-msgstr ""
+msgstr "Ustvari uporabnika OpenERP"
#. module: hr
#: view:hr.employee.category:0
@@ -258,7 +258,7 @@ msgstr "torek"
#. module: hr
#: model:ir.model,name:hr.model_hr_department
msgid "hr.department"
-msgstr ""
+msgstr "hr.department"
#. module: hr
#: field:hr.employee,user_id:0
@@ -315,7 +315,7 @@ msgstr "Aktiven"
#. module: hr
#: constraint:hr.employee:0
msgid "Error ! You cannot create recursive Hierarchy of Employees."
-msgstr ""
+msgstr "Napaka! Ne morete izdelati rekurzivne hierarhije zaposlencev."
#. module: hr
#: model:process.process,name:hr.process_process_employeecontractprocess0
@@ -325,7 +325,7 @@ msgstr ""
#. module: hr
#: model:process.node,note:hr.process_node_openerpuser0
msgid "Create OpenERP User"
-msgstr ""
+msgstr "Ustvari uporabnika OpenERP"
#. module: hr
#: model:process.node,note:hr.process_node_employee0
@@ -371,7 +371,7 @@ msgstr "Zakonski stan"
#. module: hr
#: model:ir.model,name:hr.model_hr_timesheet
msgid "Timesheet Line"
-msgstr ""
+msgstr "Postavka časovnice"
#. module: hr
#: view:hr.employee:0
@@ -430,7 +430,7 @@ msgstr "Državljanstvo"
#. module: hr
#: field:hr.employee,otherid:0
msgid "Other ID"
-msgstr ""
+msgstr "Druga oznaka (identifikator)"
#. module: hr
#: field:hr.timesheet,name:0
diff --git a/addons/hr_attendance/i18n/sl.po b/addons/hr_attendance/i18n/sl.po
index 58ebc3b3bcd..62a331a551f 100644
--- a/addons/hr_attendance/i18n/sl.po
+++ b/addons/hr_attendance/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:21+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 13:35+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:43+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_attendance
@@ -36,7 +36,7 @@ msgstr ""
#: model:ir.actions.wizard,name:hr_attendance.si_so
#: model:ir.ui.menu,name:hr_attendance.menu_si_so
msgid "Sign in / Sign out"
-msgstr ""
+msgstr "Prijava/Odjava"
#. module: hr_attendance
#: rml:report.hr.timesheet.attendance.error:0
@@ -64,12 +64,12 @@ msgstr ""
#: wizard_button:hr.si_so,init,so_test:0
#: wizard_button:hr.si_so,so_ask_si,so:0
msgid "Sign out"
-msgstr ""
+msgstr "Odjavi"
#. module: hr_attendance
#: rml:report.hr.timesheet.attendance.error:0
msgid "Delay"
-msgstr ""
+msgstr "Zakasnitev"
#. module: hr_attendance
#: wizard_field:hr.si_so,init,name:0
@@ -82,7 +82,7 @@ msgstr "Ime zaposlenega"
#: wizard_button:hr.attendance.print_month,init,print:0
#: wizard_button:hr.attendance.print_week,init,print:0
msgid "Print Timesheet"
-msgstr ""
+msgstr "Izpiši časovnico"
#. module: hr_attendance
#: model:ir.actions.wizard,name:hr_attendance.wizard_attendance_error
@@ -92,12 +92,12 @@ msgstr ""
#. module: hr_attendance
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Napačno ime modela v definiciji dejanja."
#. module: hr_attendance
#: model:ir.actions.wizard,name:hr_attendance.print_week
msgid "Print Timesheet by week"
-msgstr ""
+msgstr "Izpiši časovnico po tednih"
#. module: hr_attendance
#: field:hr.attendance,employee_id:0
@@ -119,28 +119,28 @@ msgstr ""
#: selection:hr.attendance,action:0
#: view:hr.employee:0
msgid "Sign In"
-msgstr ""
+msgstr "Prijava"
#. module: hr_attendance
#: rml:report.hr.timesheet.attendance.error:0
msgid "Total period:"
-msgstr ""
+msgstr "Skupaj obdobje:"
#. module: hr_attendance
#: field:hr.attendance,action_desc:0
#: model:ir.model,name:hr_attendance.model_hr_action_reason
msgid "Action reason"
-msgstr ""
+msgstr "Razlog dejanja"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "March"
-msgstr ""
+msgstr "marec"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "August"
-msgstr ""
+msgstr "avgust"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
@@ -150,28 +150,28 @@ msgstr ""
#. module: hr_attendance
#: wizard_field:hr.si_so,so_ask_si,last_time:0
msgid "Your last sign in"
-msgstr ""
+msgstr "Zadnja prijava"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "June"
-msgstr ""
+msgstr "junij"
#. module: hr_attendance
#: model:ir.actions.wizard,name:hr_attendance.print_month
msgid "Print Timesheet by month"
-msgstr ""
+msgstr "Izpiši časovnico po mesecu"
#. module: hr_attendance
#: selection:hr.attendance,action:0
#: view:hr.employee:0
msgid "Sign Out"
-msgstr ""
+msgstr "Odjavi"
#. module: hr_attendance
#: model:ir.module.module,shortdesc:hr_attendance.module_meta_information
msgid "Attendances Of Employees"
-msgstr ""
+msgstr "Prisotnost zaposlencev"
#. module: hr_attendance
#: field:hr.action.reason,name:0
@@ -186,7 +186,7 @@ msgstr ""
#. module: hr_attendance
#: rml:report.hr.timesheet.attendance.error:0
msgid "Date Signed"
-msgstr ""
+msgstr "Datum podpisa"
#. module: hr_attendance
#: field:hr.attendance,name:0
@@ -196,7 +196,7 @@ msgstr "Datum"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "July"
-msgstr ""
+msgstr "julij"
#. module: hr_attendance
#: wizard_view:hr.si_so,si_ask_so:0
@@ -229,17 +229,17 @@ msgstr "Odsoten"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "February"
-msgstr ""
+msgstr "februar"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "October"
-msgstr ""
+msgstr "oktober"
#. module: hr_attendance
#: wizard_field:hr.si_so,si_ask_so,last_time:0
msgid "Your last sign out"
-msgstr ""
+msgstr "Datum zadnje odjave"
#. module: hr_attendance
#: rml:report.hr.timesheet.attendance.error:0
@@ -261,7 +261,7 @@ msgstr ""
#: wizard_button:hr.si_so,init,si_test:0
#: wizard_button:hr.si_so,si_ask_so,si:0
msgid "Sign in"
-msgstr ""
+msgstr "Prijavi"
#. module: hr_attendance
#: wizard_view:hr.attendance.report,init:0
@@ -276,12 +276,12 @@ msgstr "Trenutno stanje"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "January"
-msgstr ""
+msgstr "januar"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "April"
-msgstr ""
+msgstr "april"
#. module: hr_attendance
#: model:ir.actions.act_window,name:hr_attendance.open_view_attendance
@@ -299,7 +299,7 @@ msgstr ""
#: field:hr.attendance,action:0
#: selection:hr.attendance,action:0
msgid "Action"
-msgstr ""
+msgstr "Dejanje"
#. module: hr_attendance
#: wizard_button:hr.attendance.report,init,print:0
@@ -315,7 +315,7 @@ msgstr ""
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "November"
-msgstr ""
+msgstr "november"
#. module: hr_attendance
#: wizard_view:hr.attendance.report,init:0
@@ -336,7 +336,7 @@ msgstr ""
#: wizard_field:hr.attendance.print_week,init,end_date:0
#: wizard_field:hr.attendance.report,init,end_date:0
msgid "Ending Date"
-msgstr ""
+msgstr "Končni datum"
#. module: hr_attendance
#: wizard_view:hr.si_so,so_ask_si:0
@@ -348,12 +348,12 @@ msgstr ""
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "September"
-msgstr ""
+msgstr "september"
#. module: hr_attendance
#: selection:hr.attendance.print_month,init,month:0
msgid "December"
-msgstr ""
+msgstr "december"
#. module: hr_attendance
#: view:hr.attendance:0
@@ -363,12 +363,12 @@ msgstr "Prisotnost zaposlenega"
#. module: hr_attendance
#: wizard_view:hr.attendance.print_month,init:0
msgid "Select a month"
-msgstr ""
+msgstr "Izberite mesec"
#. module: hr_attendance
#: wizard_field:hr.attendance.print_month,init,month:0
msgid "Month"
-msgstr ""
+msgstr "mesec"
#. module: hr_attendance
#: model:ir.module.module,description:hr_attendance.module_meta_information
@@ -383,7 +383,7 @@ msgstr ""
#. module: hr_attendance
#: wizard_field:hr.attendance.print_month,init,year:0
msgid "Year"
-msgstr ""
+msgstr "Leto"
#. module: hr_attendance
#: wizard_button:hr.attendance.print_month,init,end:0
@@ -398,4 +398,4 @@ msgstr "Prekliči"
#. module: hr_attendance
#: rml:report.hr.timesheet.attendance.error:0
msgid "Operation"
-msgstr ""
+msgstr "Postopek"
diff --git a/addons/hr_contract/i18n/sl.po b/addons/hr_contract/i18n/sl.po
index 4fc520044d6..8c764355772 100644
--- a/addons/hr_contract/i18n/sl.po
+++ b/addons/hr_contract/i18n/sl.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:18+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 13:20+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:42+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_contract
#: view:hr.contract.wage.type:0
msgid "Hourly cost computation"
-msgstr ""
+msgstr "Izračun urne postavke"
#. module: hr_contract
#: selection:hr.contract.wage.type,type:0
@@ -52,7 +52,7 @@ msgstr ""
#. module: hr_contract
#: view:hr.contract.wage.type:0
msgid "Wage Types"
-msgstr ""
+msgstr "Vrste plačil"
#. module: hr_contract
#: constraint:ir.actions.act_window:0
@@ -72,12 +72,12 @@ msgstr "Neto"
#. module: hr_contract
#: model:ir.module.module,shortdesc:hr_contract.module_meta_information
msgid "Human Resources Contracts"
-msgstr ""
+msgstr "Pogodbe - človeški viri"
#. module: hr_contract
#: field:hr.contract.wage.type.period,factor_days:0
msgid "Hours in the period"
-msgstr ""
+msgstr "Ur v obdobju"
#. module: hr_contract
#: field:hr.contract,function:0
@@ -125,17 +125,17 @@ msgstr "Naziv obdobja"
#. module: hr_contract
#: model:ir.model,name:hr_contract.model_hr_employee_marital_status
msgid "Employee Marital Status"
-msgstr ""
+msgstr "Zakonski stan zaposlenca"
#. module: hr_contract
#: field:hr.employee,medic_exam:0
msgid "Medical examination date"
-msgstr ""
+msgstr "Datum zdravniškega pregleda"
#. module: hr_contract
#: field:hr.contract.wage.type,name:0
msgid "Wage Type Name"
-msgstr ""
+msgstr "Naziv vrste plačila"
#. module: hr_contract
#: field:hr.contract,working_hours_per_day:0
@@ -177,13 +177,13 @@ msgstr "Pogodba"
#. module: hr_contract
#: view:hr.contract.type:0
msgid "Contract Type"
-msgstr ""
+msgstr "Vrsta pogodbe"
#. module: hr_contract
#: field:hr.contract.wage.type,period_id:0
#: model:ir.model,name:hr_contract.model_hr_contract_wage_type_period
msgid "Wage Period"
-msgstr ""
+msgstr "Obdobje plačila"
#. module: hr_contract
#: field:hr.employee,audiens_num:0
@@ -193,18 +193,18 @@ msgstr ""
#. module: hr_contract
#: view:hr.contract:0
msgid "Remuneration"
-msgstr ""
+msgstr "Preštevilčenje"
#. module: hr_contract
#: field:hr.contract,name:0
msgid "Contract Name"
-msgstr ""
+msgstr "Ime pogodbe"
#. module: hr_contract
#: model:ir.actions.act_window,name:hr_contract.action_hr_contract_wage_type
#: model:ir.ui.menu,name:hr_contract.hr_menu_contract_wage_type
msgid "Contract Wage Type"
-msgstr ""
+msgstr "Vrsta plačila po pogodbi"
#. module: hr_contract
#: field:hr.employee,place_of_birth:0
@@ -221,7 +221,7 @@ msgstr "Upravitelj"
#: model:ir.actions.act_window,name:hr_contract.action_hr_contract_wage_type_period
#: model:ir.ui.menu,name:hr_contract.hr_menu_contract_wage_type_period
msgid "Wage period"
-msgstr ""
+msgstr "Obdobje plačila"
#. module: hr_contract
#: help:hr.contract.wage.type,factor_type:0
@@ -244,7 +244,7 @@ msgstr "Datum začetka"
#. module: hr_contract
#: field:hr.employee.marital.status,description:0
msgid "Status Description"
-msgstr ""
+msgstr "Opis statusa"
#. module: hr_contract
#: view:hr.contract:0
diff --git a/addons/hr_expense/i18n/sl.po b/addons/hr_expense/i18n/sl.po
index 08202324db0..bf7faae0063 100644
--- a/addons/hr_expense/i18n/sl.po
+++ b/addons/hr_expense/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:15+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 13:21+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:42+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_expense
@@ -24,7 +24,7 @@ msgstr "Potrjeni stroški"
#. module: hr_expense
#: model:ir.model,name:hr_expense.model_hr_expense_line
msgid "Expense Line"
-msgstr ""
+msgstr "Postavka izdatkov"
#. module: hr_expense
#: model:process.node,note:hr_expense.process_node_reimbursement0
@@ -40,7 +40,7 @@ msgstr ""
#. module: hr_expense
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Napačno ime modela v definiciji dejanja."
#. module: hr_expense
#: field:hr.expense.expense,date_confirm:0
diff --git a/addons/hr_holidays/__terp__.py b/addons/hr_holidays/__terp__.py
index 3aad5f3da87..852ca6477f9 100644
--- a/addons/hr_holidays/__terp__.py
+++ b/addons/hr_holidays/__terp__.py
@@ -32,17 +32,17 @@
Note that:
- A synchronisation with an internal agenda (use of the CRM module) is possible: in order to automatically create a case when an holiday request is accepted, you have to link the holidays status to a case section. You can set up this info and your colour preferences in
- HR \ Configuration \ Holidays Status
+ HR / Configuration / Holidays Status
- An employee can make an ask for more off-days by making a new Allocation It will increase his total of that leave type available (if the request is accepted).
- There are two ways to print the employee's holidays:
* The first will allow to choose employees by department and is used by clicking the menu item located in
- HR \ Holidays Request \ Print Summary of Holidays
+ HR / Holidays Request / Print Summary of Holidays
* The second will allow you to choose the holidays report for specific employees. Go on the list
- HR \ Employees \ Employees
+ HR / Employees / Employees
then select the ones you want to choose, click on the print icon and select the option
'Print Summary of Employee's Holidays'
- The wizard allows you to choose if you want to print either the Confirmed & Validated holidays or only the Validated ones. These states must be set up by a user from the group 'HR' and with the role 'holidays'. You can define these features in the security tab from the user data in
- Administration \ Users \ Users
+ Administration / Users / Users
for example, you maybe will do it for the user 'admin'.
""",
'author': 'Tiny & Axelor',
diff --git a/addons/hr_holidays/hr.py b/addons/hr_holidays/hr.py
index 7abc9f5ffb6..06f8ebbc2e0 100644
--- a/addons/hr_holidays/hr.py
+++ b/addons/hr_holidays/hr.py
@@ -32,7 +32,6 @@ from tools.translate import _
class hr_holidays_status(osv.osv):
_name = "hr.holidays.status"
_description = "Leave Types"
-
def get_days(self, cr, uid, ids, employee_id, return_false, context={}):
res = {}
for record in self.browse(cr, uid, ids, context):
@@ -83,6 +82,48 @@ class hr_holidays_status(osv.osv):
}
hr_holidays_status()
+class hr_holidays_per_user(osv.osv):
+ _name = "hr.holidays.per.user"
+ _description = "Holidays Per User"
+ _rec_name = "user_id"
+
+ def _get_remaining_leaves(self, cr, uid, ids, field_name, arg=None, context={}):
+ obj_holiday = self.pool.get('hr.holidays')
+ result = {}
+ for holiday_user in self.browse(cr, uid, ids):
+ days = 0.0
+ ids_request = obj_holiday.search(cr, uid, [('employee_id', '=', holiday_user.employee_id.id),('state', '=', 'validate'),('holiday_status', '=', holiday_user.holiday_status.id)])
+ if ids_request:
+ holidays = obj_holiday.browse(cr, uid, ids_request)
+ for holiday in holidays:
+ days += holiday.number_of_days
+ days = holiday_user.max_leaves - days
+ result[holiday_user.id] = days
+ return result
+
+ _columns = {
+ 'employee_id': fields.many2one('hr.employee', 'Employee',required=True),
+ 'user_id' : fields.many2one('res.users','User'),
+ 'holiday_status' : fields.many2one("hr.holidays.status", "Holiday's Status", required=True),
+ 'max_leaves' : fields.float('Maximum Leaves Allowed',required=True),
+ 'leaves_taken' : fields.float('Leaves Already Taken',readonly=True),
+ 'active' : fields.boolean('Active'),
+ 'notes' : fields.text('Notes'),
+ 'remaining_leaves': fields.function(_get_remaining_leaves, method=True, string='Remaining Leaves', type='float'),
+ 'holiday_ids': fields.one2many('hr.holidays', 'holiday_user_id', 'Holidays')
+ }
+ _defaults = {
+ 'active' : lambda *a: True,
+ }
+
+ def create(self, cr, uid, vals, *args, **kwargs):
+ if vals['employee_id']:
+ obj_emp=self.pool.get('hr.employee').browse(cr,uid,vals['employee_id'])
+ vals.update({'user_id': obj_emp.user_id.id})
+ return super(osv.osv,self).create(cr, uid, vals, *args, **kwargs)
+
+hr_holidays_per_user()
+
class hr_holidays(osv.osv):
_name = "hr.holidays"
_description = "Holidays"
@@ -312,6 +353,3 @@ class hr_holidays(osv.osv):
return True
hr_holidays()
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_holidays/i18n/sl.po b/addons/hr_holidays/i18n/sl.po
index fb1ce5d6ab3..c3ecdcd5c3d 100644
--- a/addons/hr_holidays/i18n/sl.po
+++ b/addons/hr_holidays/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:13+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 13:41+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:42+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_holidays
@@ -29,7 +29,7 @@ msgstr "Vsi zahtevki za praznike"
#. module: hr_holidays
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Napačno ime modela v definiciji dejanja."
#. module: hr_holidays
#: field:hr.holidays.per.user,remaining_leaves:0
@@ -486,7 +486,7 @@ msgstr "Slonokoščena"
#. module: hr_holidays
#: model:ir.actions.act_window,name:hr_holidays.action_my_holiday
msgid "My Holidays Request"
-msgstr ""
+msgstr "Moj zahtevek za dopust"
#. module: hr_holidays
#: field:hr.holidays.status,color_name:0
@@ -596,7 +596,7 @@ msgstr ""
#: selection:hr.holidays.summary,init,holiday_type:0
#: selection:hr.holidays.summary.employee,init,holiday_type:0
msgid "Validated"
-msgstr ""
+msgstr "Potrjeno"
#. module: hr_holidays
#: model:ir.actions.act_window,name:hr_holidays.action_my_holiday_refuse
diff --git a/addons/hr_holidays/report/holidays_summary_report.py b/addons/hr_holidays/report/holidays_summary_report.py
index eae37f198ef..6349e207b35 100644
--- a/addons/hr_holidays/report/holidays_summary_report.py
+++ b/addons/hr_holidays/report/holidays_summary_report.py
@@ -152,7 +152,7 @@ class report_custom(report_rml):
while day_diff1>0:
if month+i<=12:
- if day_diff1>30:
+ if day_diff1 > lengthmonth(year,i+month): # Not on 30 else you have problems when entering 01-01-2009 for example
som1=datetime.date(year,month+i,1)
date_xml += ['' % (x, som1.replace(day=x).strftime('%a'),cell+x) for x in range(1, lengthmonth(year,i+month)+1)]
i=i+1
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index c17da2166d9..182d8843b8c 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -82,18 +82,19 @@ class account_analytic_line(osv.osv):
context=context)
def write(self, cr, uid, ids, vals, context=None):
- self._check(cr, uid, ids)
+ self._check_inv(cr, uid, ids,vals)
return super(account_analytic_line,self).write(cr, uid, ids, vals,
context=context)
- def _check(self, cr, uid, ids):
+ def _check_inv(self, cr, uid, ids,vals):
select = ids
if isinstance(select, (int, long)):
select = [ids]
- for line in self.browse(cr, uid, select):
- if line.invoice_id:
- raise osv.except_osv(_('Error !'),
- _('You can not modify an invoiced analytic line!'))
+ if ( not vals.has_key('invoice_id')) or vals['invoice_id' ] == False:
+ for line in self.browse(cr, uid, select):
+ if line.invoice_id:
+ raise osv.except_osv(_('Error !'),
+ _('You can not modify an invoiced analytic line!'))
return True
def copy(self, cursor, user, obj_id, default=None, context=None):
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
index 61f629af120..225b55be9c5 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
@@ -137,13 +137,7 @@ class invoice_create(wizard.interface):
#
# Compute for lines
#
- cr.execute("SELECT * " # TODO optimize this
- " FROM account_analytic_line"
- " WHERE account_id=%%s"
- " AND id IN (%s)"
- " AND product_id=%%s"
- " AND to_invoice=%%s" % ','.join(['%s']*len(data['ids'])),
- tuple([account.id]+ data['ids']+[ product_id, factor_id]))
+ cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id = ANY (%s) AND product_id=%s and to_invoice=%s", (account.id, data['ids'], product_id, factor_id))
line_ids = cr.dictfetchall()
note = []
for line in line_ids:
@@ -160,9 +154,9 @@ class invoice_create(wizard.interface):
details.append(line['name'])
#if data['form']['price']:
# details.append(abs(line['amount']))
- note.append(' - '.join(map(lambda x: x or '',details)))
+ note.append(u' - '.join(map(lambda x: unicode(x) or '',details)))
- curr_line['note'] = "\n".join(map(lambda x: x or '',note))
+ curr_line['note'] = "\n".join(map(lambda x: unicode(x) or '',note))
pool.get('account.invoice.line').create(cr, uid, curr_line)
strids = ','.join(map(str, data['ids']))
cr.execute("update account_analytic_line set invoice_id=%%s WHERE account_id = %%s and id IN (%s)" % strids, (last_invoice,account.id,))
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index 1cc33b38a0d..4eff8d63800 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -454,8 +454,8 @@ class hr_attendance(osv.osv):
LEFT JOIN (hr_attendance a \
LEFT JOIN hr_employee e \
ON (a.employee_id = e.id)) \
- ON (s.date_to >= to_date(to_char(a.name, 'YYYY-MM-dd'),'YYYY-MM-dd') \
- AND s.date_from <= to_date(to_char(a.name, 'YYYY-MM-dd'),'YYYY-MM-dd') \
+ ON (s.date_to >= date_trunc('day',a.name) \
+ AND s.date_from <= a.name \
AND s.user_id = e.user_id) \
WHERE a.id in (" + ",".join([str(x) for x in ids]) + ") \
GROUP BY a.id")
@@ -515,8 +515,8 @@ class hr_attendance(osv.osv):
LEFT JOIN (hr_attendance a \
LEFT JOIN hr_employee e \
ON (a.employee_id = e.id)) \
- ON (s.date_to >= a.name::date \
- AND s.date_from <= a.name::date \
+ ON (s.date_to >= date_trunc(\'day\',a.name) \
+ AND s.date_from <= a.name \
AND s.user_id = e.user_id) ' + \
qu1, qu2)
res = cursor.fetchall()
@@ -635,8 +635,8 @@ class hr_timesheet_sheet_sheet_day(osv.osv):
LEFT JOIN hr_employee e
ON (s.user_id = e.user_id))
ON (a.employee_id = e.id
- AND s.date_to >= a.name::date
- AND s.date_from <= a.name::date)
+ AND s.date_to >= date_trunc('day',a.name)
+ AND s.date_from <= a.name)
WHERE action in ('sign_in', 'sign_out')
group by a.name::date, s.id
)) AS foo
diff --git a/addons/hr_timesheet_sheet/i18n/sl.po b/addons/hr_timesheet_sheet/i18n/sl.po
index 08d768e8dd6..9658e65474b 100644
--- a/addons/hr_timesheet_sheet/i18n/sl.po
+++ b/addons/hr_timesheet_sheet/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 06:59+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 14:03+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:42+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet_sheet
@@ -39,7 +39,7 @@ msgstr "List"
#. module: hr_timesheet_sheet
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Napačno ime modela v definiciji dejanja."
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,total_attendance:0
@@ -111,7 +111,7 @@ msgstr "Dan"
#. module: hr_timesheet_sheet
#: selection:hr_timesheet_sheet.sheet,state_attendance:0
msgid "Present"
-msgstr ""
+msgstr "Prisoten"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
@@ -132,7 +132,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet.day:0
msgid "Total Difference"
-msgstr ""
+msgstr "Skupna razlika"
#. module: hr_timesheet_sheet
#: model:process.transition,name:hr_timesheet_sheet.process_transition_phonecallencoding0
@@ -212,7 +212,7 @@ msgstr "Potrdi"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,timesheet_ids:0
msgid "Timesheet lines"
-msgstr ""
+msgstr "Postavke časovnice"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_timesheetline0
@@ -222,7 +222,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: model:process.transition,name:hr_timesheet_sheet.process_transition_confirmtimesheet0
msgid "Confirm Timesheet"
-msgstr ""
+msgstr "Potrdi časovnico"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_validatedtimesheet0
@@ -232,7 +232,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: selection:hr_timesheet_sheet.sheet,state:0
msgid "New"
-msgstr "Nov"
+msgstr "Novo"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_timesheetconfirming0
@@ -247,7 +247,7 @@ msgstr "Skupni čas"
#. module: hr_timesheet_sheet
#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet
msgid "Timesheet Lines"
-msgstr ""
+msgstr "Postavke časovnice"
#. module: hr_timesheet_sheet
#: model:process.transition,note:hr_timesheet_sheet.process_transition_confirmtimesheetsheet0
@@ -282,13 +282,13 @@ msgstr "Neveljaven XML za arhitekturo pogleda."
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
msgid "Daily View"
-msgstr ""
+msgstr "Dnevni pogled"
#. module: hr_timesheet_sheet
#: model:ir.model,name:hr_timesheet_sheet.model_hr_timesheet_sheet_sheet_account
#: model:ir.model,name:hr_timesheet_sheet.model_hr_timesheet_sheet_sheet_day
msgid "Timesheets by period"
-msgstr ""
+msgstr "Časovnice po obdobjuh"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
@@ -393,7 +393,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_timesheet_sheet_sheet_by_day
msgid "Timesheet by Account"
-msgstr ""
+msgstr "Časovnice po kontih"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet.day,name:0
@@ -445,7 +445,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: model:process.node,name:hr_timesheet_sheet.process_node_timesheetline0
msgid "Timesheet Line"
-msgstr ""
+msgstr "Postavka časovnice"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet.account:0
@@ -522,7 +522,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: selection:hr_timesheet_sheet.sheet,state_attendance:0
msgid "Absent"
-msgstr ""
+msgstr "Odsoten"
#. module: hr_timesheet_sheet
#: model:process.node,note:hr_timesheet_sheet.process_node_confirmedtimesheet0
diff --git a/addons/idea/i18n/pt.po b/addons/idea/i18n/pt.po
index b610754d90c..49a9330ab7f 100644
--- a/addons/idea/i18n/pt.po
+++ b/addons/idea/i18n/pt.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-09-16 11:30+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-29 23:01+0000\n"
+"Last-Translator: Paulino \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: 2009-11-17 05:07+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: idea
@@ -44,7 +44,7 @@ msgstr "Minhas ideias"
#. module: idea
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nome de modelo inválido na definição da acção"
#. module: idea
#: selection:idea.idea,my_vote:0
@@ -118,7 +118,7 @@ msgstr "Categorias para uma ideia"
#. module: idea
#: model:ir.module.module,shortdesc:idea.module_meta_information
msgid "Idea Manager"
-msgstr ""
+msgstr "Gestão de Ideias"
#. module: idea
#: model:ir.ui.menu,name:idea.menu_idea_vote_stat
@@ -221,6 +221,12 @@ msgid ""
"managers can obtain an easy view on best ideas from all the users. Once "
"installed, check the menu 'Ideas' in the 'Tools' main menu."
msgstr ""
+"Este modulo permite aos utilizadores participar de forma fácil e eficiente "
+"na inovação da empresa. Permite que todos expressem ideias acerca de "
+"assuntos diferentes. Depois outros utilizadores podem comentar e votar essas "
+"ideias. Cada ideia obtem uma pontuação. Os gestores podem ter uma visão das "
+"melhores ideias de todos os utilizadores. depois de instalado o módulo, "
+"verifique o menu \"Ideias\" no menu principal \"Ferramentas\"."
#. module: idea
#: field:idea.comment,create_date:0
diff --git a/addons/idea/i18n/sl.po b/addons/idea/i18n/sl.po
index a0330674662..cf4bf9e1d32 100644
--- a/addons/idea/i18n/sl.po
+++ b/addons/idea/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 06:57+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 13:39+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:41+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: idea
@@ -44,7 +44,7 @@ msgstr "Moje ideje"
#. module: idea
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Napačno ime modela v definiciji dejanja."
#. module: idea
#: selection:idea.idea,my_vote:0
@@ -69,7 +69,7 @@ msgstr "Ideje"
#. module: idea
#: field:idea.category,child_ids:0
msgid "Child Categories"
-msgstr ""
+msgstr "Kategorije podrejenih"
#. module: idea
#: view:idea.idea:0
@@ -178,7 +178,7 @@ msgstr "Uporabnik"
#. module: idea
#: view:idea.idea:0
msgid "Your comment"
-msgstr ""
+msgstr "Vaša opomba"
#. module: idea
#: model:ir.ui.menu,name:idea.menu_config
@@ -241,7 +241,7 @@ msgstr "Število glasov"
#. module: idea
#: model:ir.model,name:idea.model_idea_idea
msgid "idea.idea"
-msgstr ""
+msgstr "idea.idea"
#. module: idea
#: model:ir.actions.act_window,name:idea.action_idea_idea_draft_my
@@ -318,7 +318,7 @@ msgstr "Opomba"
#. module: idea
#: field:idea.category,parent_id:0
msgid "Parent Categories"
-msgstr ""
+msgstr "Nadrejene kategorije"
#. module: idea
#: field:idea.idea,user_id:0
@@ -378,4 +378,4 @@ msgstr "Odpri"
#. module: idea
#: help:idea.idea,description:0
msgid "Content of the idea"
-msgstr ""
+msgstr "Vsebina ideje"
diff --git a/addons/idea/idea.py b/addons/idea/idea.py
index 2462ee615ff..915420f070d 100644
--- a/addons/idea/idea.py
+++ b/addons/idea/idea.py
@@ -47,40 +47,40 @@ class idea_idea(osv.osv):
if not len(ids):
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 in (%s)
- group by i.id
- """ % ','.join(['%s']*len(ids))
+ 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
+ """
- cr.execute(sql, ids)
+ cr.execute(sql, (ids,))
return dict(cr.fetchall())
def _vote_count(self,cr,uid,ids,name,arg,context=None):
if not len(ids):
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 in (%s)
- group by i.id
- """ % ','.join(['%s']*len(ids))
+ 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
+ """
- cr.execute(sql, ids)
+ cr.execute(sql, (ids,))
return dict(cr.fetchall())
def _comment_count(self,cr,uid,ids,name,arg,context=None):
if not len(ids):
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 in (%s)
- group by i.id
- """ % ','.join(['%s']*len(ids))
+ 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
+ """
- cr.execute(sql,ids)
+ cr.execute(sql,(ids,))
return dict(cr.fetchall())
def _vote_read(self, cr, uid, ids, name, arg, context = None):
@@ -195,19 +195,18 @@ class idea_vote_stat(osv.osv):
cr -- the cursor
"""
cr.execute("""
- create or replace view idea_vote_stat as (
- select
- min(v.id) as id,
- i.id as idea_id,
+ CREATE OR REPLACE VIEW idea_vote_stat AS (
+ SELECT
+ MIN(v.id) AS id,
+ i.id AS idea_id,
v.score,
- count(1) as nbr
- from
+ COUNT(1) AS nbr
+ FROM
idea_vote v
- left join
- idea_idea i on (v.idea_id=i.id)
- group by
- i.id, v.score, i.id
- )""")
+ LEFT JOIN idea_idea i ON (v.idea_id = i.id)
+ GROUP BY
+ i.id, v.score, i.id )
+ """)
idea_vote_stat()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_be/wizard/partner_vat_listing.py b/addons/l10n_be/wizard/partner_vat_listing.py
index 4e9fed80300..359f39e5ebe 100644
--- a/addons/l10n_be/wizard/partner_vat_listing.py
+++ b/addons/l10n_be/wizard/partner_vat_listing.py
@@ -21,6 +21,8 @@
import time
import datetime
import base64
+from tools.translate import _
+import tools
import wizard
import pooler
@@ -101,6 +103,7 @@ class wizard_vat(wizard.interface):
partners = []
records = []
for obj_partner in pool.get('res.partner').browse(cr, uid, p_id_list):
+
record = {} # this holds record per partner
#This listing is only for customers located in belgium, that's the
diff --git a/addons/mrp/i18n/pt.po b/addons/mrp/i18n/pt.po
index a29496fa538..1333c9768da 100644
--- a/addons/mrp/i18n/pt.po
+++ b/addons/mrp/i18n/pt.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-09-16 16:22+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-29 23:18+0000\n"
+"Last-Translator: Paulino \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: 2009-11-17 04:52+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp
@@ -24,7 +24,7 @@ msgstr "Movimentos criados"
#. module: mrp
#: rml:mrp.production.order:0
msgid "No. Of Cycles"
-msgstr ""
+msgstr "Nº de Ciclos"
#. module: mrp
#: help:mrp.procurement.compute.all,init,automatic:0
@@ -37,12 +37,12 @@ msgstr ""
#. module: mrp
#: model:ir.module.module,shortdesc:mrp.module_meta_information
msgid "Manufacturing Resource Planning"
-msgstr ""
+msgstr "Planeamento de recursos no fabrico"
#. module: mrp
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nome de modelo inválido na definição da acção"
#. module: mrp
#: field:mrp.bom.revision,indice:0
@@ -53,13 +53,13 @@ msgstr "Revisão"
#: model:ir.actions.wizard,name:mrp.wiz_mrp_proc2
#: model:ir.ui.menu,name:mrp.menu_wiz_mrp_proc2
msgid "Compute Stock Minimum Rules Only"
-msgstr ""
+msgstr "Calcular apenas regras de stock mínimo."
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_procurement_action5
#: model:ir.ui.menu,name:mrp.menu_mrp_procurement_action5
msgid "Exceptions Procurements"
-msgstr ""
+msgstr "Excepções no reaprovisionamento"
#. module: mrp
#: view:mrp.routing.workcenter:0
@@ -69,7 +69,7 @@ msgstr "Roteamento do centro de trabalho"
#. module: mrp
#: help:mrp.property,composition:0
msgid "Not used in computations, for information purpose only."
-msgstr ""
+msgstr "Não utilizado em cálculos, apenas para informação."
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_routing_action
@@ -107,7 +107,7 @@ msgstr "Referência"
#. module: mrp
#: view:mrp.production:0
msgid "Finished Products"
-msgstr ""
+msgstr "Produtos Acabados"
#. module: mrp
#: wizard_field:mrp.procurement.compute.all,init,automatic:0
@@ -130,6 +130,8 @@ msgstr "XML inválido para a arquitectura de vista"
msgid ""
"This is the days added to what you promise to customers for security purpose"
msgstr ""
+"Estes são os dias adicionados aos que prometeu aos clientes para fins de "
+"segurança"
#. module: mrp
#: field:mrp.workcenter,costs_hour:0
@@ -149,7 +151,7 @@ msgstr "Produto e localização"
#. module: mrp
#: view:res.company:0
msgid "MRP & Logistic Scheduler"
-msgstr ""
+msgstr "Planificador Logístico e de Produção"
#. module: mrp
#: help:mrp.workcenter,capacity_per_cycle:0
@@ -161,12 +163,12 @@ msgstr ""
#. module: mrp
#: wizard_button:product.product.procurement,init,create:0
msgid "Ask New Products"
-msgstr ""
+msgstr "Pedir novos produtos"
#. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_reordering
msgid "Automatic Procurements"
-msgstr ""
+msgstr "Aprovisionamentos automáticos"
#. module: mrp
#: wizard_field:change_production_qty,confirm,product_qty:0
@@ -199,12 +201,12 @@ msgstr "Excepção no empacotamento"
#. module: mrp
#: model:process.node,note:mrp.process_node_orderrfq0
msgid "A purchase order is created for a sub-contracting demand."
-msgstr ""
+msgstr "Uma ordem de compra é criada para a procura de subcontratação."
#. module: mrp
#: rml:mrp.production.order:0
msgid "Destination Location"
-msgstr ""
+msgstr "Local de destino"
#. module: mrp
#: view:mrp.workcenter:0
@@ -214,17 +216,18 @@ msgstr "Contabilidade analítica"
#. module: mrp
#: model:process.node,note:mrp.process_node_servicemts0
msgid "Do nothing"
-msgstr ""
+msgstr "Não fazer nada"
#. module: mrp
#: rml:mrp.production.order:0
msgid "Partner Ref"
-msgstr ""
+msgstr "Ref. do Parceiro"
#. module: mrp
#: help:mrp.procurement.orderpoint.compute,init,automatic:0
msgid "If the stock of a product is under 0, it will act like an orderpoint"
msgstr ""
+"Se o stock de um produto é inferior a 0, vai tornar-se um ponto de encomenda."
#. module: mrp
#: selection:mrp.workcenter.load,init,measure_unit:0
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 1dbf4f07009..71a4fd29328 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -63,12 +63,14 @@ class mrp_workcenter(osv.osv):
help="Complete this only if you want automatic analytic accounting entries on production orders."),
'costs_journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'),
'costs_general_account_id': fields.many2one('account.account', 'General Account', domain=[('type','<>','view')]),
+ 'company_id': fields.many2one('res.company','Company',required=True),
}
_defaults = {
'active': lambda *a: 1,
'type': lambda *a: 'machine',
'time_efficiency': lambda *a: 1.0,
'capacity_per_cycle': lambda *a: 1.0,
+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.workcenter', c)
}
mrp_workcenter()
@@ -199,7 +201,8 @@ class mrp_bom(osv.osv):
'revision_ids': fields.one2many('mrp.bom.revision', 'bom_id', 'BoM Revisions'),
'revision_type': fields.selection([('numeric','numeric indices'),('alpha','alphabetical indices')], 'Index type'),
'child_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many'),
- 'child_complete_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many')
+ 'child_complete_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many'),
+ 'company_id': fields.many2one('res.company','Company',required=True),
}
_defaults = {
'active': lambda *a: 1,
@@ -207,6 +210,7 @@ class mrp_bom(osv.osv):
'product_qty': lambda *a: 1.0,
'product_rounding': lambda *a: 1.0,
'type': lambda *a: 'normal',
+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.bom', c)
}
_order = "sequence"
_sql_constraints = [
@@ -442,6 +446,7 @@ class mrp_production(osv.osv):
'sale_name': fields.function(_sale_name_calc, method=True, type='char', string='Sale Name'),
'sale_ref': fields.function(_sale_ref_calc, method=True, type='char', string='Sale Ref'),
+ 'company_id': fields.many2one('res.company','Company',required=True),
}
_defaults = {
'priority': lambda *a: '1',
@@ -449,6 +454,7 @@ class mrp_production(osv.osv):
'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'product_qty': lambda *a: 1.0,
'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'mrp.production') or '/',
+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', c),
}
_order = 'date_planned asc, priority desc';
def unlink(self, cr, uid, ids, context=None):
@@ -825,6 +831,7 @@ class mrp_procurement(osv.osv):
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',
@@ -832,6 +839,7 @@ class mrp_procurement(osv.osv):
'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', c)
}
def unlink(self, cr, uid, ids, context=None):
@@ -1191,7 +1199,8 @@ class stock_warehouse_orderpoint(osv.osv):
"a requisition to bring the virtual stock to the Max Quantity."),
'qty_multiple': fields.integer('Qty Multiple', required=True,
help="The requisition quantity will by rounded up to this multiple."),
- 'procurement_id': fields.many2one('mrp.procurement', 'Purchase Order')
+ 'procurement_id': fields.many2one('mrp.procurement', 'Purchase Order'),
+ 'company_id': fields.many2one('res.company','Company',required=True),
}
_defaults = {
'active': lambda *a: 1,
@@ -1199,6 +1208,7 @@ class stock_warehouse_orderpoint(osv.osv):
'qty_multiple': lambda *a: 1,
'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'mrp.warehouse.orderpoint') or '',
'product_uom': lambda sel, cr, uid, context: context.get('product_uom', False),
+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.warehouse.orderpoint', c)
}
def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context={}):
if warehouse_id:
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index c415a12d7c3..bff2cc76d2c 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -109,6 +109,7 @@
+
@@ -235,6 +236,7 @@
+
@@ -457,10 +459,9 @@
-
-
+
@@ -697,6 +698,7 @@
+
@@ -740,6 +742,10 @@
+
+
+
+
@@ -843,6 +849,7 @@
+
diff --git a/addons/mrp/security/mrp_security.xml b/addons/mrp/security/mrp_security.xml
index 8cd84d7df6b..cfb31f7d05d 100644
--- a/addons/mrp/security/mrp_security.xml
+++ b/addons/mrp/security/mrp_security.xml
@@ -15,6 +15,71 @@
+
+
+ mrp_procurement multi-company
+
+
+
+
+
+ child_of
+ user.company_id.id
+ ['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]
+
+
+
+
+ stock_warehouse.orderpoint multi-company
+
+
+
+
+
+ child_of
+ user.company_id.id
+ ['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]
+
+
+
+
+ mrp_production multi-company
+
+
+
+
+
+ child_of
+ user.company_id.id
+ ['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]
+
+
+
+
+ mrp_workcenter multi-company
+
+
+
+
+
+ child_of
+ user.company_id.id
+ ['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]
+
+
+
+
+ mrp_bom multi-company
+
+
+
+
+
+ child_of
+ user.company_id.id
+ ['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]
+
+
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
index f670aaecaa9..ea378c3ac0d 100644
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -67,10 +67,11 @@ class mrp_production_workcenter_line(osv.osv):
res[op.id] = op.date_planned
return res
_inherit = 'mrp.production.workcenter.line'
+ _order = "sequence, date_planned"
_columns = {
'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'State', readonly=True),
'date_start_date': fields.function(_get_date_date, method=True, string='Start Date', type='date'),
- 'date_planned': fields.related('production_id', 'date_planned', type='datetime', string='Date Planned'),
+ 'date_planned': fields.datetime('Scheduled Date'),
'date_planned_end': fields.function(_get_date_end, method=True, string='End Date', type='datetime'),
'date_start': fields.datetime('Start Date'),
'date_finnished': fields.datetime('End Date'),
diff --git a/addons/point_of_sale/i18n/sl.po b/addons/point_of_sale/i18n/sl.po
index 64c41b6376a..cb17223796a 100644
--- a/addons/point_of_sale/i18n/sl.po
+++ b/addons/point_of_sale/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-19 00:37+0000\n"
+"PO-Revision-Date: 2009-11-30 10:28+0000\n"
"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-20 04:41+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: point_of_sale
@@ -142,7 +142,7 @@ msgstr "Sklic partnerja"
#. module: point_of_sale
#: rml:pos.receipt:0
msgid "Tel : + 32 (0) 2 231 04 35"
-msgstr ""
+msgstr "Tel : + 32 (0) 2 231 04 35"
#. module: point_of_sale
#: field:pos.order.line,name:0
@@ -242,7 +242,7 @@ msgstr "Kol."
#. module: point_of_sale
#: field:pos.order,user_id:0
msgid "Logged in User"
-msgstr ""
+msgstr "Prijavljeni uporabnik"
#. module: point_of_sale
#: rml:pos.details:0
diff --git a/addons/point_of_sale/wizard/wizard_pos_payment.py b/addons/point_of_sale/wizard/wizard_pos_payment.py
index eecb4898aab..30644a54d00 100644
--- a/addons/point_of_sale/wizard/wizard_pos_payment.py
+++ b/addons/point_of_sale/wizard/wizard_pos_payment.py
@@ -159,6 +159,22 @@ def _test_no_line(self, cr, uid, data, context):
if not order.lines:
raise wizard.except_wizard(_('Error'), _('No order lines defined for this sale.'))
+ if not order.lines:
+ raise wizard.except_wizard(_('Error'), _('No order lines defined for this sale.'))
+
+ return {}
+
+
+def create_invoice(self, cr, uid, data, context):
+ pool = pooler.get_pool(cr.dbname)
+ order_obj = pool.get('pos.order')
+ order = order_obj.browse(cr, uid, data['id'], context)
+ if not order.invoice_id:
+ inv_id = order_obj.action_invoice(cr, uid, [data['id']])
+ #raise wizard.except_wizard(_('Error !'), _('Please create an invoice for this sale.'))
+# wf_service = netsvc.LocalService("workflow")
+# for i in data['ids']:
+# wf_service.trg_validate(uid, 'pos.order', i, 'invoice', cr)
return {}
diff --git a/addons/process/i18n/sl.po b/addons/process/i18n/sl.po
index 63a7cad158e..48ffd3f3143 100644
--- a/addons/process/i18n/sl.po
+++ b/addons/process/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-19 00:35+0000\n"
+"PO-Revision-Date: 2009-11-30 10:32+0000\n"
"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-20 04:41+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: process
@@ -132,7 +132,7 @@ msgstr "Prehodi delovnega toka"
#. module: process
#: field:process.transition.action,action:0
msgid "Action ID"
-msgstr ""
+msgstr "Oznaka dejanja"
#. module: process
#: view:process.transition:0
@@ -173,7 +173,7 @@ msgstr "Vloge"
#. module: process
#: field:process.node,transition_in:0
msgid "Starting Transitions"
-msgstr ""
+msgstr "Začetna stanja"
#. module: process
#: field:process.node,note:0
@@ -194,7 +194,7 @@ msgstr "Prehod"
#: view:process.process:0
#: view:process.transition:0
msgid "Roles Required"
-msgstr ""
+msgstr "Zahtevane vloge"
#. module: process
#: view:process.node:0
@@ -236,7 +236,7 @@ msgstr "Tip"
#. module: process
#: field:process.node,transition_out:0
msgid "Ending Transitions"
-msgstr ""
+msgstr "Končna stanja"
#. module: process
#: model:ir.actions.act_window,name:process.action_process_form
@@ -250,7 +250,7 @@ msgstr "Procesiraj"
#. module: process
#: model:ir.module.module,shortdesc:process.module_meta_information
msgid "Enterprise Process"
-msgstr ""
+msgstr "Proces podjetja"
#. module: process
#: view:process.node:0
@@ -262,14 +262,14 @@ msgstr "Dejanja"
#. module: process
#: field:process.node,model_states:0
msgid "States Expression"
-msgstr ""
+msgstr "Izraz stanj"
#. module: process
#: model:ir.actions.act_window,name:process.action_process_transition_form
#: model:ir.model,name:process.model_process_transition
#: model:ir.ui.menu,name:process.menu_process_transition_form
msgid "Process Transitions"
-msgstr ""
+msgstr "Prehodi procesov"
#. module: process
#: field:process.transition,target_node_id:0
@@ -285,12 +285,12 @@ msgstr "Vrsta vozlišča"
#: view:process.node:0
#: view:process.process:0
msgid "Outgoing Transitions"
-msgstr ""
+msgstr "Izhodni prehodi"
#. module: process
#: model:ir.ui.menu,name:process.menu_process
msgid "Enterprise Processes"
-msgstr ""
+msgstr "Procesi podjetja"
#. module: process
#: view:process.node:0
@@ -301,4 +301,4 @@ msgstr "Prehodi"
#. module: process
#: selection:process.transition.action,state:0
msgid "Object Method"
-msgstr ""
+msgstr "Metode predmeta"
diff --git a/addons/product/i18n/sk.po b/addons/product/i18n/sk.po
new file mode 100644
index 00000000000..9a09cd0c630
--- /dev/null
+++ b/addons/product/i18n/sk.po
@@ -0,0 +1,1706 @@
+# 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 , 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-08-28 16:01+0000\n"
+"PO-Revision-Date: 2009-11-30 15:44+0000\n"
+"Last-Translator: Radoslav Sloboda \n"
+"Language-Team: Slovak \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid "Max. Margin"
+msgstr "Max. marža"
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid "Base Price"
+msgstr "Základná cena"
+
+#. module: product
+#: help:product.template,standard_price:0
+msgid ""
+"The cost of the product for accounting stock valuation. It can serves as a "
+"base price for supplier price."
+msgstr ""
+"Náklady na výrobku/produktu pre zaúčtovanie ocenenia zásob. Môže slúžiť ako "
+"základná cena pre dodávateľskú cenu."
+
+#. module: product
+#: selection:product.template,type:0
+msgid "Service"
+msgstr "Služba"
+
+#. module: product
+#: help:product.template,purchase_ok:0
+msgid ""
+"Determine if the product is visible in the list of products within a "
+"selection from a purchase order line."
+msgstr ""
+
+#. module: product
+#: help:product.supplierinfo,name:0
+msgid "Supplier of this product"
+msgstr "Dodávateľ tohto výrobku"
+
+#. module: product
+#: model:product.template,name:product.product_product_ram512_product_template
+msgid "DDR 512MB PC400"
+msgstr "DDR 512MB PC400"
+
+#. module: product
+#: model:product.template,name:product.product_product_0_product_template
+msgid "Onsite Senior Intervention"
+msgstr ""
+
+#. module: product
+#: help:product.supplierinfo,qty:0
+msgid ""
+"The minimal quantity to purchase for this supplier, expressed in the default "
+"unit of measure."
+msgstr ""
+"Minimálne množstvo na nákup pre dodávateľa, vyjadrené v štandardných "
+"jednotkách merania."
+
+#. module: product
+#: field:product.template,weight_net:0
+msgid "Net weight"
+msgstr "Čistá hmotnosť"
+
+#. module: product
+#: help:product.product,incoming_qty:0
+msgid ""
+"Quantities of products that are planned to arrive in selected locations or "
+"all internal if none have been selected."
+msgstr ""
+
+#. module: product
+#: help:product.product,virtual_available:0
+msgid ""
+"Futur stock for this product according to the selected location or all "
+"internal if none have been selected. Computed as: Real Stock - Outgoing + "
+"Incoming."
+msgstr ""
+
+#. module: product
+#: field:product.packaging,width:0
+msgid "Width"
+msgstr "Šírka"
+
+#. module: product
+#: help:product.pricelist.item,product_tmpl_id:0
+msgid ""
+"Set a template if this rule only apply to a template of product. Keep empty "
+"for all products"
+msgstr ""
+
+#. module: product
+#: field:product.template,procure_method:0
+msgid "Procure Method"
+msgstr ""
+
+#. module: product
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr ""
+
+#. module: product
+#: model:process.process,name:product.process_process_productprocess0
+msgid "Product Process"
+msgstr ""
+
+#. module: product
+#: help:product.price.type,field:0
+msgid "Associated field in the product form."
+msgstr "Súvisiace polia vo formuláre produktu."
+
+#. module: product
+#: selection:product.template,cost_method:0
+msgid "Standard Price"
+msgstr "Štandardná cena"
+
+#. module: product
+#: help:product.packaging,height:0
+msgid "The height of the package"
+msgstr ""
+
+#. module: product
+#: view:product.pricelist:0
+msgid "Products Price List"
+msgstr "Produkty Cenník"
+
+#. module: product
+#: model:product.category,name:product.cat1
+msgid "Sellable"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_26_product_template
+msgid "Kit Keyboard + Mouse"
+msgstr "Sada klávesnica + myš"
+
+#. module: product
+#: field:product.price.type,name:0
+msgid "Price Name"
+msgstr "Názov ceny"
+
+#. module: product
+#: field:product.product,price:0
+msgid "Customer Price"
+msgstr "Z8kazníková cena"
+
+#. module: product
+#: field:product.template,company_id:0
+msgid "Company"
+msgstr "Firma"
+
+#. module: product
+#: field:product.template,rental:0
+msgid "Rentable Product"
+msgstr ""
+
+#. module: product
+#: field:product.product,lst_price:0
+msgid "List Price"
+msgstr "Cenník"
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_price_type_action
+#: model:ir.ui.menu,name:product.menu_product_price_type_action
+msgid "Prices Types"
+msgstr "Typy cien"
+
+#. module: product
+#: selection:product.template,type:0
+msgid "Stockable Product"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.product_category_services
+msgid "Services"
+msgstr "Služby"
+
+#. module: product
+#: help:product.template,list_price:0
+msgid ""
+"Base price for computing the customer price. Sometimes called the catalog "
+"price."
+msgstr ""
+
+#. module: product
+#: field:pricelist.partnerinfo,min_quantity:0
+msgid "Quantity"
+msgstr "Množstvo"
+
+#. module: product
+#: model:product.template,name:product.product_product_cpu3_product_template
+msgid "Processor AMD Athlon XP 2200+"
+msgstr "Processor AMD Athlon XP 2200+"
+
+#. module: product
+#: help:product.price.type,name:0
+msgid "Name of this kind of price."
+msgstr ""
+
+#. module: product
+#: help:product.pricelist.version,date_start:0
+msgid "Starting date for this pricelist version to be valid."
+msgstr "Počiatočný dátum pre túto verziu cenníka je platný."
+
+#. module: product
+#: field:product.product,incoming_qty:0
+msgid "Incoming"
+msgstr "Prichádzajúci"
+
+#. module: product
+#: selection:product.template,procure_method:0
+msgid "Make to Stock"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Weigths"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_fan2_product_template
+msgid "Silent fan"
+msgstr "Tichý ventilátor"
+
+#. module: product
+#: help:product.template,supply_method:0
+msgid ""
+"Produce will generate production order or tasks, according to the product "
+"type. Purchase will trigger purchase orders when requested."
+msgstr ""
+
+#. module: product
+#: model:process.transition,note:product.process_transition_supplierofproduct0
+msgid "You can see the list of suppliers for that product."
+msgstr ""
+
+#. module: product
+#: help:product.packaging,rows:0
+msgid "The number of layer on a palet or box"
+msgstr ""
+
+#. module: product
+#: model:product.pricelist.type,name:product.pricelist_type_sale
+#: field:res.partner,property_product_pricelist:0
+msgid "Sale Pricelist"
+msgstr "Cenník pre predaj"
+
+#. module: product
+#: field:product.pricelist.item,base_pricelist_id:0
+msgid "If Other Pricelist"
+msgstr ""
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_normal_action
+#: model:ir.actions.act_window,name:product.product_normal_action_tree
+#: model:ir.ui.menu,name:product.menu_main_product
+#: model:ir.ui.menu,name:product.menu_products
+#: view:product.product:0
+msgid "Products"
+msgstr "Produkty"
+
+#. module: product
+#: help:product.pricelist.item,price_round:0
+msgid ""
+"Sets the price so that it is a multiple of this value.\n"
+"Rounding is applied after the discount and before the surcharge.\n"
+"To have prices that end in 9.99, set rounding 10, surcharge -0.01"
+msgstr ""
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid "New Price ="
+msgstr "Nová cena ="
+
+#. module: product
+#: field:product.product,virtual_available:0
+msgid "Virtual Stock"
+msgstr "Virtuálny sklad"
+
+#. module: product
+#: selection:product.template,mes_type:0
+msgid "Fixed"
+msgstr ""
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_uom_categ_form_action
+#: model:ir.ui.menu,name:product.menu_product_uom_categ_form_action
+msgid "Units of Measure Categories"
+msgstr ""
+
+#. module: product
+#: help:product.pricelist.item,product_id:0
+msgid ""
+"Set a product if this rule only apply to one product. Keep empty for all "
+"products"
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_pricelist_type
+#: field:product.pricelist,type:0
+#: view:product.pricelist.type:0
+msgid "Pricelist Type"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Base Prices"
+msgstr ""
+
+#. module: product
+#: model:ir.ui.menu,name:product.menu_price
+msgid "Prices Computations"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.item,name:0
+msgid "Rule Name"
+msgstr ""
+
+#. module: product
+#: model:ir.ui.menu,name:product.menu_config_product
+msgid "Configuration"
+msgstr "Konfigurácia"
+
+#. module: product
+#: field:product.packaging,rows:0
+msgid "Number of Layer"
+msgstr ""
+
+#. module: product
+#: constraint:product.category:0
+msgid "Error ! You can not create recursive categories."
+msgstr ""
+
+#. module: product
+#: field:product.template,uom_id:0
+msgid "Default UoM"
+msgstr ""
+
+#. module: product
+#: field:product.template,produce_delay:0
+msgid "Manufacturing Lead Time"
+msgstr ""
+
+#. module: product
+#: field:product.supplierinfo,pricelist_ids:0
+msgid "Supplier Pricelist"
+msgstr "Cenník dodávateľa"
+
+#. module: product
+#: view:product.packaging:0
+#: view:product.product:0
+msgid "Pallet Dimension"
+msgstr "Rozmery palety"
+
+#. module: product
+#: field:product.pricelist.item,base:0
+msgid "Based on"
+msgstr "Na základe"
+
+#. module: product
+#: model:product.template,name:product.product_product_24_product_template
+msgid "Keyboard"
+msgstr "Klávesnica"
+
+#. module: product
+#: field:product.supplierinfo,name:0
+msgid "Partner"
+msgstr "Partner"
+
+#. module: product
+#: field:product.template,sale_delay:0
+msgid "Customer Lead Time"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_25_product_template
+msgid "Mouse"
+msgstr "Myš"
+
+#. module: product
+#: help:product.template,cost_method:0
+msgid ""
+"Standard Price: the cost price is fixed and recomputed periodically (usually "
+"at the end of the year), Average Price: the cost price is recomputed at each "
+"reception of products."
+msgstr ""
+
+#. module: product
+#: field:product.pricelist,name:0
+msgid "Pricelist Name"
+msgstr "Názov cenníka"
+
+#. module: product
+#: field:product.template,seller_ids:0
+msgid "Partners"
+msgstr "Partneri"
+
+#. module: product
+#: selection:product.template,cost_method:0
+msgid "Average Price"
+msgstr "Priemerná cena"
+
+#. module: product
+#: model:process.node,note:product.process_node_product0
+msgid "Create new Product"
+msgstr "Vytvorenie nového produktu"
+
+#. module: product
+#: help:product.pricelist.item,name:0
+msgid "Explicit rule name for this pricelist line."
+msgstr ""
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid "Min. Margin"
+msgstr "Min. marža"
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid "* ( 1 + "
+msgstr "* ( 1 + "
+
+#. module: product
+#: model:product.template,name:product.product_product_cpu1_product_template
+msgid "Processor AMD Athlon XP 1800+"
+msgstr "Processor AMD Athlon XP 1800+"
+
+#. module: product
+#: selection:product.template,state:0
+msgid "In Production"
+msgstr "Vo výrobe"
+
+#. module: product
+#: field:product.category,child_id:0
+msgid "Child Categories"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.product_category_accessories
+msgid "Accessories"
+msgstr "Príslušenstvo"
+
+#. module: product
+#: field:product.supplierinfo,sequence:0
+msgid "Priority"
+msgstr "Priorita"
+
+#. module: product
+#: model:product.template,name:product.product_product_20_product_template
+msgid "HDD on demand"
+msgstr "HDD on demand"
+
+#. module: product
+#: field:product.uom,factor_inv:0
+#: field:product.uom,factor_inv_data:0
+msgid "Factor"
+msgstr "Faktor"
+
+#. module: product
+#: wizard_button:product.price_list,init,price:0
+msgid "Print"
+msgstr "Tlač"
+
+#. module: product
+#: model:process.node,name:product.process_node_supplier0
+msgid "Supplier Info"
+msgstr "Info o dodávateľovi"
+
+#. module: product
+#: field:product.ul,type:0
+msgid "Type"
+msgstr "Typ"
+
+#. module: product
+#: wizard_field:product.price_list,init,price_list:0
+msgid "PriceList"
+msgstr "Cenník"
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "UOM"
+msgstr "UOM"
+
+#. module: product
+#: model:product.uom,name:product.product_uom_unit
+msgid "PCE"
+msgstr "PCE"
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_pricelist_action2
+#: model:ir.ui.menu,name:product.menu_product_pricelist_action2
+#: model:ir.ui.menu,name:product.menu_product_pricelist_main
+msgid "Pricelists"
+msgstr "Cenníky"
+
+#. module: product
+#: field:product.supplierinfo,product_name:0
+msgid "Partner Product Name"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Miscelleanous"
+msgstr ""
+
+#. module: product
+#: help:product.pricelist.item,base:0
+msgid "The mode for computing the price for this rule."
+msgstr ""
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_uom_form_action
+#: model:ir.ui.menu,name:product.menu_product_uom_form_action
+#: model:ir.ui.menu,name:product.next_id_16
+#: view:product.uom:0
+msgid "Units of Measure"
+msgstr "Jednotky merania"
+
+#. module: product
+#: field:product.product,partner_ref:0
+msgid "Customer ref"
+msgstr ""
+
+#. module: product
+#: field:product.supplierinfo,qty:0
+msgid "Minimal Quantity"
+msgstr "Minimálne množstvo"
+
+#. module: product
+#: model:product.category,name:product.product_category_pc
+msgid "PC"
+msgstr ""
+
+#. module: product
+#: help:product.template,seller_delay:0
+msgid ""
+"This is the average delay in days between the purchase order confirmation "
+"and the reception of goods for this product and for the default supplier. It "
+"is used by the scheduler to order requests based on reordering delays."
+msgstr ""
+
+#. module: product
+#: field:product.template,seller_delay:0
+msgid "Supplier Lead Time"
+msgstr ""
+
+#. module: product
+#: model:product.pricelist.version,name:product.ver0
+msgid "Default Public Pricelist Version"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.type,key:0
+msgid "Key"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.item,price_version_id:0
+msgid "Price List Version"
+msgstr ""
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid "Rules Test Match"
+msgstr ""
+
+#. module: product
+#: help:res.partner,property_product_pricelist:0
+msgid ""
+"This pricelist will be used, instead of the default one, "
+"for sales to the current partner"
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_pricelist
+#: view:product.supplierinfo:0
+msgid "Pricelist"
+msgstr ""
+
+#. module: product
+#: selection:product.template,type:0
+msgid "Consumable"
+msgstr ""
+
+#. module: product
+#: help:product.price.type,currency_id:0
+msgid "The currency the field is expressed in."
+msgstr ""
+
+#. module: product
+#: help:product.template,weight:0
+msgid "The gross weight in Kg."
+msgstr ""
+
+#. module: product
+#: selection:product.ul,type:0
+msgid "Box"
+msgstr ""
+
+#. module: product
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: product
+#: help:product.template,sale_ok:0
+msgid ""
+"Determine if the product can be visible in the list of product within a "
+"selection from a sale order line."
+msgstr ""
+
+#. module: product
+#: constraint:product.template:0
+msgid "Error: UOS must be in a different category than the UOM"
+msgstr ""
+
+#. module: product
+#: field:product.category,parent_id:0
+msgid "Parent Category"
+msgstr ""
+
+#. module: product
+#: selection:product.template,state:0
+msgid "In Development"
+msgstr ""
+
+#. module: product
+#: help:product.pricelist.type,key:0
+msgid ""
+"Used in the code to select specific prices based on the context. Keep "
+"unchanged."
+msgstr ""
+
+#. module: product
+#: help:product.product,outgoing_qty:0
+msgid ""
+"Quantities of products that are planned to leave in selected locations or "
+"all internal if none have been selected."
+msgstr ""
+
+#. module: product
+#: field:product.packaging,weight:0
+msgid "Total Package Weight"
+msgstr ""
+
+#. module: product
+#: help:product.template,procure_method:0
+msgid ""
+"'Make to Stock': When needed, take from the stock or wait until re-"
+"supplying. 'Make to Order': When needed, purchase or produce for the "
+"procurement request."
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Procurement"
+msgstr ""
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_category_action
+#: model:ir.ui.menu,name:product.menu_product_category_action
+msgid "Products by Category"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_hdd1_product_template
+msgid "HDD Seagate 7200.8 80GB"
+msgstr ""
+
+#. module: product
+#: help:product.pricelist.version,active:0
+msgid ""
+"When a version is duplicated it is set to non active, so that the dates do "
+"not overlaps with original version. You should change the dates and "
+"reactivate the pricelist"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_hdd3_product_template
+msgid "HDD Seagate 7200.8 160GB"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+msgid "Product Variant"
+msgstr ""
+
+#. module: product
+#: field:product.packaging,ul:0
+msgid "Type of Package"
+msgstr ""
+
+#. module: product
+#: field:product.template,loc_rack:0
+msgid "Rack"
+msgstr ""
+
+#. module: product
+#: field:product.uom,category_id:0
+msgid "UoM Category"
+msgstr ""
+
+#. module: product
+#: selection:product.ul,type:0
+msgid "Pack"
+msgstr ""
+
+#. module: product
+#: field:product.product,ean13:0
+msgid "EAN13"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+#: field:product.template,description_sale:0
+msgid "Sale Description"
+msgstr ""
+
+#. module: product
+#: field:product.template,uos_id:0
+msgid "Unit of Sale"
+msgstr ""
+
+#. module: product
+#: field:product.template,mes_type:0
+msgid "Measure Type"
+msgstr ""
+
+#. module: product
+#: model:product.uom.categ,name:product.product_uom_categ_kgm
+msgid "Weight"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_22_product_template
+msgid "Processor on demand"
+msgstr ""
+
+#. module: product
+#: help:product.supplierinfo,product_name:0
+msgid ""
+"Name of the product for this partner, will be used when printing a request "
+"for quotation. Keep empty to use the internal one."
+msgstr ""
+
+#. module: product
+#: field:product.template,supply_method:0
+msgid "Supply method"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.product_category_11
+msgid "IT components kits"
+msgstr ""
+
+#. module: product
+#: view:product.uom.categ:0
+msgid "Units of Measure categories"
+msgstr ""
+
+#. module: product
+#: field:product.category,sequence:0
+#: field:product.packaging,sequence:0
+#: field:product.pricelist.item,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: product
+#: view:product.supplierinfo:0
+msgid "Supplier Information"
+msgstr ""
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_ul_form_action
+#: model:ir.model,name:product.model_product_packaging
+#: model:ir.ui.menu,name:product.menu_product_ul_form_action
+#: view:product.packaging:0
+#: view:product.product:0
+#: view:product.ul:0
+msgid "Packaging"
+msgstr ""
+
+#. module: product
+#: field:product.price.type,currency_id:0
+#: field:product.pricelist,currency_id:0
+msgid "Currency"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_cpu_gen_product_template
+msgid "Regular processor config"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Descriptions"
+msgstr ""
+
+#. module: product
+#: model:process.transition,name:product.process_transition_supplierofproduct0
+msgid "Suppliers of Product"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.version,date_start:0
+msgid "Start Date"
+msgstr ""
+
+#. module: product
+#: view:res.partner:0
+msgid "Sales Properties"
+msgstr ""
+
+#. module: product
+#: help:product.product,qty_available:0
+msgid ""
+"Current quantities of products in selected locations or all internal if none "
+"have been selected."
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_pc1_product_template
+msgid "Basic PC"
+msgstr ""
+
+#. module: product
+#: field:product.template,loc_row:0
+msgid "Row"
+msgstr ""
+
+#. module: product
+#: field:product.template,categ_id:0
+msgid "Category"
+msgstr ""
+
+#. module: product
+#: help:product.pricelist.item,min_quantity:0
+msgid ""
+"The rule only applies if the partner buys/sells more than this quantity."
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_ram_product_template
+msgid "DDR 256MB PC400"
+msgstr ""
+
+#. module: product
+#: field:product.product,qty_available:0
+msgid "Real Stock"
+msgstr ""
+
+#. module: product
+#: view:product.category:0
+msgid "Product Categories"
+msgstr ""
+
+#. module: product
+#: help:product.uom,category_id:0
+msgid ""
+"Unit of Measure of a category can be converted between each others in the "
+"same category."
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_uom
+msgid "Product Unit of Measure"
+msgstr ""
+
+#. module: product
+#: field:product.template,sale_ok:0
+msgid "Can be sold"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_23_product_template
+msgid "Complete PC With Peripherals"
+msgstr ""
+
+#. module: product
+#: constraint:product.template:0
+msgid ""
+"Error: The default UOM and the purchase UOM must be in the same category."
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_mb2_product_template
+msgid "Mainboard ASUStek A7V8X-X"
+msgstr ""
+
+#. module: product
+#: field:product.uom,factor:0
+msgid "Rate"
+msgstr ""
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid "Products Listprices Items"
+msgstr ""
+
+#. module: product
+#: field:product.uom,rounding:0
+msgid "Rounding Precision"
+msgstr ""
+
+#. module: product
+#: help:product.packaging,width:0
+msgid "The width of the package"
+msgstr ""
+
+#. module: product
+#: field:product.packaging,qty:0
+msgid "Quantity by Package"
+msgstr ""
+
+#. module: product
+#: help:product.template,uos_id:0
+msgid ""
+"Used by companies that manages two unit of measure: invoicing and stock "
+"management. For example, in food industries, you will manage a stock of ham "
+"but invoice in Kg. Keep empty to use the default UOM."
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Procurement & Locations"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+#: field:product.template,state:0
+msgid "Status"
+msgstr ""
+
+#. module: product
+#: field:product.product,outgoing_qty:0
+msgid "Outgoing"
+msgstr ""
+
+#. module: product
+#: selection:product.template,supply_method:0
+msgid "Buy"
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_pricelist_version
+#: view:product.pricelist:0
+#: view:product.pricelist.version:0
+msgid "Pricelist Version"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.item,price_round:0
+msgid "Price Rounding"
+msgstr ""
+
+#. module: product
+#: model:product.price.type,name:product.list_price
+msgid "Public Price"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.item,price_max_margin:0
+msgid "Max. Price Margin"
+msgstr ""
+
+#. module: product
+#: view:res.partner:0
+msgid "Sales & Purchases"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.product_category_10
+msgid "IT components"
+msgstr ""
+
+#. module: product
+#: help:product.packaging,weight_ul:0
+msgid "The weight of the empty UL"
+msgstr ""
+
+#. module: product
+#: help:product.packaging,code:0
+msgid "The code of the transport unit."
+msgstr ""
+
+#. module: product
+#: field:product.template,uom_po_id:0
+msgid "Purchase UoM"
+msgstr ""
+
+#. module: product
+#: view:product.price.type:0
+msgid "Products Price Type"
+msgstr ""
+
+#. module: product
+#: field:product.template,product_manager:0
+msgid "Product Manager"
+msgstr ""
+
+#. module: product
+#: field:product.product,price_extra:0
+msgid "Variant Price Extra"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_fan_product_template
+msgid "Regular case fan 80mm"
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_supplierinfo
+msgid "Information about a product supplier"
+msgstr ""
+
+#. module: product
+#: field:product.price.type,active:0
+#: field:product.pricelist,active:0
+#: field:product.pricelist.version,active:0
+#: field:product.product,active:0
+#: field:product.uom,active:0
+msgid "Active"
+msgstr ""
+
+#. module: product
+#: field:product.product,price_margin:0
+msgid "Variant Price Margin"
+msgstr ""
+
+#. module: product
+#: wizard_view:product.price_list,init:0
+msgid "Price list"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_pc3_product_template
+msgid "Medium PC"
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_pricelist_partnerinfo
+msgid "pricelist.partnerinfo"
+msgstr ""
+
+#. module: product
+#: model:product.price.type,name:product.standard_price
+#: field:product.template,standard_price:0
+msgid "Cost Price"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+#: field:product.template,description_purchase:0
+msgid "Purchase Description"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Second UoM"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.product_category_4
+msgid "Dello Computer"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Storage Localisation"
+msgstr ""
+
+#. module: product
+#: help:product.packaging,length:0
+msgid "The length of the package"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.item,price_min_margin:0
+msgid "Min. Price Margin"
+msgstr ""
+
+#. module: product
+#: help:product.packaging,ean:0
+msgid "The EAN code of the package unit."
+msgstr ""
+
+#. module: product
+#: field:product.template,weight:0
+msgid "Gross weight"
+msgstr ""
+
+#. module: product
+#: help:product.product,packaging:0
+msgid ""
+"Gives the different ways to package the same product. This has no impact on "
+"the packing order and is mainly used if you use the EDI module."
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_category
+#: field:product.pricelist.item,categ_id:0
+msgid "Product Category"
+msgstr ""
+
+#. module: product
+#: field:product.price.type,field:0
+msgid "Product Field"
+msgstr ""
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_pricelist_type_action
+#: model:ir.ui.menu,name:product.menu_product_pricelist_type_action
+msgid "Pricelists Types"
+msgstr ""
+
+#. module: product
+#: help:product.template,state:0
+msgid "Tells the user if he can use the product or not."
+msgstr ""
+
+#. module: product
+#: field:product.supplierinfo,product_code:0
+msgid "Partner Product Code"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.product_category_3
+msgid "Computer Stuff"
+msgstr ""
+
+#. module: product
+#: field:product.packaging,code:0
+#: field:product.product,code:0
+#: field:product.product,default_code:0
+msgid "Code"
+msgstr ""
+
+#. module: product
+#: help:product.uom,factor_inv:0
+msgid ""
+"The coefficient for the formula:\n"
+"coeff (base unit) = 1 (this unit). Factor = 1 / Rate."
+msgstr ""
+
+#. module: product
+#: view:product.supplierinfo:0
+msgid "Seq"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.product_category_8
+msgid "Phone Help"
+msgstr ""
+
+#. module: product
+#: selection:product.template,mes_type:0
+msgid "Variable"
+msgstr ""
+
+#. module: product
+#: help:product.template,uom_id:0
+msgid "Default Unit of Measure used for all stock operation."
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_template
+#: field:product.pricelist.item,product_tmpl_id:0
+#: field:product.product,product_tmpl_id:0
+#: view:product.template:0
+msgid "Product Template"
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_ul
+msgid "Shipping Unit"
+msgstr ""
+
+#. module: product
+#: help:product.uom,rounding:0
+msgid ""
+"The computed quantity will be a multiple of this value. Use 1.0 for products "
+"that can not be split."
+msgstr ""
+
+#. module: product
+#: field:product.packaging,height:0
+msgid "Height"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_pc4_product_template
+msgid "Customizable PC"
+msgstr ""
+
+#. module: product
+#: help:product.pricelist.version,date_end:0
+msgid "Ending date for this pricelist version to be valid."
+msgstr ""
+
+#. module: product
+#: field:pricelist.partnerinfo,suppinfo_id:0
+msgid "Partner Information"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+#: field:product.template,type:0
+msgid "Product Type"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.product_category_7
+#: model:product.template,name:product.product_product_1_product_template
+msgid "Onsite Intervention"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.cat0
+msgid "All products"
+msgstr ""
+
+#. module: product
+#: wizard_button:product.price_list,init,end:0
+msgid "Cancel"
+msgstr ""
+
+#. module: product
+#: help:product.packaging,qty:0
+msgid "The total number of products you can put by palet or box."
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_pricelist_item
+msgid "Pricelist item"
+msgstr ""
+
+#. module: product
+#: model:ir.actions.wizard,name:product.report_wizard_price
+#: field:product.pricelist.version,pricelist_id:0
+msgid "Price List"
+msgstr ""
+
+#. module: product
+#: model:product.pricelist,name:product.list0
+msgid "Public Pricelist"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_21_product_template
+msgid "RAM on demand"
+msgstr ""
+
+#. module: product
+#: selection:product.ul,type:0
+#: model:product.uom.categ,name:product.product_uom_categ_unit
+msgid "Unit"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_hdd2_product_template
+msgid "HDD Seagate 7200.8 120GB"
+msgstr ""
+
+#. module: product
+#: wizard_field:product.price_list,init,qty2:0
+msgid "Quantity-2"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Information"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+msgid "Codes"
+msgstr ""
+
+#. module: product
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: product
+#: wizard_field:product.price_list,init,qty4:0
+msgid "Quantity-4"
+msgstr ""
+
+#. module: product
+#: wizard_field:product.price_list,init,qty5:0
+msgid "Quantity-5"
+msgstr ""
+
+#. module: product
+#: view:product.packaging:0
+#: view:product.product:0
+msgid "Other Info"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Delays"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.version,items_id:0
+msgid "Price List Items"
+msgstr ""
+
+#. module: product
+#: help:product.supplierinfo,product_code:0
+msgid ""
+"Code of the product for this partner, will be used when printing a request "
+"for quotation. Keep empty to use the internal one."
+msgstr ""
+
+#. module: product
+#: selection:product.template,state:0
+msgid "Obsolete"
+msgstr ""
+
+#. module: product
+#: selection:product.ul,type:0
+msgid "Pallet"
+msgstr ""
+
+#. module: product
+#: field:pricelist.partnerinfo,price:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: product
+#: field:product.template,warranty:0
+msgid "Warranty (months)"
+msgstr ""
+
+#. module: product
+#: field:product.packaging,ul_qty:0
+msgid "Package by layer"
+msgstr ""
+
+#. module: product
+#: help:product.template,type:0
+msgid ""
+"Will change the way procurements are processed. Consumables are stockable "
+"products with infinite stock, or for use when you have no stock management "
+"in the system."
+msgstr ""
+
+#. module: product
+#: model:process.node,note:product.process_node_supplier0
+msgid "Product suppliers, with their product name, price, etc."
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_price_type
+msgid "Price type"
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_product
+#: model:process.node,name:product.process_node_product0
+#: field:product.packaging,product_id:0
+#: field:product.pricelist.item,product_id:0
+#: view:product.product:0
+#: field:product.supplierinfo,product_id:0
+#: model:res.request.link,name:product.req_link_product
+msgid "Product"
+msgstr ""
+
+#. module: product
+#: field:product.template,volume:0
+msgid "Volume"
+msgstr ""
+
+#. module: product
+#: field:pricelist.partnerinfo,name:0
+#: field:product.packaging,name:0
+#: view:product.product:0
+#: view:product.template:0
+#: field:product.template,description:0
+msgid "Description"
+msgstr ""
+
+#. module: product
+#: field:product.packaging,ean:0
+msgid "EAN"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Product Description"
+msgstr ""
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid " ) + "
+msgstr ""
+
+#. module: product
+#: help:product.template,sale_delay:0
+msgid ""
+"This is the average time between the confirmation of the customer order and "
+"the delivery of the finished products. It's the time you promise to your "
+"customers."
+msgstr ""
+
+#. module: product
+#: model:ir.model,name:product.model_product_uom_categ
+msgid "Product uom categ"
+msgstr ""
+
+#. module: product
+#: wizard_field:product.price_list,init,qty3:0
+msgid "Quantity-3"
+msgstr ""
+
+#. module: product
+#: model:product.ul,name:product.product_ul_box
+msgid "Box 20x20x40"
+msgstr ""
+
+#. module: product
+#: selection:product.template,supply_method:0
+msgid "Produce"
+msgstr ""
+
+#. module: product
+#: selection:product.template,procure_method:0
+msgid "Make to Order"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.item,price_surcharge:0
+msgid "Price Surcharge"
+msgstr ""
+
+#. module: product
+#: constraint:product.pricelist.version:0
+msgid "You cannot have 2 pricelist versions that overlap!"
+msgstr ""
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid "Rounding Method"
+msgstr ""
+
+#. module: product
+#: field:product.product,variants:0
+msgid "Variants"
+msgstr ""
+
+#. module: product
+#: view:product.pricelist.item:0
+msgid "Price Computation"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_mb1_product_template
+msgid "Mainboard ASUStek A7N8X"
+msgstr ""
+
+#. module: product
+#: field:product.template,loc_case:0
+msgid "Case"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.version,date_end:0
+msgid "End Date"
+msgstr ""
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_category_action_form
+#: model:ir.ui.menu,name:product.menu_product_category_action_form
+msgid "Products Categories"
+msgstr ""
+
+#. module: product
+#: field:product.product,packaging:0
+msgid "Logistical Units"
+msgstr ""
+
+#. module: product
+#: field:product.category,complete_name:0
+#: field:product.category,name:0
+#: field:product.pricelist.type,name:0
+#: field:product.pricelist.version,name:0
+#: field:product.template,name:0
+#: field:product.ul,name:0
+#: field:product.uom,name:0
+#: field:product.uom.categ,name:0
+msgid "Name"
+msgstr ""
+
+#. module: product
+#: help:product.template,uos_coeff:0
+msgid ""
+"Coefficient to convert UOM to UOS\n"
+" uom = uos * coeff"
+msgstr ""
+
+#. module: product
+#: field:product.template,purchase_ok:0
+msgid "Can be Purchased"
+msgstr ""
+
+#. module: product
+#: field:product.template,uos_coeff:0
+msgid "UOM -> UOS Coeff"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_cpu2_product_template
+msgid "High speed processor config"
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_pc2_product_template
+msgid "Basic+ PC (assembly on order)"
+msgstr ""
+
+#. module: product
+#: field:product.template,cost_method:0
+msgid "Costing Method"
+msgstr ""
+
+#. module: product
+#: view:product.packaging:0
+#: view:product.product:0
+msgid "Palletization"
+msgstr ""
+
+#. module: product
+#: view:product.product:0
+#: view:product.template:0
+msgid "Prices & Suppliers"
+msgstr ""
+
+#. module: product
+#: help:product.packaging,weight:0
+msgid "The weight of a full of products palet or box."
+msgstr ""
+
+#. module: product
+#: selection:product.template,state:0
+msgid "End of Lifecycle"
+msgstr ""
+
+#. module: product
+#: model:ir.module.module,shortdesc:product.module_meta_information
+msgid "Products & Pricelists"
+msgstr ""
+
+#. module: product
+#: help:product.uom,factor:0
+msgid ""
+"The coefficient for the formula:\n"
+"1 (base unit) = coeff (this unit). Rate = 1 / Factor."
+msgstr ""
+
+#. module: product
+#: help:product.template,weight_net:0
+msgid "The net weight in Kg."
+msgstr ""
+
+#. module: product
+#: model:product.template,name:product.product_product_tow1_product_template
+msgid "ATX Mid-size Tower"
+msgstr ""
+
+#. module: product
+#: field:product.supplierinfo,delay:0
+msgid "Delivery Delay"
+msgstr ""
+
+#. module: product
+#: model:ir.actions.act_window,name:product.product_pricelist_action
+#: model:ir.ui.menu,name:product.menu_product_pricelist_action
+#: field:product.pricelist,version_id:0
+msgid "Pricelist Versions"
+msgstr ""
+
+#. module: product
+#: field:product.packaging,weight_ul:0
+msgid "Empty Package Weight"
+msgstr ""
+
+#. module: product
+#: field:product.template,list_price:0
+msgid "Sale Price"
+msgstr ""
+
+#. module: product
+#: help:product.template,produce_delay:0
+msgid ""
+"Average time to produce this product. This is only for the production order "
+"and, if it is a multi-level bill of material, it's only for the level of "
+"this product. Different delays will be summed for all levels and purchase "
+"orders."
+msgstr ""
+
+#. module: product
+#: wizard_field:product.price_list,init,qty1:0
+msgid "Quantity-1"
+msgstr ""
+
+#. module: product
+#: field:product.packaging,length:0
+msgid "Length"
+msgstr ""
+
+#. module: product
+#: model:product.category,name:product.cat2
+msgid "Private"
+msgstr ""
+
+#. module: product
+#: help:product.supplierinfo,delay:0
+msgid ""
+"Delay in days between the confirmation of the purchase order and the "
+"reception of the products in your warehouse. Used by the scheduler for "
+"automatic computation of the purchase order planning."
+msgstr ""
+
+#. module: product
+#: help:product.template,uom_po_id:0
+msgid ""
+"Default Unit of Measure used for purchase orders. It must in the same "
+"category than the default unit of measure."
+msgstr ""
+
+#. module: product
+#: constraint:product.product:0
+msgid "Error: Invalid ean code"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.item,min_quantity:0
+msgid "Min. Quantity"
+msgstr ""
+
+#. module: product
+#: help:product.pricelist.item,categ_id:0
+msgid ""
+"Set a category of product if this rule only apply to products of a category "
+"and his childs. Keep empty for all products"
+msgstr ""
+
+#. module: product
+#: model:ir.actions.report.xml,name:product.report_product_label
+msgid "Products Labels"
+msgstr ""
+
+#. module: product
+#: help:product.template,volume:0
+msgid "The volume in m3."
+msgstr ""
+
+#. module: product
+#: model:product.ul,name:product.product_ul_big_box
+msgid "Box 30x40x60"
+msgstr ""
+
+#. module: product
+#: model:product.uom,name:product.product_uom_kgm
+msgid "KGM"
+msgstr ""
+
+#. module: product
+#: field:product.pricelist.item,price_discount:0
+msgid "Price Discount"
+msgstr ""
diff --git a/addons/product/i18n/sl.po b/addons/product/i18n/sl.po
index 28ddeda6b14..356ba91e108 100644
--- a/addons/product/i18n/sl.po
+++ b/addons/product/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 11:09+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 13:39+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:41+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product
@@ -74,7 +74,7 @@ msgstr ""
#. module: product
#: field:product.template,weight_net:0
msgid "Net weight"
-msgstr "Neto teža"
+msgstr "Neto masa"
#. module: product
#: help:product.product,incoming_qty:0
@@ -113,7 +113,7 @@ msgstr "Metoda nabave"
#. module: product
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Napačno ime modela v definiciji dejanja."
#. module: product
#: model:process.process,name:product.process_process_productprocess0
@@ -163,7 +163,7 @@ msgstr "Kupčeva cena"
#. module: product
#: field:product.template,company_id:0
msgid "Company"
-msgstr ""
+msgstr "Družba"
#. module: product
#: field:product.template,rental:0
@@ -189,7 +189,7 @@ msgstr "Možno dati v zalogo"
#. module: product
#: model:product.category,name:product.product_category_services
msgid "Services"
-msgstr ""
+msgstr "Storitve"
#. module: product
#: help:product.template,list_price:0
@@ -335,7 +335,7 @@ msgstr ""
#. module: product
#: field:product.pricelist.item,name:0
msgid "Rule Name"
-msgstr ""
+msgstr "Ime pravila"
#. module: product
#: model:ir.ui.menu,name:product.menu_config_product
@@ -454,12 +454,12 @@ msgstr "V proizvodnji"
#. module: product
#: field:product.category,child_id:0
msgid "Child Categories"
-msgstr ""
+msgstr "Kategorije podrejenih"
#. module: product
#: model:product.category,name:product.product_category_accessories
msgid "Accessories"
-msgstr ""
+msgstr "Pripomočki"
#. module: product
#: field:product.supplierinfo,sequence:0
@@ -480,7 +480,7 @@ msgstr "Koeficient"
#. module: product
#: wizard_button:product.price_list,init,price:0
msgid "Print"
-msgstr ""
+msgstr "Natisni"
#. module: product
#: model:process.node,name:product.process_node_supplier0
@@ -501,7 +501,7 @@ msgstr "Cenik"
#: view:product.product:0
#: view:product.template:0
msgid "UOM"
-msgstr ""
+msgstr "ME"
#. module: product
#: model:product.uom,name:product.product_uom_unit
@@ -614,12 +614,12 @@ msgstr "Potrošni material"
#. module: product
#: help:product.price.type,currency_id:0
msgid "The currency the field is expressed in."
-msgstr ""
+msgstr "Valuta v kateri je izraženo polje"
#. module: product
#: help:product.template,weight:0
msgid "The gross weight in Kg."
-msgstr ""
+msgstr "Bruto masa v kg."
#. module: product
#: selection:product.ul,type:0
@@ -672,7 +672,7 @@ msgstr ""
#. module: product
#: field:product.packaging,weight:0
msgid "Total Package Weight"
-msgstr ""
+msgstr "Skupna masa paketa"
#. module: product
#: help:product.template,procure_method:0
@@ -762,7 +762,7 @@ msgstr "Vrsta mere"
#. module: product
#: model:product.uom.categ,name:product.product_uom_categ_kgm
msgid "Weight"
-msgstr ""
+msgstr "masa"
#. module: product
#: model:product.template,name:product.product_product_22_product_template
@@ -944,7 +944,7 @@ msgstr ""
#. module: product
#: field:product.packaging,qty:0
msgid "Quantity by Package"
-msgstr ""
+msgstr "Količina na paket"
#. module: product
#: help:product.template,uos_id:0
@@ -1007,12 +1007,12 @@ msgstr "Prodaja in nabava"
#. module: product
#: model:product.category,name:product.product_category_10
msgid "IT components"
-msgstr ""
+msgstr "Komponete IT"
#. module: product
#: help:product.packaging,weight_ul:0
msgid "The weight of the empty UL"
-msgstr "Teža prazne LE"
+msgstr "Masa prazne LE"
#. module: product
#: help:product.packaging,code:0
@@ -1022,7 +1022,7 @@ msgstr "Oznaka transportne enote."
#. module: product
#: field:product.template,uom_po_id:0
msgid "Purchase UoM"
-msgstr ""
+msgstr "ME nabave"
#. module: product
#: view:product.price.type:0
@@ -1066,7 +1066,7 @@ msgstr "Spremenljiva marža"
#. module: product
#: wizard_view:product.price_list,init:0
msgid "Price list"
-msgstr ""
+msgstr "Cenik"
#. module: product
#: model:product.template,name:product.product_product_pc3_product_template
@@ -1100,7 +1100,7 @@ msgstr "Druga EM"
#. module: product
#: model:product.category,name:product.product_category_4
msgid "Dello Computer"
-msgstr ""
+msgstr "Računalnik Dello"
#. module: product
#: view:product.product:0
@@ -1111,7 +1111,7 @@ msgstr "Lokacije shrambe"
#. module: product
#: help:product.packaging,length:0
msgid "The length of the package"
-msgstr ""
+msgstr "Dolžina paketa"
#. module: product
#: field:product.pricelist.item,price_min_margin:0
@@ -1126,7 +1126,7 @@ msgstr ""
#. module: product
#: field:product.template,weight:0
msgid "Gross weight"
-msgstr "Bruto teža"
+msgstr "Bruto masa"
#. module: product
#: help:product.product,packaging:0
@@ -1167,7 +1167,7 @@ msgstr ""
#. module: product
#: model:product.category,name:product.product_category_3
msgid "Computer Stuff"
-msgstr ""
+msgstr "Računalniške zadeve"
#. module: product
#: field:product.packaging,code:0
@@ -1191,7 +1191,7 @@ msgstr "Zap."
#. module: product
#: model:product.category,name:product.product_category_8
msgid "Phone Help"
-msgstr ""
+msgstr "Telefonska pomoč"
#. module: product
#: selection:product.template,mes_type:0
@@ -1264,7 +1264,7 @@ msgstr ""
#. module: product
#: wizard_button:product.price_list,init,end:0
msgid "Cancel"
-msgstr ""
+msgstr "Prekliči"
#. module: product
#: help:product.packaging,qty:0
@@ -1368,7 +1368,7 @@ msgstr "Zastarelo"
#. module: product
#: selection:product.ul,type:0
msgid "Pallet"
-msgstr ""
+msgstr "Paleta"
#. module: product
#: field:pricelist.partnerinfo,price:0
@@ -1442,7 +1442,7 @@ msgstr "Opis proizvoda"
#. module: product
#: view:product.pricelist.item:0
msgid " ) + "
-msgstr ""
+msgstr " ) + "
#. module: product
#: help:product.template,sale_delay:0
@@ -1465,7 +1465,7 @@ msgstr ""
#. module: product
#: model:product.ul,name:product.product_ul_box
msgid "Box 20x20x40"
-msgstr ""
+msgstr "Škatla 20x20x40"
#. module: product
#: selection:product.template,supply_method:0
@@ -1611,7 +1611,7 @@ msgstr ""
#. module: product
#: help:product.template,weight_net:0
msgid "The net weight in Kg."
-msgstr ""
+msgstr "Neto masa v kg."
#. module: product
#: model:product.template,name:product.product_product_tow1_product_template
@@ -1621,7 +1621,7 @@ msgstr "Ohišje ATX Tower, srednje velikosti"
#. module: product
#: field:product.supplierinfo,delay:0
msgid "Delivery Delay"
-msgstr ""
+msgstr "Zamik dostave"
#. module: product
#: model:ir.actions.act_window,name:product.product_pricelist_action
@@ -1666,7 +1666,7 @@ msgstr "Dolžina"
#. module: product
#: model:product.category,name:product.cat2
msgid "Private"
-msgstr ""
+msgstr "Zasebno"
#. module: product
#: help:product.supplierinfo,delay:0
@@ -1708,12 +1708,12 @@ msgstr "Etikete proizvodov"
#. module: product
#: help:product.template,volume:0
msgid "The volume in m3."
-msgstr ""
+msgstr "Prostornina v m3"
#. module: product
#: model:product.ul,name:product.product_ul_big_box
msgid "Box 30x40x60"
-msgstr ""
+msgstr "Škatla 30x40x60"
#. module: product
#: model:product.uom,name:product.product_uom_kgm
diff --git a/addons/product/i18n/zh_CN.po b/addons/product/i18n/zh_CN.po
index 0b5f06c0def..4c3f0bc10c9 100644
--- a/addons/product/i18n/zh_CN.po
+++ b/addons/product/i18n/zh_CN.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-29 04:35+0000\n"
+"X-Launchpad-Export-Date: 2009-11-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product
diff --git a/addons/product/security/ir.model.access.csv b/addons/product/security/ir.model.access.csv
index 062db9e34e8..64f48a7a708 100644
--- a/addons/product/security/ir.model.access.csv
+++ b/addons/product/security/ir.model.access.csv
@@ -29,4 +29,6 @@
"access_product_pricelist_item_user","product.pricelist.item.user","model_product_pricelist_item","base.group_user",1,0,0,0
"access_product_pricelist_type_partner_manager","product.pricelist.type partner manager","model_product_pricelist_type","base.group_partner_manager",1,0,0,0
"access_product_pricelist_partner_manager","product.pricelist partner manager","model_product_pricelist","base.group_partner_manager",1,0,0,0
-"access_ir_property_group_product_manager","ir_property group_product_manager","base.model_ir_property",product.group_product_manager,1,1,1,1
+"access_ir_property_group_product_manager","ir_property group_product_manager","base.model_ir_property","product.group_product_manager",1,1,1,1
+"access_company_wise_cost_price","company_wise_cost_price Manager","model_company_wise_cost_price","product.group_product_manager",1,1,1,1
+"access_company_wise_sale_price","company_wise_sale_price Manager","model_company_wise_sale_price","product.group_product_manager",1,1,1,1
diff --git a/addons/project/i18n/hr.po b/addons/project/i18n/hr.po
index 392d0b0a246..682443f3741 100644
--- a/addons/project/i18n/hr.po
+++ b/addons/project/i18n/hr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-24 07:22+0000\n"
+"PO-Revision-Date: 2009-11-30 06:24+0000\n"
"Last-Translator: nafterburner \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: 2009-11-25 04:48+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: project
@@ -672,7 +672,7 @@ msgstr "Nisko"
#. module: project
#: field:project.project,manager:0
msgid "Project Manager"
-msgstr ""
+msgstr "Menadžer Projekta"
#. module: project
#: view:project.project:0
diff --git a/addons/project/project.py b/addons/project/project.py
index 43572ecae7d..9b97b08c433 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -441,6 +441,7 @@ class project_work(osv.osv):
'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True),
'hours': fields.float('Time Spent'),
'user_id': fields.many2one('res.users', 'Done by', required=True),
+ 'company_id': fields.related('task_id','company_id',type='many2one',relation='res.company',string='Company')
}
_defaults = {
'user_id': lambda obj,cr,uid,context: uid,
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index cdc7670b8fd..05a46c6cc5f 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -193,6 +193,7 @@
+
diff --git a/addons/project/report/gantt_report.py b/addons/project/report/gantt_report.py
index d0df7d8f449..cb6782b603d 100644
--- a/addons/project/report/gantt_report.py
+++ b/addons/project/report/gantt_report.py
@@ -19,7 +19,6 @@
#
##############################################################################
-from sets import Set
from mx.DateTime import *
import StringIO
diff --git a/addons/project_gtd/project_gtd_demo.xml b/addons/project_gtd/project_gtd_demo.xml
index 2f10ac0120a..ac73d5c7e1e 100644
--- a/addons/project_gtd/project_gtd_demo.xml
+++ b/addons/project_gtd/project_gtd_demo.xml
@@ -72,6 +72,39 @@
Validation + latest modifications.
+
+
+ 38.0
+ 38.0
+
+
+
+
+
+ Specific adaptation to MRP
+
+
+
+ 40
+ 32.0
+ 32.0
+
+
+
+
+ In house training
+
+
+ 50
+ 24.0
+ 24.0
+
+
+
+
+ Validation + latest modifications.
+
+
diff --git a/addons/project_mrp/i18n/sl.po b/addons/project_mrp/i18n/sl.po
index e5ee33e8c43..cde3f089732 100644
--- a/addons/project_mrp/i18n/sl.po
+++ b/addons/project_mrp/i18n/sl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 10:19+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2009-11-30 10:30+0000\n"
+"Last-Translator: Simon Vidmar \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-11-18 04:42+0000\n"
+"X-Launchpad-Export-Date: 2009-12-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: project_mrp
@@ -55,7 +55,7 @@ msgstr ""
#. module: project_mrp
#: model:process.transition,name:project_mrp.process_transition_procuretask0
msgid "Procure Task"
-msgstr ""
+msgstr "Naloga - nabavi"
#. module: project_mrp
#: model:process.node,note:project_mrp.process_node_mrptask0
@@ -65,19 +65,19 @@ msgstr ""
#. module: project_mrp
#: model:process.transition,name:project_mrp.process_transition_ordertask0
msgid "Order Task"
-msgstr ""
+msgstr "Naloga - naročilo"
#. module: project_mrp
#: model:process.node,name:project_mrp.process_node_saleordertask0
msgid "Sale Order Task"
-msgstr ""
+msgstr "Naloga - prodajni naročilo"
#. module: project_mrp
#: model:process.transition,name:project_mrp.process_transition_createtask0
msgid "Create Task"
-msgstr ""
+msgstr "Ustvari nalogo"
#. module: project_mrp
#: model:process.node,note:project_mrp.process_node_saleordertask0
msgid "In case you sell services on sale order"
-msgstr ""
+msgstr "V primeru, da storitve prodajate preko prodajnega naročila"
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py
index 1f6f29e76d4..03d463b8269 100644
--- a/addons/project_timesheet/project_timesheet.py
+++ b/addons/project_timesheet/project_timesheet.py
@@ -78,7 +78,7 @@ class project_work(osv.osv):
vals_line['amount'] = 00.0
timeline_id = obj.create(cr, uid, vals_line, {})
- vals_line['amount'] = (-1) * vals['hours'] * obj.browse(cr, uid, timeline_id).product_id.standard_price
+ vals_line['amount'] = (-1) * vals['hours']* ( obj.browse(cr,uid,timeline_id).product_id.standard_price or 0.0)
obj.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)
@@ -104,7 +104,7 @@ class project_work(osv.osv):
vals_line['date'] = vals['date'][:10]
if 'hours' in vals:
vals_line['unit_amount'] = vals['hours']
- vals_line['amount'] = (-1) * vals['hours'] * obj.browse(cr, uid, line_id).product_id.standard_price
+ vals_line['amount'] = (-1) * vals['hours'] * (obj.browse(cr,uid,line_id).product_id.standard_price or 0.0)
obj.write(cr, uid, [line_id], vals_line, {})
return super(project_work,self).write(cr, uid, ids, vals, context)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index f2063354cad..a3320f93977 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -449,7 +449,7 @@ class purchase_order_line(osv.osv):
'notes': fields.text('Notes'),
'order_id': fields.many2one('purchase.order', 'Order Ref', select=True, required=True, ondelete='cascade'),
'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),
- 'company_id': fields.related('order_id','company_id',type='many2one',object='res.company',string='Company')
+ 'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company')
}
_defaults = {
'product_qty': lambda *a: 1.0
@@ -464,13 +464,15 @@ class purchase_order_line(osv.osv):
return super(purchase_order_line, self).copy_data(cr, uid, id, default, context)
def product_id_change(self, cr, uid, ids, pricelist, product, qty, uom,
- partner_id, date_order=False, fiscal_position=False):
+ partner_id, date_order=False, fiscal_position=False, date_planned=False,
+ name=False, price_unit=False, notes=False):
if not pricelist:
raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the purchase form !\nPlease set one before choosing a product.'))
if not partner_id:
raise osv.except_osv(_('No Partner!'), _('You have to select a partner in the purchase form !\nPlease set one partner before choosing a product.'))
if not product:
- return {'value': {'price_unit': 0.0, 'name':'','notes':'', 'product_uom' : False}, 'domain':{'product_uom':[]}}
+ return {'value': {'price_unit': price_unit or 0.0, 'name': name or '',
+ 'notes': notes or'', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}}
prod= self.pool.get('product.product').browse(cr, uid,product)
lang=False
if partner_id:
@@ -484,7 +486,10 @@ class purchase_order_line(osv.osv):
uom = prod_uom_po
if not date_order:
date_order = time.strftime('%Y-%m-%d')
- price = self.pool.get('product.pricelist').price_get(cr,uid,[pricelist],
+ if price_unit:
+ price = price_unit
+ else:
+ price = self.pool.get('product.pricelist').price_get(cr,uid,[pricelist],
product, qty or 1.0, partner_id, {
'uom': uom,
'date': date_order,
@@ -503,8 +508,9 @@ class purchase_order_line(osv.osv):
prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id])[0][1]
- res = {'value': {'price_unit': price, 'name':prod_name, 'taxes_id':map(lambda x: x.id, prod.supplier_taxes_id),
- 'date_planned': dt,'notes':prod.description_purchase,
+ res = {'value': {'price_unit': price, 'name': name or prod_name,
+ 'taxes_id':map(lambda x: x.id, prod.supplier_taxes_id),
+ 'date_planned': date_planned or dt,'notes': notes or prod.description_purchase,
'product_qty': qty,
'product_uom': uom}}
domain = {}
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 37577dd5844..4df314ee4f4 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -222,13 +222,13 @@