@@ -416,15 +416,27 @@ class account_account(osv.osv):
|
||||
default['child_parent_ids'] = False
|
||||
return super(account_account, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def _check_moves(self, cr, uid, ids, method, context):
|
||||
line_obj = self.pool.get('account.move.line')
|
||||
account_ids = self.search(cr, uid, [('id', 'child_of', ids)])
|
||||
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
|
||||
if method == 'write':
|
||||
raise osv.except_osv(_('Error !'), _('You cannot deactivate an account that contains account moves.'))
|
||||
elif method == 'unlink':
|
||||
raise osv.except_osv(_('Error !'), _('You cannot remove an account which has account entries!. '))
|
||||
return True
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if not context:
|
||||
context = {}
|
||||
if 'active' in vals and not vals['active']:
|
||||
line_obj = self.pool.get('account.move.line')
|
||||
account_ids = self.search(cr, uid, [('id', 'child_of', ids)])
|
||||
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
|
||||
raise osv.except_osv(_('Error !'), _('You can not deactivate an account that contains Ledger Postings.'))
|
||||
self._check_moves(cr, uid, ids, "write", context)
|
||||
return super(account_account, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def unlink(self, cr, uid, ids, context={}):
|
||||
self._check_moves(cr, uid, ids, "unlink", context)
|
||||
return super(account_account, self).unlink(cr, uid, ids, context)
|
||||
|
||||
account_account()
|
||||
|
||||
class account_journal_view(osv.osv):
|
||||
@@ -767,6 +779,23 @@ class account_move(osv.osv):
|
||||
for id in ids:
|
||||
result.setdefault(id, 0.0)
|
||||
return result
|
||||
|
||||
def _search_amount(self, cr, uid, obj, name, args, context):
|
||||
ids = []
|
||||
cr.execute('select move_id,sum(debit) from account_move_line group by move_id')
|
||||
result = dict(cr.fetchall())
|
||||
|
||||
for item in args:
|
||||
if item[1] == '>=':
|
||||
res = [('id', 'in', [k for k,v in result.iteritems() if v >= item[2]])]
|
||||
else:
|
||||
res = [('id', 'in', [k for k,v in result.iteritems() if v <= item[2]])]
|
||||
ids += res
|
||||
|
||||
if not ids:
|
||||
return [('id', '>', '0')]
|
||||
|
||||
return ids
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Number', size=64, required=True),
|
||||
@@ -778,7 +807,7 @@ class account_move(osv.osv):
|
||||
'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}),
|
||||
'to_check': fields.boolean('To Be Verified'),
|
||||
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner"),
|
||||
'amount': fields.function(_amount_compute, method=True, string='Amount', digits=(16,int(config['price_accuracy']))),
|
||||
'amount': fields.function(_amount_compute, method=True, string='Amount', digits=(16,int(config['price_accuracy'])), type='float', fnct_search=_search_amount),
|
||||
'date': fields.date('Date', required=True),
|
||||
'type': fields.selection([
|
||||
('pay_voucher','Cash Payment'),
|
||||
@@ -956,7 +985,7 @@ class account_move(osv.osv):
|
||||
else:
|
||||
context.update({'journal_id': move.journal_id.id, 'period_id': move.period_id.id})
|
||||
line_id = self.pool.get('account.move.line').create(cr, uid, {
|
||||
'name': _t(cr, None, 'selection', context.get('lang'), source=(mode.capitalize()+' Centralisation')) or (mode.capitalize()+' Centralisation'),
|
||||
'name': _(mode.capitalize()+' Centralisation'),
|
||||
'centralisation': mode,
|
||||
'account_id': account_id,
|
||||
'move_id': move.id,
|
||||
@@ -1084,8 +1113,8 @@ class account_move_reconcile(osv.osv):
|
||||
'name': lambda self,cr,uid,ctx={}: self.pool.get('ir.sequence').get(cr, uid, 'account.reconcile') or '/',
|
||||
}
|
||||
def reconcile_partial_check(self, cr, uid, ids, type='auto', context={}):
|
||||
total = 0.0
|
||||
for rec in self.browse(cr, uid, ids, context):
|
||||
total = 0.0
|
||||
for line in rec.line_partial_ids:
|
||||
total += (line.debit or 0.0) - (line.credit or 0.0)
|
||||
if not total:
|
||||
@@ -1546,7 +1575,8 @@ class account_model(osv.osv):
|
||||
def generate(self, cr, uid, ids, datas={}, context={}):
|
||||
move_ids = []
|
||||
for model in self.browse(cr, uid, ids, context):
|
||||
period_id = self.pool.get('account.period').find(cr,uid, context=context)
|
||||
context.update({'date':datas['date']})
|
||||
period_id = self.pool.get('account.period').find(cr, uid, dt=context.get('date',False))
|
||||
if not period_id:
|
||||
raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !'))
|
||||
period_id = period_id[0]
|
||||
@@ -1554,6 +1584,7 @@ class account_model(osv.osv):
|
||||
'ref': model.ref,
|
||||
'period_id': period_id,
|
||||
'journal_id': model.journal_id.id,
|
||||
'date': context.get('date',time.strftime('%Y-%m-%d'))
|
||||
})
|
||||
move_ids.append(move_id)
|
||||
for line in model.lines_id:
|
||||
@@ -1571,7 +1602,7 @@ class account_model(osv.osv):
|
||||
'move_id': move_id,
|
||||
'ref': line.ref,
|
||||
'partner_id': line.partner_id.id,
|
||||
'date': time.strftime('%Y-%m-%d'),
|
||||
'date': context.get('date',time.strftime('%Y-%m-%d')),
|
||||
'date_maturity': time.strftime('%Y-%m-%d')
|
||||
})
|
||||
c = context.copy()
|
||||
|
||||
@@ -143,8 +143,7 @@ class account_bank_statement(osv.osv):
|
||||
'period_id': _get_period,
|
||||
}
|
||||
|
||||
def button_confirm(self, cr, uid, ids, context=None):
|
||||
context = context or {}
|
||||
def button_confirm(self, cr, uid, ids, context={}):
|
||||
done = []
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
res_users_obj = self.pool.get('res.users')
|
||||
@@ -166,7 +165,7 @@ class account_bank_statement(osv.osv):
|
||||
_('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
|
||||
if (not st.journal_id.default_credit_account_id) \
|
||||
or (not st.journal_id.default_debit_account_id):
|
||||
raise osv.except_osv(_('Configration Error !'),
|
||||
raise osv.except_osv(_('Configuration Error !'),
|
||||
_('Please verify that an account is defined in the journal.'))
|
||||
|
||||
for line in st.move_line_ids:
|
||||
@@ -178,10 +177,10 @@ class account_bank_statement(osv.osv):
|
||||
# in bank stat.rec we get line_new_ids on bank.stat.rec.line
|
||||
for move in st.line_ids:
|
||||
context.update({'date':move.date})
|
||||
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'date': move.date,
|
||||
}, context=context)
|
||||
account_bank_statement_line_obj.write(cr, uid, [move.id], {
|
||||
'move_ids': [(4,move_id, False)]
|
||||
|
||||
@@ -294,7 +294,7 @@ class account_move_line(osv.osv):
|
||||
return [('id', '=', '0')]
|
||||
return [('id', 'in', [x[0] for x in res])]
|
||||
|
||||
def _invoice_search(self, cursor, user, obj, name, args):
|
||||
def _invoice_search(self, cursor, user, obj, name, args, context):
|
||||
if not len(args):
|
||||
return []
|
||||
invoice_obj = self.pool.get('account.invoice')
|
||||
|
||||
@@ -1582,6 +1582,8 @@
|
||||
<field name="property_account_payable"/>
|
||||
<field name="property_account_expense_categ" />
|
||||
<field name="property_account_income_categ"/>
|
||||
<field name="property_account_expense"/>
|
||||
<field name="property_account_income"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -153,7 +153,9 @@ class account_invoice(osv.osv):
|
||||
if not move_lines:
|
||||
res[id] = []
|
||||
continue
|
||||
res[id] = []
|
||||
data_lines = self.pool.get('account.move.line').browse(cr,uid,move_lines)
|
||||
partial_ids = []# Keeps the track of ids where partial payments are done with payment terms
|
||||
for line in data_lines:
|
||||
ids_line = []
|
||||
if line.reconcile_id:
|
||||
@@ -161,7 +163,8 @@ class account_invoice(osv.osv):
|
||||
elif line.reconcile_partial_id:
|
||||
ids_line = line.reconcile_partial_id.line_partial_ids
|
||||
l = map(lambda x: x.id, ids_line)
|
||||
res[id]=[x for x in l if x <> line.id]
|
||||
partial_ids.append(line.id)
|
||||
res[id] =[x for x in l if x <> line.id and x not in partial_ids]
|
||||
return res
|
||||
|
||||
def _get_invoice_line(self, cr, uid, ids, context=None):
|
||||
@@ -183,11 +186,14 @@ class account_invoice(osv.osv):
|
||||
src = []
|
||||
lines = []
|
||||
for m in self.pool.get('account.move.line').browse(cr, uid, moves, context):
|
||||
temp_lines = []#Added temp list to avoid duplicate records
|
||||
if m.reconcile_id:
|
||||
lines += map(lambda x: x.id, m.reconcile_id.line_id)
|
||||
temp_lines = map(lambda x: x.id, m.reconcile_id.line_id)
|
||||
elif m.reconcile_partial_id:
|
||||
lines += map(lambda x: x.id, m.reconcile_partial_id.line_partial_ids)
|
||||
temp_lines = map(lambda x: x.id, m.reconcile_partial_id.line_partial_ids)
|
||||
lines += [x for x in temp_lines if x not in lines]
|
||||
src.append(m.id)
|
||||
|
||||
lines = filter(lambda x: x not in src, lines)
|
||||
result[invoice.id] = lines
|
||||
return result
|
||||
@@ -991,14 +997,17 @@ class account_invoice(osv.osv):
|
||||
else:
|
||||
amount_currency = False
|
||||
currency_id = False
|
||||
|
||||
if invoice.type in ('in_invoice', 'in_refund'):
|
||||
ref = invoice.reference
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, invoice.number)
|
||||
# Pay attention to the sign for both debit/credit AND amount_currency
|
||||
l1 = {
|
||||
'debit': direction * pay_amount>0 and direction * pay_amount,
|
||||
'credit': direction * pay_amount<0 and - direction * pay_amount,
|
||||
'account_id': src_account_id,
|
||||
'partner_id': invoice.partner_id.id,
|
||||
'ref':invoice.number,
|
||||
'ref':ref,
|
||||
'date': date,
|
||||
'currency_id':currency_id,
|
||||
'amount_currency':amount_currency and direction * amount_currency or 0.0,
|
||||
@@ -1009,7 +1018,7 @@ class account_invoice(osv.osv):
|
||||
'credit': direction * pay_amount>0 and direction * pay_amount,
|
||||
'account_id': pay_account_id,
|
||||
'partner_id': invoice.partner_id.id,
|
||||
'ref':invoice.number,
|
||||
'ref':ref,
|
||||
'date': date,
|
||||
'currency_id':currency_id,
|
||||
'amount_currency':amount_currency and - direction * amount_currency or 0.0,
|
||||
@@ -1022,7 +1031,7 @@ class account_invoice(osv.osv):
|
||||
l2['name'] = name
|
||||
|
||||
lines = [(0, 0, l1), (0, 0, l2)]
|
||||
move = {'ref': invoice.number, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date}
|
||||
move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date}
|
||||
move_id = self.pool.get('account.move').create(cr, uid, move, context=context)
|
||||
|
||||
line_ids = []
|
||||
|
||||
@@ -117,7 +117,7 @@ class res_partner(osv.osv):
|
||||
res[pid][maps[type]] = (type=='receivable') and val or -val
|
||||
return res
|
||||
|
||||
def _credit_search(self, cr, uid, obj, name, args):
|
||||
def _credit_search(self, cr, uid, obj, name, args, context):
|
||||
if not len(args):
|
||||
return []
|
||||
where = ' and '.join(map(lambda x: '(sum(debit-credit)'+x[1]+str(x[2])+')',args))
|
||||
@@ -128,7 +128,7 @@ class res_partner(osv.osv):
|
||||
return [('id','=','0')]
|
||||
return [('id','in',map(lambda x:x[0], res))]
|
||||
|
||||
def _debit_search(self, cr, uid, obj, name, args):
|
||||
def _debit_search(self, cr, uid, obj, name, args, context):
|
||||
if not len(args):
|
||||
return []
|
||||
query = self.pool.get('account.move.line')._query_get(cr, uid, context={})
|
||||
|
||||
@@ -79,10 +79,12 @@ def _data_save(self, cr, uid, data, context):
|
||||
if move_ids:
|
||||
raise wizard.except_wizard(_('UserError'),
|
||||
_('The opening journal must not have any entry in the new fiscal year !'))
|
||||
|
||||
|
||||
query = "SELECT id FROM account_fiscalyear WHERE date_stop < '" + str(new_fyear.date_start) + "'"
|
||||
cr.execute(query)
|
||||
result = cr.dictfetchall()
|
||||
fy_ids = ','.join([str(x['id']) for x in result])
|
||||
query_line = pool.get('account.move.line')._query_get(cr, uid,
|
||||
obj='account_move_line', context={'fiscalyear': fy_id})
|
||||
obj='account_move_line', context={'fiscalyear': fy_ids})
|
||||
cr.execute('select id from account_account WHERE active')
|
||||
ids = map(lambda x: x[0], cr.fetchall())
|
||||
for account in pool.get('account.account').browse(cr, uid, ids,
|
||||
|
||||
@@ -58,15 +58,35 @@ def _search_invoices(obj, cr, uid, data, context):
|
||||
journal_obj = pool.get('account.journal')
|
||||
|
||||
statement = statement_obj.browse(cr, uid, data['id'], context=context)
|
||||
args_move_line = []
|
||||
repeated_move_line_ids = []
|
||||
# Creating a group that is unique for importing move lines(move lines, once imported into statement lines, should not appear again)
|
||||
for st_line in statement.line_ids:
|
||||
args_move_line = []
|
||||
args_move_line.append(('name','=', st_line.name))
|
||||
args_move_line.append(('ref','=',st_line.ref))
|
||||
if st_line.partner_id:
|
||||
args_move_line.append(('partner_id','=',st_line.partner_id.id))
|
||||
args_move_line.append(('account_id','=',st_line.account_id.id))
|
||||
|
||||
move_line_id = line_obj.search(cr, uid, args_move_line,context=context)
|
||||
if move_line_id:
|
||||
repeated_move_line_ids.append(move_line_id)
|
||||
|
||||
journal_ids = data['form']['journal_id'][0][2]
|
||||
|
||||
if journal_ids == []:
|
||||
journal_ids = journal_obj.search(cr, uid, [('type', 'in', ('sale','cash','purchase'))], context=context)
|
||||
|
||||
line_ids = line_obj.search(cr, uid, [
|
||||
|
||||
args = [
|
||||
('reconcile_id', '=', False),
|
||||
('journal_id', 'in', journal_ids),
|
||||
('account_id.reconcile', '=', True)],
|
||||
('account_id.reconcile', '=', True)]
|
||||
|
||||
if repeated_move_line_ids:
|
||||
args.append(('id','not in',repeated_move_line_ids))
|
||||
|
||||
line_ids = line_obj.search(cr, uid, args,
|
||||
#order='date DESC, id DESC', #doesn't work
|
||||
context=context)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import pooler
|
||||
|
||||
_subscription_form = '''<?xml version="1.0"?>
|
||||
<form string="%s">
|
||||
<seperator string="Generate entries before:" colspan="4"/>
|
||||
<separator string="Generate entries before:" colspan="4"/>
|
||||
<field name="date"/>
|
||||
</form>''' % ('Subscription Compute',)
|
||||
|
||||
@@ -38,7 +38,7 @@ _subscription_fields = {
|
||||
}
|
||||
|
||||
class wiz_subscription(wizard.interface):
|
||||
def _action_generate(self, cr, uid, data, context):
|
||||
def _action_generate(self, cr, uid, data, context={}):
|
||||
cr.execute('select id from account_subscription_line where date<%s and move_id is null', (data['form']['date'],))
|
||||
ids = map(lambda x: x[0], cr.fetchall())
|
||||
pooler.get_pool(cr.dbname).get('account.subscription.line').move_create(cr, uid, ids)
|
||||
|
||||
@@ -34,7 +34,7 @@ Allows to automatically select analytic accounts based on criterions:
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
'depends': ['account'],
|
||||
'depends': ['account', 'sale'],
|
||||
'init_xml': [],
|
||||
'update_xml': ['security/ir.model.access.csv', 'account_analytic_default_view.xml'],
|
||||
'demo_xml': [],
|
||||
|
||||
@@ -70,12 +70,51 @@ 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=None):
|
||||
|
||||
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={}):
|
||||
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:
|
||||
res_prod['value'].update({'account_analytic_id':rec.analytic_id.id})
|
||||
else:
|
||||
res_prod['value'].update({'account_analytic_id':False})
|
||||
return res_prod
|
||||
account_invoice_line()
|
||||
|
||||
|
||||
class stock_picking(osv.osv):
|
||||
_inherit = "stock.picking"
|
||||
|
||||
def _get_account_analytic_invoice(self, cursor, user, picking, move_line):
|
||||
partner_id = picking.address_id and picking.address_id.partner_id or False
|
||||
rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id and partner_id.id, user, time.strftime('%Y-%m-%d'), context={})
|
||||
|
||||
if rec:
|
||||
return rec.analytic_id.id
|
||||
|
||||
return super(stock_picking, self)._get_account_analytic_invoice(cursor,
|
||||
user, picking, move_line)
|
||||
|
||||
stock_picking()
|
||||
|
||||
class sale_order_line(osv.osv):
|
||||
_inherit = 'sale.order.line'
|
||||
|
||||
# Method overridden to set the analytic account by default on criterion match
|
||||
def invoice_line_create(self, cr, uid, ids, context={}):
|
||||
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context)
|
||||
sale_line_obj = self.browse(cr, uid, ids[0], context)
|
||||
pool_inv_line = self.pool.get('account.invoice.line')
|
||||
|
||||
for line in pool_inv_line.browse(cr, uid, create_ids, context):
|
||||
rec = self.pool.get('account.analytic.default').account_get(cr, uid, line.product_id.id, sale_line_obj.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context)
|
||||
|
||||
if rec:
|
||||
pool_inv_line.write(cr, uid, [line.id], {'account_analytic_id':rec.analytic_id.id}, context=context)
|
||||
return create_ids
|
||||
|
||||
sale_order_line()
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -374,4 +374,25 @@ class analytic_default(osv.osv):
|
||||
}
|
||||
analytic_default()
|
||||
|
||||
class sale_order_line(osv.osv):
|
||||
_inherit = 'sale.order.line'
|
||||
|
||||
# Method overridden to set the analytic account by default on criterion match
|
||||
def invoice_line_create(self, cr, uid, ids, context={}):
|
||||
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context)
|
||||
if ids:
|
||||
sale_line_obj = self.browse(cr, uid, ids[0], context)
|
||||
pool_inv_line = self.pool.get('account.invoice.line')
|
||||
|
||||
for line in pool_inv_line.browse(cr, uid, create_ids, context):
|
||||
rec = self.pool.get('account.analytic.default').account_get(cr, uid, line.product_id.id, sale_line_obj.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context)
|
||||
|
||||
if rec:
|
||||
pool_inv_line.write(cr, uid, [line.id], {'analytics_id':rec.analytics_id.id}, context=context)
|
||||
cr.commit()
|
||||
return create_ids
|
||||
|
||||
sale_order_line()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -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: 2010-01-21 04:34+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_date_check
|
||||
|
||||
@@ -125,12 +125,13 @@ class followup_all_print(wizard.interface):
|
||||
def _update_partners(self, cr, uid, data, context):
|
||||
to_update = data['form']['to_update']
|
||||
for id in to_update.keys():
|
||||
cr.execute(
|
||||
"UPDATE account_move_line "\
|
||||
"SET followup_line_id=%s, followup_date=%s "\
|
||||
"WHERE id=%s",
|
||||
(to_update[id],
|
||||
data['form']['date'], int(id),))
|
||||
if to_update[id]['partner_id'] in data['form']['partner_ids'][0][2]:
|
||||
cr.execute(
|
||||
"UPDATE account_move_line "\
|
||||
"SET followup_line_id=%s, followup_date=%s "\
|
||||
"WHERE id=%s",
|
||||
(to_update[id]['level'],
|
||||
data['form']['date'], int(id),))
|
||||
return {}
|
||||
|
||||
def _sendmail(self ,cr, uid, data, context):
|
||||
@@ -263,12 +264,12 @@ class followup_all_print(wizard.interface):
|
||||
if date_maturity <= fups[followup_line_id][0].strftime('%Y-%m-%d'):
|
||||
if partner_id not in partner_list:
|
||||
partner_list.append(partner_id)
|
||||
to_update[str(id)] = fups[followup_line_id][1]
|
||||
to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': partner_id}
|
||||
elif date and date <= fups[followup_line_id][0].strftime('%Y-%m-%d'):
|
||||
if partner_id not in partner_list:
|
||||
partner_list.append(partner_id)
|
||||
to_update[str(id)] = fups[followup_line_id][1]
|
||||
|
||||
to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': partner_id}
|
||||
|
||||
message = pool.get('res.users').browse(cr, uid, uid, context=context).company_id.follow_up_msg
|
||||
|
||||
return {'partner_ids': partner_list, 'to_update': to_update, 'email_body':message}
|
||||
|
||||
@@ -46,7 +46,7 @@ class account_move_line(osv.osv):
|
||||
r=dict(cr.fetchall())
|
||||
return r
|
||||
|
||||
def _to_pay_search(self, cr, uid, obj, name, args):
|
||||
def _to_pay_search(self, cr, uid, obj, name, args, context):
|
||||
if not len(args):
|
||||
return []
|
||||
line_obj = self.pool.get('account.move.line')
|
||||
|
||||
@@ -23,6 +23,7 @@ import time
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
import ir
|
||||
from tools import config
|
||||
|
||||
class account_invoice(osv.osv):
|
||||
_inherit = "account.invoice"
|
||||
@@ -45,7 +46,9 @@ class account_invoice_line(osv.osv):
|
||||
"""
|
||||
res = {}
|
||||
tax_obj = self.pool.get('account.tax')
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
for line in self.browse(cr, uid, ids):
|
||||
cur = line.invoice_id and line.invoice_id.currency_id or False
|
||||
res_init = super(account_invoice_line, self)._amount_line(cr, uid, [line.id], name, args, context)
|
||||
res[line.id] = {
|
||||
'price_subtotal': 0.0,
|
||||
@@ -63,13 +66,13 @@ class account_invoice_line(osv.osv):
|
||||
product_taxes = filter(lambda x: x.price_include, line.product_id.supplier_taxes_id)
|
||||
|
||||
if ((set(product_taxes) == set(line.invoice_line_tax_id)) or not product_taxes) and (line.invoice_id.price_type == 'tax_included'):
|
||||
res[line.id]['price_subtotal_incl'] = res_init[line.id]
|
||||
res[line.id]['price_subtotal_incl'] = cur and cur_obj.round(cr, uid, cur, res_init[line.id]) or res_init[line.id]
|
||||
else:
|
||||
res[line.id]['price_subtotal'] = res_init[line.id]
|
||||
res[line.id]['price_subtotal'] = cur and cur_obj.round(cr, uid, cur, res_init[line.id]) or res_init[line.id]
|
||||
for tax in tax_obj.compute_inv(cr, uid, product_taxes, res_init[line.id]/line.quantity, line.quantity):
|
||||
res[line.id]['price_subtotal'] = res[line.id]['price_subtotal'] - round(tax['amount'], 2)
|
||||
res[line.id]['price_subtotal'] = res[line.id]['price_subtotal'] - round(tax['amount'], int(config['price_accuracy']))
|
||||
else:
|
||||
res[line.id]['price_subtotal'] = res_init[line.id]
|
||||
res[line.id]['price_subtotal'] = cur and cur_obj.round(cr, uid, cur, res_init[line.id]) or res_init[line.id]
|
||||
|
||||
if res[line.id]['price_subtotal']:
|
||||
res[line.id]['price_subtotal_incl'] = res[line.id]['price_subtotal']
|
||||
@@ -82,8 +85,8 @@ class account_invoice_line(osv.osv):
|
||||
res[line.id]['price_subtotal'] = res[line.id]['price_subtotal'] - tax['amount']
|
||||
res[line.id]['data'].append( tax)
|
||||
|
||||
res[line.id]['price_subtotal']= round(res[line.id]['price_subtotal'], 2)
|
||||
res[line.id]['price_subtotal_incl']= round(res[line.id]['price_subtotal_incl'], 2)
|
||||
res[line.id]['price_subtotal']= round(res[line.id]['price_subtotal'], int(config['price_accuracy']))
|
||||
res[line.id]['price_subtotal_incl']= round(res[line.id]['price_subtotal_incl'], int(config['price_accuracy']))
|
||||
return res
|
||||
|
||||
def _price_unit_default(self, cr, uid, context=None):
|
||||
|
||||
@@ -28,7 +28,7 @@ import mx.DateTime
|
||||
from mx.DateTime import RelativeDateTime
|
||||
from tools import config
|
||||
|
||||
class Account(osv.osv):
|
||||
class account_account(osv.osv):
|
||||
_inherit = "account.account"
|
||||
|
||||
def _get_level(self, cr, uid, ids, field_name, arg, context={}):
|
||||
@@ -108,7 +108,7 @@ class Account(osv.osv):
|
||||
vals['type1'] = 'none'
|
||||
journal_ids=self.pool.get('account.journal').search(cr,uid,[('name','=','Opening Journal')])
|
||||
vals['journal_id'] = journal_ids and journal_ids[0] or False
|
||||
account_id = super(Account, self).create(cr, uid, vals, context)
|
||||
account_id = super(account_account, self).create(cr, uid, vals, context)
|
||||
if vals.get('type1', False) != False:
|
||||
journal_id = vals.get('journal_id',False)
|
||||
if journal_id and vals.has_key('open_bal'):
|
||||
@@ -157,7 +157,7 @@ class Account(osv.osv):
|
||||
vals['type1'] = 'cr'
|
||||
else:
|
||||
vals['type1'] = 'none'
|
||||
super(Account, self).write(cr, uid,ids, vals, context)
|
||||
super(account_account, self).write(cr, uid,ids, vals, context)
|
||||
if vals.has_key('open_bal'):
|
||||
self_obj= self.browse(cr,uid,ids)
|
||||
move_pool=self.pool.get('account.move')
|
||||
@@ -213,16 +213,16 @@ class Account(osv.osv):
|
||||
return {
|
||||
'value' : {'type1' : type1}
|
||||
}
|
||||
Account()
|
||||
account_account()
|
||||
|
||||
class AccountMove(osv.osv):
|
||||
class account_move(osv.osv):
|
||||
_inherit = "account.move"
|
||||
_columns = {
|
||||
'name':fields.char('Name', size=256, required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'narration':fields.text('Narration', readonly=True, select=True, states={'draft':[('readonly',False)]}),
|
||||
}
|
||||
|
||||
AccountMove()
|
||||
account_move()
|
||||
|
||||
class res_currency(osv.osv):
|
||||
_inherit = "res.currency"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
@@ -63,26 +63,29 @@
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P13" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P15" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P16" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P18" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P19" fontName="Helvetica" fontSize="5.0" leading="7" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P20" fontName="Helvetica" fontSize="5.0" leading="7" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P21" fontName="Helvetica" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P22" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P23" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P24" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P25" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P26" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P27" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P28" rightIndent="0.0" leftIndent="15.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P30" rightIndent="0.0" leftIndent="20.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P31" rightIndent="0.0" leftIndent="25.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P15" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P16" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P18" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P19" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P20" fontName="Helvetica" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P21" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P22" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P23" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P24" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P25" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P26" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P27" rightIndent="0.0" leftIndent="71.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P28" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P29" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P30" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P31" fontName="Helvetica" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P32" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P33" rightIndent="0.0" leftIndent="71.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
@@ -91,27 +94,76 @@
|
||||
<paraStyle name="Index" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Drawing" fontName="Times-Italic" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Header" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
|
||||
<paraStyle name="Addressee" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P26">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<para style="P29">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<para style="P4">[[ company.name ]]</para>
|
||||
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].street ]], [[ company.partner_id.address and company.partner_id.address[0].street2 ]]</para>
|
||||
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
|
||||
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</para>
|
||||
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para>
|
||||
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].email ]]</para>
|
||||
<para style="P24">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P23">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P2">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P24">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P2">Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
|
||||
<para style="P22">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="49.0,143.0,116.0,69.0,106.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P10">No.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P27">[[ voucher.number ]]</para>
|
||||
<para style="P11">[[ voucher.number ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
@@ -122,7 +174,7 @@
|
||||
<para style="P10">Dated :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P27">[[ time.strftime('%d %B,%Y', time.strptime(voucher.date , '%Y-%m-%d')) or '' ]]</para>
|
||||
<para style="P11">[[ time.strftime('%d %B,%Y', time.strptime(voucher.date , '%Y-%m-%d')) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -130,10 +182,10 @@
|
||||
<para style="P10">State :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P25">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P25">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P25">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P25">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P21">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P21">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P21">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P21">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
@@ -144,51 +196,58 @@
|
||||
<para style="P10">Ref. :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P27">[[ voucher.reference ]]</para>
|
||||
<para style="P11">[[ voucher.reference ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P12">
|
||||
<para style="P13">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P12">
|
||||
<para style="P13">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="255.0,114.0,114.0" style="Heading1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P14">Particulars</para>
|
||||
<para style="P15">Particulars</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P15">Debit</para>
|
||||
<para style="P16">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P15">Credit</para>
|
||||
<para style="P16">Credit</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P19"/>
|
||||
<para style="terp_default_1"/>
|
||||
<blockTable colWidths="482.0" style="voucher_lines">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P20">[[ repeatIn(voucher.move_ids,'move_ids') ]] </para>
|
||||
<blockTable colWidths="251.0,110.0,115.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">[[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']] :</para>
|
||||
<para style="P28">[[ move_ids.account_id.name ]] </para>
|
||||
<para style="P28"><i>[[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]]</i></para>
|
||||
<!--para style="P31">[[ get_ref(voucher.id,move_ids) ]]</para-->
|
||||
</td>
|
||||
<td>
|
||||
<para style="P21">[[ move_ids.debit ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P21">[[ move_ids.credit ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P22">
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(voucher.move_ids,'move_ids') ]] </para>
|
||||
<blockTable colWidths="251.0,114.0,111.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P12">[[ (move_ids.partner_id and move_ids.partner_id.name) or '']] :</para>
|
||||
<para style="P24">[[ move_ids.account_id.name ]] </para>
|
||||
<para style="P27">[[ get_ref(voucher.id,move_ids) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P20">[[ move_ids.debit ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P20">[[ move_ids.credit ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="P28">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
@@ -197,7 +256,7 @@
|
||||
<blockTable colWidths="253.0,114.0,114.0" style="last_info">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P13">
|
||||
<para style="P14">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
@@ -214,7 +273,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P13">Through : </para>
|
||||
<para style="P14">Through : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
@@ -229,7 +288,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P30">[[ voucher.narration or '']]</para>
|
||||
<para style="P25">[[ voucher.narration or '']]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
@@ -244,7 +303,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P13">On Account of : </para>
|
||||
<para style="P14">On Account of : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
@@ -259,7 +318,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P30">[[ voucher.name ]]</para>
|
||||
<para style="P26">[[ voucher.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
@@ -274,7 +333,22 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P13">Amount (in words) : </para>
|
||||
<para style="P14">Amount (in words) : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P14">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P14">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P26">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">
|
||||
@@ -289,34 +363,19 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P30">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">
|
||||
<para style="P17">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P16">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P18">[[ debit(voucher.move_ids)]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P17">[[ debit(voucher.move_ids)]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P17">[[ credit(voucher.move_ids) ]]</para>
|
||||
<para style="P18">[[ credit(voucher.move_ids) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P18">
|
||||
<para style="P19">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="142.0,99.0,105.0,136.0" style="Table3">
|
||||
@@ -353,20 +412,20 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P23"><i>Receiver's Signature</i></para>
|
||||
<para style="P22">Receiver's Signature</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P23">
|
||||
<para style="P22">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P23">
|
||||
<para style="P22">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P23"><i>Authorised Signatory</i></para>
|
||||
<para style="P22">Authorised Signatory</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Heading1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>D
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
@@ -57,25 +57,25 @@
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P15" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P16" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P17" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P18" fontName="Helvetica" fontSize="5.0" leading="7" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P19" fontName="Helvetica" fontSize="5.0" leading="7" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P20" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P21" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P22" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P23" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P24" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P25" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P26" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P27" rightIndent="0.0" leftIndent="15.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P29" rightIndent="0.0" leftIndent="20.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P30" rightIndent="0.0" leftIndent="25.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P18" fontName="Helvetica" fontSize="5.0" leading="7" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P19" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P20" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P21" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P22" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P23" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P24" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P25" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P26" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P27" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P28" rightIndent="0.0" leftIndent="71.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P29" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
@@ -84,10 +84,54 @@
|
||||
<paraStyle name="Index" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Drawing" fontName="Times-Italic" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Header" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
|
||||
<paraStyle name="Addressee" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P25">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<para style="P24">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<para style="P4">[[ company.name ]]</para>
|
||||
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
|
||||
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</para>
|
||||
@@ -96,11 +140,11 @@
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P23">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P21">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P2">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P21">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P2">Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P22">
|
||||
<para style="P20">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="68.0,124.0,122.0,62.0,106.0" style="Table1">
|
||||
@@ -109,7 +153,7 @@
|
||||
<para style="P10">No.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P26">[[ voucher.number ]]</para>
|
||||
<para style="P11">[[ voucher.number ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
@@ -120,7 +164,7 @@
|
||||
<para style="P10">Dated :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P26">[[ time.strftime('%d %B,%Y', time.strptime(voucher.date , '%Y-%m-%d')) or '' ]]</para>
|
||||
<para style="P11">[[ time.strftime('%d %B,%Y', time.strptime(voucher.date , '%Y-%m-%d')) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -128,10 +172,10 @@
|
||||
<para style="P10">State :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P24">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P24">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P24">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P24">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P19">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P19">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P19">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P19">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
@@ -142,7 +186,7 @@
|
||||
<para style="P10">Ref. :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P26">[[ voucher.reference ]]</para>
|
||||
<para style="P11">[[ voucher.reference ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -150,7 +194,7 @@
|
||||
<para style="P10">Account :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P24">[[ voucher.account_id.name ]]</para>
|
||||
<para style="P19">[[ voucher.account_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
@@ -163,17 +207,19 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P26">
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P12"/>
|
||||
<para style="P12">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="333.0,149.0" style="Heading1">
|
||||
<para style="P12">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="344.0,138.0" style="Heading1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P14">Particulars</para>
|
||||
@@ -183,26 +229,31 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P18">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="482.0" style="voucher_lines">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P19">[[ repeatIn(voucher.payment_ids,'payment_ids') ]] </para>
|
||||
<blockTable colWidths="324.0,152.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">[[ payment_ids.partner_id.name ]] :</para>
|
||||
<para style="P27">[[ payment_ids.account_id.name ]] </para>
|
||||
<para style="P30">[[ payment_ids.ref ]] [[ payment_ids.amount ]] [[ payment_ids.type ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P20">[[ payment_ids.amount ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P21">
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(voucher.payment_ids,'payment_ids') ]] </para>
|
||||
<blockTable colWidths="340.0,136.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P25">[[ payment_ids.partner_id.name ]] :</para>
|
||||
<para style="P27">[[ payment_ids.account_id.name ]] </para>
|
||||
<para style="P28">[[ payment_ids.ref ]] [[ payment_ids.amount ]] [[ payment_ids.type ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P26">[[ payment_ids.amount ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="P29">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
@@ -233,10 +284,10 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P29">[[ voucher.narration or '' ]] </para>
|
||||
<para style="P22">[[ voucher.narration or '' ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P26">
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
@@ -253,10 +304,10 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P29">[[ voucher.name ]]</para>
|
||||
<para style="P23">[[ voucher.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P26">
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
@@ -273,7 +324,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P29">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
|
||||
<para style="P23">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">
|
||||
@@ -329,20 +380,20 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P22">Receiver's Signature</para>
|
||||
<para style="P20">Receiver's Signature</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P22">
|
||||
<para style="P20">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P22">
|
||||
<para style="P20">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P22">Authorised Signatory</para>
|
||||
<para style="P20">Authorised Signatory</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -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: 2010-01-20 04:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: auction
|
||||
|
||||
@@ -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: 2010-01-20 04:36+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: auction
|
||||
|
||||
@@ -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: 2010-01-21 04:34+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: audittrail
|
||||
|
||||
@@ -20,5 +20,6 @@
|
||||
##############################################################################
|
||||
|
||||
import base_calendar
|
||||
import wizard
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
"demo_xml" : [],
|
||||
"update_xml" : [
|
||||
'security/ir.model.access.csv',
|
||||
'base_calendar_wizard.xml',
|
||||
'base_calendar_view.xml'
|
||||
],
|
||||
"installable" : True,
|
||||
"active" : False,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
from datetime import datetime, timedelta
|
||||
from dateutil import parser
|
||||
from dateutil.rrule import *
|
||||
from osv import osv
|
||||
from osv import osv, fields
|
||||
import pooler
|
||||
import re
|
||||
import vobject
|
||||
@@ -59,6 +59,22 @@ def openobjectid2uid(cr, uidval, oomodel):
|
||||
value = 'OpenObject-%s_%s@%s' % (oomodel, uidval, cr.dbname)
|
||||
return value
|
||||
|
||||
def get_attribute_mapping(cr, uid, model, context={}):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
field_obj = pool.get('basic.calendar.fields')
|
||||
fids = field_obj.search(cr, uid, [('object_id.model', '=', model)])
|
||||
res = {}
|
||||
for field in field_obj.browse(cr, uid, fids):
|
||||
attr = field.attribute
|
||||
res[attr] = {}
|
||||
res[attr]['field'] = field.field_id.name
|
||||
res[attr]['type'] = field.field_id.ttype
|
||||
if res[attr]['type'] in ('one2many', 'many2many', 'many2one'):
|
||||
res[attr]['object'] = field.field_id.relation
|
||||
elif res[attr]['type'] in ('selection') and field.mapping:
|
||||
res[attr]['mapping'] = eval(field.mapping)
|
||||
return res
|
||||
|
||||
def map_data(cr, uid, obj):
|
||||
vals = {}
|
||||
for map_dict in obj.__attribute__:
|
||||
@@ -101,8 +117,8 @@ def map_data(cr, uid, obj):
|
||||
return vals
|
||||
|
||||
class CalDAV(object):
|
||||
__attribute__ = {
|
||||
}
|
||||
__attribute__ = {}
|
||||
|
||||
def get_recurrent_dates(self, rrulestring, exdate, startdate=None):
|
||||
if not startdate:
|
||||
startdate = datetime.now()
|
||||
@@ -129,8 +145,6 @@ class CalDAV(object):
|
||||
val = ','.join(map(lambda x: x.strftime('%Y-%m-%d %H:%M:%S'), val))
|
||||
else:
|
||||
val = val.strftime('%Y-%m-%d %H:%M:%S')
|
||||
if valtype and valtype == 'integer' and val:
|
||||
val = int(val)
|
||||
return val
|
||||
else:
|
||||
return self.__attribute__.get(name, None)
|
||||
@@ -142,6 +156,7 @@ class CalDAV(object):
|
||||
return True
|
||||
|
||||
def export_ical(self, cr, uid, datas, vobj=None, context={}):
|
||||
self.__attribute__ = get_attribute_mapping(cr, uid, self._name, context)
|
||||
ical = vobject.iCalendar()
|
||||
for data in datas:
|
||||
vevent = ical.add(vobj)
|
||||
@@ -177,7 +192,7 @@ class CalDAV(object):
|
||||
vevent = alarm_obj.export_ical(cr, uid, model, \
|
||||
data[map_field][0], vevent, context=context)
|
||||
elif data[map_field]:
|
||||
if map_type == "text":
|
||||
if map_type in ("char", "text"):
|
||||
vevent.add(field).value = str(data[map_field])
|
||||
elif map_type == 'datetime' and data[map_field]:
|
||||
if field in ('exdate'):
|
||||
@@ -188,13 +203,19 @@ class CalDAV(object):
|
||||
vevent.add(field).value = timedelta(hours=data[map_field])
|
||||
elif map_type == "many2one":
|
||||
vevent.add(field).value = [data.get(map_field)[1]]
|
||||
if self.__attribute__.get(field).has_key('mapping'):
|
||||
for key1, val1 in self.ical_get(field, 'mapping').items():
|
||||
if val1 == data[map_field]:
|
||||
vevent.add(field).value = key1
|
||||
elif map_type in ("float", "integer"):
|
||||
vevent.add(field).value = [data.get(map_field)]
|
||||
elif map_type == "selection":
|
||||
if not self.ical_get(field, 'mapping'):
|
||||
vevent.add(field).value = (data[map_field]).upper()
|
||||
else:
|
||||
for key1, val1 in self.ical_get(field, 'mapping').items():
|
||||
if val1 == data[map_field]:
|
||||
vevent.add(field).value = key1
|
||||
return ical
|
||||
|
||||
def import_ical(self, cr, uid, ical_data):
|
||||
self.__attribute__ = get_attribute_mapping(cr, uid, self._name)
|
||||
parsedCal = vobject.readOne(ical_data)
|
||||
att_data = []
|
||||
res = []
|
||||
@@ -222,7 +243,7 @@ class CalDAV(object):
|
||||
return res
|
||||
|
||||
|
||||
class Calendar(CalDAV, osv.osv_memory):
|
||||
class Calendar(CalDAV, osv.osv):
|
||||
_name = 'basic.calendar'
|
||||
__attribute__ = {
|
||||
'prodid': None, # Use: R-1, Type: TEXT, Specifies the identifier for the product that created the iCalendar object.
|
||||
@@ -236,11 +257,65 @@ class Calendar(CalDAV, osv.osv_memory):
|
||||
'vjournal': None, # Use: O-n, Type: Collection of Journal class
|
||||
'vfreebusy': None, # Use: O-n, Type: Collection of FreeBusy class
|
||||
'vtimezone': None, # Use: O-n, Type: Collection of Timezone class
|
||||
|
||||
}
|
||||
_columns = {
|
||||
'name': fields.char("Name", size=64),
|
||||
'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines')
|
||||
}
|
||||
|
||||
Calendar()
|
||||
|
||||
|
||||
class basic_calendar_line(osv.osv):
|
||||
_name = 'basic.calendar.lines'
|
||||
_description = 'Calendar Lines'
|
||||
_columns = {
|
||||
'name': fields.selection([('event', 'Event'), ('todo', 'TODO'), \
|
||||
('alarm', 'Alarm'), \
|
||||
('attendee', 'Attendee')], \
|
||||
string="Type", size=64),
|
||||
'object_id': fields.many2one('ir.model', 'Object'),
|
||||
'calendar_id': fields.many2one('basic.calendar', 'Calendar', required=True),
|
||||
'mapping_ids': fields.one2many('basic.calendar.fields', 'type_id', 'Fields Mapping')
|
||||
}
|
||||
|
||||
basic_calendar_line()
|
||||
|
||||
class basic_calendar_attribute(osv.osv):
|
||||
_name = 'basic.calendar.attributes'
|
||||
_description = 'Calendar attributes'
|
||||
_columns = {
|
||||
'name': fields.char("Name", size=64, required=True),
|
||||
'type': fields.selection([('event', 'Event'), ('todo', 'TODO'), \
|
||||
('alarm', 'Alarm'), \
|
||||
('attendee', 'Attendee')], \
|
||||
string="Type", size=64, required=True),
|
||||
}
|
||||
|
||||
basic_calendar_attribute()
|
||||
|
||||
class basic_calendar_fields(osv.osv):
|
||||
_name = 'basic.calendar.fields'
|
||||
_description = 'Calendar fields'
|
||||
|
||||
_columns = {
|
||||
'field_id': fields.many2one('ir.model.fields', 'OpenObject Field'),
|
||||
'name': fields.many2one('basic.calendar.attributes', 'Name', required=True),
|
||||
'type_id': fields.many2one('basic.calendar.lines', 'Type', required=True),
|
||||
'expr': fields.char("Expression", size=64),
|
||||
'fn': fields.selection( [('field', 'Use the field'),
|
||||
('const', 'Expression as constant'),
|
||||
('hours', 'Interval in hours'),
|
||||
],'Function'),
|
||||
'mapping': fields.text('Mapping'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'fn': lambda *a: 'field',
|
||||
}
|
||||
|
||||
basic_calendar_fields()
|
||||
|
||||
class Event(CalDAV, osv.osv_memory):
|
||||
_name = 'basic.calendar.event'
|
||||
__attribute__ = {
|
||||
@@ -397,7 +472,7 @@ class Alarm(CalDAV, osv.osv_memory):
|
||||
# Compute other details
|
||||
valarm.add('DESCRIPTION').value = alarm_data['name']
|
||||
valarm.add('ACTION').value = alarm_data['action']
|
||||
|
||||
return vevent
|
||||
|
||||
def import_ical(self, cr, uid, ical_data):
|
||||
for child in ical_data.getChildren():
|
||||
@@ -461,9 +536,11 @@ class Attendee(CalDAV, osv.osv_memory):
|
||||
|
||||
def export_ical(self, cr, uid, model, attendee_ids, vevent, context={}):
|
||||
attendee_object = self.pool.get(model)
|
||||
self.__attribute__ = get_attribute_mapping(cr, uid, self._name, context)
|
||||
for attendee in attendee_object.read(cr, uid, attendee_ids, []):
|
||||
attendee_add = vevent.add('attendee')
|
||||
for a_key, a_val in attendee_object.__attribute__.items():
|
||||
cn_val = ''
|
||||
for a_key, a_val in self.__attribute__.items():
|
||||
if attendee[a_val['field']] and a_val['field'] != 'cn':
|
||||
if a_val['type'] == 'text':
|
||||
attendee_add.params[a_key] = [str(attendee[a_val['field']])]
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_calendar_form" model="ir.ui.view">
|
||||
<field name="name">Basic Calendar</field>
|
||||
<field name="model">basic.calendar</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Basic Calendar">
|
||||
<field name="name" required="1" />
|
||||
<field name="line_ids" mode="form,tree" colspan="4" nolabel="1">
|
||||
<form string="Calendar Lines">
|
||||
<field name="name" required="1" select="1" />
|
||||
<field name="object_id" required="1" select="1" />
|
||||
<field name="mapping_ids" select="1" colspan="4" nolabel="1">
|
||||
<tree string="Attributes Mapping" editable="bottom">
|
||||
<field name="name" required="1" domain="[('type', '=', parent.name)]"/>
|
||||
<field name="fn" select="1" />
|
||||
<field name="field_id" select="1" domain="[('model_id', '=', parent.object_id)]" />
|
||||
<field name="expr" />
|
||||
</tree>
|
||||
<form string="Attributes Mapping">
|
||||
<field name="name" select="1" required="1" domain="[('type', '=', parent.name)]"/>
|
||||
<field name="field_id" select="1" domain="[('model_id', '=', parent.object_id)]"
|
||||
required="1" />
|
||||
<field name="fn" select="1" required="1" />
|
||||
<field name="expr" />
|
||||
</form>
|
||||
</field>
|
||||
</form>
|
||||
<tree string="Attributes Mapping" editable="bottom">
|
||||
<field name="name" select="1" />
|
||||
<field name="object_id" select="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="action_view_calendar" model="ir.actions.act_window">
|
||||
<field name="name">Calendar</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">basic.calendar</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_calendar_configuration" name="Calendar"
|
||||
parent="base.menu_base_config" sequence="10" />
|
||||
|
||||
<menuitem id="menu_calendar"
|
||||
name="Calendar" parent="menu_calendar_configuration"
|
||||
sequence="5" action="action_view_calendar" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<wizard string="Import .ics File" model="basic.calendar.event"
|
||||
name="calendar.event.import" id="wizard_cal_event_import" multi="True" />
|
||||
|
||||
<wizard string="Subscribe to a Remote calendar"
|
||||
model="basic.calendar.event" name="calendar.event.subscribe"
|
||||
id="wizard_cal_event_subscribe" multi="True" />
|
||||
|
||||
<wizard string="Export .ics File" model="basic.calendar.event"
|
||||
name="calendar.event.export" id="wizard_cal_event_export" multi="True" />
|
||||
|
||||
<wizard string="Edit this event" model="basic.calendar.event"
|
||||
name="calendar.event.edit.this" id="wizard_edit_this_event"
|
||||
menu="False" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
+4
-3
@@ -51,15 +51,16 @@ class cal_event_export_wizard(wizard.interface):
|
||||
model_obj = pooler.get_pool(cr.dbname).get(model)
|
||||
calendar = model_obj.export_cal(cr, uid, data['ids'], context)
|
||||
return {'file_path': base64.encodestring(calendar), \
|
||||
'name': 'OpenERP Events.ics'}
|
||||
'name': 'OpenERP %s.ics' % (model_obj._description)}
|
||||
|
||||
states = {
|
||||
'init': {
|
||||
'actions': [_process_export_ics],
|
||||
'result': {'type': 'form', 'arch':form1, 'fields':form1_fields, \
|
||||
'state': [('end', '_Cancel', 'gtk-cancel'), ('end', 'Ok', 'gtk-ok')]}},
|
||||
'state': [('end', '_Cancel', 'gtk-cancel'), \
|
||||
('end', 'Ok', 'gtk-ok')]}},
|
||||
}
|
||||
|
||||
cal_event_export_wizard('caldav.event.export')
|
||||
cal_event_export_wizard('calendar.event.export')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
+1
-1
@@ -81,6 +81,6 @@ class cal_event_import_wizard(wizard.interface):
|
||||
},
|
||||
}
|
||||
|
||||
cal_event_import_wizard('caldav.event.import')
|
||||
cal_event_import_wizard('calendar.event.import')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
+1
-1
@@ -90,6 +90,6 @@ class cal_event_subscribe_wizard(wizard.interface):
|
||||
},
|
||||
}
|
||||
|
||||
cal_event_subscribe_wizard('caldav.event.subscribe')
|
||||
cal_event_subscribe_wizard('calendar.event.subscribe')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -39,6 +39,13 @@ class res_partner_contact(osv.osv):
|
||||
res = [(r['shortcut'], r['name']) for r in res if r['domain']=='contact']
|
||||
return res
|
||||
|
||||
def _main_job(self, cr, uid, ids, fields, arg, context=None):
|
||||
res = dict.fromkeys(ids, False)
|
||||
for contact in self.browse(cr, uid, ids, context):
|
||||
if contact.job_ids:
|
||||
res[contact.id] = contact.job_ids[0].name_get()[0]
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Last Name', size=30,required=True),
|
||||
'first_name': fields.char('First Name', size=30),
|
||||
@@ -52,7 +59,7 @@ class res_partner_contact(osv.osv):
|
||||
'active' : fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the partner contact without removing it."),
|
||||
'partner_id':fields.related('job_ids','address_id','partner_id',type='many2one', relation='res.partner', string='Main Employer'),
|
||||
'function_id':fields.related('job_ids','function_id',type='many2one', relation='res.partner.function', string='Main Function'),
|
||||
'job_id':fields.related('job_ids',type='many2one', relation='res.partner.job', string='Main Job'),
|
||||
'job_id': fields.function(_main_job, method=True, type='many2one', relation='res.partner.job', string='Main Job'),
|
||||
'email': fields.char('E-Mail', size=240),
|
||||
'comment' : fields.text('Notes', translate=True),
|
||||
'photo' : fields.binary('Image'),
|
||||
@@ -81,6 +88,12 @@ res_partner_contact()
|
||||
|
||||
class res_partner_address(osv.osv):
|
||||
|
||||
def search(self, cr, user, args, offset=0, limit=None, order=None,
|
||||
context=None, count=False):
|
||||
if context and context.has_key('address_partner_id' ) and context['address_partner_id']:
|
||||
args.append(('partner_id', '=', context['address_partner_id']))
|
||||
return super(res_partner_address, self).search(cr, user, args, offset, limit, order, context, count)
|
||||
|
||||
#overriding of the name_get defined in base in order to remove the old contact name
|
||||
def name_get(self, cr, user, ids, context={}):
|
||||
if not len(ids):
|
||||
@@ -155,7 +168,7 @@ class res_partner_job(osv.osv):
|
||||
|
||||
_defaults = {
|
||||
'sequence_contact' : lambda *a: 0,
|
||||
'state' : lambda *a: 'current',
|
||||
'state' : lambda *a: 'current',
|
||||
}
|
||||
res_partner_job()
|
||||
|
||||
|
||||
@@ -48,16 +48,13 @@
|
||||
<field name="job_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<form string="Functions and Addresses">
|
||||
<group string="Partner" colspan="2" col="4">
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="address_id" colspan="4"/>
|
||||
<field name="function_id" colspan="4"/>
|
||||
<field name="fax"/>
|
||||
<field name="extension"/>
|
||||
<field name="other"/>
|
||||
<field name="date_start" />
|
||||
<field name="date_stop" />
|
||||
<field name="state" />
|
||||
<field name="sequence_contact" />
|
||||
<field name="function_id"/>
|
||||
<field name="address_id" context="{'address_partner_id': name}"/>
|
||||
<field name="name"/>
|
||||
<field name="date_start" />
|
||||
<field name="date_stop" />
|
||||
<field name="state" />
|
||||
<field name="sequence_contact" />
|
||||
</group>
|
||||
<group string="Communication" colspan="2" col="2">
|
||||
<field name="phone"/>
|
||||
@@ -385,7 +382,7 @@
|
||||
<notebook>
|
||||
<page string="General">
|
||||
<field name="name" select="1"/>
|
||||
<field name="address_id" select="1"/>
|
||||
<field name="address_id" select="1" context="{'address_partner_id': name}"/>
|
||||
<field name="contact_id" select="1"/>
|
||||
<field name="function_id" select="1"/>
|
||||
<field name="email" select="2" widget="email"/>
|
||||
|
||||
@@ -56,7 +56,7 @@ def _info_default(self, cr, uid, data, context):
|
||||
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
|
||||
sec=c.tm_sec!=59 and 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']
|
||||
@@ -108,7 +108,7 @@ class base_module_record_objects(wizard.interface):
|
||||
('record', 'Record', 'gtk-ok'),
|
||||
]
|
||||
}
|
||||
},
|
||||
},
|
||||
'record': {
|
||||
'actions': [],
|
||||
'result': {'type':'action','action':_record_objects,'state':'intro'}
|
||||
@@ -124,7 +124,7 @@ class base_module_record_objects(wizard.interface):
|
||||
('save', 'Continue', 'gtk-ok'),
|
||||
]
|
||||
},
|
||||
},
|
||||
},
|
||||
'save': {
|
||||
'actions': [inter_call],
|
||||
'result': {
|
||||
|
||||
@@ -64,8 +64,12 @@ class report_creator(osv.osv):
|
||||
fields = {}
|
||||
i = 0
|
||||
for f in report.field_ids:
|
||||
fields['field'+str(i)] = models[f.field_id.model][f.field_id.name]
|
||||
i+=1
|
||||
if f.field_id.model:
|
||||
fields['field'+str(i)] = models[f.field_id.model][f.field_id.name]
|
||||
i+=1
|
||||
else:
|
||||
fields['column_count'] = {'readonly': True, 'type': 'integer', 'string': 'Count', 'size': 64, 'name': 'column_count'}
|
||||
|
||||
return fields
|
||||
|
||||
#
|
||||
@@ -81,8 +85,12 @@ class report_creator(osv.osv):
|
||||
fields = {}
|
||||
i = 0
|
||||
for f in report.field_ids:
|
||||
fields['field'+str(i)] = models[f.field_id.model][f.field_id.name]
|
||||
i+=1
|
||||
if f.field_id.model:
|
||||
fields['field'+str(i)] = models[f.field_id.model][f.field_id.name]
|
||||
i+=1
|
||||
else:
|
||||
fields['column_count'] = {'readonly': True, 'type': 'integer', 'string': 'Count', 'size': 64, 'name': 'column_count'}
|
||||
|
||||
arch = '<?xml version="1.0" encoding="utf-8"?>\n'
|
||||
if view_type=='graph':
|
||||
arch +='<graph string="%s" type="%s" orientation="%s">' % (report.name, report.view_graph_type,report.view_graph_orientation)
|
||||
@@ -90,8 +98,12 @@ class report_creator(osv.osv):
|
||||
i = 0
|
||||
for f in report.field_ids:
|
||||
if f.graph_mode==val:
|
||||
arch += '<field name="%s" select="1"/>' % ('field'+str(i),)
|
||||
i+=1
|
||||
if f.field_id.model:
|
||||
arch += '<field name="%s" select="1"/>' % ('field'+str(i),)
|
||||
i+=1
|
||||
else:
|
||||
arch += '<field name="%s" select="1"/>' % ('column_count',)
|
||||
|
||||
elif view_type=='calendar':
|
||||
required_types = ['date_start','date_delay','color']
|
||||
set_dict = {'view_type':view_type,'string':report.name}
|
||||
@@ -99,13 +111,21 @@ class report_creator(osv.osv):
|
||||
i=0
|
||||
for f in report.field_ids:
|
||||
if f.calendar_mode and f.calendar_mode in required_types:
|
||||
set_dict[f.calendar_mode] = 'field'+str(i)
|
||||
i+=1
|
||||
if f.field_id.model:
|
||||
field_cal = 'field'+str(i)
|
||||
i+=1
|
||||
else:
|
||||
field_cal = 'column_count'
|
||||
set_dict[f.calendar_mode] = field_cal
|
||||
del required_types[required_types.index(f.calendar_mode)]
|
||||
|
||||
else:
|
||||
temp_list.append('''<field name="%(name)s" select="1"/>''' % {'name':'field'+str(i)})
|
||||
i+=1
|
||||
if f.field_id.model:
|
||||
temp_list.append('''<field name="%(name)s" select="1"/>''' % {'name':'field'+str(i)})
|
||||
i+=1
|
||||
else:
|
||||
temp_list.append('''<field name="%(name)s" select="1"/>''' % {'name':'column_count'})
|
||||
|
||||
arch += '''<%(view_type)s string="%(string)s" date_start="%(date_start)s" ''' %set_dict
|
||||
if set_dict.get('date_delay',False):
|
||||
arch +=''' date_delay="%(date_delay)s" '''%set_dict
|
||||
@@ -121,8 +141,11 @@ class report_creator(osv.osv):
|
||||
arch += '<%s string="%s">\n' % (view_type, report.name)
|
||||
i = 0
|
||||
for f in report.field_ids:
|
||||
arch += '<field name="%s" select="1"/>' % ('field'+str(i),)
|
||||
i+=1
|
||||
if f.field_id.model:
|
||||
arch += '<field name="%s" select="1"/>' % ('field'+str(i),)
|
||||
i+=1
|
||||
else:
|
||||
arch += '<field name="%s" select="1"/>' % ('column_count',)
|
||||
arch += '</%s>' % (view_type,)
|
||||
result = {
|
||||
'arch': arch,
|
||||
@@ -166,14 +189,20 @@ class report_creator(osv.osv):
|
||||
i = 0
|
||||
fields = {}
|
||||
for f in report.field_ids:
|
||||
fields['field'+str(i)] = (f.field_id.model, f.field_id.name)
|
||||
i+=1
|
||||
if f.field_id.model:
|
||||
fields['field'+str(i)] = (f.field_id.model, f.field_id.name)
|
||||
i+=1
|
||||
else:
|
||||
fields['column_count'] = (False, 'Count')
|
||||
newargs = []
|
||||
newargs2 = []
|
||||
for a in args:
|
||||
res = self.pool.get(fields[a[0]][0])._where_calc(cr, user, [[fields[a[0]][1],a[1],a[2]]], active_test=False, context=context)
|
||||
newargs+=res[0]
|
||||
newargs2+=res[1]
|
||||
if fields[a[0]][0]:
|
||||
res = self.pool.get(fields[a[0]][0])._where_calc(cr, user, [[fields[a[0]][1],a[1],a[2]]], active_test=False, context=context)
|
||||
newargs+=res[0]
|
||||
newargs2+=res[1]
|
||||
else:
|
||||
newargs += [("count(*) " + a[1] +" " + str(a[2]))]
|
||||
ctx = context or {}
|
||||
ctx['getid'] = True
|
||||
report = self._sql_query_get(cr, user, [context['report_id']], 'sql_query', None, ctx, where_plus=newargs, limit=limit, offset=offset)
|
||||
@@ -198,7 +227,7 @@ class report_creator(osv.osv):
|
||||
filter_list = []
|
||||
for model in models:
|
||||
model_dict[model.model] = self.pool.get(model.model)._table
|
||||
|
||||
|
||||
model_list = model_dict.keys()
|
||||
reference_model_dict = {}
|
||||
for model in model_dict:
|
||||
@@ -207,10 +236,22 @@ class report_creator(osv.osv):
|
||||
rest_list.remove(model)
|
||||
model_pool = self.pool.get(model)
|
||||
fields_get = model_pool.fields_get(cr,uid)
|
||||
fields_filter = dict(filter(lambda x:x[1].get('relation',False)
|
||||
and x[1].get('relation') in rest_list
|
||||
and x[1].get('type')=='many2one'
|
||||
and not (isinstance(model_pool._columns[x[0]],fields.function) or isinstance(model_pool._columns[x[0]],fields.related) or isinstance(model_pool._columns[x[0]],fields.dummy)), fields_get.items()))
|
||||
model_columns = {}
|
||||
|
||||
def _get_inherit_fields(obj):
|
||||
pool_model = self.pool.get(obj)
|
||||
#Adding the columns of the model itself
|
||||
model_columns.update(pool_model._columns)
|
||||
#Adding the columns of its _inherits
|
||||
for record in pool_model._inherits.keys():
|
||||
_get_inherit_fields(record)
|
||||
|
||||
_get_inherit_fields(model)
|
||||
|
||||
fields_filter = dict(filter(lambda x:x[1].get('relation',False)
|
||||
and x[1].get('relation') in rest_list
|
||||
and x[1].get('type')=='many2one'
|
||||
and not (isinstance(model_columns[x[0]],fields.function) or isinstance(model_columns[x[0]],fields.related)), fields_get.items()))
|
||||
if fields_filter:
|
||||
model in model_list and model_list.remove(model)
|
||||
model_count = reference_model_dict.get(model,False)
|
||||
@@ -225,9 +266,10 @@ class report_creator(osv.osv):
|
||||
reference_model_dict[v.get('relation')] = relation_count+1
|
||||
else:
|
||||
reference_model_dict[v.get('relation')]=1
|
||||
|
||||
str_where = model_dict.get(model)+"."+ k + "=" + model_dict.get(v.get('relation'))+'.id'
|
||||
where_list.append(str_where)
|
||||
if k in self.pool.get(model)._columns:
|
||||
str_where = model_dict.get(model)+"."+ k + "=" + model_dict.get(v.get('relation'))+'.id'
|
||||
where_list.append(str_where)
|
||||
|
||||
if reference_model_dict:
|
||||
self.model_set_id = model_dict.get(reference_model_dict.keys()[reference_model_dict.values().index(min(reference_model_dict.values()))])
|
||||
if model_list and not len(model_dict.keys()) == 1:
|
||||
@@ -250,6 +292,7 @@ class report_creator(osv.osv):
|
||||
|
||||
|
||||
if where_list:
|
||||
where_list = list(set(where_list))
|
||||
ret_str+="\n where \n"+" and\n".join(where_list)
|
||||
ret_str = ret_str.strip()
|
||||
if filter_list:
|
||||
@@ -272,12 +315,16 @@ class report_creator(osv.osv):
|
||||
groupby = []
|
||||
i = 0
|
||||
for f in obj.field_ids:
|
||||
# Allowing to use count(*)
|
||||
if not f.field_id.model and f.group_method == 'count':
|
||||
fields.insert(0,('count(*) as column_count'))
|
||||
continue
|
||||
t = self.pool.get(f.field_id.model_id.model)._table
|
||||
if f.group_method == 'group':
|
||||
fields.append('\t'+t+'.'+f.field_id.name+' as field'+str(i))
|
||||
groupby.append(t+'.'+f.field_id.name)
|
||||
else:
|
||||
fields.append('\t'+f.group_method+'('+t+'.'+f.field_id.name+')'+' as field'+str(i))
|
||||
groupby.append(t+'.'+f.field_id.name)
|
||||
i+=1
|
||||
models = self._path_get(cr, uid, obj.model_ids, obj.filter_ids)
|
||||
check = self._id_get(cr, uid, ids[0], context)
|
||||
@@ -336,6 +383,9 @@ class report_creator(osv.osv):
|
||||
this_objs = self.browse(cr, uid, ids)
|
||||
for obj in this_objs:
|
||||
for fld in obj.field_ids:
|
||||
# Allowing to use count(*)
|
||||
if not fld.field_id.model and fld.group_method == 'count':
|
||||
continue
|
||||
model_column = self.pool.get(fld.field_id.model)._columns[fld.field_id.name]
|
||||
if (isinstance(model_column,fields.function) or isinstance(model_column,fields.related)) and not model_column.store:
|
||||
return False
|
||||
@@ -347,7 +397,10 @@ class report_creator(osv.osv):
|
||||
this_objs = self.browse(cr, uid, ids)
|
||||
for obj in this_objs:
|
||||
for fld in obj.field_ids:
|
||||
model_column = self.pool.get(fld.field_id.model)._columns[fld.field_id.name]
|
||||
# Allowing to use count(*)
|
||||
if not fld.field_id.model and fld.group_method == 'count':
|
||||
continue
|
||||
model_column = self.pool.get(fld.field_id.model)._columns[fld.field_id.name]
|
||||
if model_column._type not in aggregate_columns and fld.group_method in apply_functions:
|
||||
return False
|
||||
return True
|
||||
@@ -359,6 +412,9 @@ class report_creator(osv.osv):
|
||||
for obj in this_objs:
|
||||
if obj.view_type1=='calendar' or obj.view_type2=='calendar' or obj.view_type3=='calendar':
|
||||
for fld in obj.field_ids:
|
||||
# Allowing to use count(*)
|
||||
if not fld.field_id.model and fld.group_method == 'count':
|
||||
continue
|
||||
model_column = self.pool.get(fld.field_id.model)._columns[fld.field_id.name]
|
||||
if fld.calendar_mode in ('date_start','date_end') and model_column._type not in ('date','datetime'):
|
||||
return False
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</form>
|
||||
<tree editable="bottom" string="Fields to Display">
|
||||
<field name="sequence"/>
|
||||
<field name="field_id" domain="parent.model_ids and [('model_id','in',parent.model_ids[0][2]),('ttype','<>','many2many'),('ttype','<>','one2many')] or []"/>
|
||||
<field name="field_id" domain="parent.model_ids and [('model_id','in',parent.model_ids[0][2]),('ttype','<>','many2many'),('ttype','<>','one2many')] or []" attrs="{'required':[('group_method','!=','count')]}"/>
|
||||
<field name="group_method"/>
|
||||
<field name="graph_mode"/>
|
||||
<field name="calendar_mode"/>
|
||||
|
||||
@@ -25,13 +25,15 @@ import netsvc
|
||||
import time
|
||||
import pooler
|
||||
from osv import osv
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
|
||||
|
||||
class report_creator_open(wizard.interface):
|
||||
def _open_report(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
if context.get('report_id',False):
|
||||
raise wizard.except_wizard(_('UserError'),_('No Wizards available for this object!'))
|
||||
rep = pool.get('base_report_creator.report').browse(cr, uid, data['id'], context)
|
||||
view_mode = rep.view_type1
|
||||
if rep.view_type2:
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
import wizard
|
||||
import netsvc
|
||||
import pooler
|
||||
import tools
|
||||
|
||||
relation_type=['one2many','many2one','many2many']
|
||||
char_type = ['char','text','selection']
|
||||
@@ -121,7 +122,7 @@ def _set_filter_value(self, cr, uid, data, context):
|
||||
model_pool = pooler.get_pool(cr.dbname).get(model_name)
|
||||
table_name = model_pool._table
|
||||
model_name = model_pool._description
|
||||
|
||||
|
||||
if field_type:
|
||||
if field_type == 'boolean':
|
||||
if value_data == 1:
|
||||
@@ -138,12 +139,12 @@ def _set_filter_value(self, cr, uid, data, context):
|
||||
fields_list = set_field_operator(self,table_name+"."+field_data['name'],field_data['ttype'],form_data['operator'],value_data)
|
||||
if fields_list:
|
||||
create_dict = {
|
||||
'name':model_name + "/" +field_data['field_description'] +" "+ mapping_fields[form_data['operator']] + " " + str(fields_list[2]) + " ",
|
||||
'expression':' '.join(map(str,fields_list)),
|
||||
'name':model_name + "/" +field_data['field_description'] +" "+ mapping_fields[form_data['operator']] + " " + tools.ustr(fields_list[2]) + " ",
|
||||
'expression':' '.join(map(tools.ustr,fields_list)),
|
||||
'report_id':data['id'],
|
||||
'condition' : form_data['condition']
|
||||
}
|
||||
pooler.get_pool(cr.dbname).get('base_report_creator.report.filter').create(cr,uid,create_dict)
|
||||
pooler.get_pool(cr.dbname).get('base_report_creator.report.filter').create(cr,uid,create_dict,context)
|
||||
#end if field_type == 'many2many' and value_data and len(value_data):
|
||||
# pooler.get_pool(cr.dbname).get('custom.report.filter').create(cr,uid,form_data)
|
||||
#end if field_type:
|
||||
|
||||
@@ -20,6 +20,5 @@
|
||||
##############################################################################
|
||||
|
||||
import caldav
|
||||
import wizard
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -41,8 +41,7 @@
|
||||
"demo_xml" : [],
|
||||
"update_xml" : [
|
||||
'security/ir.model.access.csv',
|
||||
'caldav_view.xml',
|
||||
'caldav_wizard.xml',
|
||||
'caldav_view.xml'
|
||||
],
|
||||
"installable" : True,
|
||||
"active" : False,
|
||||
|
||||
+8
-137
@@ -69,19 +69,7 @@ class calendar_attendee(osv.osv):
|
||||
_description = 'Attendee information'
|
||||
_rec_name = 'cutype'
|
||||
|
||||
__attribute__ = {
|
||||
'cutype': {'field':'cutype', 'type':'text'},
|
||||
'member': {'field':'member', 'type':'text'},
|
||||
'role': {'field':'role', 'type':'selection'},
|
||||
'partstat': {'field':'state', 'type':'text'},
|
||||
'rsvp': {'field':'rsvp', 'type':'boolean'},
|
||||
'delegated-to': {'field':'delegated_to', 'type':'text'},
|
||||
'delegated-from': {'field':'delegated_from', 'type':'text'},
|
||||
'sent-by': {'field':'sent_by', 'type':'text'},
|
||||
'cn': {'field':'cn', 'type':'text'},
|
||||
'dir': {'field':'dir', 'type':'text'},
|
||||
'language': {'field':'language', 'type':'text'},
|
||||
}
|
||||
__attribute__ = {}
|
||||
|
||||
def _get_address(self, name=None, email=None):
|
||||
if name and email:
|
||||
@@ -231,7 +219,7 @@ calendar_attendee()
|
||||
|
||||
class res_alarm(osv.osv):
|
||||
_name = 'res.alarm'
|
||||
_description = 'basic alarm information'
|
||||
_description = 'Basic Alarm Information'
|
||||
_columns = {
|
||||
'name':fields.char('Name', size=256, required=True),
|
||||
'trigger_occurs': fields.selection([('before', 'Before'), ('after', 'After')], \
|
||||
@@ -310,19 +298,7 @@ class calendar_alarm(osv.osv):
|
||||
_name = 'calendar.alarm'
|
||||
_description = 'Event alarm information'
|
||||
_inherits = {'res.alarm': "alarm_id"}
|
||||
__attribute__ = {
|
||||
'action': {'field': 'action', 'type': 'text'},
|
||||
'description': {'field': 'name', 'type': 'text'},
|
||||
'summary': {'field': 'description', 'type': 'text'},
|
||||
'attendee': {'field': 'attendee_ids', 'type': 'text'},
|
||||
'trigger_related': {'field': 'trigger_related', 'type': 'text'},
|
||||
'trigger_duration': {'field': 'trigger_duration', 'type': 'text'},
|
||||
'trigger_occurs': {'field': 'trigger_occurs', 'type': 'text'},
|
||||
'trigger_interval': {'field': 'trigger_interval', 'type': 'text'},
|
||||
'duration': {'field': 'duration', 'type': 'text'},
|
||||
'repeat': {'field': 'repeat', 'type': 'text'},
|
||||
'attach': {'field': 'attach', 'type': 'text'},
|
||||
}
|
||||
__attribute__ = {}
|
||||
|
||||
_columns = {
|
||||
'alarm_id': fields.many2one('res.alarm', 'Basic Alarm', ondelete='cascade'),
|
||||
@@ -434,41 +410,7 @@ calendar_alarm()
|
||||
class calendar_event(osv.osv):
|
||||
_name = "calendar.event"
|
||||
_description = "Calendar Event"
|
||||
|
||||
#kept it until fields mapping implemented
|
||||
__attribute__ = {
|
||||
'class': {'field': 'class', 'type': 'selection'},
|
||||
'created': {'field': 'create_date', 'type': 'datetime'},
|
||||
'description': {'field': 'description', 'type': 'text'},
|
||||
'dtstart': {'field': 'date', 'type': 'datetime'},
|
||||
'location': {'field': 'location', 'type': 'text'},
|
||||
#'organizer': {'field': 'partner_id', 'sub-field': 'name', 'type': 'many2one'},
|
||||
'priority': {'field': 'priority', 'type': 'int'},
|
||||
'dtstamp': {'field': 'date', 'type': 'datetime'},
|
||||
'seq': None,
|
||||
'status': {'field': 'state', 'type': 'selection', 'mapping': \
|
||||
{'tentative': 'draft', 'confirmed': 'open', \
|
||||
'cancelled': 'cancel'}},
|
||||
'summary': {'field': 'name', 'type': 'text'},
|
||||
'transp': {'field': 'transparent', 'type': 'text'},
|
||||
'uid': {'field': 'id', 'type': 'text'},
|
||||
'url': {'field': 'caldav_url', 'type': 'text'},
|
||||
'recurrence-id': {'field': 'recurrent_id', 'type': 'datetime'},
|
||||
'attendee': {'field': 'attendee_ids', 'type': 'many2many', 'object': 'calendar.attendee'},
|
||||
# 'categories': {'field': 'categ_id', 'type': 'many2one', 'object': 'crm.meeting.categ'},
|
||||
'comment': None,
|
||||
'contact': None,
|
||||
'exdate': {'field': 'exdate', 'type': 'datetime'},
|
||||
'exrule': {'field': 'exrule', 'type': 'text'},
|
||||
'rstatus': None,
|
||||
'related': None,
|
||||
'resources': None,
|
||||
'rdate': None,
|
||||
'rrule': {'field': 'rrule', 'type': 'text'},
|
||||
'x-openobject-model': {'value': _name, 'type': 'text'},
|
||||
'dtend': {'field': 'date_deadline', 'type': 'datetime'},
|
||||
'valarm': {'field': 'caldav_alarm_id', 'type': 'many2one', 'object': 'calendar.alarm'},
|
||||
}
|
||||
__attribute__ = {}
|
||||
|
||||
def onchange_rrule_type(self, cr, uid, ids, rtype, *args, **argv):
|
||||
if rtype == 'none' or not rtype:
|
||||
@@ -501,6 +443,7 @@ class calendar_event(osv.osv):
|
||||
return True
|
||||
|
||||
_columns = {
|
||||
'id': fields.integer('ID'),
|
||||
'name': fields.char('Description', size=64, required=True),
|
||||
'date': fields.datetime('Date'),
|
||||
'date_deadline': fields.datetime('Deadline'),
|
||||
@@ -537,8 +480,6 @@ rule or repeating pattern for anexception to a recurrence set"),
|
||||
ids = map(lambda x: caldav_id2real_id(x), ids)
|
||||
event_data = self.read(cr, uid, ids)
|
||||
event_obj = self.pool.get('basic.calendar.event')
|
||||
event = self.pool.get('calendar.event')
|
||||
event_obj.__attribute__.update(event.__attribute__)
|
||||
ical = event_obj.export_ical(cr, uid, event_data, context={'model': self._name})
|
||||
cal_val = ical.serialize()
|
||||
cal_val = cal_val.replace('"', '').strip()
|
||||
@@ -547,17 +488,6 @@ rule or repeating pattern for anexception to a recurrence set"),
|
||||
def import_cal(self, cr, uid, data, context={}):
|
||||
file_content = base64.decodestring(data)
|
||||
event_obj = self.pool.get('basic.calendar.event')
|
||||
event = self.pool.get('calendar.event')
|
||||
event_obj.__attribute__.update(event.__attribute__)
|
||||
|
||||
attendee_obj = self.pool.get('basic.calendar.attendee')
|
||||
attendee = self.pool.get('calendar.attendee')
|
||||
attendee_obj.__attribute__.update(attendee.__attribute__)
|
||||
|
||||
alarm_obj = self.pool.get('basic.calendar.alarm')
|
||||
alarm = self.pool.get('calendar.alarm')
|
||||
alarm_obj.__attribute__.update(alarm.__attribute__)
|
||||
|
||||
vals = event_obj.import_ical(cr, uid, file_content)
|
||||
ids = []
|
||||
for val in vals:
|
||||
@@ -793,65 +723,17 @@ class calendar_todo(osv.osv):
|
||||
'duration': fields.integer('Duration'),
|
||||
}
|
||||
|
||||
#kept it until fields mapping implemented
|
||||
__attribute__ = {
|
||||
'class': {'field': 'class', 'type': 'text'},
|
||||
'completed': {'field': 'date_close', 'type': 'datetime'},
|
||||
# 'created': {'field': 'field', 'type': 'text'},
|
||||
'description': {'field': 'description', 'type': 'text'},
|
||||
# 'dtstamp': {'field': 'field', 'type': 'text'},
|
||||
'dtstart': {'field': 'date_start', 'type': 'datetime'},
|
||||
'duration': {'field': 'planned_hours', 'type': 'timedelta'},
|
||||
'due': {'field': 'date_deadline', 'type': 'datetime'},
|
||||
# 'geo': {'field': 'field', 'type': 'text'},
|
||||
# 'last-mod ': {'field': 'field', 'type': 'text'},
|
||||
'location': {'field': 'location', 'type': 'text'},
|
||||
'organizer': {'field': 'partner_id', 'type': 'many2one', 'object': 'res.partner'},
|
||||
'percent': {'field': 'progress_rate', 'type': 'int'},
|
||||
'priority': {'field': 'priority', 'type': 'text'},
|
||||
# 'recurid': {'field': 'field', 'type': 'text'},
|
||||
'seq': {'field': 'sequence', 'type': 'text'},
|
||||
'status': {'field': 'state', 'type': 'selection', \
|
||||
'mapping': {'needs-action': 'draft', \
|
||||
'completed': 'done', 'in-process': 'open', \
|
||||
'cancelled': 'cancelled'}},
|
||||
'summary': {'field': 'name', 'type': 'text'},
|
||||
'uid': {'field': 'id', 'type': 'int'},
|
||||
'url': {'field': 'caldav_url', 'type': 'text'},
|
||||
# 'attach': {'field': 'field', 'type': 'text'},
|
||||
'attendee': {'field': 'attendee_ids', 'type': 'many2many', 'object': 'calendar.attendee'},
|
||||
'comment': {'field': 'notes', 'type': 'text'},
|
||||
# 'contact': {'field': 'field', 'type': 'text'},
|
||||
'exdate': {'field':'exdate', 'type':'datetime'},
|
||||
'exrule': {'field':'exrule', 'type':'text'},
|
||||
# 'rstatus': {'field': 'field', 'type': 'text'},
|
||||
# 'related': {'field': 'field', 'type': 'text'},
|
||||
# 'resources': {'field': 'field', 'type': 'text'},
|
||||
# 'rdate': {'field': 'field', 'type': 'text'},
|
||||
'rrule': {'field': 'rrule', 'type': 'text'},
|
||||
'valarm': {'field':'caldav_alarm_id', 'type':'many2one', 'object': 'calendar.alarm'},
|
||||
}
|
||||
__attribute__ = {}
|
||||
|
||||
def import_cal(self, cr, uid, data, context={}):
|
||||
file_content = base64.decodestring(data)
|
||||
todo_obj = self.pool.get('basic.calendar.todo')
|
||||
todo = self.pool.get('calendar.todo')
|
||||
todo_obj.__attribute__.update(todo.__attribute__)
|
||||
|
||||
attendee_obj = self.pool.get('basic.calendar.attendee')
|
||||
crm_attendee = self.pool.get('calendar.attendee')
|
||||
attendee_obj.__attribute__.update(crm_attendee.__attribute__)
|
||||
|
||||
alarm_obj = self.pool.get('basic.calendar.alarm')
|
||||
crm_alarm = self.pool.get('calendar.alarm')
|
||||
alarm_obj.__attribute__.update(crm_alarm.__attribute__)
|
||||
|
||||
vals = todo_obj.import_ical(cr, uid, file_content)
|
||||
for val in vals:
|
||||
obj_tm = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.project_time_mode_id
|
||||
if not val.has_key('planned_hours'):
|
||||
# 'Computes duration' in days
|
||||
start = datetime.strptime(val['date_start'], '%Y-%m-%d %H:%M:%S')
|
||||
start = datetime.strptime(val['date'], '%Y-%m-%d %H:%M:%S')
|
||||
end = datetime.strptime(val['date_deadline'], '%Y-%m-%d %H:%M:%S')
|
||||
diff = end - start
|
||||
plan = (diff.seconds/float(86400) + diff.days) * obj_tm.factor
|
||||
@@ -877,18 +759,7 @@ class calendar_todo(osv.osv):
|
||||
task.pop('planned_hours')
|
||||
tasks.append(task)
|
||||
todo_obj = self.pool.get('basic.calendar.todo')
|
||||
todo = self.pool.get('calendar.todo')
|
||||
todo_obj.__attribute__.update(todo.__attribute__)
|
||||
|
||||
attendee_obj = self.pool.get('basic.calendar.attendee')
|
||||
attendee = self.pool.get('calendar.attendee')
|
||||
attendee_obj.__attribute__.update(attendee.__attribute__)
|
||||
|
||||
alarm_obj = self.pool.get('basic.calendar.alarm')
|
||||
alarm = self.pool.get('calendar.alarm')
|
||||
alarm_obj.__attribute__.update(alarm.__attribute__)
|
||||
|
||||
ical = todo_obj.export_ical(cr, uid, tasks, {'model': 'project.task'})
|
||||
ical = todo_obj.export_ical(cr, uid, tasks, context={'model': self._name})
|
||||
calendar_val = ical.serialize()
|
||||
calendar_val = calendar_val.replace('"', '').strip()
|
||||
return calendar_val
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<wizard string="Import .ics File" model="calendar.event"
|
||||
name="caldav.event.import" id="wizard_cal_event_import" multi="True" />
|
||||
|
||||
<wizard string="Subscribe to a Remote calendar"
|
||||
model="calendar.event" name="caldav.event.subscribe"
|
||||
id="wizard_cal_event_subscribe" multi="True" />
|
||||
|
||||
<wizard string="Export .ics File" model="calendar.event"
|
||||
name="caldav.event.export" id="wizard_cal_event_export" multi="True" />
|
||||
|
||||
<wizard string="Edit this event" model="calendar.event"
|
||||
name="calendar.event.edit.this" id="wizard_edit_this_event"
|
||||
menu="False" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,30 +1,31 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- CASE CATEGORY(categ_id) -->
|
||||
|
||||
<record model="crm.case.categ" id="categ_meet1">
|
||||
<field name="name">Customer Meeting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_meet2">
|
||||
<field name="name">Internal Meeting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_meet3">
|
||||
<field name="name">Phone Call</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_meet1">
|
||||
<field name="name">Customer Meeting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<record model="res.request.link" id="request_link_meeting">
|
||||
<field name="name">Case Meeting</field>
|
||||
<field name="object">crm.meeting</field>
|
||||
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_meet2">
|
||||
<field name="name">Internal Meeting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
<record model="crm.case.categ" id="categ_meet3">
|
||||
<field name="name">Phone Call</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<record model="res.request.link" id="request_link_meeting">
|
||||
<field name="name">Case Meeting</field>
|
||||
<field name="object">crm.meeting</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<group col="3" colspan="4" attrs="{'invisible':[('rrule_type','in', ('none', False))]}">
|
||||
<label string="" />
|
||||
<button string="Modify this Occurrence"
|
||||
name="%(caldav.wizard_edit_this_event)d" icon="gtk-save"
|
||||
name="%(base_calendar.wizard_edit_this_event)d" icon="gtk-save"
|
||||
type="action" context="{'model' : 'crm.meeting', 'date': date, 'date_deadline': date_deadline}" />
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<wizard string="Import .ics File" model="crm.meeting"
|
||||
name="caldav.event.import" id="caldav.wizard_cal_event_import" multi="True" />
|
||||
name="calendar.event.import" id="base_calendar.wizard_cal_event_import" multi="True" />
|
||||
|
||||
<wizard string="Subscribe to a Remote calendar"
|
||||
model="crm.meeting" name="caldav.event.subscribe"
|
||||
id="caldav.wizard_cal_event_subscribe" multi="True" />
|
||||
model="crm.meeting" name="calendar.event.subscribe"
|
||||
id="base_calendar.wizard_cal_event_subscribe" multi="True" />
|
||||
|
||||
<wizard string="Export .ics File" model="crm.meeting"
|
||||
name="caldav.event.export" id="caldav.wizard_cal_event_export" multi="True" />
|
||||
name="calendar.event.export" id="base_calendar.wizard_cal_event_export" multi="True" />
|
||||
|
||||
<wizard string="Edit this event" model="crm.meeting"
|
||||
name="calendar.event.edit.this" id="caldav.wizard_edit_this_event"
|
||||
name="calendar.event.edit.this" id="base_calendar.wizard_edit_this_event"
|
||||
menu="False" />
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -41,7 +41,7 @@ class crm_segmentation(osv.osv):
|
||||
'segmentation_line': fields.one2many('crm.segmentation.line', 'segmentation_id', 'Criteria', required=True),
|
||||
'som_interval': fields.integer('Days per Periode', help="A period is the average number of days between two cycle of sale or purchase for this segmentation. It's mainly used to detect if a partner has not purchased or buy for a too long time, so we suppose that his state of mind has decreased because he probably bought goods to another supplier. Use this functionality for recurring businesses."),
|
||||
'som_interval_max': fields.integer('Max Interval', help="The computation is made on all events that occured during this interval, the past X periods."),
|
||||
'som_interval_decrease': fields.float('Decrease (0>1)', help="If the partner has not purchased (or buied) during a period, decrease the state of mind by this factor. It\'s a multiplication"),
|
||||
'som_interval_decrease': fields.float('Decrease (0>1)', help="If the partner has not purchased (or bought) during a period, decrease the state of mind by this factor. It\'s a multiplication"),
|
||||
'som_interval_default': fields.float('Default (0=None)', help="Default state of mind for period preceeding the 'Max Interval' computation. This is the starting state of mind by default if the partner has no event."),
|
||||
'sales_purchase_active': fields.boolean('Use The Sales Purchase Rules', help='Check if you want to use this tab as part of the segmentation rule. If not checked, the criteria beneath will be ignored')
|
||||
}
|
||||
|
||||
@@ -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: 2010-01-21 04:34+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: crm
|
||||
|
||||
@@ -26,21 +26,21 @@
|
||||
'version': '1.0',
|
||||
'category': 'Generic Modules/CRM & SRM',
|
||||
'description': """
|
||||
This module provide Store the Job
|
||||
This module provide Store the Job
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
'depends': ['crm','hr','board_crm_configuration'],
|
||||
'depends': ['crm','hr','board_crm_configuration','survey'],
|
||||
'init_xml': [
|
||||
'crm_hr_data.xml'
|
||||
],
|
||||
'update_xml': [
|
||||
'crm_hr_wizard.xml',
|
||||
'crm_hr_wizard.xml',
|
||||
'crm_hr_view.xml',
|
||||
'crm_hr_menu.xml',
|
||||
'report_crm_hr_view.xml',
|
||||
'security/crm_hr_security.xml',
|
||||
'board_crm_hr_statistical_view.xml',
|
||||
'board_crm_hr_statistical_view.xml',
|
||||
],
|
||||
'demo_xml': [
|
||||
'crm_hr_demo.xml'
|
||||
|
||||
+424
-21
@@ -1,76 +1,479 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
|
||||
<!-- CASE CATEGORY(categ_id) -->
|
||||
|
||||
|
||||
<record model="crm.case.categ" id="categ_job1">
|
||||
<field name="name">Salesman</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="crm.case.categ" id="categ_job2">
|
||||
<field name="name">Junior Developer</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!-- Resource(type_id) -->
|
||||
|
||||
|
||||
<record model="crm.case.resource.type" id="type_job1">
|
||||
<field name="name">Graduate</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_job2">
|
||||
<field name="name">Licenced</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_job3">
|
||||
<field name="name"> > Bac +5</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- STAGE(stage_id) -->
|
||||
|
||||
|
||||
<record model="crm.case.stage" id="stage_job1">
|
||||
<field name="name">Initial Jobs Demand</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_job2">
|
||||
<field name="name">First Interview</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_job3">
|
||||
<field name="name">Second Interview</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_job4">
|
||||
<field name="name">Contract Proposed</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_job5">
|
||||
<field name="name">Contract Signed</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_job6">
|
||||
<field name="name">Refused by Employee</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_job7">
|
||||
<field name="name">Refused by Company</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.job')]" model="ir.model"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
<data>
|
||||
<record id="survey_job_0" model="survey">
|
||||
<field name="title">Job Survey</field>
|
||||
<field name="state">draft</field>
|
||||
<field eval="[(6,0,[])]" name="users"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_page_job_0" model="survey.page">
|
||||
<field name="title">Default Section</field>
|
||||
<field name="survey_id" ref="survey_job_0"/>
|
||||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_page_job_1" model="survey.page">
|
||||
<field name="title">Education &amp; Activities</field>
|
||||
<field name="survey_id" ref="survey_job_0"/>
|
||||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_page_job_2" model="survey.page">
|
||||
<field name="title">Importance</field>
|
||||
<field name="survey_id" ref="survey_job_0"/>
|
||||
<field eval="3" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_job_0" model="survey.question">
|
||||
<field name="validation_type">do_not_validate</field>
|
||||
<field name="comment_valid_type">do_not_validate</field>
|
||||
<field name="make_comment_field_err_msg">Please enter a comment.</field>
|
||||
<field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
|
||||
<field eval="0" name="comment_column"/>
|
||||
<field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="rating_allow_one_column_require"/>
|
||||
<field name="req_error_msg">This question requires an answer.</field>
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="question">From which university will you graduate?</field>
|
||||
<field eval="0" name="is_require_answer"/>
|
||||
<field name="type">single_textbox</field>
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="make_comment_field"/>
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="page_id" ref="survey_page_job_0"/>
|
||||
<field name="comment_label">Other</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_job_1" model="survey.question">
|
||||
<field name="validation_type">do_not_validate</field>
|
||||
<field name="comment_valid_type">do_not_validate</field>
|
||||
<field name="make_comment_field_err_msg">Please enter a comment.</field>
|
||||
<field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
|
||||
<field eval="0" name="comment_column"/>
|
||||
<field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="rating_allow_one_column_require"/>
|
||||
<field name="req_error_msg">This question requires an answer.</field>
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="question">Rate the Importance</field>
|
||||
<field eval="0" name="is_require_answer"/>
|
||||
<field name="type">matrix_of_choices_only_one_ans</field>
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="make_comment_field"/>
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="page_id" ref="survey_page_job_2"/>
|
||||
<field name="comment_label">Other</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_job_2" model="survey.question">
|
||||
<field name="validation_type">do_not_validate</field>
|
||||
<field name="comment_valid_type">do_not_validate</field>
|
||||
<field name="make_comment_field_err_msg">Please enter a comment.</field>
|
||||
<field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
|
||||
<field eval="0" name="comment_column"/>
|
||||
<field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="rating_allow_one_column_require"/>
|
||||
<field name="req_error_msg">This question requires an answer.</field>
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="question">Education</field>
|
||||
<field eval="0" name="is_require_answer"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="make_comment_field"/>
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="page_id" ref="survey_page_job_1"/>
|
||||
<field name="comment_label">Other</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_job_3" model="survey.question">
|
||||
<field name="validation_type">do_not_validate</field>
|
||||
<field name="comment_valid_type">do_not_validate</field>
|
||||
<field name="make_comment_field_err_msg">Please enter a comment.</field>
|
||||
<field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
|
||||
<field eval="0" name="comment_column"/>
|
||||
<field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="rating_allow_one_column_require"/>
|
||||
<field name="req_error_msg">This question requires an answer.</field>
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="question">Knowledge</field>
|
||||
<field eval="0" name="is_require_answer"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="make_comment_field"/>
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="page_id" ref="survey_page_job_1"/>
|
||||
<field name="comment_label">Other</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_job_4" model="survey.question">
|
||||
<field name="validation_type">do_not_validate</field>
|
||||
<field name="comment_valid_type">do_not_validate</field>
|
||||
<field name="make_comment_field_err_msg">Please enter a comment.</field>
|
||||
<field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
|
||||
<field eval="0" name="comment_column"/>
|
||||
<field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="rating_allow_one_column_require"/>
|
||||
<field name="req_error_msg">This question requires an answer.</field>
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="question">What is your gender?</field>
|
||||
<field eval="0" name="is_require_answer"/>
|
||||
<field name="type">multiple_choice_only_one_ans</field>
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="make_comment_field"/>
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="page_id" ref="survey_page_job_0"/>
|
||||
<field name="comment_label">Other</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
|
||||
<record id="survey_answer_job_70" model="survey.answer">
|
||||
<field name="answer">Male</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_4"/>
|
||||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
|
||||
<record id="survey_answer_job_71" model="survey.answer">
|
||||
<field name="answer">Female</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_4"/>
|
||||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_job_5" model="survey.question">
|
||||
<field name="validation_type">do_not_validate</field>
|
||||
<field name="comment_valid_type">do_not_validate</field>
|
||||
<field name="make_comment_field_err_msg">Please enter a comment.</field>
|
||||
<field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
|
||||
<field eval="0" name="comment_column"/>
|
||||
<field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="rating_allow_one_column_require"/>
|
||||
<field name="req_error_msg">This question requires an answer.</field>
|
||||
<field eval="3" name="sequence"/>
|
||||
<field name="question">What age group do you belong to?</field>
|
||||
<field eval="0" name="is_require_answer"/>
|
||||
<field name="type">multiple_choice_only_one_ans</field>
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="make_comment_field"/>
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="page_id" ref="survey_page_job_0"/>
|
||||
<field name="comment_label">Other</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
|
||||
<record id="survey_answer_job_81" model="survey.answer">
|
||||
<field name="answer">0 - 15</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_5"/>
|
||||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
<record id="survey_answer_job_82" model="survey.answer">
|
||||
<field name="answer">16 - 20</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_5"/>
|
||||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
<record id="survey_answer_job_83" model="survey.answer">
|
||||
<field name="answer">21 - 30</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_5"/>
|
||||
<field eval="3" name="sequence"/>
|
||||
</record>
|
||||
<record id="survey_answer_job_84" model="survey.answer">
|
||||
<field name="answer">31 - 40</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_5"/>
|
||||
<field eval="4" name="sequence"/>
|
||||
</record>
|
||||
<record id="survey_answer_job_85" model="survey.answer">
|
||||
<field name="answer">41 - 50</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_5"/>
|
||||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
<record id="survey_answer_job_86" model="survey.answer">
|
||||
<field name="answer">51 - 60</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_5"/>
|
||||
<field eval="6" name="sequence"/>
|
||||
</record>
|
||||
<record id="survey_answer_job_87" model="survey.answer">
|
||||
<field name="answer">61 - 70</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_5"/>
|
||||
<field eval="7" name="sequence"/>
|
||||
</record>
|
||||
<record id="survey_answer_job_88" model="survey.answer">
|
||||
<field name="answer">71 +</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_5"/>
|
||||
<field eval="8" name="sequence"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_job_6" model="survey.question">
|
||||
<field name="validation_type">do_not_validate</field>
|
||||
<field name="comment_valid_type">do_not_validate</field>
|
||||
<field name="make_comment_field_err_msg">Please enter a comment.</field>
|
||||
<field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
|
||||
<field eval="0" name="comment_column"/>
|
||||
<field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="rating_allow_one_column_require"/>
|
||||
<field name="req_error_msg">This question requires an answer.</field>
|
||||
<field eval="3" name="sequence"/>
|
||||
<field name="question">Exprience</field>
|
||||
<field eval="0" name="is_require_answer"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="make_comment_field"/>
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="page_id" ref="survey_page_job_1"/>
|
||||
<field name="comment_label">Other</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_job_7" model="survey.question">
|
||||
<field name="validation_type">do_not_validate</field>
|
||||
<field name="comment_valid_type">do_not_validate</field>
|
||||
<field name="make_comment_field_err_msg">Please enter a comment.</field>
|
||||
<field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
|
||||
<field eval="0" name="comment_column"/>
|
||||
<field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="rating_allow_one_column_require"/>
|
||||
<field name="req_error_msg">This question requires an answer.</field>
|
||||
<field eval="4" name="sequence"/>
|
||||
<field name="question">Activities</field>
|
||||
<field eval="0" name="is_require_answer"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field eval="0" name="make_comment_field"/>
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="page_id" ref="survey_page_job_1"/>
|
||||
<field name="comment_label">Other</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_column_heading_job_0" model="survey.question.column.heading">
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="title">Not important</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field name="question_id" ref="survey_question_job_1"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_column_heading_job_1" model="survey.question.column.heading">
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="title">Somewhat important</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field name="question_id" ref="survey_question_job_1"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_column_heading_job_2" model="survey.question.column.heading">
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="title">Important</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field name="question_id" ref="survey_question_job_1"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_column_heading_job_3" model="survey.question.column.heading">
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="title">Very important</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field name="question_id" ref="survey_question_job_1"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_question_column_heading_job_4" model="survey.question.column.heading">
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
<field name="title">Most important</field>
|
||||
<field eval="1" name="in_visible_rating_weight"/>
|
||||
<field name="question_id" ref="survey_question_job_1"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_job_0" model="survey.answer">
|
||||
<field name="answer">Good pay</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_1" model="survey.answer">
|
||||
<field name="answer">Getting on with colleagues</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_2" model="survey.answer">
|
||||
<field name="answer">Office environment (décor, light, space etc)</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="3" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_3" model="survey.answer">
|
||||
<field name="answer">Desk space</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="4" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_4" model="survey.answer">
|
||||
<field name="answer">State of the art technology</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_5" model="survey.answer">
|
||||
<field name="answer">Office location (proximity to home)</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="6" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_6" model="survey.answer">
|
||||
<field name="answer">Good management/boss</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="7" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_7" model="survey.answer">
|
||||
<field name="answer">Freebies such as tea, coffee and stationery</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="8" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_8" model="survey.answer">
|
||||
<field name="answer">Perks such as free parking, gym passes etc</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="9" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_9" model="survey.answer">
|
||||
<field name="answer">No out of hours working</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_10" model="survey.answer">
|
||||
<field name="answer">Dress code</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="11" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_11" model="survey.answer">
|
||||
<field name="answer">Regular meetings</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="12" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record id="survey_answer_job_12" model="survey.answer">
|
||||
<field name="answer">Good social life (office nights out, good Christmas parties etc)</field>
|
||||
<field name="question_id" ref="crm_hr.survey_question_job_1"/>
|
||||
<field eval="13" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
</openerp>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_crm_job_user_graph" model="ir.ui.view">
|
||||
<field name="name">report.crm.job.user.graph</field>
|
||||
<field name="model">report.crm.job.user</field>
|
||||
@@ -59,7 +59,7 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_report_crm_job_user_tree" model="ir.actions.act_window">
|
||||
<field name="name">Jobs by User and Section</field>
|
||||
<field name="res_model">report.crm.job.user</field>
|
||||
@@ -68,9 +68,14 @@
|
||||
<field name="view_id" ref="view_crm_job_user_graph"/>
|
||||
<field name="search_view_id" ref="view_crm_job_user_filter"/>
|
||||
</record>
|
||||
<menuitem
|
||||
id="hr.menu_hr_reporting"
|
||||
name="Reporting"
|
||||
parent="hr.menu_hr_root"
|
||||
sequence="40" />
|
||||
<menuitem name="Jobs" id="menu_crm_jobs_tree" parent="hr.menu_hr_reporting"/>
|
||||
<menuitem action="action_report_crm_job_user_tree" id="menu_crm_job_user_tree" parent="menu_crm_jobs_tree"/>
|
||||
|
||||
|
||||
<!-- # jobs by section and category of case -->
|
||||
|
||||
<record id="view_crm_job_categ_tree" model="ir.ui.view">
|
||||
@@ -137,7 +142,7 @@
|
||||
<field name="search_view_id" ref="view_crm_job_categ_filter"/>
|
||||
</record>
|
||||
<menuitem action="action_report_crm_job_categ_tree" id="menu_crm_job_categ_tree" parent="menu_crm_jobs_tree"/>
|
||||
|
||||
|
||||
<!-- jobs by Section -->
|
||||
|
||||
<record id="view_report_crm_job_section_tree" model="ir.ui.view">
|
||||
@@ -187,6 +192,6 @@
|
||||
<field name="search_view_id" ref="view_report_crm_job_section_filter"/>
|
||||
</record>
|
||||
<menuitem action="action_report_crm_job_section_tree" id="menu_crm_job_section_tree" parent="menu_crm_jobs_tree"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -25,12 +25,11 @@
|
||||
'version': '1.3',
|
||||
'category': 'Generic Modules/CRM & SRM',
|
||||
'description': """
|
||||
This module allow users to perform segmentation within partners.
|
||||
It use the profiles criteria from the earlier segmentation module and improve it thanks to the new concept of questionnaire. You can now regroup questions into a questionnaire and directly use it on a partner.
|
||||
This module allows users to perform segmentation within partners.
|
||||
It uses the profiles criteria from the earlier segmentation module and improve it. Thanks to the new concept of questionnaire. You can now regroup questions into a questionnaire and directly use it on a partner.
|
||||
|
||||
It also has been merged with the earlier CRM & SRM segmentation tool because they were overlapping.
|
||||
|
||||
|
||||
The menu items related are in "CRM & SRM\Configuration\Segmentations"
|
||||
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
</group>
|
||||
</page>
|
||||
<page string="Sales Purchase">
|
||||
<!-- <field name="sales_purchase_active"/> -->
|
||||
<field name="sales_purchase_active"/>
|
||||
<separator string="State of Mind Computation" colspan="4"/>
|
||||
<field name="som_interval"/>
|
||||
<field name="som_interval_max"/>
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
'description': """This is a complete document management system:
|
||||
* User Authentication
|
||||
* Document Indexation
|
||||
|
||||
ATTENTION:
|
||||
- When you install this module in a running company that have already PDF files stored into the database,
|
||||
you will lose them all.
|
||||
- After installing this module PDF's are not longer stored into the database,
|
||||
but in the servers rootpad like /server/bin/filestore.
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
|
||||
@@ -25,6 +25,7 @@ import os
|
||||
import tools
|
||||
import base64
|
||||
from tools.misc import ustr
|
||||
from tools.translate import _
|
||||
|
||||
from osv.orm import except_orm
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class doucment_change_process_phase(osv.osv):
|
||||
'name': fields.char("Name", size=64, required=True),
|
||||
'process_id':fields.many2one('document.change.process','Process Change'),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'update_document': fields.selection([('at_endPhase', 'End Phase'),('at_endprocess', 'End Porcess')], 'Update Document', required=True),
|
||||
'update_document': fields.selection([('at_endPhase', 'End Phase'),('at_endprocess', 'End Process')], 'Update Document', required=True),
|
||||
'type': fields.selection([('control_required', 'Control Required'),('no_control', 'No Control')], 'Type'),
|
||||
'date_control': fields.date('Control Date', select=True),
|
||||
'phase_ids':fields.many2one('document.change.process.phase','Phase Type'),
|
||||
@@ -73,6 +73,7 @@ class doucment_change_process_phase(osv.osv):
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
'update_document': lambda *a:'at_endPhase',
|
||||
'type':lambda *a: 'no_control',
|
||||
}
|
||||
doucment_change_process_phase()
|
||||
@@ -154,4 +155,4 @@ class doucment_change_process(osv.osv):
|
||||
'state': lambda *a: 'draft',
|
||||
}
|
||||
|
||||
doucment_change_process()
|
||||
doucment_change_process()
|
||||
|
||||
@@ -30,6 +30,7 @@ import random
|
||||
import tools
|
||||
import re
|
||||
|
||||
from tools.translate import _
|
||||
from document.nodes import node_content
|
||||
|
||||
from tools.safe_eval import safe_eval
|
||||
|
||||
@@ -97,7 +97,7 @@ class res_users(osv.osv):
|
||||
result[user_id] = parent_ids
|
||||
return result
|
||||
|
||||
def _parent_search(self, cr, uid, obj, name, args):
|
||||
def _parent_search(self, cr, uid, obj, name, args, context):
|
||||
parent = []
|
||||
for arg in args:
|
||||
if arg[0] == 'parent_id':
|
||||
@@ -132,7 +132,7 @@ class res_users(osv.osv):
|
||||
result[manager_id] = child_ids
|
||||
return result
|
||||
|
||||
def _child_search(self, cr, uid, obj, name, args):
|
||||
def _child_search(self, cr, uid, obj, name, args, context):
|
||||
parent = []
|
||||
for arg in args:
|
||||
if arg[0] == 'child_ids':
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
import wizard
|
||||
import time
|
||||
import pooler
|
||||
from tools.translate import _
|
||||
|
||||
_date_form = '''<?xml version="1.0"?>
|
||||
<form string="Select a time span">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"author" : "Tiny",
|
||||
"category" : "Generic Modules/Human Resources",
|
||||
"website" : "http://www.openerp.com",
|
||||
"depends" : ["hr","survey"],
|
||||
"depends" : ["hr",'crm_hr'],
|
||||
"description": "Ability to create employees evaluation.",
|
||||
"init_xml" : [],
|
||||
"demo_xml" : ["hr_evaluation_demo.xml"],
|
||||
|
||||
@@ -52,7 +52,7 @@ class hr_evaluation_plan_phase(osv.osv):
|
||||
('bottom-up','Bottom-Up Appraisal Requests'),
|
||||
('self','Self Appraisal Requests'),
|
||||
('final','Final Interview')], 'Action', required=True),
|
||||
'survey_id': fields.many2one('survey','Appraisal Form'),
|
||||
'survey_id': fields.many2one('survey','Appraisal Form',required=True),
|
||||
'send_answer_manager': fields.boolean('All Answers',
|
||||
help="Send all answers to the manager"),
|
||||
'send_answer_employee': fields.boolean('All Answers',
|
||||
|
||||
@@ -1287,4 +1287,98 @@ Once the form had been filled, the employee send it to his supervisor.
|
||||
<field name="question_id" ref="survey_question_9"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
<data noupdate="1">
|
||||
<record id="survey_request_1" model="survey.request">
|
||||
<field name="state">waiting_answer</field>
|
||||
<field name="survey_id" ref="hr_evaluation.survey_2"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="email">fp@tinyerp.com</field>
|
||||
<field name="date_deadline">2010-02-21</field>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_managersevaluationplan0" model="hr_evaluation.plan">
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="6" name="month_next"/>
|
||||
<field name="name">Manager's Evaluation Plan</field>
|
||||
<field eval="3" name="month_first"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_phase_sendtosubordinates0" model="hr_evaluation.plan.phase">
|
||||
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
|
||||
<field name="name">Send to Subordinates</field>
|
||||
<field eval="0" name="send_anonymous_manager"/>
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="action">bottom-up</field>
|
||||
<field eval="0" name="send_anonymous_employee"/>
|
||||
<field eval="0" name="send_answer_employee"/>
|
||||
<field name="survey_id" ref="hr_evaluation.survey_2"/>
|
||||
<field eval="0" name="send_answer_manager"/>
|
||||
<field eval="0" name="wait"/>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_phase_sendtomanagers0" model="hr_evaluation.plan.phase">
|
||||
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
|
||||
<field name="name">Send to Managers</field>
|
||||
<field eval="0" name="send_anonymous_manager"/>
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="action">top-down</field>
|
||||
<field eval="0" name="send_anonymous_employee"/>
|
||||
<field eval="0" name="send_answer_employee"/>
|
||||
<field name="survey_id" ref="hr_evaluation.survey_2"/>
|
||||
<field eval="0" name="send_answer_manager"/>
|
||||
<field eval="0" name="wait"/>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_phase_sendtoemployee0" model="hr_evaluation.plan.phase">
|
||||
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
|
||||
<field name="name">Send to Employee</field>
|
||||
<field eval="0" name="send_anonymous_manager"/>
|
||||
<field eval="3" name="sequence"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="action">self</field>
|
||||
<field eval="0" name="send_anonymous_employee"/>
|
||||
<field eval="0" name="send_answer_employee"/>
|
||||
<field name="survey_id" ref="hr_evaluation.survey_2"/>
|
||||
<field eval="0" name="send_answer_manager"/>
|
||||
<field eval="0" name="wait"/>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_phase_finalinterviewwithmanager0" model="hr_evaluation.plan.phase">
|
||||
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
|
||||
<field name="name">Final Interview With Manager</field>
|
||||
<field eval="0" name="send_anonymous_manager"/>
|
||||
<field eval="4" name="sequence"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="action">final</field>
|
||||
<field eval="0" name="send_anonymous_employee"/>
|
||||
<field eval="0" name="send_answer_employee"/>
|
||||
<field name="survey_id" ref="crm_hr.survey_job_0"/>
|
||||
<field eval="0" name="send_answer_manager"/>
|
||||
<field eval="1" name="wait"/>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_evaluation_0" model="hr_evaluation.evaluation">
|
||||
<field name="rating">0</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
|
||||
<field name="state">draft</field>
|
||||
<field eval="[(6,0,[ref('survey_request_1')])]" name="survey_request_ids"/>
|
||||
<field name="date">2010-01-21</field>
|
||||
<field name="phase_id" ref="hr_evaluation_plan_phase_sendtomanagers0"/>
|
||||
<field name="manager_id" ref="base.user_root"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
</openerp>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Evaluation Plan Phase">
|
||||
<field name="plan_id" invisible="1"/>
|
||||
<group col="6" colspan="4">
|
||||
<field name="name"/>
|
||||
<field name="wait"/>
|
||||
@@ -124,7 +125,7 @@
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="manager_id" select="1"/>
|
||||
<field name="plan_id"/>
|
||||
<field name="phase_id"/>
|
||||
<field name="phase_id" domain="[('plan_id', '=', plan_id)]"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Appraisal">
|
||||
|
||||
+46
-28
@@ -164,24 +164,6 @@ class hr_holidays(osv.osv):
|
||||
}
|
||||
_order = 'date_from desc'
|
||||
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
if context:
|
||||
if context.has_key('type'):
|
||||
vals['type'] = context['type']
|
||||
if context.has_key('allocation_type'):
|
||||
vals['allocation_type'] = context['allocation_type']
|
||||
return super(osv.osv,self).create(cr, uid, vals, context)
|
||||
|
||||
#~ def _check_date(self, cr, uid, ids):
|
||||
#~ if ids:
|
||||
#~ cr.execute('select number_of_days from hr_holidays where id in ('+','.join(map(str, ids))+')')
|
||||
#~ res = cr.fetchall()
|
||||
#~ if res and res[0][0] <= 0:
|
||||
#~ return False
|
||||
#~ return True
|
||||
|
||||
#_constraints = [(_check_date, 'Start date should not be greater than end date! ', ['number_of_days'])]
|
||||
|
||||
def onchange_date_from(self, cr, uid, ids, date_to, date_from):
|
||||
result = {}
|
||||
if date_to and date_from:
|
||||
@@ -197,6 +179,51 @@ class hr_holidays(osv.osv):
|
||||
}
|
||||
return result
|
||||
|
||||
def _update_user_holidays(self, cr, uid, ids):
|
||||
for record in self.browse(cr, uid, ids):
|
||||
if record.state=='validate':
|
||||
holiday_id=self.pool.get('hr.holidays.per.user').search(cr, uid, [('employee_id','=', record.employee_id.id),('holiday_status','=',record.holiday_status.id)])
|
||||
if holiday_id:
|
||||
obj_holidays_per_user=self.pool.get('hr.holidays.per.user').browse(cr, uid,holiday_id[0])
|
||||
self.pool.get('hr.holidays.per.user').write(cr,uid,obj_holidays_per_user.id,{'leaves_taken':obj_holidays_per_user.leaves_taken - record.number_of_days})
|
||||
if record.case_id:
|
||||
if record.case_id.state <> 'draft':
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_('You can not cancel this holiday request. first You have to make its case in draft state.'))
|
||||
else:
|
||||
self.pool.get('crm.case').unlink(cr,uid,[record.case_id.id])
|
||||
|
||||
def _check_date(self, cr, uid, ids):
|
||||
if ids:
|
||||
cr.execute('select number_of_days from hr_holidays where id in ('+','.join(map(str, ids))+')')
|
||||
res = cr.fetchall()
|
||||
if res and res[0][0] < 0:
|
||||
return False
|
||||
return True
|
||||
|
||||
_constraints = [(_check_date, 'Start date should not be larger than end date! ', ['number_of_days'])]
|
||||
|
||||
def create(self, cr, uid, vals, *args, **kwargs):
|
||||
id_holiday = super(hr_holidays, self).create(cr, uid, vals, *args, **kwargs)
|
||||
self._create_holiday(cr, uid, [id_holiday])
|
||||
return id_holiday
|
||||
|
||||
def unlink(self, cr, uid, ids, context={}):
|
||||
self._update_user_holidays(cr, uid, ids)
|
||||
return super(hr_holidays, self).unlink(cr, uid, ids, context)
|
||||
|
||||
def _create_holiday(self, cr, uid, ids):
|
||||
holidays_user_obj = self.pool.get('hr.holidays.per.user')
|
||||
holidays_data = self.browse(cr, uid, ids[0])
|
||||
list_holiday = []
|
||||
ids_user_hdays = holidays_user_obj.search(cr, uid, [('employee_id', '=', holidays_data.employee_id.id),('holiday_status', '=', holidays_data.holiday_status.id)])
|
||||
for hdays in holidays_user_obj.browse(cr, uid, ids_user_hdays):
|
||||
for req in hdays.holiday_ids:
|
||||
list_holiday.append(req.id)
|
||||
list_holiday.append(ids[0])
|
||||
holidays_user_obj.write(cr, uid, ids_user_hdays, {'holiday_ids': [(6, 0, list_holiday)]})
|
||||
return True
|
||||
|
||||
def onchange_date_to(self, cr, uid, ids, date_from, date_to):
|
||||
result = {}
|
||||
if date_from and date_to:
|
||||
@@ -290,16 +317,7 @@ class hr_holidays(osv.osv):
|
||||
return True
|
||||
|
||||
def holidays_cancel(self, cr, uid, ids, *args):
|
||||
for record in self.browse(cr, uid, ids):
|
||||
if record.state=='validate':
|
||||
if record.case_id:
|
||||
self.pool.get('crm.case').unlink(cr,uid,[record.case_id.id])
|
||||
if record.linked_request_ids:
|
||||
list_ids = []
|
||||
for id in record.linked_request_ids:
|
||||
list_ids.append(id.id)
|
||||
self.holidays_cancel(cr,uid,list_ids)
|
||||
self.unlink(cr,uid,list_ids)
|
||||
self._update_user_holidays(cr, uid, ids)
|
||||
self.write(cr, uid, ids, {
|
||||
'state':'cancel'
|
||||
})
|
||||
|
||||
@@ -72,7 +72,7 @@ account_analytic_account()
|
||||
class account_analytic_line(osv.osv):
|
||||
_inherit = 'account.analytic.line'
|
||||
_columns = {
|
||||
'invoice_id': fields.many2one('account.invoice', 'Invoice'),
|
||||
'invoice_id': fields.many2one('account.invoice', 'Invoice', ondelete="set null"),
|
||||
'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Type of Invoicing'),
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
|
||||
revenue = 0.0
|
||||
if lines[id].amount < 0 and lines[id].product_id and lines[id].product_uom_id and lines[id].account_id.pricelist_id:
|
||||
ctx = {'uom': lines[id].product_uom_id.id}
|
||||
price = price_obj.price_get(self.cr, self.uid, [lines[id].pricelist_id.id], lines[id].product_id.id, lines[id].unit_amount, ctx)[lines[id].pricelist_id.id]
|
||||
price = price_obj.price_get(self.cr, self.uid, [lines[id].account_id.pricelist_id.id], lines[id].product_id.id, lines[id].unit_amount, ctx)[lines[id].account_id.pricelist_id.id]
|
||||
revenue = round(price * lines[id].unit_amount, 2)
|
||||
r['revenue'] = revenue
|
||||
self.sum_revenue[account_id] += revenue
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
import wizard
|
||||
import datetime
|
||||
import pooler
|
||||
from tools.translate import _
|
||||
|
||||
form='''<?xml version="1.0"?>
|
||||
<form string="Choose">
|
||||
|
||||
@@ -35,6 +35,13 @@ class invoice_create(wizard.interface):
|
||||
def _get_accounts(self, cr, uid, data, context):
|
||||
if not len(data['ids']):
|
||||
return {}
|
||||
#Checking whether the analytic line is invoiced or not
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
analytic_line_obj = pool.get('account.analytic.line').browse(cr, uid, data['ids'], context)
|
||||
for obj_acc in analytic_line_obj:
|
||||
if obj_acc.invoice_id and obj_acc.invoice_id.state !='cancel':
|
||||
raise wizard.except_wizard(_('Warning'),_('The analytic entry "%s" is already invoiced!')%(obj_acc.name,))
|
||||
|
||||
cr.execute("SELECT distinct(account_id) from account_analytic_line where id IN (%s)"% (','.join(map(str,data['ids'])),))
|
||||
account_ids = cr.fetchall()
|
||||
return {'accounts': [x[0] for x in account_ids]}
|
||||
|
||||
@@ -319,9 +319,12 @@ class hr_timesheet_sheet(osv.osv):
|
||||
context, load='_classic_write')]
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
sheets = self.read(cr, uid, ids, ['state'])
|
||||
if any(s['state'] in ('confirm', 'done') for s in sheets):
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete Sheet(s) which are already confirmed !'))
|
||||
sheets = self.read(cr, uid, ids, ['state','total_attendance'])
|
||||
for sheet in sheets:
|
||||
if sheet['state'] in ('confirm', 'done'):
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete Sheet(s) which are already confirmed !'))
|
||||
elif sheet['total_attendance'] <> 0.00:
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete Sheet(s) which have attendance entries encoded !'))
|
||||
return super(hr_timesheet_sheet, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
hr_timesheet_sheet()
|
||||
@@ -362,7 +365,7 @@ class hr_timesheet_line(osv.osv):
|
||||
res[line_id] = False
|
||||
return res
|
||||
|
||||
def _sheet_search(self, cursor, user, obj, name, args):
|
||||
def _sheet_search(self, cursor, user, obj, name, args, context):
|
||||
if not len(args):
|
||||
return []
|
||||
sheet_obj = self.pool.get('hr_timesheet_sheet.sheet')
|
||||
|
||||
@@ -20,5 +20,6 @@
|
||||
##############################################################################
|
||||
|
||||
import idea
|
||||
import wizard
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -30,10 +30,11 @@
|
||||
'depends': ['base'],
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'idea_wizard.xml',
|
||||
'idea_view.xml',
|
||||
'idea_workflow.xml',
|
||||
'security/idea_security.xml',
|
||||
'security/ir.model.access.csv'
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
|
||||
@@ -174,6 +174,7 @@ class idea_vote(osv.osv):
|
||||
'score': fields.selection( VoteValues, 'Score', required=True)
|
||||
}
|
||||
_defaults = {
|
||||
#'user_id': lambda self, cr, uid, context: uid,
|
||||
'score': lambda *a: DefaultVoteValue,
|
||||
}
|
||||
idea_vote()
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<field name="title" select="1" />
|
||||
<field name="category_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="my_vote"/>
|
||||
<!--<field name="my_vote"/>-->
|
||||
<field name="vote_avg" />
|
||||
<field name="description" colspan="4" select="2" widget="text_wiki"/>
|
||||
<field name="state" select="2"/>
|
||||
@@ -131,6 +131,9 @@
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Vote">
|
||||
<field name="vote_ids" nolabel="1" colspan="4" />
|
||||
</page>
|
||||
<page string="Statistics">
|
||||
<field name="stat_vote_ids" colspan="4" mode="graph,tree" nolabel="1">
|
||||
<graph string="vote_stat of ideas" type="bar">
|
||||
@@ -161,6 +164,7 @@
|
||||
<field name="vote_avg" />
|
||||
<field name="count_comments" />
|
||||
<field name="count_votes" />
|
||||
<button name="%(wizard_idea_post_vote)d" icon="gtk-execute" type="action" states="draft,open" string="Vote"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -204,7 +208,7 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_idea_idea_search"/>
|
||||
</record>
|
||||
<menuitem name="All Ideas" parent="menu_ideas1" id="menu_idea_idea" action="action_idea_idea"/>
|
||||
<menuitem name="Ideas" parent="menu_ideas1" id="menu_idea_idea" action="action_idea_idea"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_idea_idea_open">
|
||||
<field name="name">Open Ideas</field>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<wizard
|
||||
id="wizard_idea_post_vote"
|
||||
model="idea.idea"
|
||||
name="idea.post.vote"
|
||||
menu="True"
|
||||
string="Vote"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import idea_vote
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,63 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import wizard
|
||||
import ir
|
||||
from mx.DateTime import now
|
||||
import pooler
|
||||
import netsvc
|
||||
|
||||
vote_form = """<?xml version="1.0" ?>
|
||||
<form string="Create Tasks">
|
||||
<field name="vote"/>
|
||||
</form>"""
|
||||
|
||||
vote_fields = {
|
||||
'vote': {'string': 'Post Vote', 'type': 'selection',
|
||||
'selection': [('-1','Not Voted'),('0','Very Bad'),('25', 'Bad'),('50','Normal'),('75','Good'),('100','Very Good') ]},
|
||||
}
|
||||
|
||||
|
||||
|
||||
class idea_vote(wizard.interface):
|
||||
def _do_vote(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
vote_obj = pool.get('idea.vote')
|
||||
score=str(data['form']['vote'])
|
||||
dic={'idea_id' : data['id'], 'user_id' : uid, 'score' : score }
|
||||
vote=vote_obj.create(cr,uid,dic)
|
||||
return True
|
||||
|
||||
states = {
|
||||
'init':{
|
||||
'actions': [],
|
||||
'result': {'type':'form', 'arch':vote_form, 'fields':vote_fields, 'state':[('end', 'Cancel'), ('post', 'Post Vote')] },
|
||||
},
|
||||
'post':{
|
||||
'actions': [],
|
||||
'result': {'type':'action', 'action': _do_vote, 'state':'end'},
|
||||
},
|
||||
}
|
||||
idea_vote('idea.post.vote')
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -7021,8 +7021,8 @@
|
||||
<field name="description">VI 0</field>
|
||||
<field eval="0.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="base_code_id" ref="vat_code_a47"/>
|
||||
<field name="ref_base_code_id" ref="vat_code_a49"/>
|
||||
<field name="base_code_id" ref="vat_code_a46"/>
|
||||
<field name="ref_base_code_id" ref="vat_code_a48"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
<!-- Purchases VAT -->
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<record id="vat_code_input" model="account.tax.code.template">
|
||||
<field name="name">Input VAT</field>
|
||||
<field name="parent_id" ref="vat_code_balance_net"/>
|
||||
<field eval="-1" name="sign"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_code_input_S" model="account.tax.code.template">
|
||||
|
||||
+8
-6
@@ -544,7 +544,7 @@ class mrp_production(osv.osv):
|
||||
|
||||
#TODO Review materials in function in_prod and prod_end.
|
||||
def action_production_end(self, cr, uid, ids):
|
||||
move_ids = []
|
||||
# move_ids = []
|
||||
for production in self.browse(cr, uid, ids):
|
||||
for res in production.move_lines:
|
||||
for move in production.move_created_ids:
|
||||
@@ -552,7 +552,7 @@ class mrp_production(osv.osv):
|
||||
cr.execute('INSERT INTO stock_move_history_ids \
|
||||
(parent_id, child_id) VALUES (%s,%s)',
|
||||
(res.id, move.id))
|
||||
move_ids.append(res.id)
|
||||
# move_ids.append(res.id)
|
||||
vals= {'state':'confirmed'}
|
||||
new_moves = [x.id for x in production.move_created_ids]
|
||||
self.pool.get('stock.move').write(cr, uid, new_moves, vals)
|
||||
@@ -562,7 +562,7 @@ class mrp_production(osv.osv):
|
||||
self.pool.get('stock.move').check_assign(cr, uid, new_moves)
|
||||
self.pool.get('stock.move').action_done(cr, uid, new_moves)
|
||||
self._costs_generate(cr, uid, production)
|
||||
self.pool.get('stock.move').action_done(cr, uid, move_ids)
|
||||
# self.pool.get('stock.move').action_done(cr, uid, move_ids)
|
||||
self.write(cr, uid, ids, {'state': 'done'})
|
||||
return True
|
||||
|
||||
@@ -1009,7 +1009,7 @@ class mrp_procurement(osv.osv):
|
||||
self.write(cr, uid, ids, {'state':'confirmed','message':''})
|
||||
return True
|
||||
|
||||
def action_move_assigned(self, cr, uid, ids):
|
||||
def action_move_assigned(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'running','message':_('from stock: products assigned.')})
|
||||
return True
|
||||
|
||||
@@ -1085,11 +1085,13 @@ class mrp_procurement(osv.osv):
|
||||
newdate = newdate - DateTime.RelativeDateTime(days=company.po_lead)
|
||||
newdate = newdate - procurement.product_id.seller_ids[0].delay
|
||||
|
||||
context.update({'lang':partner.lang})
|
||||
#Passing partner_id to context for purchase order line integrity of Line name
|
||||
context.update({'lang':partner.lang, 'partner_id':partner_id})
|
||||
|
||||
product=self.pool.get('product.product').browse(cr,uid,procurement.product_id.id,context=context)
|
||||
|
||||
line = {
|
||||
'name': product.name,
|
||||
'name': product.partner_ref,
|
||||
'product_qty': qty,
|
||||
'product_id': procurement.product_id.id,
|
||||
'product_uom': uom_id,
|
||||
|
||||
@@ -717,9 +717,8 @@
|
||||
<group col="7" colspan="2">
|
||||
<button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
|
||||
<button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
|
||||
<button name="button_cancel" states="exception,waiting" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/>
|
||||
<button name="button_cancel" states="draft,running" string="Cancel" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Extra Information">
|
||||
|
||||
@@ -141,7 +141,16 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
return True
|
||||
|
||||
def action_done(self, cr, uid, ids):
|
||||
self.write(cr, uid, ids, {'state':'done', 'date_finnished': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
delay = 0.0
|
||||
date_now = time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
obj_line = self.browse(cr, uid, ids[0])
|
||||
|
||||
date_start = datetime.datetime.strptime(obj_line.date_start,'%Y-%m-%d %H:%M:%S')
|
||||
date_finished = datetime.datetime.strptime(date_now,'%Y-%m-%d %H:%M:%S')
|
||||
delay += (date_finished-date_start).days * 24
|
||||
delay += (date_finished-date_start).seconds / float(60*60)
|
||||
|
||||
self.write(cr, uid, ids, {'state':'done', 'date_finnished': date_now,'delay':delay})
|
||||
self.modify_production_order_state(cr,uid,ids,'done')
|
||||
return True
|
||||
|
||||
@@ -337,7 +346,7 @@ class mrp_operations_operation(osv.osv):
|
||||
a = datetime.datetime.strptime(time_lst[i-1],'%Y-%m-%d %H:%M:%S')
|
||||
b = datetime.datetime.strptime(time_lst[i],'%Y-%m-%d %H:%M:%S')
|
||||
diff += (b-a).days * 24
|
||||
diff += (b-a).seconds / (60*60)
|
||||
diff += (b-a).seconds / float(60*60)
|
||||
return diff
|
||||
|
||||
def check_operation(self,cr,uid,vals):
|
||||
@@ -412,6 +421,7 @@ class mrp_operations_operation(osv.osv):
|
||||
if code.start_stop=='start':
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_start_working(cr,uid,wc_op_id)
|
||||
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_start_working', cr)
|
||||
|
||||
|
||||
if code.start_stop=='done':
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
|
||||
@@ -433,9 +443,17 @@ class mrp_operations_operation(osv.osv):
|
||||
if not self.check_operation(cr, uid, vals):
|
||||
return
|
||||
delay=self.calc_delay(cr, uid, vals)
|
||||
self.pool.get('mrp.production.workcenter.line').write(cr,uid,wc_op_id,{'delay':delay})
|
||||
line_vals = {}
|
||||
line_vals['delay'] = delay
|
||||
if vals.get('date_start',False):
|
||||
if code.start_stop == 'done':
|
||||
line_vals['date_finnished'] = vals['date_start']
|
||||
elif code.start_stop == 'start':
|
||||
line_vals['date_start'] = vals['date_start']
|
||||
|
||||
return super(mrp_operations_operation, self).create(cr, uid, vals, context=context)
|
||||
self.pool.get('mrp.production.workcenter.line').write(cr, uid, wc_op_id, line_vals, context=context)
|
||||
|
||||
return super(mrp_operations_operation, self).create(cr, uid, vals, context=context)
|
||||
|
||||
_columns={
|
||||
'production_id':fields.many2one('mrp.production','Production',required=True),
|
||||
|
||||
@@ -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: 2010-01-21 04:34+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: mrp_repair
|
||||
|
||||
@@ -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: 2010-01-21 04:34+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: multi_company
|
||||
|
||||
+14
-13
@@ -510,19 +510,20 @@ class pos_order(osv.osv):
|
||||
if line.qty < 0:
|
||||
location_id, stock_dest_id = stock_dest_id, location_id
|
||||
|
||||
self.pool.get('stock.move').create(cr, uid, {
|
||||
'name': 'Stock move (POS %d)' % (order.id, ),
|
||||
'product_uom': line.product_id.uom_id.id,
|
||||
'product_uos': line.product_id.uom_id.id,
|
||||
'picking_id': picking_id,
|
||||
'product_id': line.product_id.id,
|
||||
'product_uos_qty': abs(line.qty),
|
||||
'product_qty': abs(line.qty),
|
||||
'tracking_id': False,
|
||||
'state': 'waiting',
|
||||
'location_id': location_id,
|
||||
'location_dest_id': stock_dest_id,
|
||||
})
|
||||
self.pool.get('stock.move').create(cr, uid, {
|
||||
'name': 'Stock move (POS %d)' % (order.id, ),
|
||||
'product_uom': line.product_id.uom_id.id,
|
||||
'product_uos': line.product_id.uom_id.id,
|
||||
'picking_id': picking_id,
|
||||
'product_id': line.product_id.id,
|
||||
'product_uos_qty': abs(line.qty),
|
||||
'product_qty': abs(line.qty),
|
||||
'tracking_id': False,
|
||||
'pos_line_id': line.id,
|
||||
'state': 'waiting',
|
||||
'location_id': location_id,
|
||||
'location_dest_id': stock_dest_id,
|
||||
})
|
||||
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
|
||||
|
||||
+112
-88
@@ -7,19 +7,19 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0_rc3\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-12-08 00:53+0000\n"
|
||||
"PO-Revision-Date: 2010-01-22 00:10+0000\n"
|
||||
"Last-Translator: Paulino <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2009-12-16 05:15+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: product
|
||||
#: view:product.pricelist.item:0
|
||||
msgid "Max. Margin"
|
||||
msgstr "Margem Máxima"
|
||||
msgstr "Margem máxima"
|
||||
|
||||
#. module: product
|
||||
#: view:product.pricelist.item:0
|
||||
@@ -32,6 +32,8 @@ msgid ""
|
||||
"The cost of the product for accounting stock valuation. It can serves as a "
|
||||
"base price for supplier price."
|
||||
msgstr ""
|
||||
"O custo do artigo para valorização contabilística do stock. Pode servir como "
|
||||
"base do preço de fornecedor."
|
||||
|
||||
#. module: product
|
||||
#: selection:product.template,type:0
|
||||
@@ -44,13 +46,13 @@ msgid ""
|
||||
"Determine if the product is visible in the list of products within a "
|
||||
"selection from a purchase order line."
|
||||
msgstr ""
|
||||
"Determina se o produto é visível na lista de produtos dentro da selecção da "
|
||||
"linha de ordem de compra."
|
||||
"Determina se o artigo é visível na lista de artigos dentro duma selecção a "
|
||||
"partir de uma linha de ordem de compra."
|
||||
|
||||
#. module: product
|
||||
#: help:product.supplierinfo,name:0
|
||||
msgid "Supplier of this product"
|
||||
msgstr "Fornecedor do produto"
|
||||
msgstr "Fornecedor do artigo"
|
||||
|
||||
#. module: product
|
||||
#: model:product.template,name:product.product_product_ram512_product_template
|
||||
@@ -60,7 +62,7 @@ msgstr "DDR 512MB PC400"
|
||||
#. module: product
|
||||
#: model:product.template,name:product.product_product_0_product_template
|
||||
msgid "Onsite Senior Intervention"
|
||||
msgstr "Intervenção Senior no Sítio"
|
||||
msgstr "Intervenção sénior no local"
|
||||
|
||||
#. module: product
|
||||
#: help:product.supplierinfo,qty:0
|
||||
@@ -69,7 +71,7 @@ msgid ""
|
||||
"unit of measure."
|
||||
msgstr ""
|
||||
"A quantidade mínima de encomenda para esse fornecedor expressa na unidade de "
|
||||
"medida por defeito"
|
||||
"medida pré-definida"
|
||||
|
||||
#. module: product
|
||||
#: field:product.template,weight_net:0
|
||||
@@ -82,8 +84,8 @@ msgid ""
|
||||
"Quantities of products that are planned to arrive in selected locations or "
|
||||
"all internal if none have been selected."
|
||||
msgstr ""
|
||||
"Quantidades dos produtos que está planeado chegarem aos locais seleccionados "
|
||||
"(ou todos, se nenhum tiver sido escolhido)"
|
||||
"Quantidades de artigos planeada para chegar aos locais seleccionados ou "
|
||||
"todos, se nenhum foi indicado."
|
||||
|
||||
#. module: product
|
||||
#: help:product.product,virtual_available:0
|
||||
@@ -92,6 +94,9 @@ msgid ""
|
||||
"internal if none have been selected. Computed as: Real Stock - Outgoing + "
|
||||
"Incoming."
|
||||
msgstr ""
|
||||
"Saldo futuro para este artigo de acordo com a localização seleccionada ou "
|
||||
"todas se nenhuma for seleccionada. Calculado como: Saldo Real - Saídas + "
|
||||
"entradas."
|
||||
|
||||
#. module: product
|
||||
#: field:product.packaging,width:0
|
||||
@@ -104,11 +109,13 @@ msgid ""
|
||||
"Set a template if this rule only apply to a template of product. Keep empty "
|
||||
"for all products"
|
||||
msgstr ""
|
||||
"Especifique um modelo de artigos se esta regra aplica-se apenas a um modelo. "
|
||||
"Deixe vazio para aplicar a todos os artigos."
|
||||
|
||||
#. module: product
|
||||
#: field:product.template,procure_method:0
|
||||
msgid "Procure Method"
|
||||
msgstr "Método de Aquisição"
|
||||
msgstr "Método de aprovisionamento."
|
||||
|
||||
#. module: product
|
||||
#: constraint:ir.actions.act_window:0
|
||||
@@ -118,17 +125,17 @@ msgstr "Nome de modelo inválido na definição da acção"
|
||||
#. module: product
|
||||
#: model:process.process,name:product.process_process_productprocess0
|
||||
msgid "Product Process"
|
||||
msgstr "Processo do produto"
|
||||
msgstr "Processo de artigos"
|
||||
|
||||
#. module: product
|
||||
#: help:product.price.type,field:0
|
||||
msgid "Associated field in the product form."
|
||||
msgstr "Campo associado no formulário do produto"
|
||||
msgstr "Campo associado no formulário do artigo"
|
||||
|
||||
#. module: product
|
||||
#: selection:product.template,cost_method:0
|
||||
msgid "Standard Price"
|
||||
msgstr "Preço Standard"
|
||||
msgstr "Preço padrão"
|
||||
|
||||
#. module: product
|
||||
#: help:product.packaging,height:0
|
||||
@@ -138,7 +145,7 @@ msgstr "Altura da embalagem"
|
||||
#. module: product
|
||||
#: view:product.pricelist:0
|
||||
msgid "Products Price List"
|
||||
msgstr "Lista de preços de produtos"
|
||||
msgstr "Lista de preços dos artigos"
|
||||
|
||||
#. module: product
|
||||
#: model:product.category,name:product.cat1
|
||||
@@ -168,7 +175,7 @@ msgstr "Empresa"
|
||||
#. module: product
|
||||
#: field:product.template,rental:0
|
||||
msgid "Rentable Product"
|
||||
msgstr ""
|
||||
msgstr "Artigo alugável"
|
||||
|
||||
#. module: product
|
||||
#: field:product.product,lst_price:0
|
||||
@@ -184,7 +191,7 @@ msgstr "Tipos de preços"
|
||||
#. module: product
|
||||
#: selection:product.template,type:0
|
||||
msgid "Stockable Product"
|
||||
msgstr "Produto estocável"
|
||||
msgstr "Artigo armazenável"
|
||||
|
||||
#. module: product
|
||||
#: model:product.category,name:product.product_category_services
|
||||
@@ -218,7 +225,7 @@ msgstr "Nome desse tipo de preço"
|
||||
#. module: product
|
||||
#: help:product.pricelist.version,date_start:0
|
||||
msgid "Starting date for this pricelist version to be valid."
|
||||
msgstr ""
|
||||
msgstr "Data de início da validade desta versão da lista de preços."
|
||||
|
||||
#. module: product
|
||||
#: field:product.product,incoming_qty:0
|
||||
@@ -248,17 +255,17 @@ msgid ""
|
||||
"type. Purchase will trigger purchase orders when requested."
|
||||
msgstr ""
|
||||
"Produzir gerará a ordem de produção ou tarefas, de acordo com o tipo de "
|
||||
"produto. A compra activará ordens de compra quando pedida."
|
||||
"artigo. A compra activará ordens de compra quando solicitado."
|
||||
|
||||
#. module: product
|
||||
#: model:process.transition,note:product.process_transition_supplierofproduct0
|
||||
msgid "You can see the list of suppliers for that product."
|
||||
msgstr ""
|
||||
msgstr "Pode ver a lista de fornecedores para esse artigo."
|
||||
|
||||
#. module: product
|
||||
#: help:product.packaging,rows:0
|
||||
msgid "The number of layer on a palet or box"
|
||||
msgstr ""
|
||||
msgstr "Número de camadas numa palete ou caixa"
|
||||
|
||||
#. module: product
|
||||
#: model:product.pricelist.type,name:product.pricelist_type_sale
|
||||
@@ -278,7 +285,7 @@ msgstr "Se outra lista de preços"
|
||||
#: model:ir.ui.menu,name:product.menu_products
|
||||
#: view:product.product:0
|
||||
msgid "Products"
|
||||
msgstr "Produtos"
|
||||
msgstr "Artigos"
|
||||
|
||||
#. module: product
|
||||
#: help:product.pricelist.item,price_round:0
|
||||
@@ -315,8 +322,8 @@ msgid ""
|
||||
"Set a product if this rule only apply to one product. Keep empty for all "
|
||||
"products"
|
||||
msgstr ""
|
||||
"Selecionar um produto se essa regra se aplica apenas a um produto. Deixar "
|
||||
"vazio para todos os produtos."
|
||||
"Indicar um artigo se essa regra se aplica apenas a um artigo. Deixar vazio "
|
||||
"para todos os artigos."
|
||||
|
||||
#. module: product
|
||||
#: model:ir.model,name:product.model_product_pricelist_type
|
||||
@@ -349,7 +356,7 @@ msgstr "Configuração"
|
||||
#. module: product
|
||||
#: field:product.packaging,rows:0
|
||||
msgid "Number of Layer"
|
||||
msgstr ""
|
||||
msgstr "Número de camadas"
|
||||
|
||||
#. module: product
|
||||
#: constraint:product.category:0
|
||||
@@ -375,7 +382,7 @@ msgstr "Lista de preços de fornecedores"
|
||||
#: view:product.packaging:0
|
||||
#: view:product.product:0
|
||||
msgid "Pallet Dimension"
|
||||
msgstr ""
|
||||
msgstr "Dimensão da palete"
|
||||
|
||||
#. module: product
|
||||
#: field:product.pricelist.item,base:0
|
||||
@@ -409,6 +416,9 @@ msgid ""
|
||||
"at the end of the year), Average Price: the cost price is recomputed at each "
|
||||
"reception of products."
|
||||
msgstr ""
|
||||
"Preço Padrão: o preço de custo é fixado e recalculado periodicamente "
|
||||
"(geralmente no final do ano); Preço Médio: o preço de custo é recalculado a "
|
||||
"cada recepção de artigos."
|
||||
|
||||
#. module: product
|
||||
#: field:product.pricelist,name:0
|
||||
@@ -428,7 +438,7 @@ msgstr "Preço Médio"
|
||||
#. module: product
|
||||
#: model:process.node,note:product.process_node_product0
|
||||
msgid "Create new Product"
|
||||
msgstr "Criar um novo Produto"
|
||||
msgstr "Cria um novo artigo"
|
||||
|
||||
#. module: product
|
||||
#: help:product.pricelist.item,name:0
|
||||
@@ -458,7 +468,7 @@ msgstr "Em produção"
|
||||
#. module: product
|
||||
#: field:product.category,child_id:0
|
||||
msgid "Child Categories"
|
||||
msgstr ""
|
||||
msgstr "Categorias dependentes"
|
||||
|
||||
#. module: product
|
||||
#: model:product.category,name:product.product_category_accessories
|
||||
@@ -510,7 +520,7 @@ msgstr "UdM"
|
||||
#. module: product
|
||||
#: model:product.uom,name:product.product_uom_unit
|
||||
msgid "PCE"
|
||||
msgstr ""
|
||||
msgstr "PCE"
|
||||
|
||||
#. module: product
|
||||
#: model:ir.actions.act_window,name:product.product_pricelist_action2
|
||||
@@ -522,7 +532,7 @@ msgstr "Listas de preços"
|
||||
#. module: product
|
||||
#: field:product.supplierinfo,product_name:0
|
||||
msgid "Partner Product Name"
|
||||
msgstr "Designação do produto do parceiro"
|
||||
msgstr "Nome do artigo no parceiro"
|
||||
|
||||
#. module: product
|
||||
#: view:product.product:0
|
||||
@@ -533,7 +543,7 @@ msgstr "Miscelânea"
|
||||
#. module: product
|
||||
#: help:product.pricelist.item,base:0
|
||||
msgid "The mode for computing the price for this rule."
|
||||
msgstr ""
|
||||
msgstr "O modo de cálculo do preço para esta regra."
|
||||
|
||||
#. module: product
|
||||
#: model:ir.actions.act_window,name:product.product_uom_form_action
|
||||
@@ -566,8 +576,8 @@ msgid ""
|
||||
"is used by the scheduler to order requests based on reordering delays."
|
||||
msgstr ""
|
||||
"Este é o atraso médio nos dias entre a confirmação do pedido de compra e a "
|
||||
"recepção dos bens deste produto e para o fornecedor por defeito. É usado "
|
||||
"pelo agendador para requisitar os pedidos baseados em pedidos em atrasos."
|
||||
"recepção dos bens deste artigo e para o fornecedor pré-definido. É usado "
|
||||
"pelo agendador para emitir pedidos baseado em reordenar atrasos."
|
||||
|
||||
#. module: product
|
||||
#: field:product.template,seller_delay:0
|
||||
@@ -577,7 +587,7 @@ msgstr "Tempo de produção no fornecedor"
|
||||
#. module: product
|
||||
#: model:product.pricelist.version,name:product.ver0
|
||||
msgid "Default Public Pricelist Version"
|
||||
msgstr ""
|
||||
msgstr "Versão pública pré-definida da lista de preços"
|
||||
|
||||
#. module: product
|
||||
#: field:product.pricelist.type,key:0
|
||||
@@ -622,7 +632,7 @@ msgstr "A moeda do campo está em"
|
||||
#. module: product
|
||||
#: help:product.template,weight:0
|
||||
msgid "The gross weight in Kg."
|
||||
msgstr ""
|
||||
msgstr "Peso bruto em Kg."
|
||||
|
||||
#. module: product
|
||||
#: selection:product.ul,type:0
|
||||
@@ -640,8 +650,8 @@ msgid ""
|
||||
"Determine if the product can be visible in the list of product within a "
|
||||
"selection from a sale order line."
|
||||
msgstr ""
|
||||
"Determina se um produto pode ser visível na lista de produção dentro de uma "
|
||||
"selecção da linha de ordem de venda."
|
||||
"Determina se um artigo pode ser visível na lista de artigos numa selecção a "
|
||||
"partir de uma linha de ordem de venda."
|
||||
|
||||
#. module: product
|
||||
#: constraint:product.template:0
|
||||
@@ -673,11 +683,13 @@ msgid ""
|
||||
"Quantities of products that are planned to leave in selected locations or "
|
||||
"all internal if none have been selected."
|
||||
msgstr ""
|
||||
"As quantidades de artigos que estão programadas para sair em locais "
|
||||
"seleccionados ou todos se nenhum for seleccionado."
|
||||
|
||||
#. module: product
|
||||
#: field:product.packaging,weight:0
|
||||
msgid "Total Package Weight"
|
||||
msgstr ""
|
||||
msgstr "Peso total da embalagem"
|
||||
|
||||
#. module: product
|
||||
#: help:product.template,procure_method:0
|
||||
@@ -697,7 +709,7 @@ msgstr "Aquisição"
|
||||
#: 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 "Produtos por categoria"
|
||||
msgstr "Artigos por categoria"
|
||||
|
||||
#. module: product
|
||||
#: model:product.template,name:product.product_product_hdd1_product_template
|
||||
@@ -720,7 +732,7 @@ msgstr "HDD Seagate 7200.8 160GB"
|
||||
#. module: product
|
||||
#: view:product.product:0
|
||||
msgid "Product Variant"
|
||||
msgstr "Variante de produto"
|
||||
msgstr "Artigo variante"
|
||||
|
||||
#. module: product
|
||||
#: field:product.packaging,ul:0
|
||||
@@ -767,7 +779,7 @@ msgstr "Tipo de medida"
|
||||
#. module: product
|
||||
#: model:product.uom.categ,name:product.product_uom_categ_kgm
|
||||
msgid "Weight"
|
||||
msgstr ""
|
||||
msgstr "Peso"
|
||||
|
||||
#. module: product
|
||||
#: model:product.template,name:product.product_product_22_product_template
|
||||
@@ -780,6 +792,8 @@ 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 ""
|
||||
"Nome do artigo para este parceiro, será utilizado na impressão de um pedido "
|
||||
"de cotação. Mantenha vazio para utilizar o nome interno."
|
||||
|
||||
#. module: product
|
||||
#: field:product.template,supply_method:0
|
||||
@@ -789,7 +803,7 @@ msgstr "Método de fornecimento"
|
||||
#. module: product
|
||||
#: model:product.category,name:product.product_category_11
|
||||
msgid "IT components kits"
|
||||
msgstr ""
|
||||
msgstr "Kits de componentes de TI"
|
||||
|
||||
#. module: product
|
||||
#: view:product.uom.categ:0
|
||||
@@ -838,7 +852,7 @@ msgstr "Descrições"
|
||||
#. module: product
|
||||
#: model:process.transition,name:product.process_transition_supplierofproduct0
|
||||
msgid "Suppliers of Product"
|
||||
msgstr ""
|
||||
msgstr "Fornecedores do artigo"
|
||||
|
||||
#. module: product
|
||||
#: field:product.pricelist.version,date_start:0
|
||||
@@ -856,7 +870,8 @@ msgid ""
|
||||
"Current quantities of products in selected locations or all internal if none "
|
||||
"have been selected."
|
||||
msgstr ""
|
||||
"Quantidades de produtos actuais selecionadas ou todos se nenhuma selecionada"
|
||||
"Quantidades actuais de artigos nos locais seleccionados ou todos se nenhuma "
|
||||
"for indicada."
|
||||
|
||||
#. module: product
|
||||
#: model:product.template,name:product.product_product_pc1_product_template
|
||||
@@ -878,6 +893,7 @@ msgstr "Categoria"
|
||||
msgid ""
|
||||
"The rule only applies if the partner buys/sells more than this quantity."
|
||||
msgstr ""
|
||||
"A regra aplica-se apenas se o parceiro compra/vende mais que esta quantidade."
|
||||
|
||||
#. module: product
|
||||
#: model:product.template,name:product.product_product_ram_product_template
|
||||
@@ -892,7 +908,7 @@ msgstr "Stock Real"
|
||||
#. module: product
|
||||
#: view:product.category:0
|
||||
msgid "Product Categories"
|
||||
msgstr "Categorias de produto"
|
||||
msgstr "Categorias de artigos"
|
||||
|
||||
#. module: product
|
||||
#: help:product.uom,category_id:0
|
||||
@@ -900,11 +916,13 @@ msgid ""
|
||||
"Unit of Measure of a category can be converted between each others in the "
|
||||
"same category."
|
||||
msgstr ""
|
||||
"A unidade de medida de uma categoria pode ser convertida em qualquer outra "
|
||||
"da mesma categoria."
|
||||
|
||||
#. module: product
|
||||
#: model:ir.model,name:product.model_product_uom
|
||||
msgid "Product Unit of Measure"
|
||||
msgstr "Unidade de medida do produto"
|
||||
msgstr "Unidade de medida do artigo"
|
||||
|
||||
#. module: product
|
||||
#: field:product.template,sale_ok:0
|
||||
@@ -936,7 +954,7 @@ msgstr "Taxa"
|
||||
#. module: product
|
||||
#: view:product.pricelist.item:0
|
||||
msgid "Products Listprices Items"
|
||||
msgstr "Itens de lista de preço dos produtos"
|
||||
msgstr "Itens da lista de preços dos artigos"
|
||||
|
||||
#. module: product
|
||||
#: field:product.uom,rounding:0
|
||||
@@ -1004,7 +1022,7 @@ msgstr "Preço público"
|
||||
#. module: product
|
||||
#: field:product.pricelist.item,price_max_margin:0
|
||||
msgid "Max. Price Margin"
|
||||
msgstr ""
|
||||
msgstr "Margem de preço máxima"
|
||||
|
||||
#. module: product
|
||||
#: view:res.partner:0
|
||||
@@ -1034,12 +1052,12 @@ msgstr "UdM da Encomenda"
|
||||
#. module: product
|
||||
#: view:product.price.type:0
|
||||
msgid "Products Price Type"
|
||||
msgstr "Tipo de preço do produto"
|
||||
msgstr "Tipo de preço dos artigos"
|
||||
|
||||
#. module: product
|
||||
#: field:product.template,product_manager:0
|
||||
msgid "Product Manager"
|
||||
msgstr "Gestor de produto"
|
||||
msgstr "Gestor do artigo"
|
||||
|
||||
#. module: product
|
||||
#: field:product.product,price_extra:0
|
||||
@@ -1054,7 +1072,7 @@ msgstr "Ventoinha de caixa regular 80mm"
|
||||
#. module: product
|
||||
#: model:ir.model,name:product.model_product_supplierinfo
|
||||
msgid "Information about a product supplier"
|
||||
msgstr "Informação sobre o fornecedor do produto"
|
||||
msgstr "Informação sobre o fornecedor de um artigo"
|
||||
|
||||
#. module: product
|
||||
#: field:product.price.type,active:0
|
||||
@@ -1107,7 +1125,7 @@ msgstr "Segundo UdM"
|
||||
#. module: product
|
||||
#: model:product.category,name:product.product_category_4
|
||||
msgid "Dello Computer"
|
||||
msgstr ""
|
||||
msgstr "Computador Dello"
|
||||
|
||||
#. module: product
|
||||
#: view:product.product:0
|
||||
@@ -1123,7 +1141,7 @@ msgstr "O tamanho da embalagem"
|
||||
#. module: product
|
||||
#: field:product.pricelist.item,price_min_margin:0
|
||||
msgid "Min. Price Margin"
|
||||
msgstr ""
|
||||
msgstr "Margem de preço mínima"
|
||||
|
||||
#. module: product
|
||||
#: help:product.packaging,ean:0
|
||||
@@ -1141,7 +1159,7 @@ 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 ""
|
||||
"Mostra as maneiras diferentes de empacotar o mesmo produto. Isto não tem "
|
||||
"Mostra as maneiras diferentes de empacotar o mesmo artigo. Isto não tem "
|
||||
"nenhum impacto na ordem da empacotamento e é utilizado principalmente se "
|
||||
"você usa o módulo do EDI."
|
||||
|
||||
@@ -1149,12 +1167,12 @@ msgstr ""
|
||||
#: model:ir.model,name:product.model_product_category
|
||||
#: field:product.pricelist.item,categ_id:0
|
||||
msgid "Product Category"
|
||||
msgstr "Categoria de produto"
|
||||
msgstr "Categoria do artigo"
|
||||
|
||||
#. module: product
|
||||
#: field:product.price.type,field:0
|
||||
msgid "Product Field"
|
||||
msgstr "Campo produto"
|
||||
msgstr "Campo artigo"
|
||||
|
||||
#. module: product
|
||||
#: model:ir.actions.act_window,name:product.product_pricelist_type_action
|
||||
@@ -1165,17 +1183,17 @@ msgstr "Tipos de listas de preço"
|
||||
#. module: product
|
||||
#: help:product.template,state:0
|
||||
msgid "Tells the user if he can use the product or not."
|
||||
msgstr "Diz ao utilizador se ele pode ou não utilizar o produto"
|
||||
msgstr "Diz ao utilizador se ele pode ou não utilizar o artigo"
|
||||
|
||||
#. module: product
|
||||
#: field:product.supplierinfo,product_code:0
|
||||
msgid "Partner Product Code"
|
||||
msgstr "Código do produto do parceiro"
|
||||
msgstr "Código do artigo no parceiro"
|
||||
|
||||
#. module: product
|
||||
#: model:product.category,name:product.product_category_3
|
||||
msgid "Computer Stuff"
|
||||
msgstr ""
|
||||
msgstr "Material informático"
|
||||
|
||||
#. module: product
|
||||
#: field:product.packaging,code:0
|
||||
@@ -1218,7 +1236,7 @@ msgstr ""
|
||||
#: field:product.product,product_tmpl_id:0
|
||||
#: view:product.template:0
|
||||
msgid "Product Template"
|
||||
msgstr "Produto modelo"
|
||||
msgstr "Artigo modelo"
|
||||
|
||||
#. module: product
|
||||
#: model:ir.model,name:product.model_product_ul
|
||||
@@ -1231,6 +1249,8 @@ msgid ""
|
||||
"The computed quantity will be a multiple of this value. Use 1.0 for products "
|
||||
"that can not be split."
|
||||
msgstr ""
|
||||
"A quantidade calculada será um múltiplo deste valor. Use 1 para artigos que "
|
||||
"não podem ser divididos"
|
||||
|
||||
#. module: product
|
||||
#: field:product.packaging,height:0
|
||||
@@ -1245,7 +1265,7 @@ msgstr "PC Personalizado"
|
||||
#. module: product
|
||||
#: help:product.pricelist.version,date_end:0
|
||||
msgid "Ending date for this pricelist version to be valid."
|
||||
msgstr ""
|
||||
msgstr "Data de fim da validade desta versão da lista de preços"
|
||||
|
||||
#. module: product
|
||||
#: field:pricelist.partnerinfo,suppinfo_id:0
|
||||
@@ -1257,7 +1277,7 @@ msgstr "Informação de parceiro"
|
||||
#: view:product.template:0
|
||||
#: field:product.template,type:0
|
||||
msgid "Product Type"
|
||||
msgstr "Tipo de produto"
|
||||
msgstr "Tipo de artigo"
|
||||
|
||||
#. module: product
|
||||
#: model:product.category,name:product.product_category_7
|
||||
@@ -1268,7 +1288,7 @@ msgstr "Intervenção no sítio"
|
||||
#. module: product
|
||||
#: model:product.category,name:product.cat0
|
||||
msgid "All products"
|
||||
msgstr "Todos os produtos"
|
||||
msgstr "Todos os artigos"
|
||||
|
||||
#. module: product
|
||||
#: wizard_button:product.price_list,init,end:0
|
||||
@@ -1278,7 +1298,7 @@ msgstr "Cancelar"
|
||||
#. module: product
|
||||
#: help:product.packaging,qty:0
|
||||
msgid "The total number of products you can put by palet or box."
|
||||
msgstr "Número total de produtos que se pode pôr numa paleta ou caixa"
|
||||
msgstr "Número total de artigos que se pode pôr por palete ou caixa"
|
||||
|
||||
#. module: product
|
||||
#: model:ir.model,name:product.model_product_pricelist_item
|
||||
@@ -1326,7 +1346,7 @@ msgstr "Informação"
|
||||
#. module: product
|
||||
#: view:product.product:0
|
||||
msgid "Codes"
|
||||
msgstr ""
|
||||
msgstr "Códigos"
|
||||
|
||||
#. module: product
|
||||
#: constraint:ir.model:0
|
||||
@@ -1368,6 +1388,8 @@ 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 ""
|
||||
"Código do artigo para este parceiro, será usado na impressão de um pedido de "
|
||||
"cotação. Deixe vazio para utilizar o interno."
|
||||
|
||||
#. module: product
|
||||
#: selection:product.template,state:0
|
||||
@@ -1377,7 +1399,7 @@ msgstr "Obsoleto"
|
||||
#. module: product
|
||||
#: selection:product.ul,type:0
|
||||
msgid "Pallet"
|
||||
msgstr ""
|
||||
msgstr "Palete"
|
||||
|
||||
#. module: product
|
||||
#: field:pricelist.partnerinfo,price:0
|
||||
@@ -1392,7 +1414,7 @@ msgstr "Garantia (meses)"
|
||||
#. module: product
|
||||
#: field:product.packaging,ul_qty:0
|
||||
msgid "Package by layer"
|
||||
msgstr ""
|
||||
msgstr "Embalagem por camadas"
|
||||
|
||||
#. module: product
|
||||
#: help:product.template,type:0
|
||||
@@ -1405,7 +1427,7 @@ msgstr ""
|
||||
#. module: product
|
||||
#: model:process.node,note:product.process_node_supplier0
|
||||
msgid "Product suppliers, with their product name, price, etc."
|
||||
msgstr ""
|
||||
msgstr "Fornecedores do artigo, com a sua designação, preço, etc"
|
||||
|
||||
#. module: product
|
||||
#: model:ir.model,name:product.model_product_price_type
|
||||
@@ -1421,7 +1443,7 @@ msgstr "Tipo de preço"
|
||||
#: field:product.supplierinfo,product_id:0
|
||||
#: model:res.request.link,name:product.req_link_product
|
||||
msgid "Product"
|
||||
msgstr "Produto"
|
||||
msgstr "Artigo"
|
||||
|
||||
#. module: product
|
||||
#: field:product.template,volume:0
|
||||
@@ -1446,7 +1468,7 @@ msgstr "EAN"
|
||||
#: view:product.product:0
|
||||
#: view:product.template:0
|
||||
msgid "Product Description"
|
||||
msgstr "Descrição do produto"
|
||||
msgstr "Descrição do artigo"
|
||||
|
||||
#. module: product
|
||||
#: view:product.pricelist.item:0
|
||||
@@ -1464,7 +1486,7 @@ msgstr ""
|
||||
#. module: product
|
||||
#: model:ir.model,name:product.model_product_uom_categ
|
||||
msgid "Product uom categ"
|
||||
msgstr "udm da categoria do produto"
|
||||
msgstr "Categoria da UdM de artigos"
|
||||
|
||||
#. module: product
|
||||
#: wizard_field:product.price_list,init,qty3:0
|
||||
@@ -1474,7 +1496,7 @@ msgstr "Quantidade-3"
|
||||
#. module: product
|
||||
#: model:product.ul,name:product.product_ul_box
|
||||
msgid "Box 20x20x40"
|
||||
msgstr ""
|
||||
msgstr "Caixa 20x20x40"
|
||||
|
||||
#. module: product
|
||||
#: selection:product.template,supply_method:0
|
||||
@@ -1494,7 +1516,7 @@ msgstr "Acréscimo de preço"
|
||||
#. module: product
|
||||
#: constraint:product.pricelist.version:0
|
||||
msgid "You cannot have 2 pricelist versions that overlap!"
|
||||
msgstr ""
|
||||
msgstr "Não pode ter duas versões de listas de preços sobrepostas"
|
||||
|
||||
#. module: product
|
||||
#: view:product.pricelist.item:0
|
||||
@@ -1530,7 +1552,7 @@ msgstr "Data Final"
|
||||
#: 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 "Categorias de produtos"
|
||||
msgstr "Categorias de artigos"
|
||||
|
||||
#. module: product
|
||||
#: field:product.product,packaging:0
|
||||
@@ -1587,7 +1609,7 @@ msgstr "Método de custo"
|
||||
#: view:product.packaging:0
|
||||
#: view:product.product:0
|
||||
msgid "Palletization"
|
||||
msgstr ""
|
||||
msgstr "Pelatização"
|
||||
|
||||
#. module: product
|
||||
#: view:product.product:0
|
||||
@@ -1598,7 +1620,7 @@ msgstr "Preços e Fornecedores"
|
||||
#. module: product
|
||||
#: help:product.packaging,weight:0
|
||||
msgid "The weight of a full of products palet or box."
|
||||
msgstr "O peso de uma palete ou caixa completa de produtos"
|
||||
msgstr "O peso de uma palete ou caixa cheia de artigos"
|
||||
|
||||
#. module: product
|
||||
#: selection:product.template,state:0
|
||||
@@ -1608,7 +1630,7 @@ msgstr "Fim de ciclo de vida"
|
||||
#. module: product
|
||||
#: model:ir.module.module,shortdesc:product.module_meta_information
|
||||
msgid "Products & Pricelists"
|
||||
msgstr ""
|
||||
msgstr "Artigos e listas de preços"
|
||||
|
||||
#. module: product
|
||||
#: help:product.uom,factor:0
|
||||
@@ -1620,7 +1642,7 @@ msgstr ""
|
||||
#. module: product
|
||||
#: help:product.template,weight_net:0
|
||||
msgid "The net weight in Kg."
|
||||
msgstr ""
|
||||
msgstr "Peso líquido em kg."
|
||||
|
||||
#. module: product
|
||||
#: model:product.template,name:product.product_product_tow1_product_template
|
||||
@@ -1657,10 +1679,9 @@ msgid ""
|
||||
"this product. Different delays will be summed for all levels and purchase "
|
||||
"orders."
|
||||
msgstr ""
|
||||
"Tempo médio a produzir este produto. Isto é somente para o pedido de "
|
||||
"produção e, se é uma conta de material multi-nível, é somente para o nível "
|
||||
"deste produto. Os atrasos diferentes serão somados para todos os níveis e "
|
||||
"pedidos de compra."
|
||||
"Tempo médio a produzir este artigo. Isto é somente para ordem de produção e, "
|
||||
"se é uma lista de materiais multi-nível, é apenas para o nível deste artigo. "
|
||||
"Os diferentes atrasos serão somados para todos os níveis e ordens de compra."
|
||||
|
||||
#. module: product
|
||||
#: wizard_field:product.price_list,init,qty1:0
|
||||
@@ -1684,6 +1705,9 @@ msgid ""
|
||||
"reception of the products in your warehouse. Used by the scheduler for "
|
||||
"automatic computation of the purchase order planning."
|
||||
msgstr ""
|
||||
"Intervalo (em dias) entre a confirmação da ordem de compra e a recepção dos "
|
||||
"artigos no seu armazém. Usado pelo planificador para calendarização "
|
||||
"automática das ordens de compra."
|
||||
|
||||
#. module: product
|
||||
#: help:product.template,uom_po_id:0
|
||||
@@ -1710,28 +1734,28 @@ 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 ""
|
||||
"Selecionar uma categoria de produto se essa regra se aplica apenas a "
|
||||
"produtos dessa categoria. Deixar vazio para todos os produtos."
|
||||
"Defina a categoria se esta regra aplica-se apenas a artigos dessa categoria "
|
||||
"e dependentes. Deixe vazio para todos os artigos."
|
||||
|
||||
#. module: product
|
||||
#: model:ir.actions.report.xml,name:product.report_product_label
|
||||
msgid "Products Labels"
|
||||
msgstr "Rótulos de produtos"
|
||||
msgstr "Rótulos de artigos"
|
||||
|
||||
#. module: product
|
||||
#: help:product.template,volume:0
|
||||
msgid "The volume in m3."
|
||||
msgstr ""
|
||||
msgstr "Volume em m3"
|
||||
|
||||
#. module: product
|
||||
#: model:product.ul,name:product.product_ul_big_box
|
||||
msgid "Box 30x40x60"
|
||||
msgstr ""
|
||||
msgstr "Caixa 30x40x60"
|
||||
|
||||
#. module: product
|
||||
#: model:product.uom,name:product.product_uom_kgm
|
||||
msgid "KGM"
|
||||
msgstr ""
|
||||
msgstr "KGM"
|
||||
|
||||
#. module: product
|
||||
#: field:product.pricelist.item,price_discount:0
|
||||
|
||||
@@ -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: 2010-01-21 04:34+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: profile_accounting
|
||||
|
||||
@@ -362,7 +362,7 @@ class task(osv.osv):
|
||||
'delegated_user_id': fields.related('child_ids','user_id',type='many2one', relation='res.users', string='Delegated To'),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner'),
|
||||
'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done'),
|
||||
'manager_id': fields.related('project_id','manager', type='many2one', relation='res.users', string='Project Manager'),
|
||||
'manager_id': fields.related('project_id','category_id','user_id', type='many2one', relation='res.users', string='Project Manager'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
_defaults = {
|
||||
@@ -491,9 +491,11 @@ class task(osv.osv):
|
||||
def next_type(self, cr, uid, ids, *args):
|
||||
for typ in self.browse(cr, uid, ids):
|
||||
typeid = typ.type.id
|
||||
types = map(lambda x:x.id, typ.project_id.type_ids)
|
||||
types = map(lambda x:x.id, typ.project_id.type_ids or [])
|
||||
if types:
|
||||
if typeid and typeid in types and types.index(typeid) != len(types)-1 :
|
||||
if not typeid:
|
||||
self.write(cr, uid, typ.id, {'type': types[0]})
|
||||
elif typeid and typeid in types and types.index(typeid) != len(types)-1 :
|
||||
index = types.index(typeid)
|
||||
self.write(cr, uid, typ.id, {'type': types[index+1]})
|
||||
return True
|
||||
|
||||
@@ -471,10 +471,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Task Edition">
|
||||
<group col="20" colspan="4">
|
||||
<filter string="By Users" icon="terp-project" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="By Project" icon="terp-project" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
<filter string="By Type" icon="terp-project" domain="[]" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Draft" domain="[('state','=','draft')]" help="Draft Tasks" icon="terp-project"/>
|
||||
<filter string="In Progress" domain="[('state','=','open')]" help="Open Tasks" icon="terp-project"/>
|
||||
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Tasks" icon="terp-project"/>
|
||||
@@ -488,6 +484,11 @@
|
||||
<filter domain="[('user_id','=',False)]" help="Unassigned Tasks" icon="gtk-execute" separator="1"/>
|
||||
</field>
|
||||
</group>
|
||||
<group expand="1" string="Group By..." colspan="4" col="20">
|
||||
<filter string="By Users" icon="terp-project" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="By Project" icon="terp-project" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
<filter string="By Type" icon="terp-project" domain="[]" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -63,7 +63,7 @@ class wizard_delegate(wizard.interface):
|
||||
'child_ids': [],
|
||||
'work_ids': []
|
||||
})
|
||||
task_obj.write(cr, uid, data['id'], {
|
||||
task_obj.write(cr, uid, [data['id']], {
|
||||
'remaining_hours': data['form']['planned_hours_me'],
|
||||
'name': newname
|
||||
})
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<wizard string="Import .ics File" model="project.task"
|
||||
name="caldav.event.import" id="caldav.wizard_cal_event_import" multi="True" />
|
||||
name="calendar.event.import" id="base_calendar.wizard_cal_event_import" multi="True" />
|
||||
|
||||
<wizard string="Subscribe to a Remote calendar"
|
||||
model="project.task" name="caldav.event.subscribe"
|
||||
id="caldav.wizard_cal_event_subscribe" multi="True" />
|
||||
model="project.task" name="calendar.event.subscribe"
|
||||
id="base_calendar.wizard_cal_event_subscribe" multi="True" />
|
||||
|
||||
<wizard string="Export .ics File" model="project.task"
|
||||
name="caldav.event.export" id="caldav.wizard_cal_event_export" multi="True" />
|
||||
name="calendar.event.export" id="base_calendar.wizard_cal_event_export" multi="True" />
|
||||
|
||||
<wizard string="Edit this event" model="project.task"
|
||||
name="calendar.event.edit.this" id="caldav.wizard_edit_this_event"
|
||||
name="calendar.event.edit.this" id="base_calendar.wizard_edit_this_event"
|
||||
menu="False" />
|
||||
|
||||
</data>
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from xml import dom
|
||||
from lxml import etree
|
||||
|
||||
from mx import DateTime
|
||||
from mx.DateTime import now
|
||||
import time
|
||||
@@ -29,6 +26,16 @@ import tools
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
import ir
|
||||
from tools.translate import _
|
||||
|
||||
import sys
|
||||
from tools.translate import _
|
||||
|
||||
try:
|
||||
from lxml import etree
|
||||
except ImportError:
|
||||
sys.stderr.write("ERROR: Import lxml module\n")
|
||||
sys.stderr.write("ERROR: Try to install the python-lxml package\n")
|
||||
|
||||
class project_gtd_context(osv.osv):
|
||||
_name = "project.gtd.context"
|
||||
@@ -148,9 +155,12 @@ class project_task(osv.osv):
|
||||
timebox_ids = timebox_obj.search(cr,uid,[])
|
||||
for task in self.browse(cr,uid,ids):
|
||||
timebox = task.timebox_id.id
|
||||
if timebox and timebox_ids.index(timebox) != 0 :
|
||||
index = timebox_ids.index(timebox)
|
||||
self.write(cr, uid, task.id, {'timebox_id': timebox_ids[index - 1]})
|
||||
if timebox:
|
||||
if timebox_ids.index(timebox):
|
||||
index = timebox_ids.index(timebox)
|
||||
self.write(cr, uid, task.id, {'timebox_id': timebox_ids[index - 1]})
|
||||
else:
|
||||
self.write(cr, uid, task.id, {'timebox_id': False})
|
||||
return True
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
@@ -159,7 +169,7 @@ class project_task(osv.osv):
|
||||
timebox_obj = self.pool.get('project.gtd.timebox')
|
||||
if res['type'] == 'search':
|
||||
tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[]))
|
||||
search_extended ='''<newline/><group col="%d">''' % (len(tt)+6,)
|
||||
search_extended ='''<newline/><group col="%d" expand="1" string="%s">''' % (len(tt)+6,_('Getting Things Done'))
|
||||
search_extended += '''<filter domain="[('timebox_id','=', False)]" icon="gtk-new" string="Inbox"/>'''
|
||||
search_extended += '''<separator orientation="vertical"/>'''
|
||||
for time in tt:
|
||||
|
||||
@@ -110,11 +110,13 @@ class project_work(osv.osv):
|
||||
return super(project_work,self).write(cr, uid, ids, vals, context)
|
||||
|
||||
def unlink(self, cr, uid, ids, *args, **kwargs):
|
||||
timesheet_id = self.pool.get('project.task.work').browse(cr, uid, ids)[0].hr_analytic_timesheet_id
|
||||
# delete entry from timesheet too while deleting entry to task.
|
||||
list_avail_ids = self.pool.get('hr.analytic.timesheet').search(cr, uid, [])
|
||||
if timesheet_id in list_avail_ids:
|
||||
obj = self.pool.get('hr.analytic.timesheet').unlink(cr, uid, [timesheet_id], *args, **kwargs)
|
||||
pool_analytic_timesheet = self.pool.get('hr.analytic.timesheet')
|
||||
for work_id in ids:
|
||||
timesheet_id = self.read(cr, uid, work_id, ['hr_analytic_timesheet_id'])['hr_analytic_timesheet_id']
|
||||
# delete entry from timesheet too while deleting entry to task.
|
||||
list_avail_ids = pool_analytic_timesheet.search(cr, uid, [])
|
||||
if timesheet_id in list_avail_ids:
|
||||
obj = pool_analytic_timesheet.unlink(cr, uid, [timesheet_id], *args, **kwargs)
|
||||
|
||||
return super(project_work,self).unlink(cr, uid, ids, *args, **kwargs)
|
||||
|
||||
@@ -124,6 +126,40 @@ class project_work(osv.osv):
|
||||
|
||||
project_work()
|
||||
|
||||
class task(osv.osv):
|
||||
_inherit = "project.task"
|
||||
_description = "Tasks"
|
||||
|
||||
def unlink(self, cr, uid, ids, *args, **kwargs):
|
||||
for task_obj in self.browse(cr, uid, ids, *args, **kwargs):
|
||||
if task_obj.work_ids:
|
||||
work_ids = [x.id for x in task_obj.work_ids]
|
||||
self.pool.get('project.task.work').unlink(cr, uid, work_ids, *args, **kwargs)
|
||||
|
||||
return super(task,self).unlink(cr, uid, ids, *args, **kwargs)
|
||||
|
||||
def write(self, cr, uid, ids,vals,context={}):
|
||||
if (vals.has_key('project_id') and vals['project_id']) or (vals.has_key('name') and vals['name']):
|
||||
vals_line = {}
|
||||
hr_anlytic_timesheet = self.pool.get('hr.analytic.timesheet')
|
||||
task_obj_l = self.browse(cr, uid, ids, context)
|
||||
if (vals.has_key('project_id') and vals['project_id']):
|
||||
project_obj = self.pool.get('project.project').browse(cr, uid, vals['project_id'])
|
||||
acc_id = project_obj.category_id.id
|
||||
|
||||
for task_obj in task_obj_l:
|
||||
if len(task_obj.work_ids):
|
||||
for task_work in task_obj.work_ids:
|
||||
line_id = task_work.hr_analytic_timesheet_id
|
||||
if (vals.has_key('project_id') and vals['project_id']):
|
||||
vals_line['account_id'] = acc_id
|
||||
if (vals.has_key('name') and vals['name']):
|
||||
vals_line['name'] = '%s: %s' % (tools.ustr(vals['name']), tools.ustr(task_work.name) or '/')
|
||||
hr_anlytic_timesheet.write(cr, uid, [line_id], vals_line, {})
|
||||
return super(task,self).write(cr, uid, ids, vals, context)
|
||||
|
||||
task()
|
||||
|
||||
class project_project(osv.osv):
|
||||
_inherit = "project.project"
|
||||
def name_get(self, cr, user, ids, context=None):
|
||||
|
||||
@@ -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: 2010-01-21 04:34+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: purchase
|
||||
|
||||
+16
-19
@@ -151,20 +151,17 @@ class purchase_order(osv.osv):
|
||||
'partner_ref': fields.char('Supplier Reference', size=64),
|
||||
'date_order':fields.date('Date Ordered', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, help="Date on which this document has been created."),
|
||||
'date_approve':fields.date('Date Approved', readonly=1),
|
||||
'partner_id':fields.many2one('res.partner', 'Supplier', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, change_default=True),
|
||||
'partner_address_id':fields.many2one('res.partner.address', 'Supplier Address', required=True, states={'posted':[('readonly',True)]}),
|
||||
|
||||
'partner_id':fields.many2one('res.partner', 'Supplier', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, change_default=True),
|
||||
'partner_address_id':fields.many2one('res.partner.address', 'Address', required=True, states={'posted':[('readonly',True)]}),
|
||||
'dest_address_id':fields.many2one('res.partner.address', 'Destination Address', states={'posted':[('readonly',True)]},
|
||||
help="Put an address if you want to deliver directly from the supplier to the customer." \
|
||||
"In this case, it will remove the warehouse link and set the customer location."
|
||||
),
|
||||
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'posted':[('readonly',True)]}),
|
||||
'location_id': fields.many2one('stock.location', 'Destination', required=True),
|
||||
|
||||
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."),
|
||||
|
||||
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."),
|
||||
'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Waiting Supplier Ack'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True),
|
||||
'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines', states={'approved':[('readonly',True)]}),
|
||||
'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines', states={'approved':[('readonly',True)],'done':[('readonly',True)]}),
|
||||
'validator' : fields.many2one('res.users', 'Validated by', readonly=True),
|
||||
'notes': fields.text('Notes', translate=True),
|
||||
'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True),
|
||||
@@ -396,7 +393,7 @@ class purchase_order(osv.osv):
|
||||
continue
|
||||
if order_line.product_id.product_tmpl_id.type in ('product', 'consu'):
|
||||
dest = order.location_id.id
|
||||
self.pool.get('stock.move').create(cr, uid, {
|
||||
move = self.pool.get('stock.move').create(cr, uid, {
|
||||
'name': 'PO:'+order_line.name,
|
||||
'product_id': order_line.product_id.id,
|
||||
'product_qty': order_line.product_qty,
|
||||
@@ -408,12 +405,14 @@ class purchase_order(osv.osv):
|
||||
'location_dest_id': dest,
|
||||
'picking_id': picking_id,
|
||||
'move_dest_id': order_line.move_dest_id.id,
|
||||
'state': 'assigned',
|
||||
'state': 'draft',
|
||||
'purchase_line_id': order_line.id,
|
||||
'company_id': order.company_id.id,
|
||||
})
|
||||
if order_line.move_dest_id:
|
||||
self.pool.get('stock.move').write(cr, uid, [order_line.move_dest_id.id], {'location_id':order.location_id.id})
|
||||
self.pool.get('stock.move').action_confirm(cr, uid, [move])
|
||||
self.pool.get('stock.move').force_assign(cr,uid, [move])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
|
||||
return picking_id
|
||||
@@ -493,15 +492,6 @@ class purchase_order_line(osv.osv):
|
||||
uom = prod_uom_po
|
||||
if not date_order:
|
||||
date_order = time.strftime('%Y-%m-%d')
|
||||
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,
|
||||
})[pricelist]
|
||||
|
||||
qty = qty or 1.0
|
||||
seller_delay = 0
|
||||
for s in prod.seller_ids:
|
||||
@@ -510,7 +500,14 @@ class purchase_order_line(osv.osv):
|
||||
temp_qty = s.qty # supplier _qty assigned to temp
|
||||
if qty < temp_qty: # If the supplier quantity is greater than entered from user, set minimal.
|
||||
qty = temp_qty
|
||||
|
||||
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,
|
||||
})[pricelist]
|
||||
dt = (DateTime.now() + DateTime.RelativeDateTime(days=seller_delay or 0.0)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id])[0][1]
|
||||
|
||||
|
||||
@@ -245,6 +245,7 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="red:date_planned<=current_date;black:date_planned>current_date" string="Purchase Order Lines">
|
||||
<field name="order_id"/>
|
||||
<field name="name"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="product_id"/>
|
||||
|
||||
@@ -7,3 +7,4 @@
|
||||
"access_stock_move_purchase_user","stock.move purchase_user","stock.model_stock_move","purchase.group_purchase_user",1,1,1,1
|
||||
"access_purchase_order_stock_worker","purchase.order stock_worker","model_purchase_order","stock.group_stock_user",1,0,0,0
|
||||
"access_purchase_order_line_stock_worker","purchase.order.line stock_worker","model_purchase_order_line","stock.group_stock_user",1,0,0,0
|
||||
"access_account_tax_purchase_user","account.tax purchase_user","account.model_account_tax","purchase.group_purchase_user",1,0,0,0
|
||||
|
@@ -24,6 +24,7 @@ import netsvc
|
||||
import ir
|
||||
import pooler
|
||||
from osv import osv
|
||||
from tools.translate import _
|
||||
|
||||
invoice_form = """<?xml version="1.0"?>
|
||||
<form string="Control invoices">
|
||||
|
||||
+19
-19
@@ -148,7 +148,7 @@ class sale_order(osv.osv):
|
||||
res[sale.id] = False
|
||||
return res
|
||||
|
||||
def _invoiced_search(self, cursor, user, obj, name, args):
|
||||
def _invoiced_search(self, cursor, user, obj, name, args, context):
|
||||
if not len(args):
|
||||
return []
|
||||
clause = ''
|
||||
@@ -453,7 +453,23 @@ class sale_order(osv.osv):
|
||||
self.pool.get('sale.order.line').write(cr, uid, [line.id], {'invoiced': invoiced})
|
||||
self.write(cr, uid, ids, {'state': 'invoice_except', 'invoice_ids': False})
|
||||
return True
|
||||
|
||||
|
||||
def action_invoice_end(self, cr, uid, ids, context={}):
|
||||
for order in self.browse(cr, uid, ids):
|
||||
val = {'invoiced': True}
|
||||
if order.state == 'invoice_except':
|
||||
val['state'] = 'progress'
|
||||
|
||||
for line in order.order_line:
|
||||
towrite = []
|
||||
if line.state == 'exception':
|
||||
towrite.append(line.id)
|
||||
if towrite:
|
||||
self.pool.get('sale.order.line').write(cr, uid, towrite, {'state': 'confirmed'}, context=context)
|
||||
self.write(cr, uid, [order.id], val)
|
||||
|
||||
return True
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context={}):
|
||||
ok = True
|
||||
sale_order_line_obj = self.pool.get('sale.order.line')
|
||||
@@ -517,25 +533,9 @@ class sale_order(osv.osv):
|
||||
notcanceled = False
|
||||
write_done_ids = []
|
||||
write_cancel_ids = []
|
||||
stock_move_obj = self.pool.get('stock.move')
|
||||
for order in self.browse(cr, uid, ids, context={}):
|
||||
|
||||
#check for pending deliveries
|
||||
pending_deliveries = False
|
||||
# check => if order_lines do not exist,don't proceed for any mode.
|
||||
if not order.order_line:
|
||||
return False
|
||||
for line in order.order_line:
|
||||
move_ids = stock_move_obj.search(cr, uid, [('sale_line_id','=', line.id)])
|
||||
for move in stock_move_obj.browse( cr, uid, move_ids ):
|
||||
#if one of the related order lines is in state draft, auto or confirmed
|
||||
#this order line is not yet delivered
|
||||
if move.state in ('draft', 'waiting', 'confirmed'):
|
||||
pending_deliveries = True
|
||||
# Reason => if there are no move lines,the following condition will always set to be true,and will set SO to 'DONE'.
|
||||
# Added move_ids check to SOLVE.
|
||||
if move_ids and ((not line.procurement_id) or (line.procurement_id.state=='done')) and not pending_deliveries:
|
||||
# finished = True
|
||||
if (not line.procurement_id) or (line.procurement_id.state=='done'):
|
||||
if line.state != 'done':
|
||||
write_done_ids.append(line.id)
|
||||
else:
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
<record id="act_invoice_end" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_sale"/>
|
||||
<field name="name">invoice_end</field>
|
||||
<field name="kind">dummy</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_invoice_end()</field>
|
||||
</record>
|
||||
<record id="act_invoice_cancel" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_sale"/>
|
||||
|
||||
@@ -25,6 +25,7 @@ import wizard
|
||||
import netsvc
|
||||
import ir
|
||||
import pooler
|
||||
from tools.translate import _
|
||||
|
||||
sale_form = """<?xml version="1.0"?>
|
||||
<form string="Convert to Quote">
|
||||
@@ -119,7 +120,7 @@ class make_sale(wizard.interface):
|
||||
value['tax_id'] = [(6,0,value['tax_id'])]
|
||||
sale_line_obj.create(cr, uid, value)
|
||||
|
||||
case_obj.write(cr, uid, case.id, {'ref': 'sale.order,%s' % new_id})
|
||||
case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
|
||||
new_ids.append(new_id)
|
||||
|
||||
if data['form']['close']:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user