bzr revid: vir@tinyerp.com-20101013044237-k3wbnz3u3gwv0tu9
This commit is contained in:
Vir (Open ERP) 2010-10-13 10:12:37 +05:30
commit 0bf0d7eae1
183 changed files with 2298 additions and 2356 deletions

View File

@ -278,7 +278,7 @@ class account_account(osv.osv):
# ON l.account_id = tmp.id # ON l.account_id = tmp.id
# or make _get_children_and_consol return a query and join on that # or make _get_children_and_consol return a query and join on that
request = ("SELECT l.account_id as id, " +\ request = ("SELECT l.account_id as id, " +\
' , '.join(map(mapping.__getitem__, field_names)) + ', '.join(map(mapping.__getitem__, field_names)) +
" FROM account_move_line l" \ " FROM account_move_line l" \
" WHERE l.account_id IN %s " \ " WHERE l.account_id IN %s " \
+ filters + + filters +
@ -838,7 +838,7 @@ class account_period(osv.osv):
'date_start': fields.date('Start of Period', required=True, states={'done':[('readonly',True)]}), 'date_start': fields.date('Start of Period', required=True, states={'done':[('readonly',True)]}),
'date_stop': fields.date('End of Period', required=True, states={'done':[('readonly',True)]}), 'date_stop': fields.date('End of Period', required=True, states={'done':[('readonly',True)]}),
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True), 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True, 'state': fields.selection([('draft','Open'), ('done','Closed')], 'State', readonly=True,
help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'), help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'),
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True) 'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
} }
@ -1538,7 +1538,7 @@ class account_tax_code(osv.osv):
if context is None: if context is None:
context = {} context = {}
move_state = ('posted', ) move_state = ('posted', )
if context.get('state', False) == 'all': if context.get('state', 'all') == 'all':
move_state = ('draft', 'posted', ) move_state = ('draft', 'posted', )
if context.get('fiscalyear_id', False): if context.get('fiscalyear_id', False):
fiscalyear_id = context['fiscalyear_id'] fiscalyear_id = context['fiscalyear_id']

View File

@ -31,12 +31,12 @@ class account_analytic_line(osv.osv):
_inherit = 'account.analytic.line' _inherit = 'account.analytic.line'
_description = 'Analytic Line' _description = 'Analytic Line'
_columns = { _columns = {
'product_uom_id' : fields.many2one('product.uom', 'UoM'), 'product_uom_id': fields.many2one('product.uom', 'UoM'),
'product_id' : fields.many2one('product.product', 'Product'), 'product_id': fields.many2one('product.product', 'Product'),
'general_account_id' : fields.many2one('account.account', 'General Account', required=True, ondelete='cascade'), 'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='cascade'),
'move_id' : fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True), 'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True),
'journal_id' : fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='cascade', select=True), 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='cascade', select=True),
'code' : fields.char('Code', size=8), 'code': fields.char('Code', size=8),
'ref': fields.char('Ref.', size=64), 'ref': fields.char('Ref.', size=64),
'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account currency', store=True, help="The related account currency if not equal to the company one.", readonly=True), 'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account currency', store=True, help="The related account currency if not equal to the company one.", readonly=True),
'amount_currency': fields.related('move_id', 'amount_currency', type='float', string='Amount currency', store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True), 'amount_currency': fields.related('move_id', 'amount_currency', type='float', string='Amount currency', store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True),
@ -88,7 +88,7 @@ class account_analytic_line(osv.osv):
company_id = j_id.company_id.id company_id = j_id.company_id.id
result = 0.0 result = 0.0
is_purchase = False is_purchase = False
if j_id.type <> 'sale': if j_id.type <> 'sale':
a = prod.product_tmpl_id.property_account_expense.id a = prod.product_tmpl_id.property_account_expense.id
if not a: if not a:

View File

@ -21,9 +21,7 @@
import time import time
import netsvc
from osv import fields, osv from osv import fields, osv
from tools.misc import currency
from tools.translate import _ from tools.translate import _
import decimal_precision as dp import decimal_precision as dp

View File

@ -151,15 +151,14 @@ class account_cash_statement(osv.osv):
res[r] = round(res[r], 2) res[r] = round(res[r], 2)
return res return res
def _get_company(self, cr, uid, context={}): def _get_company(self, cr, uid, context=None):
user_pool = self.pool.get('res.users') user_pool = self.pool.get('res.users')
company_pool = self.pool.get('res.company') company_pool = self.pool.get('res.company')
user = user_pool.browse(cr, uid, uid, context) user = user_pool.browse(cr, uid, uid, context=context)
company_id = user.company_id and user.company_id.id company_id = user.company_id
if not company_id: if not company_id:
company_id = company_pool.search(cr, uid, [])[0] company_id = company_pool.search(cr, uid, [])
return company_id and company_id[0] or False
return company_id
def _get_cash_open_box_lines(self, cr, uid, context={}): def _get_cash_open_box_lines(self, cr, uid, context={}):
res = [] res = []
@ -229,7 +228,7 @@ class account_cash_statement(osv.osv):
'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', help="Closing balance based on cashBox"), 'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', help="Closing balance based on cashBox"),
'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'), 'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'),
'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'), 'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then / , its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), 'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'),
'user_id':fields.many2one('res.users', 'Responsible', required=False), 'user_id':fields.many2one('res.users', 'Responsible', required=False),
} }
_defaults = { _defaults = {

View File

@ -6,8 +6,8 @@
<field name="name">Close a Period</field> <field name="name">Close a Period</field>
<field name="res_model">account.period</field> <field name="res_model">account.period</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="domain">[('state','=','draft')]</field>
<field name="view_id" ref="view_account_period_tree"/> <field name="view_id" ref="view_account_period_tree"/>
<field name="context">{'search_default_draft': 1}</field>
<field name="help"> After closing a period, you will no longer be able to post entries to the period once it has been closed.</field> <field name="help"> After closing a period, you will no longer be able to post entries to the period once it has been closed.</field>
</record> </record>
<menuitem <menuitem

View File

@ -45,7 +45,7 @@
<field name="account_type"/> <field name="account_type"/>
<field name="currency_id" widget="selection" groups="base.group_extended"/> <field name="currency_id" widget="selection" groups="base.group_extended"/>
</form> </form>
<tree editable="bottom" string=""> <tree editable="bottom" string="Your bank and cash accounts">
<field name="acc_name"/> <field name="acc_name"/>
<field name="account_type"/> <field name="account_type"/>
<field name="currency_id" widget="selection" groups="base.group_extended"/> <field name="currency_id" widget="selection" groups="base.group_extended"/>

View File

@ -349,7 +349,7 @@ class account_move_line(osv.osv):
return res return res
def name_get(self, cr, uid, ids, context={}): def name_get(self, cr, uid, ids, context={}):
if not len(ids): if not ids:
return [] return []
result = [] result = []
for line in self.browse(cr, uid, ids, context): for line in self.browse(cr, uid, ids, context):
@ -363,18 +363,18 @@ class account_move_line(osv.osv):
if context is None: if context is None:
context = {} context = {}
if not len(args): if not args:
return [] return []
where = ' and '.join(map(lambda x: '(abs(sum(debit-credit))'+x[1]+str(x[2])+')',args)) where = ' and '.join(map(lambda x: '(abs(sum(debit-credit))'+x[1]+str(x[2])+')',args))
cursor.execute('select id, sum(debit-credit) from account_move_line \ cursor.execute('select id, sum(debit-credit) from account_move_line \
group by id, debit, credit having '+where) group by id, debit, credit having '+where)
res = cursor.fetchall() res = cursor.fetchall()
if not len(res): if not res:
return [('id', '=', '0')] return [('id', '=', '0')]
return [('id', 'in', [x[0] for x in res])] return [('id', 'in', [x[0] for x in res])]
def _invoice_search(self, cursor, user, obj, name, args, context): def _invoice_search(self, cursor, user, obj, name, args, context):
if not len(args): if not args:
return [] return []
invoice_obj = self.pool.get('account.invoice') invoice_obj = self.pool.get('account.invoice')
@ -407,7 +407,7 @@ class account_move_line(osv.osv):
qu2 += x[2] qu2 += x[2]
else: else:
qu1.append(' (False)') qu1.append(' (False)')
if len(qu1): if qu1:
qu1 = ' AND' + ' AND'.join(qu1) qu1 = ' AND' + ' AND'.join(qu1)
else: else:
qu1 = '' qu1 = ''
@ -415,7 +415,7 @@ class account_move_line(osv.osv):
'FROM account_move_line l, account_invoice i ' \ 'FROM account_move_line l, account_invoice i ' \
'WHERE l.move_id = i.move_id ' + qu1, qu2) 'WHERE l.move_id = i.move_id ' + qu1, qu2)
res = cursor.fetchall() res = cursor.fetchall()
if not len(res): if not res:
return [('id', '=', '0')] return [('id', '=', '0')]
return [('id', 'in', [x[0] for x in res])] return [('id', 'in', [x[0] for x in res])]
@ -989,7 +989,7 @@ class account_move_line(osv.osv):
part_rec_ids = [rec['reconcile_partial_id'][0] for rec in part_recs] part_rec_ids = [rec['reconcile_partial_id'][0] for rec in part_recs]
unlink_ids += rec_ids unlink_ids += rec_ids
unlink_ids += part_rec_ids unlink_ids += part_rec_ids
if len(unlink_ids): if unlink_ids:
obj_move_rec.unlink(cr, uid, unlink_ids) obj_move_rec.unlink(cr, uid, unlink_ids)
return True return True

View File

@ -129,7 +129,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<search string="Search Period"> <search string="Search Period">
<group> <group>
<filter string="Draft" name="draft" domain="[('state','=','draft')]" icon="terp-document-new"/> <filter string="To Close" name="draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<separator orientation="vertical"/> <separator orientation="vertical"/>
<field name="name"/> <field name="name"/>
<field name="code"/> <field name="code"/>
@ -1640,7 +1640,7 @@
<filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/> <filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
<separator orientation="vertical"/> <separator orientation="vertical"/>
<field name="name"/> <field name="name"/>
<field name="journal_id"/> <field name="journal_id" widget="selection"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>
</group> </group>
<newline/> <newline/>
@ -2590,7 +2590,7 @@
</field> </field>
</record> </record>
<record id="action_view_bank_statement_tree" model="ir.actions.act_window"> <record id="action_view_bank_statement_tree" model="ir.actions.act_window">
<field name="name">Cash Register</field> <field name="name">Cash Registers</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">account.bank.statement</field> <field name="res_model">account.bank.statement</field>
<field name="view_type">form</field> <field name="view_type">form</field>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-10-10 10:37+0000\n" "PO-Revision-Date: 2010-10-11 07:18+0000\n"
"Last-Translator: Ferdinand @ ChriCar <Unknown>\n" "Last-Translator: Ferdinand-chricar <Unknown>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-11 04:45+0000\n" "X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#. module: account #. module: account

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-10-11 04:27+0000\n" "PO-Revision-Date: 2010-10-11 07:18+0000\n"
"Last-Translator: sugi <Unknown>\n" "Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Mongolian <mn@li.org>\n" "Language-Team: Mongolian <mn@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-11 04:45+0000\n" "X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#. module: account #. module: account
@ -1983,7 +1983,7 @@ msgstr "Шилжүүлэлт"
#. module: account #. module: account
#: rml:account.overdue:0 #: rml:account.overdue:0
msgid "Li." msgid "Li."
msgstr "" msgstr "Ли."
#. module: account #. module: account
#: wizard_view:account.chart,init:0 #: wizard_view:account.chart,init:0
@ -2262,7 +2262,7 @@ msgstr "Дансны мод"
#. module: account #. module: account
#: model:account.journal,name:account.check_journal #: model:account.journal,name:account.check_journal
msgid "x Checks Journal" msgid "x Checks Journal"
msgstr "" msgstr "x Чекийн журнал"
#. module: account #. module: account
#: model:ir.actions.wizard,name:account.wizard_generate_subscription #: model:ir.actions.wizard,name:account.wizard_generate_subscription
@ -4413,7 +4413,7 @@ msgstr "Батлагдсан"
#: view:account.tax:0 #: view:account.tax:0
#: view:account.tax.template:0 #: view:account.tax.template:0
msgid "Credit Notes" msgid "Credit Notes"
msgstr "" msgstr "Орлогын тэмдэглэл"
#. module: account #. module: account
#: field:account.config.wizard,date2:0 #: field:account.config.wizard,date2:0
@ -4430,12 +4430,12 @@ msgstr "Нээлтийн бичилтийг цуцлах"
#. module: account #. module: account
#: model:process.transition,name:account.process_transition_invoicemanually0 #: model:process.transition,name:account.process_transition_invoicemanually0
msgid "Manually statement" msgid "Manually statement"
msgstr "" msgstr "Гараар үүсгэсэн тайлан"
#. module: account #. module: account
#: field:account.payment.term.line,days2:0 #: field:account.payment.term.line,days2:0
msgid "Day of the Month" msgid "Day of the Month"
msgstr "" msgstr "Сарын өдөр"
#. module: account #. module: account
#: field:account.analytic.journal,line_ids:0 #: field:account.analytic.journal,line_ids:0
@ -4493,12 +4493,12 @@ msgstr ""
#. module: account #. module: account
#: wizard_view:account.wizard_paid_open,init:0 #: wizard_view:account.wizard_paid_open,init:0
msgid "Open Invoice" msgid "Open Invoice"
msgstr "" msgstr "Нэхэмжлэл нээх"
#. module: account #. module: account
#: model:process.node,note:account.process_node_draftstatement0 #: model:process.node,note:account.process_node_draftstatement0
msgid "Set starting and ending balance for control" msgid "Set starting and ending balance for control"
msgstr "" msgstr "Балансын удирдлагын эхлэл төгсгөлийг тохируулах"
#. module: account #. module: account
#: wizard_view:account.wizard_paid_open,init:0 #: wizard_view:account.wizard_paid_open,init:0

View File

@ -302,7 +302,7 @@ class account_invoice(osv.osv):
}, help="The Journal Entry of the invoice have been totally reconciled with one or several Journal Entries of payment."), }, help="The Journal Entry of the invoice have been totally reconciled with one or several Journal Entries of payment."),
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account', 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',
help='Bank Account Number, Company bank account if Invoice is customer or supplier refund, otherwise Partner bank account number.', readonly=True, states={'draft':[('readonly',False)]}), help='Bank Account Number, Company bank account if Invoice is customer or supplier refund, otherwise Partner bank account number.', readonly=True, states={'draft':[('readonly',False)]}),
'move_lines':fields.function(_get_lines , method=True, type='many2many', relation='account.move.line', string='Entry Lines'), 'move_lines':fields.function(_get_lines, method=True, type='many2many', relation='account.move.line', string='Entry Lines'),
'residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual', 'residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual',
store={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 50), 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 50),
@ -585,7 +585,7 @@ class account_invoice(osv.osv):
else: else:
val['currency_id'] = company.currency_id.id val['currency_id'] = company.currency_id.id
return {'value' : val, 'domain': dom } return {'value': val, 'domain': dom }
# go from canceled state to draft state # go from canceled state to draft state
def action_cancel_draft(self, cr, uid, ids, *args): def action_cancel_draft(self, cr, uid, ids, *args):
@ -898,7 +898,7 @@ class account_invoice(osv.osv):
'name': name, 'name': name,
'price': total, 'price': total,
'account_id': acc_id, 'account_id': acc_id,
'date_maturity' : inv.date_due or False, 'date_maturity': inv.date_due or False,
'amount_currency': diff_currency_p \ 'amount_currency': diff_currency_p \
and total_currency or False, and total_currency or False,
'currency_id': diff_currency_p \ 'currency_id': diff_currency_p \
@ -909,7 +909,7 @@ class account_invoice(osv.osv):
date = inv.date_invoice or time.strftime('%Y-%m-%d') date = inv.date_invoice or time.strftime('%Y-%m-%d')
part = inv.partner_id.id part = inv.partner_id.id
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x, part, date, context={})) ,iml) line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x, part, date, context={})),iml)
line = self.group_lines(cr, uid, iml, line, inv) line = self.group_lines(cr, uid, iml, line, inv)
@ -932,7 +932,7 @@ class account_invoice(osv.osv):
period_id = inv.period_id and inv.period_id.id or False period_id = inv.period_id and inv.period_id.id or False
if not period_id: if not period_id:
period_ids = self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d'))]) period_ids = self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d'))])
if len(period_ids): if period_ids:
period_id = period_ids[0] period_id = period_ids[0]
if period_id: if period_id:
move['period_id'] = period_id move['period_id'] = period_id
@ -1018,7 +1018,7 @@ class account_invoice(osv.osv):
account_move_obj.unlink(cr, uid, [i['move_id'][0]]) account_move_obj.unlink(cr, uid, [i['move_id'][0]])
if i['payment_ids']: if i['payment_ids']:
account_move_line_obj = self.pool.get('account.move.line') account_move_line_obj = self.pool.get('account.move.line')
pay_ids = account_move_line_obj.browse(cr, uid , i['payment_ids']) pay_ids = account_move_line_obj.browse(cr, uid, i['payment_ids'])
for move_line in pay_ids: for move_line in pay_ids:
if move_line.reconcile_partial_id and move_line.reconcile_partial_id.line_partial_ids: if move_line.reconcile_partial_id and move_line.reconcile_partial_id.line_partial_ids:
raise osv.except_osv(_('Error !'), _('You cannot cancel the Invoice which is Partially Paid! You need to unreconcile concerned payment entries!')) raise osv.except_osv(_('Error !'), _('You cannot cancel the Invoice which is Partially Paid! You need to unreconcile concerned payment entries!'))
@ -1043,7 +1043,7 @@ class account_invoice(osv.osv):
return True return True
def name_get(self, cr, uid, ids, context=None): def name_get(self, cr, uid, ids, context=None):
if not len(ids): if not ids:
return [] return []
types = { types = {
'out_invoice': 'CI: ', 'out_invoice': 'CI: ',
@ -1078,7 +1078,9 @@ class account_invoice(osv.osv):
def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None): def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None):
invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id']) invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id'])
obj_invoice_line = self.pool.get('account.invoice.line')
obj_invoice_tax = self.pool.get('account.invoice.tax')
obj_journal = self.pool.get('account.journal')
new_ids = [] new_ids = []
for invoice in invoices: for invoice in invoices:
del invoice['id'] del invoice['id']
@ -1090,20 +1092,20 @@ class account_invoice(osv.osv):
'in_refund': 'in_invoice', # Supplier Refund 'in_refund': 'in_invoice', # Supplier Refund
} }
invoice_lines = self.pool.get('account.invoice.line').read(cr, uid, invoice['invoice_line']) invoice_lines = obj_invoice_line.read(cr, uid, invoice['invoice_line'])
invoice_lines = self._refund_cleanup_lines(cr, uid, invoice_lines) invoice_lines = self._refund_cleanup_lines(cr, uid, invoice_lines)
tax_lines = self.pool.get('account.invoice.tax').read(cr, uid, invoice['tax_line']) tax_lines = obj_invoice_tax.read(cr, uid, invoice['tax_line'])
tax_lines = filter(lambda l: l['manual'], tax_lines) tax_lines = filter(lambda l: l['manual'], tax_lines)
tax_lines = self._refund_cleanup_lines(cr, uid, tax_lines) tax_lines = self._refund_cleanup_lines(cr, uid, tax_lines)
if journal_id: if journal_id:
refund_journal_ids = [journal_id] refund_journal_ids = [journal_id]
elif invoice['type'] == 'in_invoice': elif invoice['type'] == 'in_invoice':
refund_journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','purchase_refund')]) refund_journal_ids = obj_journal.search(cr, uid, [('type','=','purchase_refund')])
else: else:
refund_journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','sale_refund')]) refund_journal_ids = obj_journal.search(cr, uid, [('type','=','sale_refund')])
if not date : if not date:
date = time.strftime('%Y-%m-%d') date = time.strftime('%Y-%m-%d')
invoice.update({ invoice.update({
'type': type_dict[invoice['type']], 'type': type_dict[invoice['type']],
@ -1114,11 +1116,11 @@ class account_invoice(osv.osv):
'tax_line': tax_lines, 'tax_line': tax_lines,
'journal_id': refund_journal_ids 'journal_id': refund_journal_ids
}) })
if period_id : if period_id:
invoice.update({ invoice.update({
'period_id': period_id, 'period_id': period_id,
}) })
if description : if description:
invoice.update({ invoice.update({
'name': description, 'name': description,
}) })
@ -1406,7 +1408,7 @@ class account_invoice_line(osv.osv):
result['uos_id'] = res.uom_id.id or uom or False result['uos_id'] = res.uom_id.id or uom or False
if result['uos_id']: if result['uos_id']:
res2 = res.uom_id.category_id.id res2 = res.uom_id.category_id.id
if res2 : if res2:
domain = {'uos_id':[('category_id','=',res2 )]} domain = {'uos_id':[('category_id','=',res2 )]}
result['categ_id'] = res.categ_id.id result['categ_id'] = res.categ_id.id
@ -1537,8 +1539,8 @@ class account_invoice_tax(osv.osv):
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."), 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Account')), 'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Account')),
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True), 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True),
'factor_base' : fields.function(_count_factor, method=True, string='Multipication factor for Base code', type='float', multi="all"), 'factor_base': fields.function(_count_factor, method=True, string='Multipication factor for Base code', type='float', multi="all"),
'factor_tax' : fields.function(_count_factor, method=True, string='Multipication factor Tax code', type='float', multi="all") 'factor_tax': fields.function(_count_factor, method=True, string='Multipication factor Tax code', type='float', multi="all")
} }
def base_change(self, cr, uid, ids, base, currency_id=False, company_id=False, date_invoice=False): def base_change(self, cr, uid, ids, base, currency_id=False, company_id=False, date_invoice=False):

View File

@ -51,7 +51,7 @@ class account_fiscal_position(osv.osv):
return result return result
def map_account(self, cr, uid, fposition_id, account_id, context={}): def map_account(self, cr, uid, fposition_id, account_id, context={}):
if not fposition_id : if not fposition_id:
return account_id return account_id
for pos in fposition_id.account_ids: for pos in fposition_id.account_ids:
if pos.account_src_id.id == account_id: if pos.account_src_id.id == account_id:
@ -111,7 +111,7 @@ class res_partner(osv.osv):
return res return res
def _asset_difference_search(self, cr, uid, obj, name, type, args, context=None): def _asset_difference_search(self, cr, uid, obj, name, type, args, context=None):
if not len(args): if not args:
return [] return []
having_values = tuple(map(itemgetter(2), args)) having_values = tuple(map(itemgetter(2), args))
where = ' AND '.join( where = ' AND '.join(
@ -128,7 +128,7 @@ class res_partner(osv.osv):
'GROUP BY partner_id HAVING '+where), 'GROUP BY partner_id HAVING '+where),
(type,) + having_values) (type,) + having_values)
res = cr.fetchall() res = cr.fetchall()
if not len(res): if not res:
return [('id','=','0')] return [('id','=','0')]
return [('id','in',map(itemgetter(0), res))] return [('id','in',map(itemgetter(0), res))]

View File

@ -198,7 +198,7 @@
<field name="parent_id" ref="analytic_project_1"/> <field name="parent_id" ref="analytic_project_1"/>
</record> </record>
<record id="analytic_administratif" model="account.analytic.account"> <record id="analytic_administratif" model="account.analytic.account">
<field name="name">Administratif</field> <field name="name">Administrative</field>
<field name="code">1</field> <field name="code">1</field>
<field name="parent_id" ref="analytic_internal"/> <field name="parent_id" ref="analytic_internal"/>
</record> </record>

View File

@ -182,6 +182,7 @@
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" invisible="not context.get('to_invoice', False)"/> <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" invisible="not context.get('to_invoice', False)"/>
<field domain="[('type','=','normal')]" name="account_id"/> <field domain="[('type','=','normal')]" name="account_id"/>
<field name="general_account_id" invisible="context.get('to_invoice', False)"/> <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
<field name="user_id" invisible="1" />
</tree> </tree>
</field> </field>
</record> </record>
@ -430,13 +431,13 @@
</field> </field>
</record> </record>
<act_window <act_window
context="{'search_default_account_id': [active_id], 'search_default_user_id': False}" context="{'search_default_account_id': [active_id], 'search_default_user_id': False}"
id="act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal" id="act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal"
name="All Analytic Entries" name="All Analytic Entries"
res_model="account.analytic.line" res_model="account.analytic.line"
src_model="account.analytic.account" src_model="account.analytic.account"
view_mode="tree,form" view_mode="tree,form"
view_type="form"/> view_type="form"/>
<record id="view_account_journal_1" model="ir.ui.view"> <record id="view_account_journal_1" model="ir.ui.view">

View File

@ -119,12 +119,12 @@ class account_analytic_balance(report_sxw.rml_parse):
return (debit-credit) return (debit-credit)
def _sum_all(self, accounts, date1, date2, option): def _sum_all(self, accounts, date1, date2, option):
account_analytic_obj = self.pool.get('account.analytic.account')
ids = map(lambda x: x['id'], accounts) ids = map(lambda x: x['id'], accounts)
if not ids: if not ids:
return 0.0 return 0.0
if not self.acc_sum_list: if not self.acc_sum_list:
account_analytic_obj = self.pool.get('account.analytic.account')
ids2 = account_analytic_obj.search(self.cr, self.uid,[('parent_id', 'child_of', ids)]) ids2 = account_analytic_obj.search(self.cr, self.uid,[('parent_id', 'child_of', ids)])
self.acc_sum_list = ids2 self.acc_sum_list = ids2
else: else:

View File

@ -91,14 +91,14 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
def _sum_debit(self, accounts, date1, date2): def _sum_debit(self, accounts, date1, date2):
ids = map(lambda x: x.id, accounts) ids = map(lambda x: x.id, accounts)
if not len(ids): if not ids:
return 0.0 return 0.0
self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(ids), date1, date2,)) self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(ids), date1, date2,))
return self.cr.fetchone()[0] or 0.0 return self.cr.fetchone()[0] or 0.0
def _sum_credit(self, accounts, date1, date2): def _sum_credit(self, accounts, date1, date2):
ids = map(lambda x: x.id, accounts) ids = map(lambda x: x.id, accounts)
if not len(ids): if not ids:
return 0.0 return 0.0
self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(ids),date1, date2,)) self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(ids),date1, date2,))
return self.cr.fetchone()[0] or 0.0 return self.cr.fetchone()[0] or 0.0

View File

@ -102,7 +102,7 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
def _sum_quantity(self, accounts, date1, date2, journals): def _sum_quantity(self, accounts, date1, date2, journals):
ids = map(lambda x: x.id, accounts) ids = map(lambda x: x.id, accounts)
if not len(ids): if not ids:
return 0.0 return 0.0
if not journals: if not journals:
self.cr.execute("SELECT sum(unit_amount) \ self.cr.execute("SELECT sum(unit_amount) \

View File

@ -70,7 +70,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\ OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND (l.partner_id=res_partner.id)\ AND (l.partner_id=res_partner.id)\
AND ' + self.query + ' \ AND ' + self.query + ' \
ORDER BY res_partner.name' , (self.date_from,)) ORDER BY res_partner.name', (self.date_from,))
partners = self.cr.dictfetchall() partners = self.cr.dictfetchall()
## mise a 0 du total ## mise a 0 du total
for i in range(7): for i in range(7):
@ -96,7 +96,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND ' + self.query + '\ AND ' + self.query + '\
AND account_account.active\ AND account_account.active\
GROUP BY partner_id ' , (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from)) GROUP BY partner_id ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from))
t = self.cr.fetchall() t = self.cr.fetchall()
for i in t: for i in t:
totals[i[0]] = i[1] totals[i[0]] = i[1]
@ -131,7 +131,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND '+ self.query + '\ AND '+ self.query + '\
AND account_account.active\ AND account_account.active\
GROUP BY l.partner_id' , (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from)) GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from))
t = self.cr.fetchall() t = self.cr.fetchall()
for i in t: for i in t:
future_past[i[0]] = i[1] future_past[i[0]] = i[1]
@ -140,7 +140,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
# Each history will contain : history[1] = {'<partner_id>': <partner_debit-credit>} # Each history will contain : history[1] = {'<partner_id>': <partner_debit-credit>}
history = [] history = []
for i in range(5): for i in range(5):
args_list = (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids) ,self.date_from,) args_list = (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids),self.date_from,)
dates_query = '(COALESCE(l.date_maturity,l.date)' dates_query = '(COALESCE(l.date_maturity,l.date)'
if form[str(i)]['start'] and form[str(i)]['stop']: if form[str(i)]['start'] and form[str(i)]['stop']:
dates_query += ' BETWEEN %s AND %s)' dates_query += ' BETWEEN %s AND %s)'
@ -153,7 +153,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
args_list += (form[str(i)]['stop'],) args_list += (form[str(i)]['stop'],)
self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit)\ self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit)\
FROM account_move_line AS l, account_account , account_move am \ FROM account_move_line AS l, account_account, account_move am \
WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\ WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\
AND (am.state IN %s)\ AND (am.state IN %s)\
AND (account_account.type IN %s)\ AND (account_account.type IN %s)\
@ -163,7 +163,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
AND '+ self.query + '\ AND '+ self.query + '\
AND account_account.active\ AND account_account.active\
AND ' + dates_query + '\ AND ' + dates_query + '\
GROUP BY l.partner_id' , args_list) GROUP BY l.partner_id', args_list)
t = self.cr.fetchall() t = self.cr.fetchall()
d = {} d = {}
for i in t: for i in t:
@ -227,7 +227,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
self.total_account.append(0) self.total_account.append(0)
totals = {} totals = {}
self.cr.execute('SELECT SUM(l.debit-l.credit) \ self.cr.execute('SELECT SUM(l.debit-l.credit) \
FROM account_move_line AS l, account_account , account_move am \ FROM account_move_line AS l, account_account, account_move am \
WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\ WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\
AND (am.state IN %s)\ AND (am.state IN %s)\
AND (l.partner_id IS NULL)\ AND (l.partner_id IS NULL)\
@ -235,7 +235,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
AND ((l.reconcile_id IS NULL) \ AND ((l.reconcile_id IS NULL) \
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND ' + self.query + '\ AND ' + self.query + '\
AND account_account.active ' ,(tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from)) AND account_account.active ',(tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from))
t = self.cr.fetchall() t = self.cr.fetchall()
for i in t: for i in t:
totals['Unknown Partner'] = i[0] totals['Unknown Partner'] = i[0]
@ -266,7 +266,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
AND ((l.reconcile_id IS NULL)\ AND ((l.reconcile_id IS NULL)\
OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND '+ self.query + '\ AND '+ self.query + '\
AND account_account.active ' , (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from)) AND account_account.active ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from))
t = self.cr.fetchall() t = self.cr.fetchall()
for i in t: for i in t:
future_past['Unknown Partner'] = i[0] future_past['Unknown Partner'] = i[0]
@ -286,7 +286,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
args_list += (form[str(i)]['stop'],) args_list += (form[str(i)]['stop'],)
self.cr.execute('SELECT SUM(l.debit-l.credit)\ self.cr.execute('SELECT SUM(l.debit-l.credit)\
FROM account_move_line AS l, account_account , account_move am \ FROM account_move_line AS l, account_account, account_move am \
WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\ WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\
AND (am.state IN %s)\ AND (am.state IN %s)\
AND (account_account.type IN %s)\ AND (account_account.type IN %s)\
@ -296,7 +296,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
AND '+ self.query + '\ AND '+ self.query + '\
AND account_account.active\ AND account_account.active\
AND ' + dates_query + '\ AND ' + dates_query + '\
GROUP BY l.partner_id' , args_list) GROUP BY l.partner_id', args_list)
t = self.cr.fetchall() t = self.cr.fetchall()
d = {} d = {}
for i in t: for i in t:

View File

@ -33,7 +33,7 @@ class analytic_entries_report(osv.osv):
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'user_id' : fields.many2one('res.users', 'User',readonly=True), 'user_id': fields.many2one('res.users', 'User',readonly=True),
'name': fields.char('Description', size=64, readonly=True), 'name': fields.char('Description', size=64, readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner'), 'partner_id': fields.many2one('res.partner', 'Partner'),
'company_id': fields.many2one('res.company', 'Company', required=True), 'company_id': fields.many2one('res.company', 'Company', required=True),

View File

@ -56,6 +56,24 @@
</field> </field>
</group> </group>
<newline/> <newline/>
<group expand="0" string="Group By...">
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>
<filter string="General Account" icon="terp-folder-green" context="{'group_by':'general_account_id'}"/>
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter string="Product UOM" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
<separator orientation="vertical" groups="base.group_multi_company"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" name="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended"> <group expand="0" string="Extended Filters..." groups="base.group_extended">
<field name="currency_id" widget="selection"/> <field name="currency_id" widget="selection"/>
<field name="general_account_id" widget="selection"/> <field name="general_account_id" widget="selection"/>
@ -66,23 +84,6 @@
<field name="account_id" groups="analytic.group_analytic_accounting"/> <field name="account_id" groups="analytic.group_analytic_accounting"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/> <field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group> </group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>
<filter string="General Account" icon="terp-folder-green" context="{'group_by':'general_account_id'}"/>
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter string="Product UOM" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" name="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
</search> </search>
</field> </field>
</record> </record>

View File

@ -86,7 +86,7 @@ class account_balance(report_sxw.rml_parse, common_report_header):
self.sum_debit += account_rec['debit'] self.sum_debit += account_rec['debit']
self.sum_credit += account_rec['credit'] self.sum_credit += account_rec['credit']
if disp_acc == 'bal_movement': if disp_acc == 'bal_movement':
if res['credit'] > 0 or res['debit'] > 0 or res['balance'] > 0 : if res['credit'] > 0 or res['debit'] > 0 or res['balance'] > 0:
self.result_acc.append(res) self.result_acc.append(res)
elif disp_acc == 'bal_solde': elif disp_acc == 'bal_solde':
if res['balance'] != 0: if res['balance'] != 0:

View File

@ -139,7 +139,7 @@ class account_balance_landscape(rml_parse.rml_parse):
ctx['state'] = form['context'].get('state','all') ctx['state'] = form['context'].get('state','all')
tmp = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx.copy()) tmp = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx.copy())
if len(tmp): if tmp:
accounts.append(tmp) accounts.append(tmp)
merged_accounts=zip(*accounts) merged_accounts=zip(*accounts)
@ -198,7 +198,7 @@ class account_balance_landscape(rml_parse.rml_parse):
ctx['state'] = form['context'].get('state','all') ctx['state'] = form['context'].get('state','all')
tmp1 = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx.copy()) tmp1 = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx.copy())
if len(tmp1): if tmp1:
accounts.append(tmp1) accounts.append(tmp1)
if level==1: #if parent is called,done is not empty when called again. if level==1: #if parent is called,done is not empty when called again.

View File

@ -71,11 +71,12 @@ class journal_print(report_sxw.rml_parse, common_report_header):
move_state = ['draft','posted'] move_state = ['draft','posted']
if self.target_move == 'posted': if self.target_move == 'posted':
move_state = ['posted'] move_state = ['posted']
self.cr.execute('SELECT a.currency_id ,a.code, a.name, c.code AS currency_code,l.currency_id ,l.amount_currency ,SUM(debit) AS debit, SUM(credit) AS credit \
self.cr.execute('SELECT a.currency_id ,a.code, a.name, c.code AS currency_code, l.currency_id, l.amount_currency, SUM(debit) AS debit, SUM(credit) AS credit \
from account_move_line l \ from account_move_line l \
LEFT JOIN account_move am ON (l.move_id=am.id) \ LEFT JOIN account_move am ON (l.move_id=am.id) \
LEFT JOIN account_account a ON (l.account_id=a.id) \ LEFT JOIN account_account a ON (l.account_id=a.id) \
LEFT JOIN res_currency c on (l.currency_id=c.id) WHERE am.state IN %s AND l.period_id=%s AND l.journal_id=%s '+self.query_get_clause+' GROUP BY a.id, a.code, a.name,l.amount_currency,c.code , a.currency_id,l.currency_id', (tuple(move_state), period_id, journal_id)) LEFT JOIN res_currency c on (l.currency_id=c.id) WHERE am.state IN %s AND l.period_id=%s AND l.journal_id=%s '+self.query_get_clause+' GROUP BY a.id, a.code, a.name,l.amount_currency,c.code, a.currency_id,l.currency_id', (tuple(move_state), period_id, journal_id))
return self.cr.dictfetchall() return self.cr.dictfetchall()
def _set_get_account_currency_code(self, account_id): def _set_get_account_currency_code(self, account_id):
@ -91,12 +92,12 @@ class journal_print(report_sxw.rml_parse, common_report_header):
def _get_account(self, data): def _get_account(self, data):
if data['model'] == 'account.journal.period': if data['model'] == 'account.journal.period':
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name
return super(journal_print ,self)._get_account(data) return super(journal_print,self)._get_account(data)
def _get_fiscalyear(self, data): def _get_fiscalyear(self, data):
if data['model'] == 'account.journal.period': if data['model'] == 'account.journal.period':
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).fiscalyear_id.name return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).fiscalyear_id.name
return super(journal_print ,self)._get_fiscalyear(data) return super(journal_print,self)._get_fiscalyear(data)
def _display_currency(self, data): def _display_currency(self, data):
if data['model'] == 'account.journal.period': if data['model'] == 'account.journal.period':

View File

@ -293,7 +293,7 @@
<td><para style="terp_tblheader_Details_Right">Currency</para></td> <td><para style="terp_tblheader_Details_Right">Currency</para></td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="50.0,270.0,70.0,70.0,70.0" style="Table_Final_Total">[[ display_currency(data) == False or removeParentNode('blockTable') ]] <blockTable colWidths="50.0,300.0,70.0,70.0,70.0" style="Table_Final_Total">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td><para style="terp_default_Bold_9">Total:</para></td> <td><para style="terp_default_Bold_9">Total:</para></td>
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td> <td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
@ -314,7 +314,7 @@
</blockTable> </blockTable>
<section> <section>
<para style="terp_default_8">[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]]</para> <para style="terp_default_8">[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]]</para>
<blockTable colWidths="50.0,270.0,70.0,70.0,70.0" style="Table_Journal_Line_Content">[[ display_currency(data) == False or removeParentNode('blockTable') ]] <blockTable colWidths="50.0,300.0,70.0,70.0,70.0" style="Table_Journal_Line_Content">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td><para style="terp_default_9">[[ line['code'] ]]</para></td> <td><para style="terp_default_9">[[ line['code'] ]]</para></td>
<td><para style="terp_default_9">[[ line['name'] ]]</para></td> <td><para style="terp_default_9">[[ line['name'] ]]</para></td>

View File

@ -55,7 +55,7 @@ class account_entries_report(osv.osv):
'move_line_state': fields.selection([('draft','Unbalanced'), ('valid','Valid')], 'State of Move Line', readonly=True), 'move_line_state': fields.selection([('draft','Unbalanced'), ('valid','Valid')], 'State of Move Line', readonly=True),
'reconcile_id': fields.many2one('account.move.reconcile', readonly=True), 'reconcile_id': fields.many2one('account.move.reconcile', readonly=True),
'partner_id': fields.many2one('res.partner','Partner', readonly=True), 'partner_id': fields.many2one('res.partner','Partner', readonly=True),
'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account', readonly=True), 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'quantity': fields.float('Products Quantity', digits=(16,2), readonly=True), 'quantity': fields.float('Products Quantity', digits=(16,2), readonly=True),
'user_type': fields.many2one('account.account.type', 'Account Type', readonly=True), 'user_type': fields.many2one('account.account.type', 'Account Type', readonly=True),
'type': fields.selection([ 'type': fields.selection([

View File

@ -117,15 +117,15 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
sold_account = self._sum_balance_account(child_account) sold_account = self._sum_balance_account(child_account)
self.sold_accounts[child_account.id] = sold_account self.sold_accounts[child_account.id] = sold_account
if self.display_account == 'bal_movement': if self.display_account == 'bal_movement':
if child_account.type != 'view' and num_entry <> 0 : if child_account.type != 'view' and num_entry <> 0:
res.append(child_account) res.append(child_account)
elif self.display_account == 'bal_solde': elif self.display_account == 'bal_solde':
if child_account.type != 'view' and num_entry <> 0 : if child_account.type != 'view' and num_entry <> 0:
if ( sold_account <> 0.0): if ( sold_account <> 0.0):
res.append(child_account) res.append(child_account)
else: else:
res.append(child_account) res.append(child_account)
if not len(res): if not res:
return [account] return [account]
return res return res

View File

@ -84,7 +84,7 @@ class journal_print(report_sxw.rml_parse, common_report_header):
if self.target_move == 'posted': if self.target_move == 'posted':
move_state = ['posted'] move_state = ['posted']
self.cr.execute('SELECT SUM(debit) FROM account_move_line l , account_move am ' self.cr.execute('SELECT SUM(debit) FROM account_move_line l, account_move am '
'WHERE l.move_id=am.id AND am.state IN %s AND l.period_id IN %s AND l.journal_id IN %s ' + self.query_get_clause + ' ', 'WHERE l.move_id=am.id AND am.state IN %s AND l.period_id IN %s AND l.journal_id IN %s ' + self.query_get_clause + ' ',
(tuple(move_state), tuple(period_id), tuple(journal_id))) (tuple(move_state), tuple(period_id), tuple(journal_id)))
return self.cr.fetchone()[0] or 0.0 return self.cr.fetchone()[0] or 0.0
@ -121,7 +121,7 @@ class journal_print(report_sxw.rml_parse, common_report_header):
if self.target_move == 'posted': if self.target_move == 'posted':
move_state = ['posted'] move_state = ['posted']
self.cr.execute('SELECT l.id FROM account_move_line l, account_move am WHERE l.move_id=am.id AND am.state IN %s AND l.period_id=%s AND l.journal_id IN %s ' + self.query_get_clause + ' ORDER BY l.'+ self.sort_selection + '' ,(tuple(move_state), period_id, tuple(journal_id) )) self.cr.execute('SELECT l.id FROM account_move_line l, account_move am WHERE l.move_id=am.id AND am.state IN %s AND l.period_id=%s AND l.journal_id IN %s ' + self.query_get_clause + ' ORDER BY l.'+ self.sort_selection + '',(tuple(move_state), period_id, tuple(journal_id) ))
ids = map(lambda x: x[0], self.cr.fetchall()) ids = map(lambda x: x[0], self.cr.fetchall())
return obj_mline.browse(self.cr, self.uid, ids) return obj_mline.browse(self.cr, self.uid, ids)
@ -138,12 +138,12 @@ class journal_print(report_sxw.rml_parse, common_report_header):
def _get_fiscalyear(self, data): def _get_fiscalyear(self, data):
if data['model'] == 'account.journal.period': if data['model'] == 'account.journal.period':
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).fiscalyear_id.name return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).fiscalyear_id.name
return super(journal_print ,self)._get_fiscalyear(data) return super(journal_print, self)._get_fiscalyear(data)
def _get_account(self, data): def _get_account(self, data):
if data['model'] == 'account.journal.period': if data['model'] == 'account.journal.period':
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name
return super(journal_print ,self)._get_account(data) return super(journal_print, self)._get_account(data)
def _display_currency(self, data): def _display_currency(self, data):
if data['model'] == 'account.journal.period': if data['model'] == 'account.journal.period':

View File

@ -83,7 +83,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
full_account = [] full_account = []
result_tmp = 0.0 result_tmp = 0.0
self.cr.execute( self.cr.execute(
"SELECT p.ref,l.account_id,ac.name AS account_name,ac.code AS code ,p.name, sum(debit) AS debit, sum(credit) AS credit, " \ "SELECT p.ref,l.account_id,ac.name AS account_name,ac.code AS code,p.name, sum(debit) AS debit, sum(credit) AS credit, " \
"CASE WHEN sum(debit) > sum(credit) " \ "CASE WHEN sum(debit) > sum(credit) " \
"THEN sum(debit) - sum(credit) " \ "THEN sum(debit) - sum(credit) " \
"ELSE 0 " \ "ELSE 0 " \
@ -254,7 +254,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
"JOIN account_move am ON (am.id = l.move_id)" \ "JOIN account_move am ON (am.id = l.move_id)" \
"WHERE l.account_id IN %s" \ "WHERE l.account_id IN %s" \
"AND am.state IN %s" \ "AND am.state IN %s" \
"AND " + self.query + "" , "AND " + self.query + "",
(tuple(self.account_ids), tuple(move_state))) (tuple(self.account_ids), tuple(move_state)))
temp_res = float(self.cr.fetchone()[0] or 0.0) temp_res = float(self.cr.fetchone()[0] or 0.0)
return temp_res return temp_res
@ -273,7 +273,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
"JOIN account_move am ON (am.id = l.move_id)" \ "JOIN account_move am ON (am.id = l.move_id)" \
"WHERE l.account_id IN %s" \ "WHERE l.account_id IN %s" \
"AND am.state IN %s" \ "AND am.state IN %s" \
"AND " + self.query + "" , "AND " + self.query + "",
(tuple(self.account_ids), tuple(move_state))) (tuple(self.account_ids), tuple(move_state)))
temp_res = float(self.cr.fetchone()[0] or 0.0) temp_res = float(self.cr.fetchone()[0] or 0.0)
return temp_res return temp_res

View File

@ -30,11 +30,11 @@ class Overdue(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context): def __init__(self, cr, uid, name, context):
super(Overdue, self).__init__(cr, uid, name, context=context) super(Overdue, self).__init__(cr, uid, name, context=context)
self.localcontext.update( { self.localcontext.update( {
'time' : time, 'time': time,
'adr_get' : self._adr_get, 'adr_get': self._adr_get,
'getLines' : self._lines_get, 'getLines': self._lines_get,
'tel_get' : self._tel_get, 'tel_get': self._tel_get,
'message' : self._message, 'message': self._message,
}) })
self.context = context self.context = context
def _adr_get(self, partner, type): def _adr_get(self, partner, type):
@ -47,10 +47,10 @@ class Overdue(report_sxw.rml_parse):
'name': False, 'name': False,
'street': False, 'street': False,
'street2': False, 'street2': False,
'city' : False, 'city': False,
'zip' : False, 'zip': False,
'state_id':False, 'state_id':False,
'country_id' : False, 'country_id': False,
} }
if adr_id: if adr_id:
result = res_partner_address.read(self.cr, self.uid, [adr_id], context=self.context.copy()) result = res_partner_address.read(self.cr, self.uid, [adr_id], context=self.context.copy())

View File

@ -34,17 +34,17 @@ class rml_parse(report_sxw.rml_parse):
self.localcontext.update({ self.localcontext.update({
'comma_me': self.comma_me, 'comma_me': self.comma_me,
'format_date': self._get_and_change_date_format_for_swiss, 'format_date': self._get_and_change_date_format_for_swiss,
'strip_name' : self._strip_name, 'strip_name': self._strip_name,
'explode_name' : self._explode_name, 'explode_name': self._explode_name,
}) })
def comma_me(self,amount): def comma_me(self,amount):
#print "#" + str(amount) + "#" #print "#" + str(amount) + "#"
if not amount: if not amount:
amount = 0.0 amount = 0.0
if type(amount) is float : if type(amount) is float:
amount = str('%.2f'%amount) amount = str('%.2f'%amount)
else : else:
amount = str(amount) amount = str(amount)
if (amount == '0'): if (amount == '0'):
return ' ' return ' '

View File

@ -43,13 +43,13 @@ ir_sequence_fiscalyear()
class ir_sequence(osv.osv): class ir_sequence(osv.osv):
_inherit = 'ir.sequence' _inherit = 'ir.sequence'
_columns = { _columns = {
'fiscal_ids' : fields.one2many('account.sequence.fiscalyear', 'fiscal_ids': fields.one2many('account.sequence.fiscalyear',
'sequence_main_id', 'Sequences') 'sequence_main_id', 'Sequences')
} }
def get_id(self, cr, uid, sequence_id, test='id', context=None): def get_id(self, cr, uid, sequence_id, test='id', context=None):
if context is None: if context is None:
context = {} context = {}
cr.execute('select id from ir_sequence where ' cr.execute('select id from ir_sequence where '
+ test + '=%s and active=%s', (sequence_id, True,)) + test + '=%s and active=%s', (sequence_id, True,))
res = cr.dictfetchone() res = cr.dictfetchone()
if res: if res:

View File

@ -67,6 +67,8 @@
import netsvc, tools, os, time import netsvc, tools, os, time
import datetime import datetime
from mx.DateTime import * from mx.DateTime import *
import warnings
warnings.filterwarnings('ignore',".*struct integer overflow masking is deprecated*")
start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d")))
start = DateTime(int(start.year), int(start.month), int(start.day)) start = DateTime(int(start.year), int(start.month), int(start.day))
res = {} res = {}

View File

@ -170,7 +170,7 @@ class account_automatic_reconcile(osv.osv_memory):
"AND reconcile_id IS NULL", "AND reconcile_id IS NULL",
(account_id, partner_id)) (account_id, partner_id))
line_ids = [id for (id,) in cr.fetchall()] line_ids = [id for (id,) in cr.fetchall()]
if len(line_ids): if line_ids:
reconciled += len(line_ids) reconciled += len(line_ids)
if allow_write_off: if allow_write_off:
move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context) move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)

View File

@ -71,8 +71,8 @@ class account_change_currency(osv.osv_memory):
if old_rate <= 0: if old_rate <= 0:
raise osv.except_osv(_('Error'), _('Current currency is not confirured properly !')) raise osv.except_osv(_('Error'), _('Current currency is not confirured properly !'))
new_price = (line.price_unit / old_rate ) * rate new_price = (line.price_unit / old_rate ) * rate
obj_inv_line.write(cr, uid, [line.id], {'price_unit' : new_price}) obj_inv_line.write(cr, uid, [line.id], {'price_unit': new_price})
obj_inv.write(cr, uid, [invoice.id], {'currency_id' : new_currency}, context=context) obj_inv.write(cr, uid, [invoice.id], {'currency_id': new_currency}, context=context)
return {} return {}
account_change_currency() account_change_currency()

View File

@ -65,9 +65,9 @@ class account_fiscalyear_close(osv.osv_memory):
context = {} context = {}
fy_id = data[0]['fy_id'] fy_id = data[0]['fy_id']
cr.execute("SELECT id FROM account_period WHERE date_stop < (SELECT date_start FROM account_fiscalyear WHERE id = %s)" , (str(data[0]['fy2_id']),)) cr.execute("SELECT id FROM account_period WHERE date_stop < (SELECT date_start FROM account_fiscalyear WHERE id = %s)", (str(data[0]['fy2_id']),))
fy_period_set = ','.join(map(lambda id: str(id[0]), cr.fetchall())) fy_period_set = ','.join(map(lambda id: str(id[0]), cr.fetchall()))
cr.execute("SELECT id FROM account_period WHERE date_start > (SELECT date_stop FROM account_fiscalyear WHERE id = %s)" , (str(fy_id),)) cr.execute("SELECT id FROM account_period WHERE date_start > (SELECT date_stop FROM account_fiscalyear WHERE id = %s)", (str(fy_id),))
fy2_period_set = ','.join(map(lambda id: str(id[0]), cr.fetchall())) fy2_period_set = ','.join(map(lambda id: str(id[0]), cr.fetchall()))
period = obj_acc_period.browse(cr, uid, data[0]['period_id'], context=context) period = obj_acc_period.browse(cr, uid, data[0]['period_id'], context=context)

View File

@ -100,7 +100,7 @@ class account_invoice_refund(osv.osv_memory):
raise osv.except_osv(_('Error !'), _('Can not %s draft/proforma/cancel invoice.') % (mode)) raise osv.except_osv(_('Error !'), _('Can not %s draft/proforma/cancel invoice.') % (mode))
if inv.reconciled and mode in ('cancel', 'modify'): if inv.reconciled and mode in ('cancel', 'modify'):
raise osv.except_osv(_('Error !'), _('Can not %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice') % (mode)) raise osv.except_osv(_('Error !'), _('Can not %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice') % (mode))
if form['period'] : if form['period']:
period = form['period'] period = form['period']
else: else:
period = inv.period_id and inv.period_id.id or False period = inv.period_id and inv.period_id.id or False
@ -108,9 +108,9 @@ class account_invoice_refund(osv.osv_memory):
if not journal_id: if not journal_id:
journal_id = inv.journal_id.id journal_id = inv.journal_id.id
if form['date'] : if form['date']:
date = form['date'] date = form['date']
if not form['period'] : if not form['period']:
cr.execute("select name from ir_model_fields \ cr.execute("select name from ir_model_fields \
where model = 'account.period' \ where model = 'account.period' \
and name = 'company_id'") and name = 'company_id'")
@ -128,7 +128,7 @@ class account_invoice_refund(osv.osv_memory):
period = res[0] period = res[0]
else: else:
date = inv.date_invoice date = inv.date_invoice
if form['description'] : if form['description']:
description = form['description'] description = form['description']
else: else:
description = inv.name description = inv.name
@ -147,18 +147,18 @@ class account_invoice_refund(osv.osv_memory):
if mode in ('cancel', 'modify'): if mode in ('cancel', 'modify'):
movelines = inv.move_id.line_id movelines = inv.move_id.line_id
to_reconcile_ids = {} to_reconcile_ids = {}
for line in movelines : for line in movelines:
if line.account_id.id == inv.account_id.id : if line.account_id.id == inv.account_id.id:
to_reconcile_ids[line.account_id.id] = [line.id] to_reconcile_ids[line.account_id.id] = [line.id]
if type(line.reconcile_id) != osv.orm.browse_null : if type(line.reconcile_id) != osv.orm.browse_null:
reconcile_obj.unlink(cr, uid, line.reconcile_id.id) reconcile_obj.unlink(cr, uid, line.reconcile_id.id)
wf_service.trg_validate(uid, 'account.invoice', \ wf_service.trg_validate(uid, 'account.invoice', \
refund.id, 'invoice_open', cr) refund.id, 'invoice_open', cr)
refund = inv_obj.browse(cr, uid, refund_id[0], context=context) refund = inv_obj.browse(cr, uid, refund_id[0], context=context)
for tmpline in refund.move_id.line_id : for tmpline in refund.move_id.line_id:
if tmpline.account_id.id == inv.account_id.id : if tmpline.account_id.id == inv.account_id.id:
to_reconcile_ids[tmpline.account_id.id].append(tmpline.id) to_reconcile_ids[tmpline.account_id.id].append(tmpline.id)
for account in to_reconcile_ids : for account in to_reconcile_ids:
account_m_line_obj.reconcile(cr, uid, to_reconcile_ids[account], account_m_line_obj.reconcile(cr, uid, to_reconcile_ids[account],
writeoff_period_id=period, writeoff_period_id=period,
writeoff_journal_id = inv.journal_id.id, writeoff_journal_id = inv.journal_id.id,
@ -214,7 +214,7 @@ class account_invoice_refund(osv.osv_memory):
return result return result
def invoice_refund(self, cr, uid, ids, context=None): def invoice_refund(self, cr, uid, ids, context=None):
data_refund = self.read(cr, uid, ids, [] ,context=context)[0]['filter_refund'] data_refund = self.read(cr, uid, ids, [],context=context)[0]['filter_refund']
return self.compute_refund(cr, uid, ids, data_refund, context=context) return self.compute_refund(cr, uid, ids, data_refund, context=context)
account_invoice_refund() account_invoice_refund()

View File

@ -33,7 +33,7 @@ class account_move_journal(osv.osv_memory):
""" """
ids = self.pool.get('account.period').find(cr, uid, context=context) ids = self.pool.get('account.period').find(cr, uid, context=context)
period_id = False period_id = False
if len(ids): if ids:
period_id = ids[0] period_id = ids[0]
return period_id return period_id
@ -91,9 +91,9 @@ class account_move_journal(osv.osv_memory):
<form string="Standard entries"> <form string="Standard entries">
<separator string="Open Journal Items !" colspan="4"/> <separator string="Open Journal Items !" colspan="4"/>
<group colspan="4" > <group colspan="4" >
<label width="300" string="Journal : %s"/> <label width="300" string="Journal: %s"/>
<newline/> <newline/>
<label width="300" string="Period : %s"/> <label width="300" string="Period: %s"/>
</group> </group>
<group colspan="4" col="4"> <group colspan="4" col="4">
<label string ="" colspan="2"/> <label string ="" colspan="2"/>

View File

@ -46,7 +46,7 @@ class account_move_line_select(osv.osv_memory):
fiscalyears = fiscalyear_obj.browse(cr, uid, fiscalyear_ids) fiscalyears = fiscalyear_obj.browse(cr, uid, fiscalyear_ids)
period_ids = [] period_ids = []
if fiscalyears : if fiscalyears:
for fiscalyear in fiscalyears: for fiscalyear in fiscalyears:
for period in fiscalyear.period_ids: for period in fiscalyear.period_ids:
period_ids.append(period.id) period_ids.append(period.id)
@ -56,7 +56,7 @@ class account_move_line_select(osv.osv_memory):
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id'] id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
result = act_obj.read(cr, uid, [id])[0] result = act_obj.read(cr, uid, [id])[0]
result['context'] = { result['context'] = {
'fiscalyear': False , 'fiscalyear': False,
'account_id': context['active_id'], 'account_id': context['active_id'],
'active_id': context['active_id'], 'active_id': context['active_id'],
} }

View File

@ -34,7 +34,7 @@
<record id="action_idea_post_vote_values" model="ir.values"> <record id="action_idea_post_vote_values" model="ir.values">
<field name="model_id" ref="model_account_period" /> <field name="model_id" ref="model_account_period" />
<field name="object" eval="1" /> <field name="object" eval="1" />
<field name="name"></field> <field name="name">Close a Period</field>
<field name="key2">client_action_multi</field> <field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_period_close'))"/> <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_period_close'))"/>
<field name="key">action</field> <field name="key">action</field>

View File

@ -83,7 +83,7 @@ class account_move_line_reconcile(osv.osv_memory):
data = self.read(cr, uid, ids, context=context) data = self.read(cr, uid, ids, context=context)
date = time.strftime('%Y-%m-%d') date = time.strftime('%Y-%m-%d')
ids = self.pool.get('account.period').find(cr, uid, dt=date, context=context) ids = self.pool.get('account.period').find(cr, uid, dt=date, context=context)
if len(ids): if ids:
period_id = ids[0] period_id = ids[0]
#stop the reconciliation process by partner (manual reconciliation) only if there is nothing more to reconcile for this partner #stop the reconciliation process by partner (manual reconciliation) only if there is nothing more to reconcile for this partner
if 'active_ids' in context and context['active_ids']: if 'active_ids' in context and context['active_ids']:
@ -93,10 +93,10 @@ class account_move_line_reconcile(osv.osv_memory):
credit_ml_ids = account_move_line_obj.search(cr, uid, [('partner_id', '=', partner_id), ('account_id.reconcile', '=', True), ('reconcile_id', '=', False), ('credit', '>', 0)], context=context) credit_ml_ids = account_move_line_obj.search(cr, uid, [('partner_id', '=', partner_id), ('account_id.reconcile', '=', True), ('reconcile_id', '=', False), ('credit', '>', 0)], context=context)
for ml_id in context['active_ids']: for ml_id in context['active_ids']:
if ml_id in debit_ml_ids: if ml_id in debit_ml_ids:
debit_ml_ids.remove(ml_id) debit_ml_ids.remove(ml_id)
if ml_id in credit_ml_ids: if ml_id in credit_ml_ids:
credit_ml_ids.remove(ml_id) credit_ml_ids.remove(ml_id)
if not (len(debit_ml_ids) and len(credit_ml_ids)): if not debit_ml_ids and credit_ml_ids:
context.update({'stop_reconcile': True}) context.update({'stop_reconcile': True})
account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id, account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id,
period_id, journal_id, context=context) period_id, journal_id, context=context)
@ -161,7 +161,7 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
date = context['date_p'] date = context['date_p']
ids = self.pool.get('account.period').find(cr, uid, dt=date, context=context) ids = self.pool.get('account.period').find(cr, uid, dt=date, context=context)
if len(ids): if ids:
period_id = ids[0] period_id = ids[0]
context.update({'stop_reconcile': True}) context.update({'stop_reconcile': True})

View File

@ -44,7 +44,7 @@ class account_unreconcile_reconcile(osv.osv_memory):
rec_ids = context['active_ids'] rec_ids = context['active_ids']
if context is None: if context is None:
context = {} context = {}
if len(rec_ids): if rec_ids:
obj_move_reconcile.unlink(cr, uid, rec_ids) obj_move_reconcile.unlink(cr, uid, rec_ids)
return {} return {}

View File

@ -34,7 +34,7 @@ class account_analytic_account(osv.osv):
dp = 2 dp = 2
res = dict([(i, {}) for i in ids]) res = dict([(i, {}) for i in ids])
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context))
accounts = self.browse(cr, uid, ids, context=context) accounts = self.browse(cr, uid, ids, context=context)
for f in fields: for f in fields:
@ -62,10 +62,10 @@ class account_analytic_account(osv.osv):
for id in ids: for id in ids:
res[id][f] = 0.0 res[id][f] = 0.0
if parent_ids: if parent_ids:
cr.execute("select account_analytic_line.account_id, max(date) \ cr.execute("SELECT account_analytic_line.account_id, MAX(date) \
from account_analytic_line \ FROM account_analytic_line \
where account_id IN %s \ WHERE account_id IN %s \
and invoice_id is not null \ AND invoice_id IS NOT NULL \
GROUP BY account_analytic_line.account_id;", (parent_ids,)) GROUP BY account_analytic_line.account_id;", (parent_ids,))
for account_id, sum in cr.fetchall(): for account_id, sum in cr.fetchall():
if account_id not in res: if account_id not in res:
@ -85,25 +85,25 @@ class account_analytic_account(osv.osv):
# This computation doesn't take care of pricelist ! # This computation doesn't take care of pricelist !
# Just consider list_price # Just consider list_price
cr.execute("""SELECT account_analytic_account.id, \ cr.execute("""SELECT account_analytic_account.id, \
COALESCE(sum (product_template.list_price * \ COALESCE(SUM (product_template.list_price * \
account_analytic_line.unit_amount * \ account_analytic_line.unit_amount * \
((100-hr_timesheet_invoice_factor.factor)/100)),0.0) \ ((100-hr_timesheet_invoice_factor.factor)/100)), 0.0) \
AS ca_to_invoice \ AS ca_to_invoice \
FROM product_template \ FROM product_template \
join product_product \ JOIN product_product \
on product_template.id = product_product.product_tmpl_id \ ON product_template.id = product_product.product_tmpl_id \
JOIN account_analytic_line \ JOIN account_analytic_line \
on account_analytic_line.product_id = product_product.id \ ON account_analytic_line.product_id = product_product.id \
JOIN account_analytic_journal \ JOIN account_analytic_journal \
on account_analytic_line.journal_id = account_analytic_journal.id \ ON account_analytic_line.journal_id = account_analytic_journal.id \
JOIN account_analytic_account \ JOIN account_analytic_account \
on account_analytic_account.id = account_analytic_line.account_id \ ON account_analytic_account.id = account_analytic_line.account_id \
JOIN hr_timesheet_invoice_factor \ JOIN hr_timesheet_invoice_factor \
on hr_timesheet_invoice_factor.id = account_analytic_account.to_invoice \ ON hr_timesheet_invoice_factor.id = account_analytic_account.to_invoice \
WHERE account_analytic_account.id IN %s \ WHERE account_analytic_account.id IN %s \
AND account_analytic_line.invoice_id is null \ AND account_analytic_line.invoice_id IS NULL \
AND account_analytic_line.to_invoice IS NOT NULL \ AND account_analytic_line.to_invoice IS NOT NULL \
and account_analytic_journal.type in ('purchase','general') \ AND account_analytic_journal.type IN ('purchase','general') \
GROUP BY account_analytic_account.id;""", (parent_ids,)) GROUP BY account_analytic_account.id;""", (parent_ids,))
for account_id, sum in cr.fetchall(): for account_id, sum in cr.fetchall():
if account_id not in res: if account_id not in res:
@ -124,13 +124,13 @@ class account_analytic_account(osv.osv):
for id in ids: for id in ids:
res[id][f] = '' res[id][f] = ''
if parent_ids: if parent_ids:
cr.execute ("select account_analytic_line.account_id, \ cr.execute ("SELECT account_analytic_line.account_id, \
date(max(account_invoice.date_invoice)) \ DATE(MAX(account_invoice.date_invoice)) \
from account_analytic_line \ FROM account_analytic_line \
join account_invoice \ JOIN account_invoice \
on account_analytic_line.invoice_id = account_invoice.id \ ON account_analytic_line.invoice_id = account_invoice.id \
where account_analytic_line.account_id IN %s \ WHERE account_analytic_line.account_id IN %s \
and account_analytic_line.invoice_id is not null \ AND account_analytic_line.invoice_id IS NOT NULL \
GROUP BY account_analytic_line.account_id",(parent_ids,)) GROUP BY account_analytic_line.account_id",(parent_ids,))
for account_id, lid in cr.fetchall(): for account_id, lid in cr.fetchall():
res[account_id][f] = lid res[account_id][f] = lid
@ -142,10 +142,10 @@ class account_analytic_account(osv.osv):
for id in ids: for id in ids:
res[id][f] = '' res[id][f] = ''
if parent_ids: if parent_ids:
cr.execute("select account_analytic_line.account_id, max(date) \ cr.execute("SELECT account_analytic_line.account_id, MAX(date) \
from account_analytic_line \ FROM account_analytic_line \
where account_id IN %s \ WHERE account_id IN %s \
and invoice_id is null \ AND invoice_id IS NULL \
GROUP BY account_analytic_line.account_id" ,(parent_ids,)) GROUP BY account_analytic_line.account_id" ,(parent_ids,))
for account_id, lwd in cr.fetchall(): for account_id, lwd in cr.fetchall():
if account_id not in res: if account_id not in res:
@ -159,13 +159,13 @@ class account_analytic_account(osv.osv):
for id in ids: for id in ids:
res[id][f] = 0.0 res[id][f] = 0.0
if parent_ids: if parent_ids:
cr.execute("select account_analytic_line.account_id, COALESCE(sum(unit_amount),0.0) \ cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(unit_amount), 0.0) \
from account_analytic_line \ FROM account_analytic_line \
join account_analytic_journal \ JOIN account_analytic_journal \
on account_analytic_line.journal_id = account_analytic_journal.id \ ON account_analytic_line.journal_id = account_analytic_journal.id \
where account_analytic_line.account_id IN %s \ WHERE account_analytic_line.account_id IN %s \
and account_analytic_journal.type='general' \ AND account_analytic_journal.type='general' \
and invoice_id is null \ AND invoice_id IS NULL \
AND to_invoice IS NOT NULL \ AND to_invoice IS NOT NULL \
GROUP BY account_analytic_line.account_id;",(parent_ids,)) GROUP BY account_analytic_line.account_id;",(parent_ids,))
for account_id, sua in cr.fetchall(): for account_id, sua in cr.fetchall():
@ -182,12 +182,12 @@ class account_analytic_account(osv.osv):
for id in ids: for id in ids:
res[id][f] = 0.0 res[id][f] = 0.0
if parent_ids: if parent_ids:
cr.execute("select account_analytic_line.account_id,COALESCE(SUM(unit_amount),0.0) \ cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(unit_amount), 0.0) \
from account_analytic_line \ FROM account_analytic_line \
join account_analytic_journal \ JOIN account_analytic_journal \
on account_analytic_line.journal_id = account_analytic_journal.id \ ON account_analytic_line.journal_id = account_analytic_journal.id \
where account_analytic_line.account_id IN %s \ WHERE account_analytic_line.account_id IN %s \
and account_analytic_journal.type='general' \ AND account_analytic_journal.type='general' \
GROUP BY account_analytic_line.account_id",(parent_ids,)) GROUP BY account_analytic_line.account_id",(parent_ids,))
ff = cr.fetchall() ff = cr.fetchall()
for account_id, hq in ff: for account_id, hq in ff:
@ -211,24 +211,24 @@ class account_analytic_account(osv.osv):
# This computation doesn't take care of pricelist ! # This computation doesn't take care of pricelist !
# Just consider list_price # Just consider list_price
if parent_ids: if parent_ids:
cr.execute("""select account_analytic_line.account_id as account_id, \ cr.execute("""SELECT account_analytic_line.account_id AS account_id, \
COALESCE(sum((account_analytic_line.unit_amount * pt.list_price) \ COALESCE(SUM((account_analytic_line.unit_amount * pt.list_price) \
- (account_analytic_line.unit_amount * pt.list_price \ - (account_analytic_line.unit_amount * pt.list_price \
* hr.factor)),0.0) as somme * hr.factor)), 0.0) AS somme
from account_analytic_line \ FROM account_analytic_line \
left join account_analytic_journal \ LEFT JOIN account_analytic_journal \
on (account_analytic_line.journal_id = account_analytic_journal.id) \ ON (account_analytic_line.journal_id = account_analytic_journal.id) \
join product_product pp \ JOIN product_product pp \
on (account_analytic_line.product_id = pp.id) \ ON (account_analytic_line.product_id = pp.id) \
join product_template pt \ JOIN product_template pt \
on (pp.product_tmpl_id = pt.id) \ ON (pp.product_tmpl_id = pt.id) \
join account_analytic_account a \ JOIN account_analytic_account a \
on (a.id=account_analytic_line.account_id) \ ON (a.id=account_analytic_line.account_id) \
join hr_timesheet_invoice_factor hr \ JOIN hr_timesheet_invoice_factor hr \
on (hr.id=a.to_invoice) \ ON (hr.id=a.to_invoice) \
where account_analytic_line.account_id IN %s \ WHERE account_analytic_line.account_id IN %s \
and a.to_invoice IS NOT NULL \ AND a.to_invoice IS NOT NULL \
and account_analytic_journal.type IN ('purchase','general') AND account_analytic_journal.type IN ('purchase', 'general')
GROUP BY account_analytic_line.account_id""",(parent_ids,)) GROUP BY account_analytic_line.account_id""",(parent_ids,))
for account_id, sum in cr.fetchall(): for account_id, sum in cr.fetchall():
res2[account_id] = round(sum, dp) res2[account_id] = round(sum, dp)
@ -250,53 +250,51 @@ class account_analytic_account(osv.osv):
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None):
res = {} res = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context))
if parent_ids: if parent_ids:
cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \
from account_analytic_line \ FROM account_analytic_line \
join account_analytic_journal \ JOIN account_analytic_journal \
on account_analytic_line.journal_id = account_analytic_journal.id \ ON account_analytic_line.journal_id = account_analytic_journal.id \
where account_analytic_line.account_id IN %s \ WHERE account_analytic_line.account_id IN %s \
and account_analytic_journal.type = 'sale' \ AND account_analytic_journal.type = 'sale' \
group by account_analytic_line.account_id" ,(parent_ids,)) GROUP BY account_analytic_line.account_id", (parent_ids,))
for account_id, sum in cr.fetchall(): for account_id, sum in cr.fetchall():
res[account_id] = round(sum,2) res[account_id] = round(sum,2)
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context=context)
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context)
def _total_cost_calc(self, cr, uid, ids, name, arg, context=None): def _total_cost_calc(self, cr, uid, ids, name, arg, context=None):
res = {} res = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context))
if parent_ids: if parent_ids:
cr.execute("""select account_analytic_line.account_id,COALESCE(sum(amount_currency),0.0) \ cr.execute("""SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \
FROM account_analytic_line \
from account_analytic_line \ JOIN account_analytic_journal \
join account_analytic_journal \ ON account_analytic_line.journal_id = account_analytic_journal.id \
on account_analytic_line.journal_id = account_analytic_journal.id \ WHERE account_analytic_line.account_id IN %s \
where account_analytic_line.account_id IN %s \ AND amount<0 \
and amount<0 \
GROUP BY account_analytic_line.account_id""",(parent_ids,)) GROUP BY account_analytic_line.account_id""",(parent_ids,))
for account_id, sum in cr.fetchall(): for account_id, sum in cr.fetchall():
res[account_id] = round(sum,2) res[account_id] = round(sum,2)
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context) return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context=context)
def _remaining_hours_calc(self, cr, uid, ids, name, arg, context=None): def _remaining_hours_calc(self, cr, uid, ids, name, arg, context=None):
res = {} res = {}
for account in self.browse(cr, uid, ids): for account in self.browse(cr, uid, ids, context=context):
if account.quantity_max != 0: if account.quantity_max != 0:
res[account.id] = account.quantity_max - account.hours_quantity res[account.id] = account.quantity_max - account.hours_quantity
else: else:
res[account.id]=0.0 res[account.id] = 0.0
for id in ids: for id in ids:
res[id] = round(res.get(id, 0.0),2) res[id] = round(res.get(id, 0.0),2)
return res return res
def _hours_qtt_invoiced_calc(self, cr, uid, ids, name, arg, context=None): def _hours_qtt_invoiced_calc(self, cr, uid, ids, name, arg, context=None):
res = {} res = {}
for account in self.browse(cr, uid, ids): for account in self.browse(cr, uid, ids, context=context):
res[account.id] = account.hours_quantity - account.hours_qtt_non_invoiced res[account.id] = account.hours_quantity - account.hours_qtt_non_invoiced
if res[account.id] < 0: if res[account.id] < 0:
res[account.id]=0.0 res[account.id] = 0.0
for id in ids: for id in ids:
res[id] = round(res.get(id, 0.0),2) res[id] = round(res.get(id, 0.0),2)
return res return res
@ -414,7 +412,7 @@ class account_analytic_account_summary_user(osv.osv):
max_user = cr.fetchone()[0] max_user = cr.fetchone()[0]
account_ids = [int(str(x/max_user - (x%max_user == 0 and 1 or 0))) for x in ids] account_ids = [int(str(x/max_user - (x%max_user == 0 and 1 or 0))) for x in ids]
user_ids = [int(str(x-((x/max_user - (x%max_user == 0 and 1 or 0)) *max_user))) for x in ids] user_ids = [int(str(x-((x/max_user - (x%max_user == 0 and 1 or 0)) *max_user))) for x in ids]
parent_ids = tuple(account_obj.search(cr, uid, [('parent_id', 'child_of', account_ids)])) parent_ids = tuple(account_obj.search(cr, uid, [('parent_id', 'child_of', account_ids)], context=context))
if parent_ids: if parent_ids:
cr.execute('SELECT id, unit_amount ' \ cr.execute('SELECT id, unit_amount ' \
'FROM account_analytic_analysis_summary_user ' \ 'FROM account_analytic_analysis_summary_user ' \
@ -436,7 +434,7 @@ class account_analytic_account_summary_user(osv.osv):
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True), 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'unit_amount': fields.function(_unit_amount, method=True, type='float', 'unit_amount': fields.function(_unit_amount, method=True, type='float',
string='Total Time'), string='Total Time'),
'user' : fields.many2one('res.users', 'User'), 'user': fields.many2one('res.users', 'User'),
} }
def init(self, cr): def init(self, cr):
@ -477,30 +475,30 @@ class account_analytic_account_summary_user(osv.osv):
def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'):
if not context: if not context:
context={} context = {}
if not ids: if not ids:
return [] return []
if fields==None: if fields is None:
fields = self._columns.keys() fields = self._columns.keys()
res_trans_obj = self.pool.get('ir.translation')
# construct a clause for the rules : # construct a clause for the rules:
d1, d2, tables = self.pool.get('ir.rule').domain_get(cr, user, self._name, 'read', context=context) d1, d2, tables = self.pool.get('ir.rule').domain_get(cr, user, self._name, 'read', context=context)
# all inherited fields + all non inherited fields for which the attribute whose name is in load is True # all inherited fields + all non inherited fields for which the attribute whose name is in load is True
fields_pre = filter(lambda x: x in self._columns and getattr(self._columns[x],'_classic_write'), fields) + self._inherits.values() fields_pre = filter(lambda x: x in self._columns and getattr(self._columns[x],'_classic_write'), fields) + self._inherits.values()
res = [] res = []
cr.execute('SELECT MAX(id) FROM res_users') cr.execute('SELECT MAX(id) FROM res_users')
max_user = cr.fetchone()[0] max_user = cr.fetchone()[0]
if len(fields_pre) : if fields_pre:
fields_pre2 = map(lambda x: (x in ('create_date', 'write_date')) and ('date_trunc(\'second\', '+x+') as '+x) or '"'+x+'"', fields_pre) fields_pre2 = map(lambda x: (x in ('create_date', 'write_date')) and ('date_trunc(\'second\', '+x+') as '+x) or '"'+x+'"', fields_pre)
for i in range(0, len(ids), cr.IN_MAX): for i in range(0, len(ids), cr.IN_MAX):
sub_ids = ids[i:i+cr.IN_MAX] sub_ids = ids[i:i+cr.IN_MAX]
if d1: if d1:
cr.execute('select %s from \"%s\" where id IN (%s) ' \ cr.execute('SELECT %s FROM \"%s\" WHERE id IN (%s) ' \
'and account_id IN (%s) ' \ 'AND account_id IN (%s) ' \
'and "user" IN (%s) and %s order by %s' % \ 'AND "user" IN (%s) AND %s ORDER BY %s' % \
(','.join(fields_pre2 + ['id']), self._table, (','.join(fields_pre2 + ['id']), self._table,
','.join([str(x) for x in sub_ids]), ','.join([str(x) for x in sub_ids]),
','.join([str(x/max_user - (x%max_user == 0 and 1 or 0)) for x in sub_ids]), ','.join([str(x/max_user - (x%max_user == 0 and 1 or 0)) for x in sub_ids]),
@ -510,9 +508,9 @@ class account_analytic_account_summary_user(osv.osv):
raise except_orm(_('AccessError'), raise except_orm(_('AccessError'),
_('You try to bypass an access rule (Document type: %s).') % self._description) _('You try to bypass an access rule (Document type: %s).') % self._description)
else: else:
cr.execute('select %s from \"%s\" where id IN (%s) ' \ cr.execute('SELECT %s FROM \"%s\" WHERE id IN (%s) ' \
'and account_id IN (%s) ' \ 'AND account_id IN (%s) ' \
'and "user" IN (%s) order by %s' % \ 'AND "user" IN (%s) ORDER BY %s' % \
(','.join(fields_pre2 + ['id']), self._table, (','.join(fields_pre2 + ['id']), self._table,
','.join([str(x) for x in sub_ids]), ','.join([str(x) for x in sub_ids]),
','.join([str(x/max_user - (x%max_user == 0 and 1 or 0)) for x in sub_ids]), ','.join([str(x/max_user - (x%max_user == 0 and 1 or 0)) for x in sub_ids]),
@ -521,7 +519,6 @@ class account_analytic_account_summary_user(osv.osv):
res.extend(cr.dictfetchall()) res.extend(cr.dictfetchall())
else: else:
res = map(lambda x: {'id': x}, ids) res = map(lambda x: {'id': x}, ids)
res_trans_obj = self.pool.get('ir.translation')
for f in fields_pre: for f in fields_pre:
if self._columns[f].translate: if self._columns[f].translate:
ids = map(lambda x: x['id'], res) ids = map(lambda x: x['id'], res)
@ -579,7 +576,7 @@ class account_analytic_account_summary_month(osv.osv):
account_obj = self.pool.get('account.analytic.account') account_obj = self.pool.get('account.analytic.account')
account_ids = [int(str(int(x))[:-6]) for x in ids] account_ids = [int(str(int(x))[:-6]) for x in ids]
month_ids = [int(str(int(x))[-6:]) for x in ids] month_ids = [int(str(int(x))[-6:]) for x in ids]
parent_ids = tuple(account_obj.search(cr, uid, [('parent_id', 'child_of', account_ids)])) parent_ids = tuple(account_obj.search(cr, uid, [('parent_id', 'child_of', account_ids)], context=context))
if parent_ids: if parent_ids:
cr.execute('SELECT id, unit_amount ' \ cr.execute('SELECT id, unit_amount ' \
'FROM account_analytic_analysis_summary_month ' \ 'FROM account_analytic_analysis_summary_month ' \
@ -598,11 +595,9 @@ class account_analytic_account_summary_month(osv.osv):
return res return res
_columns = { _columns = {
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
readonly=True), 'unit_amount': fields.function(_unit_amount, method=True, type='float', string='Total Time'),
'unit_amount': fields.function(_unit_amount, method=True, type='float', 'month': fields.char('Month', size=32, readonly=True),
string='Total Time'),
'month': fields.char('Month', size=25, readonly=True),
} }
def init(self, cr): def init(self, cr):
@ -654,28 +649,27 @@ class account_analytic_account_summary_month(osv.osv):
def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'):
if not context: if not context:
context={} context = {}
if not ids: if not ids:
return [] return []
if fields==None: if fields is None:
fields = self._columns.keys() fields = self._columns.keys()
res_trans_obj = self.pool.get('ir.translation')
# construct a clause for the rules : # construct a clause for the rules :
d1, d2, tables = self.pool.get('ir.rule').domain_get(cr, user, self._name) d1, d2, tables= self.pool.get('ir.rule').domain_get(cr, user, self._name)
# all inherited fields + all non inherited fields for which the attribute whose name is in load is True # all inherited fields + all non inherited fields for which the attribute whose name is in load is True
fields_pre = filter(lambda x: x in self._columns and getattr(self._columns[x],'_classic_write'), fields) + self._inherits.values() fields_pre = filter(lambda x: x in self._columns and getattr(self._columns[x],'_classic_write'), fields) + self._inherits.values()
res = [] res = []
if len(fields_pre) : if fields_pre:
fields_pre2 = map(lambda x: (x in ('create_date', 'write_date')) and ('date_trunc(\'second\', '+x+') as '+x) or '"'+x+'"', fields_pre) fields_pre2 = map(lambda x: (x in ('create_date', 'write_date')) and ('date_trunc(\'second\', '+x+') as '+x) or '"'+x+'"', fields_pre)
for i in range(0, len(ids), cr.IN_MAX): for i in range(0, len(ids), cr.IN_MAX):
sub_ids = ids[i:i+cr.IN_MAX] sub_ids = ids[i:i+cr.IN_MAX]
if d1: if d1:
cr.execute('select %s from \"%s\" where id IN (%s) ' \ cr.execute('SELECT %s FROM \"%s\" WHERE id IN (%s) ' \
'and account_id IN (%s) ' \ 'AND account_id IN (%s) ' \
'and month_id IN (%s) and %s order by %s' % \ 'AND month_id IN (%s) AND %s ORDER BY %s' % \
(','.join(fields_pre2 + ['id']), self._table, (','.join(fields_pre2 + ['id']), self._table,
','.join([str(x) for x in sub_ids]), ','.join([str(x) for x in sub_ids]),
','.join([str(x)[:-6] for x in sub_ids]), ','.join([str(x)[:-6] for x in sub_ids]),
@ -685,9 +679,9 @@ class account_analytic_account_summary_month(osv.osv):
raise except_orm(_('AccessError'), raise except_orm(_('AccessError'),
_('You try to bypass an access rule (Document type: %s).') % self._description) _('You try to bypass an access rule (Document type: %s).') % self._description)
else: else:
cr.execute('select %s from \"%s\" where id IN (%s) ' \ cr.execute('SELECT %s FROM \"%s\" WHERE id IN (%s) ' \
'and account_id IN (%s) ' \ 'AND account_id IN (%s) ' \
'and month_id IN (%s) order by %s' % \ 'AND month_id IN (%s) ORDER BY %s' % \
(','.join(fields_pre2 + ['id']), self._table, (','.join(fields_pre2 + ['id']), self._table,
','.join([str(x) for x in sub_ids]), ','.join([str(x) for x in sub_ids]),
','.join([str(x)[:-6] for x in sub_ids]), ','.join([str(x)[:-6] for x in sub_ids]),
@ -697,7 +691,6 @@ class account_analytic_account_summary_month(osv.osv):
else: else:
res = map(lambda x: {'id': x}, ids) res = map(lambda x: {'id': x}, ids)
res_trans_obj = self.pool.get('ir.translation')
for f in fields_pre: for f in fields_pre:
if self._columns[f].translate: if self._columns[f].translate:
ids = map(lambda x: x['id'], res) ids = map(lambda x: x['id'], res)
@ -739,10 +732,8 @@ class account_analytic_account_summary_month(osv.osv):
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res) res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
for record in res: for record in res:
record[f] = res2[record['id']] record[f] = res2[record['id']]
return res return res
account_analytic_account_summary_month() account_analytic_account_summary_month()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,13 +21,13 @@
import time import time
from osv import fields,osv from osv import fields, osv
class account_analytic_default(osv.osv): class account_analytic_default(osv.osv):
_name = 'account.analytic.default' _name = "account.analytic.default"
_description = 'Analytic Distribution' _description = "Analytic Distribution"
_rec_name = 'analytic_id' _rec_name = "analytic_id"
_order = 'sequence' _order = "sequence"
_columns = { _columns = {
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of analytic distribution."), 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of analytic distribution."),
'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), 'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
@ -38,50 +38,50 @@ class account_analytic_default(osv.osv):
'date_start': fields.date('Start Date'), 'date_start': fields.date('Start Date'),
'date_stop': fields.date('End Date'), 'date_stop': fields.date('End Date'),
} }
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context=None): def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context=None):
domain = [] domain = []
if product_id: if product_id:
domain += ['|',('product_id','=',product_id)] domain += ['|', ('product_id', '=', product_id)]
domain += [('product_id','=',False)] domain += [('product_id','=', False)]
if partner_id: if partner_id:
domain += ['|',('partner_id','=',partner_id)] domain += ['|', ('partner_id', '=', partner_id)]
domain += [('partner_id','=',False)] domain += [('partner_id', '=', False)]
if user_id: if user_id:
domain += ['|',('user_id','=',user_id)] domain += ['|',('user_id', '=', user_id)]
domain += [('user_id','=',False)] domain += [('user_id','=', False)]
if date: if date:
domain += ['|',('date_start','<=',date),('date_start','=',False)] domain += ['|', ('date_start', '<=', date), ('date_start', '=', False)]
domain += ['|',('date_stop','>=',date),('date_stop','=',False)] domain += ['|', ('date_stop', '>=', date), ('date_stop', '=', False)]
best_index = -1 best_index = -1
res = False res = False
for rec in self.browse(cr, uid, self.search(cr, uid, domain, context=context), context=context): for rec in self.browse(cr, uid, self.search(cr, uid, domain, context=context), context=context):
index = 0 index = 0
if rec.product_id: index+=1 if rec.product_id: index += 1
if rec.partner_id: index+=1 if rec.partner_id: index += 1
if rec.user_id: index+=1 if rec.user_id: index += 1
if rec.date_start: index+=1 if rec.date_start: index += 1
if rec.date_stop: index+=1 if rec.date_stop: index += 1
if index>best_index: if index > best_index:
res = rec res = rec
best_index = index best_index = index
return res return res
account_analytic_default() account_analytic_default()
class account_invoice_line(osv.osv): class account_invoice_line(osv.osv):
_inherit = 'account.invoice.line' _inherit = "account.invoice.line"
_description = 'Invoice Line' _description = "Invoice Line"
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context) res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context) rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
if rec: if rec:
res_prod['value'].update({'account_analytic_id':rec.analytic_id.id}) res_prod['value'].update({'account_analytic_id': rec.analytic_id.id})
else: else:
res_prod['value'].update({'account_analytic_id':False}) res_prod['value'].update({'account_analytic_id': False})
return res_prod return res_prod
account_invoice_line() account_invoice_line()
@ -95,28 +95,27 @@ class stock_picking(osv.osv):
if rec: if rec:
return rec.analytic_id.id return rec.analytic_id.id
return super(stock_picking, self)._get_account_analytic_invoice(cursor, return super(stock_picking, self)._get_account_analytic_invoice(cursor, user, picking, move_line)
user, picking, move_line)
stock_picking() stock_picking()
class sale_order_line(osv.osv): class sale_order_line(osv.osv):
_inherit = 'sale.order.line' _inherit = "sale.order.line"
# Method overridden to set the analytic account by default on criterion match # Method overridden to set the analytic account by default on criterion match
def invoice_line_create(self, cr, uid, ids, context=None): def invoice_line_create(self, cr, uid, ids, context=None):
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context) create_ids = super(sale_order_line, self).invoice_line_create(cr, uid, ids, context=context)
if not ids: if not ids:
return create_ids return create_ids
sale_line = self.browse(cr, uid, ids[0], context) sale_line = self.browse(cr, uid, ids[0], context=context)
inv_line_obj = self.pool.get('account.invoice.line') inv_line_obj = self.pool.get('account.invoice.line')
anal_def_obj = self.pool.get('account.analytic.default') anal_def_obj = self.pool.get('account.analytic.default')
for line in inv_line_obj.browse(cr, uid, create_ids, context): for line in inv_line_obj.browse(cr, uid, create_ids, context=context):
rec = anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, sale_line.order_id.user_id.id, time.strftime('%Y-%m-%d'), context) rec = anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, sale_line.order_id.user_id.id, time.strftime('%Y-%m-%d'), context=context)
if rec: if rec:
inv_line_obj.write(cr, uid, [line.id], {'account_analytic_id':rec.analytic_id.id}, context=context) inv_line_obj.write(cr, uid, [line.id], {'account_analytic_id': rec.analytic_id.id}, context=context)
return create_ids return create_ids
sale_order_line() sale_order_line()

View File

@ -48,7 +48,7 @@
<field name="product_id"/> <field name="product_id"/>
<field name="partner_id"/> <field name="partner_id"/>
<field name="user_id"/> <field name="user_id"/>
<field name="company_id"/> <field name="company_id" widget="selection" groups="base.group_multi_company"/>
</search> </search>
</field> </field>
</record> </record>

View File

@ -18,8 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
from lxml import etree
import time import time
from lxml import etree
from osv import fields, osv from osv import fields, osv
import tools import tools
@ -34,10 +35,10 @@ class one2many_mod2(fields.one2many):
res[id] = [] res[id] = []
ids2 = None ids2 = None
if 'journal_id' in context: if 'journal_id' in context:
journal = obj.pool.get('account.journal').browse(cr, user, context['journal_id'], context) journal = obj.pool.get('account.journal').browse(cr, user, context['journal_id'], context=context)
pnum = int(name[7]) -1 pnum = int(name[7]) -1
plan = journal.plan_id plan = journal.plan_id
if plan and len(plan.plan_ids)>pnum: if plan and len(plan.plan_ids) > pnum:
acc_id = plan.plan_ids[pnum].root_analytic_id.id acc_id = plan.plan_ids[pnum].root_analytic_id.id
ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id,'in',ids),('analytic_account_id','child_of',[acc_id])], limit=self._limit) ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id,'in',ids),('analytic_account_id','child_of',[acc_id])], limit=self._limit)
if ids2 is None: if ids2 is None:
@ -50,8 +51,8 @@ class account_analytic_plan(osv.osv):
_name = "account.analytic.plan" _name = "account.analytic.plan"
_description = "Analytic Plan" _description = "Analytic Plan"
_columns = { _columns = {
'name': fields.char('Analytic Plan', size=64, required=True, select=True,), 'name': fields.char('Analytic Plan', size=64, required=True, select=True),
'plan_ids': fields.one2many('account.analytic.plan.line','plan_id','Analytic Plans'), 'plan_ids': fields.one2many('account.analytic.plan.line', 'plan_id', 'Analytic Plans'),
} }
account_analytic_plan() account_analytic_plan()
@ -61,10 +62,10 @@ class account_analytic_plan_line(osv.osv):
_description = "Analytic Plan Line" _description = "Analytic Plan Line"
_order = "sequence, id" _order = "sequence, id"
_columns = { _columns = {
'plan_id':fields.many2one('account.analytic.plan','Analytic Plan'), 'plan_id': fields.many2one('account.analytic.plan','Analytic Plan'),
'name': fields.char('Plan Name', size=64, required=True, select=True), 'name': fields.char('Plan Name', size=64, required=True, select=True),
'sequence':fields.integer('Sequence'), 'sequence': fields.integer('Sequence'),
'root_analytic_id': fields.many2one('account.analytic.account','Root Account',help="Root account of this plan.",required=False), 'root_analytic_id': fields.many2one('account.analytic.account', 'Root Account', help="Root account of this plan.", required=False),
'min_required': fields.float('Minimum Allowed (%)'), 'min_required': fields.float('Minimum Allowed (%)'),
'max_required': fields.float('Maximum Allowed (%)'), 'max_required': fields.float('Maximum Allowed (%)'),
} }
@ -76,27 +77,28 @@ class account_analytic_plan_line(osv.osv):
account_analytic_plan_line() account_analytic_plan_line()
class account_analytic_plan_instance(osv.osv): class account_analytic_plan_instance(osv.osv):
_name = 'account.analytic.plan.instance' _name = "account.analytic.plan.instance"
_description = 'Analytic Plan Instance' _description = "Analytic Plan Instance"
_columns = { _columns = {
'name':fields.char('Analytic Distribution', size=64), 'name': fields.char('Analytic Distribution', size=64),
'code':fields.char('Distribution Code', size=16), 'code': fields.char('Distribution Code', size=16),
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal' ), 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal' ),
'account_ids':fields.one2many('account.analytic.plan.instance.line', 'plan_id', 'Account Id'), 'account_ids': fields.one2many('account.analytic.plan.instance.line', 'plan_id', 'Account Id'),
'account1_ids':one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account1 Id'), 'account1_ids': one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account1 Id'),
'account2_ids':one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account2 Id'), 'account2_ids': one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account2 Id'),
'account3_ids':one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account3 Id'), 'account3_ids': one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account3 Id'),
'account4_ids':one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account4 Id'), 'account4_ids': one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account4 Id'),
'account5_ids':one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account5 Id'), 'account5_ids': one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account5 Id'),
'account6_ids':one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account6 Id'), 'account6_ids': one2many_mod2('account.analytic.plan.instance.line', 'plan_id', 'Account6 Id'),
'plan_id':fields.many2one('account.analytic.plan', "Model's Plan"), 'plan_id': fields.many2one('account.analytic.plan', "Model's Plan"),
} }
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
if context is None: if context is None:
context = {} context = {}
journal_obj = self.pool.get('account.journal')
if context.get('journal_id', False): if context.get('journal_id', False):
journal = self.pool.get('account.journal').browse(cr, user, [context['journal_id']], context=context)[0] journal = journal_obj.browse(cr, user, [context['journal_id']], context=context)[0]
analytic_journal = journal.analytic_journal_id and journal.analytic_journal_id.id or False analytic_journal = journal.analytic_journal_id and journal.analytic_journal_id.id or False
args.append('|') args.append('|')
args.append(('journal_id', '=', analytic_journal)) args.append(('journal_id', '=', analytic_journal))
@ -108,15 +110,16 @@ class account_analytic_plan_instance(osv.osv):
def copy(self, cr, uid, id, default=None, context=None): def copy(self, cr, uid, id, default=None, context=None):
if not default: if not default:
default = {} default = {}
default.update({'account1_ids':False, 'account2_ids':False, 'account3_ids':False, default.update({'account1_ids':False, 'account2_ids':False, 'account3_ids':False,
'account4_ids':False, 'account5_ids':False, 'account6_ids':False}) 'account4_ids':False, 'account5_ids':False, 'account6_ids':False})
return super(account_analytic_plan_instance, self).copy(cr, uid, id, default, context) return super(account_analytic_plan_instance, self).copy(cr, uid, id, default, context=context)
def _default_journal(self, cr, uid, context=None): def _default_journal(self, cr, uid, context=None):
if not context: if not context:
context = {} context = {}
journal_obj = self.pool.get('account.journal')
if context.has_key('journal_id') and context['journal_id']: if context.has_key('journal_id') and context['journal_id']:
journal = self.pool.get('account.journal').browse(cr, uid, context['journal_id']) journal = journal_obj.browse(cr, uid, context['journal_id'], context=context)
if journal.analytic_journal_id: if journal.analytic_journal_id:
return journal.analytic_journal_id.id return journal.analytic_journal_id.id
return False return False
@ -127,7 +130,7 @@ class account_analytic_plan_instance(osv.osv):
} }
def name_get(self, cr, uid, ids, context=None): def name_get(self, cr, uid, ids, context=None):
res = [] res = []
for inst in self.browse(cr, uid, ids, context): for inst in self.browse(cr, uid, ids, context=context):
name = inst.name or '/' name = inst.name or '/'
if name and inst.code: if name and inst.code:
name=name+' ('+inst.code+')' name=name+' ('+inst.code+')'
@ -135,7 +138,7 @@ class account_analytic_plan_instance(osv.osv):
return res return res
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100): def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
args= args or [] args = args or []
if name: if name:
ids = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context or {}) ids = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context or {})
if not ids: if not ids:
@ -145,15 +148,16 @@ class account_analytic_plan_instance(osv.osv):
return self.name_get(cr, uid, ids, context or {}) return self.name_get(cr, uid, ids, context or {})
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
wiz_id = self.pool.get('ir.actions.act_window').search(cr, uid, [("name","=","analytic.plan.create.model.action")]) wiz_id = self.pool.get('ir.actions.act_window').search(cr, uid, [("name","=","analytic.plan.create.model.action")], context=context)
res = super(account_analytic_plan_instance,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) res = super(account_analytic_plan_instance,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
journal_obj = self.pool.get('account.journal')
analytic_plan_obj = self.pool.get('account.analytic.plan')
if (res['type']=='form'): if (res['type']=='form'):
plan_id = False plan_id = False
if context.get('journal_id',False): if context.get('journal_id', False):
plan_id = self.pool.get('account.journal').browse(cr, uid, int(context['journal_id']), context).plan_id plan_id = journal_obj.browse(cr, uid, int(context['journal_id']), context=context).plan_id
elif context.get('plan_id',False): elif context.get('plan_id', False):
plan_id = self.pool.get('account.analytic.plan').browse(cr, uid, int(context['plan_id']), context) plan_id = analytic_plan_obj.browse(cr, uid, int(context['plan_id']), context=context)
if plan_id: if plan_id:
i=1 i=1
@ -183,40 +187,43 @@ class account_analytic_plan_instance(osv.osv):
return res return res
def create(self, cr, uid, vals, context=None): def create(self, cr, uid, vals, context=None):
journal_obj = self.pool.get('account.journal')
ana_plan_instance_obj = self.pool.get('account.analytic.plan.instance')
acct_anal_acct = self.pool.get('account.analytic.account')
acct_anal_plan_line_obj = self.pool.get('account.analytic.plan.line')
if context and 'journal_id' in context: if context and 'journal_id' in context:
journal= self.pool.get('account.journal').browse(cr, uid, context['journal_id']) journal = journal_obj.browse(cr, uid, context['journal_id'], context=context)
pids = self.pool.get('account.analytic.plan.instance').search(cr, uid, [('name','=',vals['name']),('code','=',vals['code']),('plan_id','<>',False)]) pids = ana_plan_instance_obj.search(cr, uid, [('name','=',vals['name']), ('code','=',vals['code']), ('plan_id','<>',False)], context=context)
if pids: if pids:
raise osv.except_osv(_('Error'), _('A model having this name and code already exists !')) raise osv.except_osv(_('Error'), _('A model having this name and code already exists !'))
acct_anal_acct = self.pool.get('account.analytic.account') res = acct_anal_plan_line_obj.search(cr, uid, [('plan_id','=',journal.plan_id.id)], context=context)
acct_anal_plan_line_obj = self.pool.get('account.analytic.plan.line')
res = acct_anal_plan_line_obj.search(cr, uid, [('plan_id','=',journal.plan_id.id)])
for i in res: for i in res:
total_per_plan = 0 total_per_plan = 0
item = acct_anal_plan_line_obj.browse(cr, uid, i) item = acct_anal_plan_line_obj.browse(cr, uid, i, context=context)
temp_list=['account1_ids','account2_ids','account3_ids','account4_ids','account5_ids','account6_ids'] temp_list = ['account1_ids','account2_ids','account3_ids','account4_ids','account5_ids','account6_ids']
for l in temp_list: for l in temp_list:
if vals.has_key(l): if vals.has_key(l):
for tempo in vals[l]: for tempo in vals[l]:
if acct_anal_acct.search(cr, uid, [('parent_id','child_of',[item.root_analytic_id.id]),('id','=',tempo[2]['analytic_account_id'])]): if acct_anal_acct.search(cr, uid, [('parent_id', 'child_of', [item.root_analytic_id.id]), ('id', '=', tempo[2]['analytic_account_id'])], context=context):
total_per_plan += tempo[2]['rate'] total_per_plan += tempo[2]['rate']
if total_per_plan < item.min_required or total_per_plan > item.max_required: if total_per_plan < item.min_required or total_per_plan > item.max_required:
raise osv.except_osv(_('Value Error') ,_('The Total Should be Between %s and %s') % (str(item.min_required), str(item.max_required))) raise osv.except_osv(_('Value Error'),_('The Total Should be Between %s and %s') % (str(item.min_required), str(item.max_required)))
return super(account_analytic_plan_instance, self).create(cr, uid, vals, context) return super(account_analytic_plan_instance, self).create(cr, uid, vals, context=context)
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
this = self.browse(cr, uid, ids[0]) this = self.browse(cr, uid, ids[0], context=context)
invoice_line_obj = self.pool.get('account.invoice.line')
if this.plan_id and not vals.has_key('plan_id'): if this.plan_id and not vals.has_key('plan_id'):
#this instance is a model, so we have to create a new plan instance instead of modifying it #this instance is a model, so we have to create a new plan instance instead of modifying it
#copy the existing model #copy the existing model
temp_id = self.copy(cr, uid, this.id, None, context) temp_id = self.copy(cr, uid, this.id, None, context=context)
#get the list of the invoice line that were linked to the model #get the list of the invoice line that were linked to the model
list = self.pool.get('account.invoice.line').search(cr, uid, [('analytics_id','=',this.id)]) lists = invoice_line_obj.search(cr, uid, [('analytics_id','=',this.id)], context=context)
#make them link to the copy #make them link to the copy
self.pool.get('account.invoice.line').write(cr, uid, list, {'analytics_id':temp_id}, context) invoice_line_obj.write(cr, uid, lists, {'analytics_id':temp_id}, context=context)
#and finally modify the old model to be not a model anymore #and finally modify the old model to be not a model anymore
vals['plan_id'] = False vals['plan_id'] = False
@ -224,25 +231,25 @@ class account_analytic_plan_instance(osv.osv):
vals['name'] = this.name and (str(this.name)+'*') or "*" vals['name'] = this.name and (str(this.name)+'*') or "*"
if not vals.has_key('code'): if not vals.has_key('code'):
vals['code'] = this.code and (str(this.code)+'*') or "*" vals['code'] = this.code and (str(this.code)+'*') or "*"
return super(account_analytic_plan_instance, self).write(cr, uid, ids, vals, context) return super(account_analytic_plan_instance, self).write(cr, uid, ids, vals, context=context)
account_analytic_plan_instance() account_analytic_plan_instance()
class account_analytic_plan_instance_line(osv.osv): class account_analytic_plan_instance_line(osv.osv):
_name='account.analytic.plan.instance.line' _name = "account.analytic.plan.instance.line"
_description = 'Analytic Instance Line' _description = "Analytic Instance Line"
_columns={ _columns = {
'plan_id':fields.many2one('account.analytic.plan.instance', 'Plan Id'), 'plan_id': fields.many2one('account.analytic.plan.instance', 'Plan Id'),
'analytic_account_id':fields.many2one('account.analytic.account', 'Analytic Account', required=True), 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True),
'rate':fields.float('Rate (%)', required=True), 'rate': fields.float('Rate (%)', required=True),
} }
_defaults = { _defaults = {
'rate': 100.0 'rate': 100.0
} }
def name_get(self, cr, uid, ids, context=None): def name_get(self, cr, uid, ids, context=None):
if not len(ids): if not ids:
return [] return []
reads = self.read(cr, uid, ids, ['analytic_account_id'], context) reads = self.read(cr, uid, ids, ['analytic_account_id'], context=context)
res = [] res = []
for record in reads: for record in reads:
res.append((record['id'], record['analytic_account_id'])) res.append((record['id'], record['analytic_account_id']))
@ -251,44 +258,44 @@ class account_analytic_plan_instance_line(osv.osv):
account_analytic_plan_instance_line() account_analytic_plan_instance_line()
class account_journal(osv.osv): class account_journal(osv.osv):
_inherit='account.journal' _inherit = "account.journal"
_name='account.journal' _name = "account.journal"
_columns = { _columns = {
'plan_id':fields.many2one('account.analytic.plan', 'Analytic Plans'), 'plan_id': fields.many2one('account.analytic.plan', 'Analytic Plans'),
} }
account_journal() account_journal()
class account_invoice_line(osv.osv): class account_invoice_line(osv.osv):
_inherit='account.invoice.line' _inherit = "account.invoice.line"
_name='account.invoice.line' _name = "account.invoice.line"
_columns = { _columns = {
'analytics_id':fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'), 'analytics_id': fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'),
} }
def create(self, cr, uid, vals, context=None): def create(self, cr, uid, vals, context=None):
if 'analytics_id' in vals and isinstance(vals['analytics_id'],tuple): if 'analytics_id' in vals and isinstance(vals['analytics_id'], tuple):
vals['analytics_id'] = vals['analytics_id'][0] vals['analytics_id'] = vals['analytics_id'][0]
return super(account_invoice_line, self).create(cr, uid, vals, context) return super(account_invoice_line, self).create(cr, uid, vals, context=context)
def move_line_get_item(self, cr, uid, line, context=None): def move_line_get_item(self, cr, uid, line, context=None):
res= super(account_invoice_line,self).move_line_get_item(cr, uid, line, context={}) res = super(account_invoice_line, self).move_line_get_item(cr, uid, line, context=context)
res ['analytics_id']=line.analytics_id and line.analytics_id.id or False res ['analytics_id'] = line.analytics_id and line.analytics_id.id or False
return res return res
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context) res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context) rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
if rec and rec.analytics_id: if rec and rec.analytics_id:
res_prod['value'].update({'analytics_id':rec.analytics_id.id}) res_prod['value'].update({'analytics_id': rec.analytics_id.id})
return res_prod return res_prod
account_invoice_line() account_invoice_line()
class account_move_line(osv.osv): class account_move_line(osv.osv):
_inherit='account.move.line' _inherit = "account.move.line"
_name='account.move.line' _name = "account.move.line"
_columns = { _columns = {
'analytics_id':fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'), 'analytics_id':fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'),
} }
@ -300,9 +307,9 @@ class account_move_line(osv.osv):
return data return data
def create_analytic_lines(self, cr, uid, ids, context=None): def create_analytic_lines(self, cr, uid, ids, context=None):
super(account_move_line, self).create_analytic_lines(cr, uid, ids, context) super(account_move_line, self).create_analytic_lines(cr, uid, ids, context=context)
analytic_line_obj = self.pool.get('account.analytic.line') analytic_line_obj = self.pool.get('account.analytic.line')
for line in self.browse(cr, uid, ids, context): for line in self.browse(cr, uid, ids, context=context):
if line.analytics_id: if line.analytics_id:
if not line.journal_id.analytic_journal_id: if not line.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (line.journal_id.name,)) raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (line.journal_id.name,))
@ -333,24 +340,25 @@ account_move_line()
class account_invoice(osv.osv): class account_invoice(osv.osv):
_name = "account.invoice" _name = "account.invoice"
_inherit="account.invoice" _inherit = "account.invoice"
def line_get_convert(self, cr, uid, x, part, date, context=None): def line_get_convert(self, cr, uid, x, part, date, context=None):
res=super(account_invoice,self).line_get_convert(cr, uid, x, part, date, context) res=super(account_invoice,self).line_get_convert(cr, uid, x, part, date, context=context)
res['analytics_id']=x.get('analytics_id',False) res['analytics_id'] = x.get('analytics_id', False)
return res return res
def _get_analytic_lines(self, cr, uid, id): def _get_analytic_lines(self, cr, uid, id):
inv = self.browse(cr, uid, [id])[0] inv = self.browse(cr, uid, [id])[0]
cur_obj = self.pool.get('res.currency') cur_obj = self.pool.get('res.currency')
invoice_line_obj = self.pool.get('account.invoice.line')
acct_ins_obj = self.pool.get('account.analytic.plan.instance')
company_currency = inv.company_id.currency_id.id company_currency = inv.company_id.currency_id.id
if inv.type in ('out_invoice', 'in_refund'): if inv.type in ('out_invoice', 'in_refund'):
sign = 1 sign = 1
else: else:
sign = -1 sign = -1
iml = self.pool.get('account.invoice.line').move_line_get(cr, uid, inv.id) iml = invoice_line_obj.move_line_get(cr, uid, inv.id)
acct_ins_obj = self.pool.get('account.analytic.plan.instance')
for il in iml: for il in iml:
if il.get('analytics_id', False): if il.get('analytics_id', False):
@ -369,8 +377,8 @@ class account_invoice(osv.osv):
al_vals = { al_vals = {
'name': il['name'], 'name': il['name'],
'date': inv['date_invoice'], 'date': inv['date_invoice'],
'unit_amount':qtty, 'unit_amount': qtty,
'product_id':il['product_id'], 'product_id': il['product_id'],
'account_id': line2.analytic_account_id.id, 'account_id': line2.analytic_account_id.id,
'amount': amt, 'amount': amt,
'product_uom_id': il['uos_id'], 'product_uom_id': il['uos_id'],
@ -378,7 +386,7 @@ class account_invoice(osv.osv):
'journal_id': self._get_journal_analytic(cr, uid, inv.type), 'journal_id': self._get_journal_analytic(cr, uid, inv.type),
'ref': ref, 'ref': ref,
} }
il['analytic_lines'].append((0,0,al_vals)) il['analytic_lines'].append((0, 0, al_vals))
return iml return iml
account_invoice() account_invoice()
@ -391,7 +399,7 @@ class account_analytic_plan(osv.osv):
account_analytic_plan() account_analytic_plan()
class analytic_default(osv.osv): class analytic_default(osv.osv):
_inherit = 'account.analytic.default' _inherit = "account.analytic.default"
_columns = { _columns = {
'analytics_id': fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'), 'analytics_id': fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'),
} }
@ -399,21 +407,20 @@ class analytic_default(osv.osv):
analytic_default() analytic_default()
class sale_order_line(osv.osv): class sale_order_line(osv.osv):
_inherit = 'sale.order.line' _inherit = "sale.order.line"
# Method overridden to set the analytic account by default on criterion match # Method overridden to set the analytic account by default on criterion match
def invoice_line_create(self, cr, uid, ids, context=None): def invoice_line_create(self, cr, uid, ids, context=None):
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context) create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context=context)
inv_line_obj = self.pool.get('account.invoice.line')
acct_anal_def_obj = self.pool.get('account.analytic.default')
if ids: if ids:
sale_line = self.browse(cr, uid, ids[0], context) sale_line = self.browse(cr, uid, ids[0], context=context)
inv_line_obj = self.pool.get('account.invoice.line') for line in inv_line_obj.browse(cr, uid, create_ids, context=context):
acct_anal_def_obj = self.pool.get('account.analytic.default')
for line in inv_line_obj.browse(cr, uid, create_ids, context):
rec = acct_anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context) rec = acct_anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context)
if rec: if rec:
inv_line_obj.write(cr, uid, [line.id], {'analytics_id':rec.analytics_id.id}, context=context) inv_line_obj.write(cr, uid, [line.id], {'analytics_id': rec.analytics_id.id}, context=context)
return create_ids return create_ids
sale_order_line() sale_order_line()

View File

@ -29,8 +29,8 @@ class crossovered_analytic(report_sxw.rml_parse):
self.localcontext.update( { self.localcontext.update( {
'time': time, 'time': time,
'lines': self._lines, 'lines': self._lines,
'ref_lines' : self._ref_lines, 'ref_lines': self._ref_lines,
'find_children':self.find_children, 'find_children': self.find_children,
}) })
self.base_amount = 0.00 self.base_amount = 0.00
@ -39,11 +39,12 @@ class crossovered_analytic(report_sxw.rml_parse):
final_list = [] final_list = []
parent_list = [] parent_list = []
set_list = [] set_list = []
analytic_obj = self.pool.get('account.analytic.account')
for id in ref_ids: for id in ref_ids:
# to avoid duplicate entries # to avoid duplicate entries
if id not in to_return_ids: if id not in to_return_ids:
to_return_ids.append(self.pool.get('account.analytic.account').search(self.cr,self.uid,[('parent_id','child_of',[id])])) to_return_ids.append(analytic_obj.search(self.cr,self.uid,[('parent_id','child_of',[id])]))
data_accnt = self.pool.get('account.analytic.account').browse(self.cr,self.uid,to_return_ids[0]) data_accnt = analytic_obj.browse(self.cr,self.uid,to_return_ids[0])
for data in data_accnt: for data in data_accnt:
if data.parent_id and data.parent_id.id == ref_ids[0]: if data.parent_id and data.parent_id.id == ref_ids[0]:
parent_list.append(data.id) parent_list.append(data.id)
@ -54,7 +55,7 @@ class crossovered_analytic(report_sxw.rml_parse):
def set_account(self,cats): def set_account(self,cats):
lst = [] lst = []
category = self.pool.get('account.analytic.account').read(self.cr,self.uid,cats) category = self.pool.get('account.analytic.account').read(self.cr, self.uid, cats)
for cat in category: for cat in category:
lst.append(cat['id']) lst.append(cat['id'])
if cat['child_ids']: if cat['child_ids']:
@ -75,44 +76,44 @@ class crossovered_analytic(report_sxw.rml_parse):
else: else:
journal = 'is not null' journal = 'is not null'
query_general = "select id from account_analytic_line where (journal_id " + journal +") AND date>='"+ str(form['date1']) +"'"" AND date<='" + str(form['date2']) + "'" query_general = "SELECT id FROM account_analytic_line WHERE (journal_id " + journal +") AND date>='"+ str(form['date1']) +"'"" AND date<='" + str(form['date2']) + "'"
self.cr.execute(query_general) self.cr.execute(query_general)
l_ids=self.cr.fetchall() l_ids = self.cr.fetchall()
line_ids = [x[0] for x in l_ids] line_ids = [x[0] for x in l_ids]
obj_line = line_pool.browse(self.cr,self.uid,line_ids) obj_line = line_pool.browse(self.cr,self.uid,line_ids)
#this structure will be usefull for easily knowing the account_analytic_line that are related to the reference account. At this purpose, we save the move_id of analytic lines. #this structure will be usefull for easily knowing the account_analytic_line that are related to the reference account. At this purpose, we save the move_id of analytic lines.
self.dict_acc_ref[form['ref']] = [] self.dict_acc_ref[form['ref']] = []
children_list = self.pool.get('account.analytic.account').search(self.cr,self.uid,[('parent_id','child_of',[form['ref']])]) children_list = acc_pool.search(self.cr, self.uid, [('parent_id', 'child_of', [form['ref']])])
for obj in obj_line: for obj in obj_line:
if obj.account_id.id in children_list: if obj.account_id.id in children_list:
if obj.move_id and obj.move_id.id not in self.dict_acc_ref[form['ref']]: if obj.move_id and obj.move_id.id not in self.dict_acc_ref[form['ref']]:
self.dict_acc_ref[form['ref']].append(obj.move_id.id) self.dict_acc_ref[form['ref']].append(obj.move_id.id)
res['ref_name'] = acc_pool.name_get(self.cr,self.uid,[form['ref']])[0][1] res['ref_name'] = acc_pool.name_get(self.cr, self.uid, [form['ref']])[0][1]
res['ref_code'] = acc_pool.browse(self.cr,self.uid,form['ref']).code res['ref_code'] = acc_pool.browse(self.cr, self.uid, form['ref']).code
self.final_list = children_list self.final_list = children_list
selected_ids = line_pool.search(self.cr,self.uid,[('account_id','in',self.final_list)]) selected_ids = line_pool.search(self.cr, self.uid, [('account_id', 'in' ,self.final_list)])
if selected_ids: if selected_ids:
query="SELECT sum(aal.amount) AS amt, sum(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \ query = "SELECT SUM(aal.amount) AS amt, SUM(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \
WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'" WHERE aal.account_id = aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'"
self.cr.execute(query) self.cr.execute(query)
info=self.cr.dictfetchall() info=self.cr.dictfetchall()
res['ref_qty']=info[0]['qty'] res['ref_qty'] = info[0]['qty']
res['ref_amt']=info[0]['amt'] res['ref_amt'] = info[0]['amt']
self.base_amount= info[0]['amt'] self.base_amount = info[0]['amt']
res['ref_qty']=0.0 res['ref_qty'] = 0.0
res['ref_amt']=0.0 res['ref_amt'] = 0.0
self.base_amount= 0.0 self.base_amount = 0.0
result.append(res) result.append(res)
return result return result
def _lines(self,form,ids={}): def _lines(self, form, ids={}):
if not ids: if not ids:
ids = self.ids ids = self.ids
@ -122,43 +123,43 @@ class crossovered_analytic(report_sxw.rml_parse):
journal= 'is not null' journal= 'is not null'
acc_pool = self.pool.get('account.analytic.account') acc_pool = self.pool.get('account.analytic.account')
line_pool=self.pool.get('account.analytic.line') line_pool = self.pool.get('account.analytic.line')
acc_id=[] acc_id = []
final=[] final = []
child_ids=[] child_ids = []
self.list_ids=[] self.list_ids = []
self.final_list = self.find_children(ids) self.final_list = self.find_children(ids)
for acc_id in self.final_list: for acc_id in self.final_list:
selected_ids = line_pool.search(self.cr,self.uid,[('account_id','=',acc_id),('move_id','in',self.dict_acc_ref[form['ref']])]) selected_ids = line_pool.search(self.cr, self.uid, [('account_id','=',acc_id), ('move_id', 'in', self.dict_acc_ref[form['ref']])])
if selected_ids: if selected_ids:
query="SELECT aaa.code as code , sum(aal.amount) AS amt, sum(aal.unit_amount) AS qty,aaa.name as acc_name,aal.account_id as id FROM account_analytic_line AS aal, account_analytic_account AS aaa \ query="SELECT aaa.code AS code, SUM(aal.amount) AS amt, SUM(aal.unit_amount) AS qty, aaa.name AS acc_name, aal.account_id AS id FROM account_analytic_line AS aal, account_analytic_account AS aaa \
WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'"" GROUP BY aal.account_id,aaa.name,aaa.code ORDER BY aal.account_id" WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'"" GROUP BY aal.account_id,aaa.name,aaa.code ORDER BY aal.account_id"
self.cr.execute(query) self.cr.execute(query)
res = self.cr.dictfetchall() res = self.cr.dictfetchall()
if res: if res:
for element in res: for element in res:
if self.base_amount<>0.00: if self.base_amount <> 0.00:
element['perc']= (element['amt'] / self.base_amount) * 100.00 element['perc'] = (element['amt'] / self.base_amount) * 100.00
else: else:
element['perc']=0.00 element['perc'] = 0.00
else: else:
result={} result = {}
res=[] res = []
result['id']=acc_id result['id'] = acc_id
data_account = acc_pool.browse(self.cr,self.uid,acc_id) data_account = acc_pool.browse(self.cr, self.uid, acc_id)
result['acc_name']=data_account.name result['acc_name'] = data_account.name
result['code'] = data_account.code result['code'] = data_account.code
result['amt']=result['qty']=result['perc']=0.00 result['amt'] = result['qty'] = result['perc'] = 0.00
if not form['empty_line']: if not form['empty_line']:
res.append(result) res.append(result)
else: else:
result = {} result = {}
res = [] res = []
result['id'] = acc_id result['id'] = acc_id
data_account = acc_pool.browse(self.cr,self.uid,acc_id) data_account = acc_pool.browse(self.cr, self.uid, acc_id)
result['acc_name'] = data_account.name result['acc_name'] = data_account.name
result['code'] = data_account.code result['code'] = data_account.code
result['amt'] = result['qty'] = result['perc'] = 0.00 result['amt'] = result['qty'] = result['perc'] = 0.00

View File

@ -18,37 +18,38 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import time import time
from osv import osv, fields from osv import osv, fields
from tools.translate import _ from tools.translate import _
class account_crossovered_analytic(osv.osv_memory): class account_crossovered_analytic(osv.osv_memory):
_name = 'account.crossovered.analytic' _name = "account.crossovered.analytic"
_description = 'Print Crossovered Analytic' _description = "Print Crossovered Analytic"
_columns = { _columns = {
'date1': fields.date('Start Date', required=True), 'date1': fields.date('Start Date', required=True),
'date2': fields.date('End Date', required=True), 'date2': fields.date('End Date', required=True),
'journal_ids': fields.many2many('account.analytic.journal', 'crossovered_journal_rel', 'crossover_id', 'journal_id', 'Analytic Journal'), 'journal_ids': fields.many2many('account.analytic.journal', 'crossovered_journal_rel', 'crossover_id', 'journal_id', 'Analytic Journal'),
'ref': fields.many2one('account.analytic.account', 'Analytic Account Reference', required=False), 'ref': fields.many2one('account.analytic.account', 'Analytic Account Reference', required=False),
'empty_line': fields.boolean('Dont show empty lines'), 'empty_line': fields.boolean('Dont show empty lines'),
} }
_defaults = { _defaults = {
'date1': lambda *a: time.strftime('%Y-01-01'), 'date1': time.strftime('%Y-01-01'),
'date2': lambda *a: time.strftime('%Y-%m-%d'), 'date2': time.strftime('%Y-%m-%d'),
} }
def print_report(self, cr, uid, ids, context=None): def print_report(self, cr, uid, ids, context=None):
cr.execute('select account_id from account_analytic_line') cr.execute('SELECT account_id FROM account_analytic_line')
res = cr.fetchall() res = cr.fetchall()
acc_ids = [x[0] for x in res] acc_ids = [x[0] for x in res]
data = self.read(cr, uid, ids, [], context=context)[0] data = self.read(cr, uid, ids, [], context=context)[0]
obj_acc = self.pool.get('account.analytic.account').browse(cr, uid, data['ref']) obj_acc = self.pool.get('account.analytic.account').browse(cr, uid, data['ref'], context=context)
name = obj_acc.name name = obj_acc.name
account_ids = self.pool.get('account.analytic.account').search(cr, uid, [('parent_id', 'child_of', [data['ref']])]) account_ids = self.pool.get('account.analytic.account').search(cr, uid, [('parent_id', 'child_of', [data['ref']])], context=context)
flag = True flag = True
for acc in account_ids: for acc in account_ids:
@ -62,12 +63,12 @@ class account_crossovered_analytic(osv.osv_memory):
'ids': [], 'ids': [],
'model': 'account.analytic.account', 'model': 'account.analytic.account',
'form': data 'form': data
} }
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.analytic.account.crossovered.analytic', 'report_name': 'account.analytic.account.crossovered.analytic',
'datas': datas, 'datas': datas,
} }
account_crossovered_analytic() account_crossovered_analytic()

View File

@ -18,24 +18,26 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
from osv import osv from osv import osv
from tools.translate import _ from tools.translate import _
class analytic_plan_create_model(osv.osv_memory): class analytic_plan_create_model(osv.osv_memory):
_name = 'analytic.plan.create.model' _name = "analytic.plan.create.model"
_description = 'analytic.plan.create.model' _description = "analytic.plan.create.model"
def activate(self, cr, uid, ids, context=None): def activate(self, cr, uid, ids, context=None):
plan_obj = self.pool.get('account.analytic.plan.instance') plan_obj = self.pool.get('account.analytic.plan.instance')
mod_obj = self.pool.get('ir.model.data') mod_obj = self.pool.get('ir.model.data')
anlytic_plan_obj = self.pool.get('account.analytic.plan')
if 'active_id' in context and context['active_id']: if 'active_id' in context and context['active_id']:
plan = plan_obj.browse(cr, uid, context['active_id'], context=context) plan = plan_obj.browse(cr, uid, context['active_id'], context=context)
if (not plan.name) or (not plan.code): if (not plan.name) or (not plan.code):
raise osv.except_osv(_('Error'), _('Please put a name and a code before saving the model !')) raise osv.except_osv(_('Error'), _('Please put a name and a code before saving the model !'))
pids = self.pool.get('account.analytic.plan').search(cr, uid, [], context=context) pids = anlytic_plan_obj.search(cr, uid, [], context=context)
if (not pids): if not pids:
raise osv.except_osv(_('Error'), _('No analytic plan defined !')) raise osv.except_osv(_('Error'), _('No analytic plan defined !'))
plan_obj.write(cr, uid, [context['active_id']], {'plan_id':pids[0]}) plan_obj.write(cr, uid, [context['active_id']], {'plan_id':pids[0]}, context=context)
model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'),('name', '=', 'view_analytic_plan_create_model')], context=context) model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'),('name', '=', 'view_analytic_plan_create_model')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']

View File

@ -128,16 +128,16 @@
<para style="terp_tblheader_Details">Description</para> <para style="terp_tblheader_Details">Description</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Theoretical Amount </para> <para style="terp_tblheader_General_Right">Theoretical Amt </para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Planned Amount</para> <para style="terp_tblheader_General_Right">Planned Amt</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Practical Amount</para> <para style="terp_tblheader_General_Right">Practical Amt</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Perc(%)</para> <para style="terp_tblheader_General_Right">Perc(%)</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -166,7 +166,7 @@
<blockTable colWidths="202.0,75.0,75.0,78.0,52.0" style="Table5"> <blockTable colWidths="202.0,75.0,75.0,78.0,52.0" style="Table5">
<tr> <tr>
<td> <td>
<para style="terp_default_Bold_9">[[ repeatIn(funct_total(data['form']),'b') ]] Total([[ company.currency_id.code ]]) :</para> <para style="terp_default_Bold_9">[[ repeatIn(funct_total(data['form']),'b') ]] Total:</para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo']) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo']) ]] [[ company.currency_id.symbol ]]</para>

View File

@ -161,13 +161,6 @@
<para style="Standard"> <para style="Standard">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="P10">Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para>
<para style="P1">
<font color="white"> </font>
</para>
<para style="P1"> <para style="P1">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
@ -180,19 +173,19 @@
<para style="P13">A/c No.</para> <para style="P13">A/c No.</para>
</td> </td>
<td> <td>
<para style="P13">Budget</para> <para style="terp_tblheader_Details_Right">Budget</para>
</td> </td>
<td> <td>
<para style="P13">Period Budget</para> <para style="terp_tblheader_Details_Right">Period Budget</para>
</td> </td>
<td> <td>
<para style="P13">Performance</para> <para style="terp_tblheader_Details_Right">Performance</para>
</td> </td>
<td> <td>
<para style="P13">Spread</para> <para style="terp_tblheader_Details_Right">Spread</para>
</td> </td>
<td> <td>
<para style="P13">% performance</para> <para style="terp_tblheader_Details_Right">% performance</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -127,16 +127,16 @@
<para style="terp_tblheader_Details">Description</para> <para style="terp_tblheader_Details">Description</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Theoretical Amount</para> <para style="terp_tblheader_Details_Right">Theoretical Amt</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Planned Amount</para> <para style="terp_tblheader_Details_Right">Planned Amt</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Practical Amount</para> <para style="terp_tblheader_Details_Right">Practical Amt</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Perc(%)</para> <para style="terp_tblheader_Details_Right">Perc(%)</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -32,7 +32,7 @@ class followup(osv.osv):
} }
_defaults = { _defaults = {
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c), 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c),
} }
followup() followup()
@ -46,7 +46,7 @@ class followup_line(osv.osv):
'start': fields.selection([('days','Net Days'),('end_of_month','End of Month')], 'Type of Term', size=64, required=True), 'start': fields.selection([('days','Net Days'),('end_of_month','End of Month')], 'Type of Term', size=64, required=True),
'followup_id': fields.many2one('account_followup.followup', 'Follow Ups', required=True, ondelete="cascade"), 'followup_id': fields.many2one('account_followup.followup', 'Follow Ups', required=True, ondelete="cascade"),
'description': fields.text('Printed Message', translate=True), 'description': fields.text('Printed Message', translate=True),
} }
followup_line() followup_line()
@ -62,12 +62,12 @@ account_move_line()
class res_company(osv.osv): class res_company(osv.osv):
_inherit = "res.company" _inherit = "res.company"
_columns = { _columns = {
'follow_up_msg' : fields.text('Follow-up Message', translate=True), 'follow_up_msg': fields.text('Follow-up Message', translate=True),
} }
_defaults = { _defaults = {
'overdue_msg': ''' 'overdue_msg': '''
Date : %(date)s Date: %(date)s
Dear %(partner_name)s, Dear %(partner_name)s,
@ -80,7 +80,7 @@ Thanks,
%(user_signature)s %(user_signature)s
%(company_name)s %(company_name)s
''' '''
} }
res_company() res_company()

View File

@ -73,7 +73,8 @@
<search string="Search Followup"> <search string="Search Followup">
<group col="10" colspan="4"> <group col="10" colspan="4">
<field name="name"/> <field name="name"/>
</group> <field name="company_id" groups="base.group_multi_company"/>
</group>
</search> </search>
</field> </field>
</record> </record>

View File

@ -61,12 +61,12 @@ class account_followup_print(osv.osv_memory):
'views': [(resource_id,'form')], 'views': [(resource_id,'form')],
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
'target': 'new', 'target': 'new',
} }
_defaults = { _defaults = {
'date': time.strftime('%Y-%m-%d'), 'date': time.strftime('%Y-%m-%d'),
'followup_id': _get_followup, 'followup_id': _get_followup,
} }
account_followup_print() account_followup_print()
@ -80,7 +80,7 @@ class account_followup_print_all(osv.osv_memory):
'partner_lang': fields.boolean('Send Email in Partner Language', help='Do not change message text, if you want to send email in partner language, or configure from company'), 'partner_lang': fields.boolean('Send Email in Partner Language', help='Do not change message text, if you want to send email in partner language, or configure from company'),
'email_body': fields.text('Email body'), 'email_body': fields.text('Email body'),
'summary': fields.text('Summary', required=True, readonly=True) 'summary': fields.text('Summary', required=True, readonly=True)
} }
def _get_summary(self, cr, uid, context=None): def _get_summary(self, cr, uid, context=None):
if context is None: if context is None:
context = {} context = {}
@ -285,14 +285,14 @@ class account_followup_print_all(osv.osv_memory):
'ids': [], 'ids': [],
'model': 'account_followup.followup', 'model': 'account_followup.followup',
'form': data 'form': data
} }
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account_followup.followup.print', 'report_name': 'account_followup.followup.print',
'datas': datas, 'datas': datas,
} }
account_followup_print_all() account_followup_print_all()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -75,7 +75,8 @@
<separator string="Write a notification or a wishful message." colspan="4"/> <separator string="Write a notification or a wishful message." colspan="4"/>
<field name="name" select="1" colspan="2" /> <field name="name" select="1" colspan="2" />
<newline/> <newline/>
<field name="msg" select="1" colspan="2"/> <separator string="Special Message" colspan="4"/>
<field name="msg" select="1" nolabel="1" colspan="2"/>
</form> </form>
</field> </field>
</record> </record>

View File

@ -29,4 +29,4 @@ import account_move_line
import account_invoice import account_invoice
import report import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -28,9 +28,9 @@
"depends": ["account"], "depends": ["account"],
"init_xml": [], "init_xml": [],
"description": """ "description": """
This module provides : This module provides :
* a more efficient way to manage invoice payment. * a more efficient way to manage invoice payment.
* a basic mechanism to easily plug various automated payment. * a basic mechanism to easily plug various automated payment.
""", """,
'author': 'OpenERP SA', 'author': 'OpenERP SA',
'depends': ['account_voucher'], 'depends': ['account_voucher'],

View File

@ -47,7 +47,7 @@ class account_move_line(osv.osv):
return r return r
def _to_pay_search(self, cr, uid, obj, name, args, context): def _to_pay_search(self, cr, uid, obj, name, args, context):
if not len(args): if not args:
return [] return []
line_obj = self.pool.get('account.move.line') line_obj = self.pool.get('account.move.line')
query = line_obj._query_get(cr, uid, context={}) query = line_obj._query_get(cr, uid, context={})
@ -63,17 +63,17 @@ class account_move_line(osv.osv):
) %(operator)s %%s ''' % {'operator': x[1]}, args)) ) %(operator)s %%s ''' % {'operator': x[1]}, args))
sql_args = tuple(map(itemgetter(2), args)) sql_args = tuple(map(itemgetter(2), args))
cr.execute(('''select id cr.execute(('''SELECT id
from account_move_line l FROM account_move_line l
where account_id in (select id WHERE account_id IN (select id
from account_account FROM account_account
where type=%s and active) WHERE type=%s AND active)
and reconcile_id is null AND reconcile_id IS null
and credit > 0 AND credit > 0
and ''' + where + ' and ' + query), ('payable',)+sql_args ) AND ''' + where + ' and ' + query), ('payable',)+sql_args )
res = cr.fetchall() res = cr.fetchall()
if not len(res): if not res:
return [('id','=','0')] return [('id','=','0')]
return [('id','in',map(lambda x:x[0], res))] return [('id','in',map(lambda x:x[0], res))]
@ -110,7 +110,7 @@ class account_move_line(osv.osv):
return line2bank return line2bank
_columns = { _columns = {
'amount_to_pay' : fields.function(amount_to_pay, method=True, 'amount_to_pay': fields.function(amount_to_pay, method=True,
type='float', string='Amount to pay', fnct_search=_to_pay_search), type='float', string='Amount to pay', fnct_search=_to_pay_search),
} }

View File

@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import time import time
from osv import osv, fields from osv import osv, fields
@ -118,11 +119,10 @@ class payment_order(osv.osv):
self.write(cr, uid, order['id'],{'reference':reference}) self.write(cr, uid, order['id'],{'reference':reference})
return True return True
def set_done(self, cr, uid, id, *args): def set_done(self, cr, uid, ids, *args):
self.write(cr,uid,id,{'date_done': time.strftime('%Y-%m-%d'),
'state': 'done',})
wf_service = netsvc.LocalService("workflow") wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'payment.order', id, 'done', cr) self.write(cr, uid, ids, {'date_done': time.strftime('%Y-%m-%d')})
wf_service.trg_validate(uid, 'payment.order', ids[0], 'done', cr)
return True return True
def copy(self, cr, uid, id, default={}, context=None): def copy(self, cr, uid, id, default={}, context=None):
@ -162,7 +162,6 @@ class payment_line(osv.osv):
_name = 'payment.line' _name = 'payment.line'
_description = 'Payment Line' _description = 'Payment Line'
def translate(self, orig): def translate(self, orig):
return { return {
"due_date": "date_maturity", "due_date": "date_maturity",
@ -330,14 +329,14 @@ class payment_line(osv.osv):
'info_owner': fields.function(info_owner, string="Owner Account", method=True, type="text", help='Address of the Main Partner'), 'info_owner': fields.function(info_owner, string="Owner Account", method=True, type="text", help='Address of the Main Partner'),
'info_partner': fields.function(info_partner, string="Destination Account", method=True, type="text", help='Address of the Ordering Customer.'), 'info_partner': fields.function(info_partner, string="Destination Account", method=True, type="text", help='Address of the Ordering Customer.'),
'date': fields.date('Payment Date', help="If no payment date is specified, the bank will treat this payment line directly"), 'date': fields.date('Payment Date', help="If no payment date is specified, the bank will treat this payment line directly"),
'create_date': fields.datetime('Created' , readonly=True), 'create_date': fields.datetime('Created', readonly=True),
'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True), 'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True),
'bank_statement_line_id': fields.many2one('account.bank.statement.line', 'Bank statement line') 'bank_statement_line_id': fields.many2one('account.bank.statement.line', 'Bank statement line')
} }
_defaults = { _defaults = {
'name': lambda obj, cursor, user, context: obj.pool.get('ir.sequence' 'name': lambda obj, cursor, user, context: obj.pool.get('ir.sequence'
).get(cursor, user, 'payment.line'), ).get(cursor, user, 'payment.line'),
'state': lambda *args: 'normal', 'state': 'normal',
'currency': _get_currency, 'currency': _get_currency,
'company_currency': _get_currency, 'company_currency': _get_currency,
'date': _get_date, 'date': _get_date,
@ -438,5 +437,4 @@ class payment_line(osv.osv):
payment_line() payment_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -40,6 +40,23 @@
<menuitem id="menu_main_payment" name="Payment" parent="account.menu_finance" sequence="6"/> <menuitem id="menu_main_payment" name="Payment" parent="account.menu_finance" sequence="6"/>
<record id="view_payment_mode_search" model="ir.ui.view">
<field name="name">payment.mode.search</field>
<field name="model">payment.mode</field>
<field name="type">search</field>
<field name="arch" type="xml">
<form string="Payment Mode">
<field name="name"/>
<field name="journal" widget='selection'/>
<field name="company_id" widget='selection' groups="base.group_multi_company"/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal'}"/>
</group>
</form>
</field>
</record>
<record id="view_payment_mode_tree" model="ir.ui.view"> <record id="view_payment_mode_tree" model="ir.ui.view">
<field name="name">payment.mode.tree</field> <field name="name">payment.mode.tree</field>
<field name="model">payment.mode</field> <field name="model">payment.mode</field>
@ -52,6 +69,7 @@
</tree> </tree>
</field> </field>
</record> </record>
<record id="view_payment_mode_form" model="ir.ui.view"> <record id="view_payment_mode_form" model="ir.ui.view">
<field name="name">payment.mode.form</field> <field name="name">payment.mode.form</field>
<field name="model">payment.mode</field> <field name="model">payment.mode</field>
@ -69,7 +87,8 @@
<field name="name">Payment Mode</field> <field name="name">Payment Mode</field>
<field name="res_model">payment.mode</field> <field name="res_model">payment.mode</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form,search</field>
<field name="search_view_id" ref="view_payment_mode_search"/>
</record> </record>
<menuitem action="action_payment_mode_form" id="menu_action_payment_mode_form" parent="account.menu_configuration_misc"/> <menuitem action="action_payment_mode_form" id="menu_action_payment_mode_form" parent="account.menu_configuration_misc"/>
@ -142,7 +161,7 @@
<group col="4" colspan="2"> <group col="4" colspan="2">
<button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/> <button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/>
<button name="open" states="draft" string="Confirm Payments" icon="gtk-apply"/> <button name="open" states="draft" string="Confirm Payments" icon="gtk-apply"/>
<button name="%(action_account_payment_make_payment)d" states="open" string="Make Payments" type="action" icon="gtk-execute"/> <button name="set_done" states="open" string="Make Payments" type="object" icon="gtk-execute"/>
<button name="set_to_draft" states="cancel" string="Set to draft" type="object" icon="gtk-convert"/> <button name="set_to_draft" states="cancel" string="Set to draft" type="object" icon="gtk-convert"/>
</group> </group>
</form> </form>
@ -165,7 +184,7 @@
<field name="state"/> <field name="state"/>
<button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/> <button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/>
<button name="open" states="draft" string="Confirm Payments" icon="gtk-apply"/> <button name="open" states="draft" string="Confirm Payments" icon="gtk-apply"/>
<button name="%(action_account_payment_make_payment)d" states="open" string="Make Payments" type="action" icon="gtk-execute"/> <button name="set_done" states="open" string="Make Payments" type ="object" icon="gtk-execute"/>
</tree> </tree>
</field> </field>
</record> </record>
@ -241,7 +260,6 @@
<field name="state"/> <field name="state"/>
</page> </page>
<page string="Information"> <page string="Information">
<separator colspan="4" string="General Information"/> <separator colspan="4" string="General Information"/>
<group colspan="2"> <group colspan="2">
<field name="amount" select="1"/> <field name="amount" select="1"/>

View File

@ -24,6 +24,8 @@ write({'state':'open'})</field>
<record id="act_done" model="workflow.activity"> <record id="act_done" model="workflow.activity">
<field name="name">done</field> <field name="name">done</field>
<field name="wkf_id" ref="wkf_payment_order"/> <field name="wkf_id" ref="wkf_payment_order"/>
<field name="action">write({'state':'done'})</field>
<field name="kind">function</field>
<field name="flow_stop">True</field> <field name="flow_stop">True</field>
</record> </record>
<record id="act_cancel" model="workflow.activity"> <record id="act_cancel" model="workflow.activity">
@ -33,14 +35,14 @@ write({'state':'open'})</field>
<field name="kind">function</field> <field name="kind">function</field>
<field name="flow_stop">True</field> <field name="flow_stop">True</field>
</record> </record>
<!-- Transition --> <!-- Transition -->
<record id="trans_draft_open" model="workflow.transition"> <record id="trans_draft_open" model="workflow.transition">
<field name="act_from" ref="act_draft"/> <field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_open"/> <field name="act_to" ref="act_open"/>
<field name="signal">open</field> <field name="signal">open</field>
</record> </record>
<record id="trans_open_done" model="workflow.transition"> <record id="trans_open_done" model="workflow.transition">
<field name="act_from" ref="act_open"/> <field name="act_from" ref="act_open"/>
<field name="act_to" ref="act_done"/> <field name="act_to" ref="act_done"/>
@ -56,6 +58,6 @@ write({'state':'open'})</field>
<field name="act_to" ref="act_cancel"/> <field name="act_to" ref="act_cancel"/>
<field name="signal">cancel</field> <field name="signal">cancel</field>
</record> </record>
</data> </data>
</openerp> </openerp>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# #
@ -15,9 +15,9 @@
# GNU Affero General Public License for more details. # GNU Affero General Public License for more details.
# #
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import payment_order import payment_order
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -31,11 +31,11 @@ class payment_order(report_sxw.rml_parse):
self.localcontext.update( { self.localcontext.update( {
'time': time, 'time': time,
'get_invoice_name': self._get_invoice_name, 'get_invoice_name': self._get_invoice_name,
'get_company_currency' : self._get_company_currency, 'get_company_currency': self._get_company_currency,
'get_company_currency_symbol': self._get_company_currency_symbol, 'get_company_currency_symbol': self._get_company_currency_symbol,
'get_amount_total_in_currency' : self._get_amount_total_in_currency, 'get_amount_total_in_currency': self._get_amount_total_in_currency,
'get_amount_total' : self._get_amount_total, 'get_amount_total': self._get_amount_total,
'get_account_name' : self._get_account_name, 'get_account_name': self._get_account_name,
}) })
def _get_invoice_name(self, invoice_id): def _get_invoice_name(self, invoice_id):
@ -87,4 +87,4 @@ class payment_order(report_sxw.rml_parse):
report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="external") report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="external")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -28,7 +28,7 @@ class payment_order_create(osv.osv_memory):
Create a payment object with lines corresponding to the account move line Create a payment object with lines corresponding to the account move line
to pay according to the date and the mode provided by the user. to pay according to the date and the mode provided by the user.
Hypothesis: Hypothesis:
- Small number of non-reconcilied move line , payment mode and bank account type, - Small number of non-reconcilied move line, payment mode and bank account type,
- Big number of partner and bank account. - Big number of partner and bank account.
If a type is given, unsuitable account Entry lines are ignored. If a type is given, unsuitable account Entry lines are ignored.

View File

@ -21,8 +21,8 @@
from osv import fields, osv from osv import fields, osv
class account_payment_make_payment(osv.osv_memory): class account_payment_make_payment(osv.osv_memory):
_name = 'account.payment.make.payment' _name = "account.payment.make.payment"
_description = 'Account make payment' _description = "Account make payment"
def launch_wizard(self, cr, uid, ids, context=None): def launch_wizard(self, cr, uid, ids, context=None):
""" """
@ -33,10 +33,10 @@ class account_payment_make_payment(osv.osv_memory):
# obj_model = self.pool.get('ir.model.data') # obj_model = self.pool.get('ir.model.data')
# obj_act = self.pool.get('ir.actions.act_window') # obj_act = self.pool.get('ir.actions.act_window')
# order = obj_payment_order.browse(cr, uid, context['active_id'], context) # order = obj_payment_order.browse(cr, uid, context['active_id'], context)
obj_payment_order.set_done(cr, uid, context['active_id'], context) obj_payment_order.set_done(cr, uid, [context['active_id']], context)
return {} return {}
# t = order.mode and order.mode.type.code or 'manual' # t = order.mode and order.mode.type.code or 'manual'
# if t == 'manual' : # if t == 'manual':
# obj_payment_order.set_done(cr,uid,context['active_id'],context) # obj_payment_order.set_done(cr,uid,context['active_id'],context)
# return {} # return {}
# #

View File

@ -77,13 +77,13 @@ class account_payment_populate_statement(osv.osv_memory):
if line.partner_id: if line.partner_id:
# line['partner_id'] = mv.partner_id.id # line['partner_id'] = mv.partner_id.id
if amount < 0 : if amount < 0:
account = line.partner_id.property_account_payable.id account = line.partner_id.property_account_payable.id
else : else:
account = line.partner_id.property_account_receivable.id account = line.partner_id.property_account_receivable.id
if line.move_line_id: if line.move_line_id:
voucher_res = { 'type': 'payment' , voucher_res = { 'type': 'payment',
'name': line.name, 'name': line.name,
'partner_id': line.partner_id.id, 'partner_id': line.partner_id.id,
'journal_id': statement.journal_id.id, 'journal_id': statement.journal_id.id,

View File

@ -32,18 +32,18 @@ class account_report(osv.osv):
_description = "Account Reporting" _description = "Account Reporting"
def _amount_get(self, cr, uid, ids, field_name, arg, context={}): def _amount_get(self, cr, uid, ids, field_name, arg, context={}):
obj_fy=self.pool.get('account.fiscalyear') obj_fy = self.pool.get('account.fiscalyear')
obj_period=self.pool.get('account.period') obj_period = self.pool.get('account.period')
def _calc_context(key,obj): def _calc_context(key, obj):
if key==0: if key == 0:
return obj.find(cr, uid, exception=False) return obj.find(cr, uid, exception=False)
else: else:
obj_key=obj.browse(cr, uid, obj.find(cr, uid, exception=False)) obj_key = obj.browse(cr, uid, obj.find(cr, uid, exception=False))
if isinstance(obj_key,list): if isinstance(obj_key, list):
obj_key=obj_key[0] obj_key = obj_key[0]
key_ids=obj.search(cr,uid,[('date_stop','<',obj_key.date_start)]) key_ids = obj.search(cr, uid, [('date_stop','<',obj_key.date_start)])
if len(key_ids)<abs(key): if len(key_ids) < abs(key):
return False return False
return key_ids[key] return key_ids[key]
@ -53,18 +53,18 @@ class account_report(osv.osv):
del context['fiscalyear'] del context['fiscalyear']
acc = self.pool.get('account.account') acc = self.pool.get('account.account')
acc_id = acc.search(cr, uid, [('code','in',code)]) acc_id = acc.search(cr, uid, [('code','in',code)])
return reduce(lambda y,x=0: x.credit+y, acc.browse(cr, uid, acc_id, context),0.0) return reduce(lambda y, x=0: x.credit+y, acc.browse(cr, uid, acc_id, context),0.0)
def _calc_debit(code,year=0): def _calc_debit(code, year=0):
context['fiscalyear']=_calc_context(year, obj_fy) context['fiscalyear'] = _calc_context(year, obj_fy)
if not context['fiscalyear']: if not context['fiscalyear']:
del context['fiscalyear'] del context['fiscalyear']
acc = self.pool.get('account.account') acc = self.pool.get('account.account')
acc_id = acc.search(cr, uid, [('code','in',code)]) acc_id = acc.search(cr, uid, [('code','in',code)])
return reduce(lambda y,x=0: x.debit+y, acc.browse(cr, uid, acc_id, context),0.0) return reduce(lambda y, x=0: x.debit+y, acc.browse(cr, uid, acc_id, context), 0.0)
def _calc_balance(code,year=0): def _calc_balance(code, year=0):
context['fiscalyear']=_calc_context(year, obj_fy) context['fiscalyear'] = _calc_context(year, obj_fy)
if not context['fiscalyear']: if not context['fiscalyear']:
del context['fiscalyear'] del context['fiscalyear']
acc = self.pool.get('account.account') acc = self.pool.get('account.account')
@ -72,21 +72,21 @@ class account_report(osv.osv):
for c in code: for c in code:
for i in c.split('-'): for i in c.split('-'):
account_ids += acc.search(cr, uid, [('code', 'ilike', i)]) account_ids += acc.search(cr, uid, [('code', 'ilike', i)])
return reduce(lambda y,x=0: x.balance+y, acc.browse(cr, uid, account_ids, context),0.0) return reduce(lambda y, x=0: x.balance+y, acc.browse(cr, uid, account_ids, context), 0.0)
def _calc_report(*code): def _calc_report(*code):
acc = self.pool.get('account.report.report') acc = self.pool.get('account.report.report')
acc_id = acc.search(cr, uid, [('code','in',code)]) acc_id = acc.search(cr, uid, [('code', 'in', code)])
return reduce(lambda y,x=0: x.amount+y, acc.browse(cr, uid, acc_id, context),0.0) return reduce(lambda y, x=0: x.amount+y, acc.browse(cr, uid, acc_id, context),0.0)
def _calc_tax_code(code,period=0): def _calc_tax_code(code, period=0):
context['period_id']=_calc_context(period, obj_period) context['period_id'] = _calc_context(period, obj_period)
if not context['period_id']: if not context['period_id']:
return 0.00 return 0.00
context['period_id']=context['period_id'][0] context['period_id'] = context['period_id'][0]
acc = self.pool.get('account.tax.code') acc = self.pool.get('account.tax.code')
acc_id = acc.search(cr, uid, [('code','in',code)]) acc_id = acc.search(cr, uid, [('code', 'in', code)])
return reduce(lambda y,x=0: x.sum_period+y, acc.browse(cr, uid, acc_id, context),0.0) return reduce(lambda y, x=0: x.sum_period+y, acc.browse(cr, uid, acc_id, context), 0.0)
result = {} result = {}
for rep in self.browse(cr, uid, ids, context): for rep in self.browse(cr, uid, ids, context):
objdict = { objdict = {
@ -97,18 +97,18 @@ class account_report(osv.osv):
'tax_code': _calc_tax_code, 'tax_code': _calc_tax_code,
} }
try: try:
val = eval(getattr(rep,'expression'), objdict) val = eval(getattr(rep, 'expression'), objdict)
except: except:
val = 0.0 val = 0.0
if field_name=='status': if field_name == 'status':
if val<rep.badness_limit: if val < rep.badness_limit:
result[rep.id] = 'very bad' result[rep.id] = 'very bad'
elif val==rep.badness_limit: elif val == rep.badness_limit:
result[rep.id] = 'bad' result[rep.id] = 'bad'
elif val<rep.goodness_limit: elif val<rep.goodness_limit:
result[rep.id] = 'normal' result[rep.id] = 'normal'
elif val==rep.goodness_limit: elif val == rep.goodness_limit:
result[rep.id] = 'good' result[rep.id] = 'good'
else: else:
result[rep.id] = 'very good' result[rep.id] = 'very good'
@ -117,10 +117,10 @@ class account_report(osv.osv):
return result return result
def onchange_parent_id(self, cr, uid, ids, parent_id): def onchange_parent_id(self, cr, uid, ids, parent_id):
v={} v = {}
if parent_id: if parent_id:
acc=self.pool.get('account.report.report').browse(cr, uid, parent_id) acc = self.pool.get('account.report.report').browse(cr, uid, parent_id)
v['type']=acc.type v['type'] = acc.type
return {'value': v} return {'value': v}
_columns = { _columns = {
@ -135,8 +135,8 @@ class account_report(osv.osv):
('other','Others')], ('other','Others')],
'Type', required=True), 'Type', required=True),
'expression': fields.char('Expression', size=240, required=True), 'expression': fields.char('Expression', size=240, required=True),
'badness_limit' :fields.float('Badness Indicator Limit', digits=(16,2), help='This Value sets the limit of badness.'), 'badness_limit': fields.float('Badness Indicator Limit', digits=(16,2), help='This Value sets the limit of badness.'),
'goodness_limit' :fields.float('Goodness Indicator Limit', digits=(16,2), help='This Value sets the limit of goodness.'), 'goodness_limit': fields.float('Goodness Indicator Limit', digits=(16,2), help='This Value sets the limit of goodness.'),
'parent_id': fields.many2one('account.report.report', 'Parent'), 'parent_id': fields.many2one('account.report.report', 'Parent'),
'child_ids': fields.one2many('account.report.report', 'parent_id', 'Children'), 'child_ids': fields.one2many('account.report.report', 'parent_id', 'Children'),
'note': fields.text('Note'), 'note': fields.text('Note'),
@ -152,8 +152,8 @@ class account_report(osv.osv):
('very good', 'Very Good') ('very good', 'Very Good')
], ],
string='Status'), string='Status'),
'disp_tree':fields.boolean('Display Tree', help='When the indicators are printed, if one indicator is set with this field to True, then it will display one more graphs with all its children in tree'), 'disp_tree': fields.boolean('Display Tree', help='When the indicators are printed, if one indicator is set with this field to True, then it will display one more graphs with all its children in tree'),
'disp_graph':fields.boolean('Display As Graph', help='If the field is set to True, information will be printed as a Graph, otherwise as an array.'), 'disp_graph': fields.boolean('Display As Graph', help='If the field is set to True, information will be printed as a Graph, otherwise as an array.'),
} }
_defaults = { _defaults = {
'active': lambda *args: True, 'active': lambda *args: True,
@ -162,9 +162,9 @@ class account_report(osv.osv):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100): def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args: if not args:
args=[] args = []
if not context: if not context:
context={} context = {}
ids = [] ids = []
if name: if name:
ids = self.search(cr, user, [('code','=',name)]+ args, limit=limit, context=context) ids = self.search(cr, user, [('code','=',name)]+ args, limit=limit, context=context)
@ -183,12 +183,12 @@ account_report()
class account_report_history(osv.osv): class account_report_history(osv.osv):
def _calc_value(self, cr, uid, ids, name, args, context): def _calc_value(self, cr, uid, ids, name, args, context):
acc_report_id=self.read(cr, uid, ids, ['tmp','period_id']) acc_report_id = self.read(cr, uid, ids, ['tmp','period_id'])
tmp_ids={} tmp_ids = {}
for a in acc_report_id: for a in acc_report_id:
period_val=pooler.get_pool(cr.dbname).get('account.period').read(cr, uid, [a['period_id'][0]])[0] period_val = pooler.get_pool(cr.dbname).get('account.period').read(cr, uid, [a['period_id'][0]])[0]
period_id=pooler.get_pool(cr.dbname).get('account.period').search(cr, uid, [('date_start','<=',period_val['date_start']),('fiscalyear_id','=',period_val['fiscalyear_id'][0])]) period_id = pooler.get_pool(cr.dbname).get('account.period').search(cr, uid, [('date_start', '<=', period_val['date_start']),('fiscalyear_id', '=', period_val['fiscalyear_id'][0])])
tmp_ids[a['id']] = pooler.get_pool(cr.dbname).get('account.report.report').read(cr, uid, [a['tmp']], context={'periods':period_id})[0]['amount'] tmp_ids[a['id']] = pooler.get_pool(cr.dbname).get('account.report.report').read(cr, uid, [a['tmp']], context={'periods': period_id})[0]['amount']
return tmp_ids return tmp_ids
_name = "account.report.history" _name = "account.report.history"
@ -197,11 +197,11 @@ class account_report_history(osv.osv):
_auto = False _auto = False
_order='name' _order='name'
_columns = { _columns = {
'period_id': fields.many2one('account.period','Period', readonly=True, select=True), 'period_id': fields.many2one('account.period', 'Period', readonly=True, select=True),
'fiscalyear_id': fields.many2one('account.fiscalyear','Fiscal Year', readonly=True, select=True), 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', readonly=True, select=True),
'name': fields.many2one('account.report.report','Indicator', readonly=True, select=True), 'name': fields.many2one('account.report.report', 'Indicator', readonly=True, select=True),
'val': fields.function(_calc_value, method=True, string='Value', readonly=True), 'val': fields.function(_calc_value, method=True, string='Value', readonly=True),
'tmp' : fields.integer(string='temp',readonly=True) 'tmp' : fields.integer(string='temp', readonly=True)
} }
def init(self, cr): def init(self, cr):

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-09-29 08:36+0000\n" "PO-Revision-Date: 2010-10-11 20:16+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n" "Last-Translator: simone.sandri <Unknown>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-30 04:38+0000\n" "X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#. module: account_report #. module: account_report
@ -308,7 +308,7 @@ msgstr "Report per personale Contabile"
#: model:ir.actions.act_window,name:account_report.action_account_report_form #: model:ir.actions.act_window,name:account_report.action_account_report_form
#: model:ir.ui.menu,name:account_report.menu_action_account_report_form #: model:ir.ui.menu,name:account_report.menu_action_account_report_form
msgid "New Reporting Item Formula" msgid "New Reporting Item Formula"
msgstr "" msgstr "Nuova Formula di Riporto Oggetti"
#. module: account_report #. module: account_report
#: field:account.report.report,code:0 #: field:account.report.report,code:0

View File

@ -29,8 +29,9 @@ from tools.translate import _
class account_move_line(osv.osv): class account_move_line(osv.osv):
_inherit = 'account.move.line' _inherit = 'account.move.line'
def _unreconciled(self, cr, uid, ids, prop, unknow_none, context): def _unreconciled(self, cr, uid, ids, prop, unknow_none, context):
res={} res = {}
for line in self.browse(cr, uid, ids, context=context): for line in self.browse(cr, uid, ids, context=context):
res[line.id] = line.debit - line.credit res[line.id] = line.debit - line.credit
if line.reconcile_partial_id: if line.reconcile_partial_id:
@ -43,9 +44,11 @@ class account_move_line(osv.osv):
_columns = { _columns = {
'amount_unreconciled': fields.function(_unreconciled, method=True, string='Unreconciled Amount'), 'amount_unreconciled': fields.function(_unreconciled, method=True, string='Unreconciled Amount'),
} }
account_move_line() account_move_line()
class account_voucher(osv.osv): class account_voucher(osv.osv):
def _get_type(self, cr, uid, ids, context={}): def _get_type(self, cr, uid, ids, context={}):
return context.get('type', False) return context.get('type', False)
@ -92,7 +95,7 @@ class account_voucher(osv.osv):
journal_id = context.get('journal_id', False) journal_id = context.get('journal_id', False)
if journal_id: if journal_id:
journal = journal_pool.browse(cr, uid, journal_id) journal = journal_pool.browse(cr, uid, journal_id)
currency_id = journal.company_id.currency_id.id # currency_id = journal.company_id.currency_id.id
if journal.currency: if journal.currency:
return journal.currency.id return journal.currency.id
return False return False
@ -112,15 +115,15 @@ class account_voucher(osv.osv):
return [(r['id'], (str("%.2f" % r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')] return [(r['id'], (str("%.2f" % r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')]
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
if not view_id and context.get('invoice_type',False): if not view_id and context.get('invoice_type', False):
mod_obj = self.pool.get('ir.model.data') mod_obj = self.pool.get('ir.model.data')
if context.get('invoice_type') in ('out_invoice','out_refund'): if context.get('invoice_type') in ('out_invoice', 'out_refund'):
result = mod_obj._get_id(cr, uid, 'account_voucher', 'view_vendor_receipt_form') result = mod_obj._get_id(cr, uid, 'account_voucher', 'view_vendor_receipt_form')
else: else:
result = mod_obj._get_id(cr, uid, 'account_voucher', 'view_vendor_payment_form') result = mod_obj._get_id(cr, uid, 'account_voucher', 'view_vendor_payment_form')
result = mod_obj.read(cr, uid, [result], ['res_id'], context=context)[0]['res_id'] result = mod_obj.read(cr, uid, [result], ['res_id'], context=context)[0]['res_id']
view_id = result view_id = result
res = super(account_voucher,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu) res = super(account_voucher, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
doc = etree.XML(res['arch']) doc = etree.XML(res['arch'])
nodes = doc.xpath("//field[@name='partner_id']") nodes = doc.xpath("//field[@name='partner_id']")
if context.get('type', 'sale') in ('purchase', 'payment'): if context.get('type', 'sale') in ('purchase', 'payment'):
@ -223,7 +226,7 @@ class account_voucher(osv.osv):
total_tax = 0.0 total_tax = 0.0
if not tax[0].price_include: if not tax[0].price_include:
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes',[]): for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes', []):
total_tax += tax_line.get('amount', 0.0) total_tax += tax_line.get('amount', 0.0)
total += total_tax total += total_tax
else: else:
@ -231,7 +234,7 @@ class account_voucher(osv.osv):
line_total = 0.0 line_total = 0.0
line_tax = 0.0 line_tax = 0.0
for tax_line in tax_pool.compute_all(cr, uid, tax, line.untax_amount or line.amount, 1).get('taxes',[]): for tax_line in tax_pool.compute_all(cr, uid, tax, line.untax_amount or line.amount, 1).get('taxes', []):
line_tax += tax_line.get('amount', 0.0) line_tax += tax_line.get('amount', 0.0)
line_total += tax_line.get('price_unit') line_total += tax_line.get('price_unit')
total_tax += line_tax total_tax += line_tax
@ -246,8 +249,8 @@ class account_voucher(osv.osv):
partner_pool = self.pool.get('res.partner') partner_pool = self.pool.get('res.partner')
position_pool = self.pool.get('account.fiscal.position') position_pool = self.pool.get('account.fiscal.position')
res = { res = {
'tax_amount':False, 'tax_amount': False,
'amount':False, 'amount': False,
} }
voucher_total = 0.0 voucher_total = 0.0
voucher_line_ids = [] voucher_line_ids = []
@ -271,7 +274,7 @@ class account_voucher(osv.osv):
tax = tax_pool.browse(cr, uid, taxes) tax = tax_pool.browse(cr, uid, taxes)
if not tax[0].price_include: if not tax[0].price_include:
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes',[]): for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes', []):
total_tax += tax_line.get('amount') total_tax += tax_line.get('amount')
total += total_tax total += total_tax
@ -371,7 +374,7 @@ class account_voucher(osv.osv):
return default return default
if not partner_id and ids: if not partner_id and ids:
line_ids = line_pool.search(cr, uid, [('voucher_id','=',ids[0])]) line_ids = line_pool.search(cr, uid, [('voucher_id', '=', ids[0])])
if line_ids: if line_ids:
line_pool.unlink(cr, uid, line_ids) line_pool.unlink(cr, uid, line_ids)
return default return default
@ -402,7 +405,7 @@ class account_voucher(osv.osv):
account_type = 'receivable' account_type = 'receivable'
if not context.get('move_line_ids', False): if not context.get('move_line_ids', False):
ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context) ids = move_line_pool.search(cr, uid, [('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context)
else: else:
ids = context['move_line_ids'] ids = context['move_line_ids']
ids.reverse() ids.reverse()
@ -469,7 +472,7 @@ class account_voucher(osv.osv):
@return: Returns a dict which contains new values, and context @return: Returns a dict which contains new values, and context
""" """
period_pool = self.pool.get('account.period') period_pool = self.pool.get('account.period')
pids = period_pool.search(cr, user, [('date_start','<=',date), ('date_stop','>=',date)]) pids = period_pool.search(cr, user, [('date_start', '<=', date), ('date_stop', '>=', date)])
if not pids: if not pids:
return {} return {}
return { return {
@ -685,13 +688,13 @@ class account_voucher(osv.osv):
if not self.pool.get('res.currency').is_zero(cr, uid, inv.currency_id, line_total): if not self.pool.get('res.currency').is_zero(cr, uid, inv.currency_id, line_total):
diff = line_total diff = line_total
move_line = { move_line = {
'name':name, 'name': name,
'account_id':False, 'account_id': False,
'move_id':move_id , 'move_id': move_id ,
'partner_id':inv.partner_id.id, 'partner_id': inv.partner_id.id,
'date':inv.date, 'date': inv.date,
'credit':diff>0 and diff or 0.0, 'credit': diff > 0 and diff or 0.0,
'debit':diff<0 and -diff or 0.0, 'debit': diff < 0 and -diff or 0.0,
} }
account_id = False account_id = False
if inv.type in ('sale', 'receipt'): if inv.type in ('sale', 'receipt'):
@ -792,10 +795,10 @@ class account_voucher_line(osv.osv):
if move_line_id: if move_line_id:
move_line = move_line_pool.browse(cr, user, move_line_id, context=context) move_line = move_line_pool.browse(cr, user, move_line_id, context=context)
if move_line.credit: if move_line.credit:
ttype='dr' ttype = 'dr'
amount = move_line.credit amount = move_line.credit
else: else:
ttype='cr' ttype = 'cr'
account_id = move_line.account_id.id account_id = move_line.account_id.id
res.update({ res.update({
'account_id':account_id, 'account_id':account_id,
@ -909,4 +912,4 @@ class account_bank_statement_line(osv.osv):
self.pool.get('account.voucher').unlink(cr, uid, unlink_ids, context=context) self.pool.get('account.voucher').unlink(cr, uid, unlink_ids, context=context)
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context) return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
account_bank_statement_line() account_bank_statement_line()

View File

@ -36,7 +36,7 @@ class report_voucher(report_sxw.rml_parse):
}) })
def convert(self, amount, cur): def convert(self, amount, cur):
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur); amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur)
return amt_en return amt_en
def get_title(self, type): def get_title(self, type):
@ -48,17 +48,17 @@ class report_voucher(report_sxw.rml_parse):
def debit(self, move_ids): def debit(self, move_ids):
debit = 0.0 debit = 0.0
for move in move_ids: for move in move_ids:
debit +=move.debit debit += move.debit
return debit return debit
def credit(self, move_ids): def credit(self, move_ids):
credit = 0.0 credit = 0.0
for move in move_ids: for move in move_ids:
credit +=move.credit credit += move.credit
return credit return credit
def _get_ref(self, voucher_id, move_ids): def _get_ref(self, voucher_id, move_ids):
voucher_line = self.pool.get('account.voucher.line').search(self.cr, self.uid, [('partner_id','=',move_ids.partner_id.id), ('voucher_id','=',voucher_id)]) voucher_line = self.pool.get('account.voucher.line').search(self.cr, self.uid, [('partner_id', '=', move_ids.partner_id.id), ('voucher_id', '=', voucher_id)])
if voucher_line: if voucher_line:
voucher = self.pool.get('account.voucher.line').browse(self.cr, self.uid, voucher_line)[0] voucher = self.pool.get('account.voucher.line').browse(self.cr, self.uid, voucher_line)[0]
return voucher.name return voucher.name
@ -69,4 +69,4 @@ report_sxw.report_sxw(
'account.voucher', 'account.voucher',
'addons/account_voucher/report/account_voucher.rml', 'addons/account_voucher/report/account_voucher.rml',
parser=report_voucher,header="external" parser=report_voucher,header="external"
) )

View File

@ -35,10 +35,10 @@ class report_voucher_print(report_sxw.rml_parse):
}) })
def convert(self, amount, cur): def convert(self, amount, cur):
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur); amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur)
return amt_en return amt_en
def get_lines(self,voucher): def get_lines(self, voucher):
result = [] result = []
if voucher.type in ('payment','receipt'): if voucher.type in ('payment','receipt'):
type = voucher.line_ids and voucher.line_ids[0].type or False type = voucher.line_ids and voucher.line_ids[0].type or False

View File

@ -20,15 +20,9 @@
############################################################################## ##############################################################################
from report import report_sxw from report import report_sxw
import xml.dom.minidom
import os, time
import osv
import re
import tools
import pooler
import re
import sys
from datetime import datetime
import re
class rml_parse(report_sxw.rml_parse): class rml_parse(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context): def __init__(self, cr, uid, name, context):
@ -40,7 +34,7 @@ class rml_parse(report_sxw.rml_parse):
'explode_name' : self._explode_name, 'explode_name' : self._explode_name,
}) })
def comma_me(self,amount): def comma_me(self, amount):
if not amount: if not amount:
amount = 0.0 amount = 0.0
if type(amount) is float : if type(amount) is float :
@ -48,7 +42,7 @@ class rml_parse(report_sxw.rml_parse):
else : else :
amount = str(amount) amount = str(amount)
if (amount == '0'): if (amount == '0'):
return ' ' return ' '
orig = amount orig = amount
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount) new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
if orig == new: if orig == new:
@ -60,19 +54,19 @@ class rml_parse(report_sxw.rml_parse):
ellipsis = ellipsis or '' ellipsis = ellipsis or ''
try: try:
return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen] return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen]
except Exception, e: except:
return False return False
def _strip_name(self, name, maxlen=50): def _strip_name(self, name, maxlen=50):
return self._ellipsis(name, maxlen, '...') return self._ellipsis(name, maxlen, '...')
def _get_and_change_date_format_for_swiss (self,date_to_format): def _get_and_change_date_format_for_swiss (self, date_to_format):
date_formatted='' date_formatted = ''
if date_to_format: if date_to_format:
date_formatted = strptime (date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y') date_formatted = datetime.strptime(date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
return date_formatted return date_formatted
def _explode_name(self,chaine,length): def _explode_name(self, chaine, length):
# We will test if the size is less then account # We will test if the size is less then account
full_string = '' full_string = ''
if (len(str(chaine)) <= length): if (len(str(chaine)) <= length):
@ -92,7 +86,7 @@ class rml_parse(report_sxw.rml_parse):
return full_string return full_string
def makeAscii(self,str): def makeAscii(self, str):
try: try:
Stringer = str.encode("utf-8") Stringer = str.encode("utf-8")
except UnicodeDecodeError: except UnicodeDecodeError:
@ -106,7 +100,7 @@ class rml_parse(report_sxw.rml_parse):
return Stringer return Stringer
return Stringer return Stringer
def explode_this(self,chaine,length): def explode_this(self, chaine, length):
chaine = rstrip(chaine) chaine = rstrip(chaine)
ast = list(chaine) ast = list(chaine)
i = length i = length
@ -116,7 +110,7 @@ class rml_parse(report_sxw.rml_parse):
chaine = str("".join(ast)) chaine = str("".join(ast))
return chaine return chaine
def repair_string(self,chaine): def repair_string(self, chaine):
ast = list(chaine) ast = list(chaine)
UnicodeAst = [] UnicodeAst = []
_previouslyfound = False _previouslyfound = False
@ -135,7 +129,7 @@ class rml_parse(report_sxw.rml_parse):
i += i + 1 i += i + 1
return "".join(UnicodeAst) return "".join(UnicodeAst)
def ReencodeAscii(self,str): def ReencodeAscii(self, str):
try: try:
Stringer = str.decode("ascii") Stringer = str.decode("ascii")
except UnicodeEncodeError: except UnicodeEncodeError:
@ -146,7 +140,7 @@ class rml_parse(report_sxw.rml_parse):
return Stringer return Stringer
def _add_header(self, node, header=1): def _add_header(self, node, header=1):
if header==2: if header == 2:
rml_head = self.rml_header2 rml_head = self.rml_header2
else: else:
rml_head = self.rml_header rml_head = self.rml_header

View File

@ -86,7 +86,7 @@ class account_statement_from_invoice_lines(osv.osv_memory):
'period_id':statement.period_id.id} 'period_id':statement.period_id.id}
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context) voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
voucher_line_dict = False voucher_line_dict = {}
if result['value']['line_ids']: if result['value']['line_ids']:
for line_dict in result['value']['line_ids']: for line_dict in result['value']['line_ids']:
move_line = line_obj.browse(cr, uid, line_dict['move_line_id'], context) move_line = line_obj.browse(cr, uid, line_dict['move_line_id'], context)
@ -94,7 +94,7 @@ class account_statement_from_invoice_lines(osv.osv_memory):
voucher_line_dict = line_dict voucher_line_dict = line_dict
if voucher_line_dict: if voucher_line_dict:
voucher_line_dict.update({'voucher_id':voucher_id}) voucher_line_dict.update({'voucher_id': voucher_id})
voucher_line_obj.create(cr, uid, voucher_line_dict, context=context) voucher_line_obj.create(cr, uid, voucher_line_dict, context=context)
if line.journal_id.type == 'sale': if line.journal_id.type == 'sale':
type = 'customer' type = 'customer'
@ -147,11 +147,11 @@ class account_statement_from_invoice(osv.osv_memory):
# Creating a group that is unique for importing move lines(move lines, once imported into statement lines, should not appear again) # 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: for st_line in statement.line_ids:
args_move_line = [] args_move_line = []
args_move_line.append(('name','=', st_line.name)) args_move_line.append(('name', '=', st_line.name))
args_move_line.append(('ref','=',st_line.ref)) args_move_line.append(('ref', '=', st_line.ref))
if st_line.partner_id: if st_line.partner_id:
args_move_line.append(('partner_id','=',st_line.partner_id.id)) args_move_line.append(('partner_id', '=', st_line.partner_id.id))
args_move_line.append(('account_id','=',st_line.account_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) move_line_id = line_obj.search(cr, uid, args_move_line, context=context)
if move_line_id: if move_line_id:
@ -159,7 +159,7 @@ class account_statement_from_invoice(osv.osv_memory):
journal_ids = data['journal_ids'] journal_ids = data['journal_ids']
if journal_ids == []: if journal_ids == []:
journal_ids = journal_obj.search(cr, uid, [('type', 'in', ('sale','cash','purchase'))], context=context) journal_ids = journal_obj.search(cr, uid, [('type', 'in', ('sale', 'cash', 'purchase'))], context=context)
args = [ args = [
('reconcile_id', '=', False), ('reconcile_id', '=', False),
@ -167,12 +167,12 @@ class account_statement_from_invoice(osv.osv_memory):
('account_id.reconcile', '=', True)] ('account_id.reconcile', '=', True)]
if repeated_move_line_ids: if repeated_move_line_ids:
args.append(('id','not in',repeated_move_line_ids)) args.append(('id', 'not in', repeated_move_line_ids))
line_ids = line_obj.search(cr, uid, args, line_ids = line_obj.search(cr, uid, args,
context=context) context=context)
model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_account_statement_from_invoice_lines')], context=context) model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'), ('name', '=', 'view_account_statement_from_invoice_lines')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
return { return {
'domain': "[('id','in', ["+','.join([str(x) for x in line_ids])+"])]", 'domain': "[('id','in', ["+','.join([str(x) for x in line_ids])+"])]",
@ -187,4 +187,4 @@ class account_statement_from_invoice(osv.osv_memory):
} }
account_statement_from_invoice() account_statement_from_invoice()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -19,7 +19,6 @@
# #
############################################################################## ##############################################################################
import netsvc
from osv import osv from osv import osv
from osv import fields from osv import fields
@ -32,11 +31,11 @@ class account_voucher_unreconcile(osv.osv_memory):
} }
_defaults = { _defaults = {
'remove': lambda *a: True, 'remove': True,
} }
def trans_unrec(self, cr, uid, ids, context=None): def trans_unrec(self, cr, uid, ids, context=None):
res = self.browse(cr, uid, ids[0]) # res = self.browse(cr, uid, ids[0])
if context is None: if context is None:
context = {} context = {}
voucher_pool = self.pool.get('account.voucher') voucher_pool = self.pool.get('account.voucher')

View File

@ -156,7 +156,7 @@ class account_analytic_account(osv.osv):
return dict([(i, res[i]) for i in ids]) return dict([(i, res[i]) for i in ids])
def name_get(self, cr, uid, ids, context=None): def name_get(self, cr, uid, ids, context=None):
if not len(ids): if not ids:
return [] return []
res = [] res = []
for account in self.browse(cr, uid, ids, context=context): for account in self.browse(cr, uid, ids, context=context):
@ -174,7 +174,7 @@ class account_analytic_account(osv.osv):
return dict(res) return dict(res)
_columns = { _columns = {
'name' : fields.char('Account Name', size=128, required=True), 'name': fields.char('Account Name', size=128, required=True),
'complete_name': fields.function(_complete_name_calc, method=True, type='char', string='Full Account Name'), 'complete_name': fields.function(_complete_name_calc, method=True, type='char', string='Full Account Name'),
'code': fields.char('Account Code', size=24), 'code': fields.char('Account Code', size=24),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Account Type', help='If you select the View Type, it means you won\'t allow to create journal entries using that account.'), 'type': fields.selection([('view','View'), ('normal','Normal')], 'Account Type', help='If you select the View Type, it means you won\'t allow to create journal entries using that account.'),
@ -182,14 +182,14 @@ class account_analytic_account(osv.osv):
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2), 'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'), 'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),
'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'), 'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),
'balance' : fields.function(_balance_calc, method=True, type='float', string='Balance'), 'balance': fields.function(_balance_calc, method=True, type='float', string='Balance'),
'debit' : fields.function(_debit_calc, method=True, type='float', string='Debit'), 'debit': fields.function(_debit_calc, method=True, type='float', string='Debit'),
'credit' : fields.function(_credit_calc, method=True, type='float', string='Credit'), 'credit': fields.function(_credit_calc, method=True, type='float', string='Credit'),
'quantity': fields.function(_quantity_calc, method=True, type='float', string='Quantity'), 'quantity': fields.function(_quantity_calc, method=True, type='float', string='Quantity'),
'quantity_max': fields.float('Maximum Quantity', help='Sets the higher limit of quantity of hours.'), 'quantity_max': fields.float('Maximum Quantity', help='Sets the higher limit of quantity of hours.'),
'partner_id' : fields.many2one('res.partner', 'Associated Partner'), 'partner_id': fields.many2one('res.partner', 'Partner'),
'contact_id' : fields.many2one('res.partner.address', 'Contact'), 'contact_id': fields.many2one('res.partner.address', 'Contact'),
'user_id' : fields.many2one('res.users', 'Account Manager'), 'user_id': fields.many2one('res.users', 'Account Manager'),
'date_start': fields.date('Date Start'), 'date_start': fields.date('Date Start'),
'date': fields.date('Date End'), 'date': fields.date('Date End'),
'company_id': fields.many2one('res.company', 'Company', required=True), 'company_id': fields.many2one('res.company', 'Company', required=True),
@ -210,10 +210,10 @@ class account_analytic_account(osv.osv):
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0] return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = { _defaults = {
'type' : 'normal', 'type': 'normal',
'company_id': _default_company, 'company_id': _default_company,
'state' : 'open', 'state': 'open',
'user_id' : lambda self, cr, uid, ctx : uid, 'user_id': lambda self, cr, uid, ctx: uid,
'partner_id': lambda self, cr, uid, ctx: ctx.get('partner_id', False), 'partner_id': lambda self, cr, uid, ctx: ctx.get('partner_id', False),
'contact_id': lambda self, cr, uid, ctx: ctx.get('contact_id', False), 'contact_id': lambda self, cr, uid, ctx: ctx.get('contact_id', False),
'date_start': time.strftime('%Y-%m-%d') 'date_start': time.strftime('%Y-%m-%d')
@ -244,7 +244,7 @@ class account_analytic_account(osv.osv):
partner = parent['partner_id'][0] partner = parent['partner_id'][0]
else: else:
partner = False partner = False
res = {'value' : {}} res = {'value': {}}
if partner: if partner:
res['value']['partner_id'] = partner res['value']['partner_id'] = partner
return res return res
@ -271,19 +271,19 @@ class account_analytic_line(osv.osv):
_description = 'Analytic Line' _description = 'Analytic Line'
_columns = { _columns = {
'name' : fields.char('Description', size=256, required=True), 'name': fields.char('Description', size=256, required=True),
'date' : fields.date('Date', required=True, select=1), 'date': fields.date('Date', required=True, select=1),
'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')), 'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
'unit_amount' : fields.float('Quantity', help='Specifies the amount of quantity to count.'), 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
'account_id' : fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True), 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True),
'user_id' : fields.many2one('res.users', 'User'), 'user_id': fields.many2one('res.users', 'User'),
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
} }
_defaults = { _defaults = {
'date': time.strftime('%Y-%m-%d'), 'date': time.strftime('%Y-%m-%d'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c), 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
'amount' : 0.00 'amount': 0.00
} }
_order = 'date desc' _order = 'date desc'

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-06-18 10:59+0000\n" "POT-Creation-Date: 2010-06-18 10:59+0000\n"
"PO-Revision-Date: 2010-10-10 10:41+0000\n" "PO-Revision-Date: 2010-10-11 07:17+0000\n"
"Last-Translator: Ferdinand @ ChriCar <Unknown>\n" "Last-Translator: Ferdinand-chricar <Unknown>\n"
"Language-Team: German <de@li.org>\n" "Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-11 04:45+0000\n" "X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#. module: analytic #. module: analytic

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# #
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details. # GNU Affero General Public License for more details.
# #
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
@ -38,7 +38,7 @@ class account_analytic_account(osv.osv):
_inherit = "account.analytic.account" _inherit = "account.analytic.account"
_columns = { _columns = {
'journal_rate_ids' : fields.one2many('analytic_journal_rate_grid', 'account_id', 'Invoicing Rate per Journal'), 'journal_rate_ids': fields.one2many('analytic_journal_rate_grid', 'account_id', 'Invoicing Rate per Journal'),
} }
account_analytic_account() account_analytic_account()
@ -92,7 +92,7 @@ class hr_analytic_timesheet(osv.osv):
if to_invoice: if to_invoice:
res.setdefault('value',{}) res.setdefault('value',{})
res['value']['to_invoice'] = to_invoice[0] res['value']['to_invoice'] = to_invoice[0]
return res return res
hr_analytic_timesheet() hr_analytic_timesheet()

View File

@ -40,7 +40,7 @@ class account_analytic_account(osv.osv):
_inherit = "account.analytic.account" _inherit = "account.analytic.account"
_columns = { _columns = {
'user_product_ids' : fields.one2many('analytic_user_funct_grid', 'account_id', 'Users/Products Rel.'), 'user_product_ids': fields.one2many('analytic_user_funct_grid', 'account_id', 'Users/Products Rel.'),
} }
account_analytic_account() account_analytic_account()

View File

@ -1,18 +1,5 @@
<openerp> <openerp>
<data> <data>
<record id="view_picking_delivery" model="ir.ui.view">
<field name="name">stock.picking.delivery.form20</field>
<field name="model">stock.picking</field>
<field name="type">form</field>
<field name="priority" eval="2"/>
<field name="inherit_id" ref="stock.view_picking_delivery_form"/>
<field name="arch" type="xml">
<xpath expr="//form/group/field[@name='date']" position="after">
<field name="partner_id" invisible="1"/>
</xpath>
</field>
</record>
<act_window id="action_claim_from_delivery" name="Claim" <act_window id="action_claim_from_delivery" name="Claim"
domain="[]" target="current" domain="[]" target="current"
@ -20,5 +7,5 @@
view_mode="form" res_model="crm.claim" view_mode="form" res_model="crm.claim"
src_model="stock.picking" /> src_model="stock.picking" />
</data> </data>
</openerp> </openerp>

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-20 12:02+0000\n" "POT-Creation-Date: 2010-08-20 12:02+0000\n"
"PO-Revision-Date: 2010-10-10 10:45+0000\n" "PO-Revision-Date: 2010-10-11 07:17+0000\n"
"Last-Translator: Ferdinand @ ChriCar <Unknown>\n" "Last-Translator: Ferdinand-chricar <Unknown>\n"
"Language-Team: German <de@li.org>\n" "Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-11 04:45+0000\n" "X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#. module: claim_from_delivery #. module: claim_from_delivery

View File

@ -158,6 +158,5 @@
action="open_board_crm" action="open_board_crm"
sequence="1" sequence="1"
id="menu_board_crm" icon="terp-graph"/> id="menu_board_crm" icon="terp-graph"/>
<menuitem icon="terp-partner" id="base.menu_base_partner" name="Sales" sequence="0" groups="base.group_sale_salesman,base.group_sale_manager,base.group_system,base.group_partner_manager" action="open_board_crm"/>
</data> </data>
</openerp> </openerp>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-01-05 05:59+0000\n" "POT-Creation-Date: 2010-01-05 05:59+0000\n"
"PO-Revision-Date: 2010-10-10 08:54+0000\n" "PO-Revision-Date: 2010-10-11 13:45+0000\n"
"Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n" "Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-11 04:45+0000\n" "X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#. module: crm #. module: crm
@ -583,7 +583,7 @@ msgstr "Augustus"
#. module: crm #. module: crm
#: view:crm.meeting:0 #: view:crm.meeting:0
msgid "Meetings Tree" msgid "Meetings Tree"
msgstr "Afsprakenboom" msgstr "Afspraken"
#. module: crm #. module: crm
#: code:addons/crm/crm.py:0 #: code:addons/crm/crm.py:0
@ -4006,7 +4006,7 @@ msgstr "ICS bestand opslaan"
#. module: crm #. module: crm
#: wizard_field:caldav.crm.subscribe,init,url_path:0 #: wizard_field:caldav.crm.subscribe,init,url_path:0
msgid "Provide path for remote calendar" msgid "Provide path for remote calendar"
msgstr "Geef het pas naar de remote agenda" msgstr "Geef het pad naar de remote agenda"
#. module: crm #. module: crm
#: view:crm.case.log:0 #: view:crm.case.log:0

View File

@ -8,35 +8,35 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-20 12:29+0000\n" "POT-Creation-Date: 2010-08-20 12:29+0000\n"
"PO-Revision-Date: 2010-09-10 14:23+0000\n" "PO-Revision-Date: 2010-10-11 09:58+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n" "Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-29 05:17+0000\n" "X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,planned_revenue:0 #: field:crm.fundraising,planned_revenue:0
msgid "Planned Revenue" msgid "Planned Revenue"
msgstr "" msgstr "Verwachte omzet"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising.report,nbr:0 #: field:crm.fundraising.report,nbr:0
msgid "# of Cases" msgid "# of Cases"
msgstr "" msgstr "# Fondsen"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "Group By..." msgid "Group By..."
msgstr "" msgstr "Groepeer op.."
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising.report,probability:0 #: field:crm.fundraising.report,probability:0
msgid "Avg. Probability" msgid "Avg. Probability"
msgstr "" msgstr "Gemiddelde kans"
#. module: crm_fundraising #. module: crm_fundraising
#: help:crm.fundraising,canal_id:0 #: help:crm.fundraising,canal_id:0
@ -45,207 +45,211 @@ msgid ""
"customer. With each commercial opportunity, you can indicate " "customer. With each commercial opportunity, you can indicate "
" the canall which is this opportunity source." " the canall which is this opportunity source."
msgstr "" msgstr ""
"De kanalen geven de verschillende beschikbare communicatievormen met de "
"klant weer. Met elke kans kunt u het kanaal aangeven wat de oorsprong van de "
"kans is."
#. module: crm_fundraising #. module: crm_fundraising
#: constraint:ir.actions.act_window:0 #: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition." msgid "Invalid model name in the action definition."
msgstr "" msgstr "Ongeldige modelnaam in de definitie van de actie."
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Funds Form" msgid "Funds Form"
msgstr "" msgstr "Fondsenformulier"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising.report,delay_close:0 #: field:crm.fundraising.report,delay_close:0
msgid "Delay to close" msgid "Delay to close"
msgstr "" msgstr "Vertraging tot sluiting"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,company_id:0 #: field:crm.fundraising,company_id:0
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,company_id:0 #: field:crm.fundraising.report,company_id:0
msgid "Company" msgid "Company"
msgstr "" msgstr "Bedrijf"
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.actions.act_window,name:crm_fundraising.crm_fund_categ_action #: model:ir.actions.act_window,name:crm_fundraising.crm_fund_categ_action
msgid "Fundraising Categories" msgid "Fundraising Categories"
msgstr "" msgstr "Fondscategorieën"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,email_cc:0 #: field:crm.fundraising,email_cc:0
msgid "Watchers Emails" msgid "Watchers Emails"
msgstr "" msgstr "Email toeschouwers"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "This Year" msgid "This Year"
msgstr "" msgstr "Dit jaar"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "Cases" msgid "Cases"
msgstr "" msgstr "Dossiers"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising,priority:0 #: selection:crm.fundraising,priority:0
msgid "Highest" msgid "Highest"
msgstr "" msgstr "Hoogste"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,day:0 #: field:crm.fundraising.report,day:0
msgid "Day" msgid "Day"
msgstr "" msgstr "Dag"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,partner_mobile:0 #: field:crm.fundraising,partner_mobile:0
msgid "Mobile" msgid "Mobile"
msgstr "" msgstr "Mobiel"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Notes" msgid "Notes"
msgstr "" msgstr "Notities"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,message_ids:0 #: field:crm.fundraising,message_ids:0
msgid "Messages" msgid "Messages"
msgstr "" msgstr "Berichten"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Amount" msgid "Amount"
msgstr "" msgstr "Bedrag"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising,state:0 #: selection:crm.fundraising,state:0
#: selection:crm.fundraising.report,state:0 #: selection:crm.fundraising.report,state:0
msgid "Cancelled" msgid "Cancelled"
msgstr "" msgstr "Geannuleerd"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,amount_revenue:0 #: field:crm.fundraising.report,amount_revenue:0
msgid "Est.Revenue" msgid "Est.Revenue"
msgstr "" msgstr "Gesch. omzet"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,partner_address_id:0 #: field:crm.fundraising,partner_address_id:0
msgid "Partner Contact" msgid "Partner Contact"
msgstr "" msgstr "Contactpersoon relatie"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "My Case" msgid "My Case"
msgstr "" msgstr "Mijn Fondsen"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,ref:0 #: field:crm.fundraising,ref:0
msgid "Reference" msgid "Reference"
msgstr "" msgstr "Verwijzing"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,date_action_next:0 #: field:crm.fundraising,date_action_next:0
msgid "Next Action" msgid "Next Action"
msgstr "" msgstr "Volgende actie"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Reset to Draft" msgid "Reset to Draft"
msgstr "" msgstr "Terugzetten naar Concept"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Extra Info" msgid "Extra Info"
msgstr "" msgstr "Extra informatie"
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.model,name:crm_fundraising.model_crm_fundraising #: model:ir.model,name:crm_fundraising.model_crm_fundraising
#: model:ir.ui.menu,name:crm_fundraising.menu_config_fundrising #: model:ir.ui.menu,name:crm_fundraising.menu_config_fundrising
#: model:ir.ui.menu,name:crm_fundraising.menu_crm_case_fund_raise #: model:ir.ui.menu,name:crm_fundraising.menu_crm_case_fund_raise
msgid "Fund Raising" msgid "Fund Raising"
msgstr "" msgstr "Fondsenwerving"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
#: field:crm.fundraising,partner_id:0 #: field:crm.fundraising,partner_id:0
#: field:crm.fundraising.report,partner_id:0 #: field:crm.fundraising.report,partner_id:0
msgid "Partner" msgid "Partner"
msgstr "" msgstr "Relatie"
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.ui.menu,name:crm_fundraising.menu_report_crm_fundraising_tree #: model:ir.ui.menu,name:crm_fundraising.menu_report_crm_fundraising_tree
msgid "Fundraising Analysis" msgid "Fundraising Analysis"
msgstr "" msgstr "Fondsenwerving Analyse"
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.module.module,shortdesc:crm_fundraising.module_meta_information #: model:ir.module.module,shortdesc:crm_fundraising.module_meta_information
msgid "CRM Fundraising" msgid "CRM Fundraising"
msgstr "" msgstr "CRM Fondsenwerving"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Estimates" msgid "Estimates"
msgstr "" msgstr "Schattingen"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,section_id:0 #: field:crm.fundraising.report,section_id:0
msgid "Section" msgid "Section"
msgstr "" msgstr "Afdeling"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Dates" msgid "Dates"
msgstr "" msgstr "Data"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
#: field:crm.fundraising,priority:0 #: field:crm.fundraising,priority:0
msgid "Priority" msgid "Priority"
msgstr "" msgstr "Prioriteit"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Send New Email" msgid "Send New Email"
msgstr "" msgstr "Verstuur nieuwe email"
#. module: crm_fundraising #. module: crm_fundraising
#: model:crm.case.categ,name:crm_fundraising.categ_fund1 #: model:crm.case.categ,name:crm_fundraising.categ_fund1
msgid "Social Rehabilitation And Rural Upliftment" msgid "Social Rehabilitation And Rural Upliftment"
msgstr "" msgstr ""
"Sociale reïntegratie en ontwikkelingsstimulans niet-stedelijke gebieden"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Payment Mode" msgid "Payment Mode"
msgstr "" msgstr "Betalingsvorm"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Reply" msgid "Reply"
msgstr "" msgstr "Beantwoorden"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,email_from:0 #: field:crm.fundraising,email_from:0
msgid "Email" msgid "Email"
msgstr "" msgstr "Email"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,canal_id:0 #: field:crm.fundraising,canal_id:0
msgid "Channel" msgid "Channel"
msgstr "" msgstr "Kanaal"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising,priority:0 #: selection:crm.fundraising,priority:0
msgid "Lowest" msgid "Lowest"
msgstr "" msgstr "Laagste"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,create_date:0 #: field:crm.fundraising,create_date:0
msgid "Creation Date" msgid "Creation Date"
msgstr "" msgstr "Aanmaakdatum"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
@ -253,127 +257,127 @@ msgstr ""
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: selection:crm.fundraising.report,state:0 #: selection:crm.fundraising.report,state:0
msgid "Pending" msgid "Pending"
msgstr "" msgstr "Wacht"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,date_deadline:0 #: field:crm.fundraising,date_deadline:0
msgid "Deadline" msgid "Deadline"
msgstr "" msgstr "Uiterste datum"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "July" msgid "July"
msgstr "" msgstr "Juli"
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.ui.menu,name:crm_fundraising.menu_crm_case_fundraising-act #: model:ir.ui.menu,name:crm_fundraising.menu_crm_case_fundraising-act
msgid "Categories" msgid "Categories"
msgstr "" msgstr "Categorieën"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,stage_id:0 #: field:crm.fundraising,stage_id:0
msgid "Stage" msgid "Stage"
msgstr "" msgstr "Fase"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "History Information" msgid "History Information"
msgstr "" msgstr "Historie Informatie"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,date_closed:0 #: field:crm.fundraising,date_closed:0
#: selection:crm.fundraising,state:0 #: selection:crm.fundraising,state:0
#: selection:crm.fundraising.report,state:0 #: selection:crm.fundraising.report,state:0
msgid "Closed" msgid "Closed"
msgstr "" msgstr "Gesloten"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,partner_name2:0 #: field:crm.fundraising,partner_name2:0
msgid "Employee Email" msgid "Employee Email"
msgstr "" msgstr "E-mail werknemer"
#. module: crm_fundraising #. module: crm_fundraising
#: model:crm.case.categ,name:crm_fundraising.categ_fund2 #: model:crm.case.categ,name:crm_fundraising.categ_fund2
msgid "Learning And Education" msgid "Learning And Education"
msgstr "" msgstr "Leren en onderwijs"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Contact" msgid "Contact"
msgstr "" msgstr "Contactpersoon"
#. module: crm_fundraising #. module: crm_fundraising
#: constraint:ir.ui.view:0 #: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!" msgid "Invalid XML for View Architecture!"
msgstr "" msgstr "Ongeldige XML voor weergave opbouw!"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "March" msgid "March"
msgstr "" msgstr "Maart"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Fund Description" msgid "Fund Description"
msgstr "" msgstr "Fonds omschrijving"
#. module: crm_fundraising #. module: crm_fundraising
#: help:crm.fundraising.report,delay_close:0 #: help:crm.fundraising.report,delay_close:0
msgid "Number of Days to close the case" msgid "Number of Days to close the case"
msgstr "" msgstr "Aantal dagen om werving af te sluiten"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: model:ir.actions.act_window,name:crm_fundraising.action_report_crm_fundraising #: model:ir.actions.act_window,name:crm_fundraising.action_report_crm_fundraising
#: model:ir.module.module,description:crm_fundraising.module_meta_information #: model:ir.module.module,description:crm_fundraising.module_meta_information
msgid "Fundraising" msgid "Fundraising"
msgstr "" msgstr "Fondsenwerving"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "September" msgid "September"
msgstr "" msgstr "September"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "December" msgid "December"
msgstr "" msgstr "December"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Funds Tree" msgid "Funds Tree"
msgstr "" msgstr "Fondsen"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,month:0 #: field:crm.fundraising.report,month:0
msgid "Month" msgid "Month"
msgstr "" msgstr "Maand"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Escalate" msgid "Escalate"
msgstr "" msgstr "Escaleren"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,write_date:0 #: field:crm.fundraising,write_date:0
msgid "Update Date" msgid "Update Date"
msgstr "" msgstr "Wijzigingsdatum"
#. module: crm_fundraising #. module: crm_fundraising
#: model:crm.case.resource.type,name:crm_fundraising.type_fund3 #: model:crm.case.resource.type,name:crm_fundraising.type_fund3
msgid "Credit Card" msgid "Credit Card"
msgstr "" msgstr "Creditcard"
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.actions.act_window,name:crm_fundraising.crm_fundraising_stage_act #: model:ir.actions.act_window,name:crm_fundraising.crm_fundraising_stage_act
msgid "Fundraising Stages" msgid "Fundraising Stages"
msgstr "" msgstr "Fondswerving fasen"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,ref2:0 #: field:crm.fundraising,ref2:0
msgid "Reference 2" msgid "Reference 2"
msgstr "" msgstr "Referentie 2"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
@ -381,17 +385,17 @@ msgstr ""
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,categ_id:0 #: field:crm.fundraising.report,categ_id:0
msgid "Category" msgid "Category"
msgstr "" msgstr "Categorie"
#. module: crm_fundraising #. module: crm_fundraising
#: model:crm.case.categ,name:crm_fundraising.categ_fund4 #: model:crm.case.categ,name:crm_fundraising.categ_fund4
msgid "Arts And Culture" msgid "Arts And Culture"
msgstr "" msgstr "Kunst en cultuur"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,planned_cost:0 #: field:crm.fundraising,planned_cost:0
msgid "Planned Costs" msgid "Planned Costs"
msgstr "" msgstr "Verwachte kosten"
#. module: crm_fundraising #. module: crm_fundraising
#: help:crm.fundraising,email_cc:0 #: help:crm.fundraising,email_cc:0
@ -400,145 +404,148 @@ msgid ""
"outbound emails for this record before being sent. Separate multiple email " "outbound emails for this record before being sent. Separate multiple email "
"addresses with a comma" "addresses with a comma"
msgstr "" msgstr ""
"Deze email adressen worden toegevoegd aan het CC veld van alle inkomende en "
"uitgaande emails van dit record voordat het wordt verstuurd. Meerdere namen "
"scheidt u met een komma (,)."
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising,state:0 #: selection:crm.fundraising,state:0
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: selection:crm.fundraising.report,state:0 #: selection:crm.fundraising.report,state:0
msgid "Draft" msgid "Draft"
msgstr "" msgstr "Concept"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising,priority:0 #: selection:crm.fundraising,priority:0
msgid "Low" msgid "Low"
msgstr "" msgstr "Laag"
#. module: crm_fundraising #. module: crm_fundraising
#: constraint:ir.ui.menu:0 #: constraint:ir.ui.menu:0
msgid "Error ! You can not create recursive Menu." msgid "Error ! You can not create recursive Menu."
msgstr "" msgstr "Fout ! U kunt geen recursief menu maken."
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "7 Days" msgid "7 Days"
msgstr "" msgstr "7 Dagen"
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.ui.menu,name:crm_fundraising.menu_crm_fundraising_stage_act #: model:ir.ui.menu,name:crm_fundraising.menu_crm_fundraising_stage_act
msgid "Stages" msgid "Stages"
msgstr "" msgstr "Fasen"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "August" msgid "August"
msgstr "" msgstr "Augustus"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising,priority:0 #: selection:crm.fundraising,priority:0
msgid "Normal" msgid "Normal"
msgstr "" msgstr "Normaal"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Global CC" msgid "Global CC"
msgstr "" msgstr "Globale CC"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
#: model:ir.actions.act_window,name:crm_fundraising.crm_case_category_act_fund_all1 #: model:ir.actions.act_window,name:crm_fundraising.crm_case_category_act_fund_all1
msgid "Funds" msgid "Funds"
msgstr "" msgstr "Fondsen"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "June" msgid "June"
msgstr "" msgstr "Juni"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,partner_phone:0 #: field:crm.fundraising,partner_phone:0
msgid "Phone" msgid "Phone"
msgstr "" msgstr "Telefoon"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,user_id:0 #: field:crm.fundraising.report,user_id:0
msgid "User" msgid "User"
msgstr "" msgstr "Gebruiker"
#. module: crm_fundraising #. module: crm_fundraising
#: model:crm.case.resource.type,name:crm_fundraising.type_fund2 #: model:crm.case.resource.type,name:crm_fundraising.type_fund2
msgid "Cheque" msgid "Cheque"
msgstr "" msgstr "Cheque"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,active:0 #: field:crm.fundraising,active:0
msgid "Active" msgid "Active"
msgstr "" msgstr "Actief"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "November" msgid "November"
msgstr "" msgstr "November"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "Extended Filters..." msgid "Extended Filters..."
msgstr "" msgstr "Uitgebreide filters..."
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.ui.menu,name:crm_fundraising.menu_crm_fundraising_resource_act #: model:ir.ui.menu,name:crm_fundraising.menu_crm_fundraising_resource_act
msgid "Resource Type" msgid "Resource Type"
msgstr "" msgstr "Betalingsvorm"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "Search" msgid "Search"
msgstr "" msgstr "Zoeken"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "October" msgid "October"
msgstr "" msgstr "Oktober"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "January" msgid "January"
msgstr "" msgstr "Januari"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "#Fundraising" msgid "#Fundraising"
msgstr "" msgstr "# Fondsen"
#. module: crm_fundraising #. module: crm_fundraising
#: help:crm.fundraising,email_from:0 #: help:crm.fundraising,email_from:0
msgid "These people will receive email." msgid "These people will receive email."
msgstr "" msgstr "Deze personen ontvangen email."
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,date:0 #: field:crm.fundraising,date:0
msgid "Date" msgid "Date"
msgstr "" msgstr "Datum"
#. module: crm_fundraising #. module: crm_fundraising
#: model:crm.case.categ,name:crm_fundraising.categ_fund3 #: model:crm.case.categ,name:crm_fundraising.categ_fund3
msgid "Healthcare" msgid "Healthcare"
msgstr "" msgstr "Gezondheidszorg"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "History" msgid "History"
msgstr "" msgstr "Historie"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Attachments" msgid "Attachments"
msgstr "" msgstr "Bijlagen"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Misc" msgid "Misc"
msgstr "" msgstr "Overig"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
@ -546,24 +553,24 @@ msgstr ""
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,state:0 #: field:crm.fundraising.report,state:0
msgid "State" msgid "State"
msgstr "" msgstr "Status"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "Done" msgid "Done"
msgstr "" msgstr "Klaar"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Communication" msgid "Communication"
msgstr "" msgstr "Communicatie"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr "Annuleren"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
@ -571,24 +578,25 @@ msgstr ""
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: selection:crm.fundraising.report,state:0 #: selection:crm.fundraising.report,state:0
msgid "Open" msgid "Open"
msgstr "" msgstr "Open"
#. module: crm_fundraising #. module: crm_fundraising
#: constraint:ir.model:0 #: constraint:ir.model:0
msgid "" msgid ""
"The Object name must start with x_ and not contain any special character !" "The Object name must start with x_ and not contain any special character !"
msgstr "" msgstr ""
"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten!"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
#: field:crm.fundraising,user_id:0 #: field:crm.fundraising,user_id:0
msgid "Responsible" msgid "Responsible"
msgstr "" msgstr "Verantwoordelijke"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Current" msgid "Current"
msgstr "" msgstr "Actueel"
#. module: crm_fundraising #. module: crm_fundraising
#: help:crm.fundraising,section_id:0 #: help:crm.fundraising,section_id:0
@ -596,57 +604,59 @@ msgid ""
"Sales team to which Case belongs to. Define Responsible user and Email " "Sales team to which Case belongs to. Define Responsible user and Email "
"account for mail gateway." "account for mail gateway."
msgstr "" msgstr ""
"Verkoopteam waaraan dit fonds is toegewezen. Definieer de verantwoordelijke "
"gebruiker en Email account voor de mail gateway."
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Details" msgid "Details"
msgstr "" msgstr "Details"
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.model,name:crm_fundraising.model_crm_fundraising_report #: model:ir.model,name:crm_fundraising.model_crm_fundraising_report
msgid "CRM Fundraising Report" msgid "CRM Fundraising Report"
msgstr "" msgstr "CRM Fondsenwerving overzicht"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,type_id:0 #: field:crm.fundraising,type_id:0
msgid "Fundraising Type" msgid "Fundraising Type"
msgstr "" msgstr "Betalingsvorm"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,amount_revenue_prob:0 #: field:crm.fundraising.report,amount_revenue_prob:0
msgid "Est. Rev*Prob." msgid "Est. Rev*Prob."
msgstr "" msgstr "Verw. omzet*kans"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,description:0 #: field:crm.fundraising,description:0
msgid "Description" msgid "Description"
msgstr "" msgstr "Omschrijving"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "May" msgid "May"
msgstr "" msgstr "Mei"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,probability:0 #: field:crm.fundraising,probability:0
msgid "Probability (%)" msgid "Probability (%)"
msgstr "" msgstr "Waarschijnlijkheid (%)"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,partner_name:0 #: field:crm.fundraising,partner_name:0
msgid "Employee's Name" msgid "Employee's Name"
msgstr "" msgstr "Relatienaam"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
msgid "This Month" msgid "This Month"
msgstr "" msgstr "Deze maand"
#. module: crm_fundraising #. module: crm_fundraising
#: model:ir.actions.act_window,name:crm_fundraising.crm_fundraising_resource_act #: model:ir.actions.act_window,name:crm_fundraising.crm_fundraising_resource_act
msgid "Fundraising Resource Type" msgid "Fundraising Resource Type"
msgstr "" msgstr "Fondsenwerving betalingsvorm"
#. module: crm_fundraising #. module: crm_fundraising
#: help:crm.fundraising,state:0 #: help:crm.fundraising,state:0
@ -659,86 +669,94 @@ msgid ""
" \n" " \n"
"If the case needs to be reviewed then the state is set to 'Pending'." "If the case needs to be reviewed then the state is set to 'Pending'."
msgstr "" msgstr ""
"De status wordt op 'Concept' gezet als de aanvraag wordt gemaakt. "
" \n"
"Als de aanvraag in behandeling is, wordt de status op 'Open' gezet. "
" \n"
"Als de aanvraag klaar is, gaat de status naar 'Gereed'. "
" \n"
"Als de aanvraag moet worden onderzocht, wordt de status op 'Behandeling' "
"gezet."
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "February" msgid "February"
msgstr "" msgstr "Februari"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
#: field:crm.fundraising,name:0 #: field:crm.fundraising,name:0
msgid "Name" msgid "Name"
msgstr "" msgstr "Naam"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Communication history" msgid "Communication history"
msgstr "" msgstr "Communicatiegeschiedenis"
#. module: crm_fundraising #. module: crm_fundraising
#: model:crm.case.resource.type,name:crm_fundraising.type_fund1 #: model:crm.case.resource.type,name:crm_fundraising.type_fund1
msgid "Cash" msgid "Cash"
msgstr "" msgstr "Contant"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Funds by Categories" msgid "Funds by Categories"
msgstr "" msgstr "Fondsen op categorie"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising.report,month:0 #: selection:crm.fundraising.report,month:0
msgid "April" msgid "April"
msgstr "" msgstr "April"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "References" msgid "References"
msgstr "" msgstr "Verwijzingen"
#. module: crm_fundraising #. module: crm_fundraising
#: model:crm.case.resource.type,name:crm_fundraising.type_fund4 #: model:crm.case.resource.type,name:crm_fundraising.type_fund4
msgid "Demand Draft" msgid "Demand Draft"
msgstr "" msgstr "Incasso"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,id:0 #: field:crm.fundraising,id:0
msgid "ID" msgid "ID"
msgstr "" msgstr "ID"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
msgid "Search Funds" msgid "Search Funds"
msgstr "" msgstr "Zoek fondsen"
#. module: crm_fundraising #. module: crm_fundraising
#: selection:crm.fundraising,priority:0 #: selection:crm.fundraising,priority:0
msgid "High" msgid "High"
msgstr "" msgstr "Hoog"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising:0 #: view:crm.fundraising:0
#: field:crm.fundraising,section_id:0 #: field:crm.fundraising,section_id:0
msgid "Sales Team" msgid "Sales Team"
msgstr "" msgstr "Verkoopteam"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising.report,create_date:0 #: field:crm.fundraising.report,create_date:0
msgid "Create Date" msgid "Create Date"
msgstr "" msgstr "Aanmaakdatum"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,date_action_last:0 #: field:crm.fundraising,date_action_last:0
msgid "Last Action" msgid "Last Action"
msgstr "" msgstr "Laatste actie"
#. module: crm_fundraising #. module: crm_fundraising
#: view:crm.fundraising.report:0 #: view:crm.fundraising.report:0
#: field:crm.fundraising.report,name:0 #: field:crm.fundraising.report,name:0
msgid "Year" msgid "Year"
msgstr "" msgstr "Jaar"
#. module: crm_fundraising #. module: crm_fundraising
#: field:crm.fundraising,duration:0 #: field:crm.fundraising,duration:0
msgid "Duration" msgid "Duration"
msgstr "" msgstr "Duur"

View File

@ -8,124 +8,124 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-20 13:01+0000\n" "POT-Creation-Date: 2010-08-20 13:01+0000\n"
"PO-Revision-Date: 2010-09-10 09:13+0000\n" "PO-Revision-Date: 2010-10-11 08:22+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n" "Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-29 05:18+0000\n" "X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk.report,nbr:0 #: field:crm.helpdesk.report,nbr:0
msgid "# of Cases" msgid "# of Cases"
msgstr "" msgstr "# Aanvragen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Group By..." msgid "Group By..."
msgstr "" msgstr "Groepeer op.."
#. module: crm_helpdesk #. module: crm_helpdesk
#: constraint:ir.actions.act_window:0 #: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition." msgid "Invalid model name in the action definition."
msgstr "" msgstr "Ongeldige modelnaam in de definitie van de actie."
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Today" msgid "Today"
msgstr "" msgstr "Vandaag"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "March" msgid "March"
msgstr "" msgstr "Maart"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk.report,delay_close:0 #: field:crm.helpdesk.report,delay_close:0
msgid "Delay to close" msgid "Delay to close"
msgstr "" msgstr "Vertraging tot sluiting"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,company_id:0 #: field:crm.helpdesk,company_id:0
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,company_id:0 #: field:crm.helpdesk.report,company_id:0
msgid "Company" msgid "Company"
msgstr "" msgstr "Bedrijf"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,email_cc:0 #: field:crm.helpdesk,email_cc:0
msgid "Watchers Emails" msgid "Watchers Emails"
msgstr "" msgstr "Emails toeschouwers"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "This Year" msgid "This Year"
msgstr "" msgstr "Dit jaar"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Cases" msgid "Cases"
msgstr "" msgstr "Aanvragen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,priority:0 #: selection:crm.helpdesk,priority:0
#: selection:crm.helpdesk.report,priority:0 #: selection:crm.helpdesk.report,priority:0
msgid "Highest" msgid "Highest"
msgstr "" msgstr "Hoogste"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk.report,day:0 #: field:crm.helpdesk.report,day:0
msgid "Day" msgid "Day"
msgstr "" msgstr "Dag"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Notes" msgid "Notes"
msgstr "" msgstr "Notities"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,message_ids:0 #: field:crm.helpdesk,message_ids:0
msgid "Messages" msgid "Messages"
msgstr "" msgstr "Berichten"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,state:0 #: selection:crm.helpdesk,state:0
#: selection:crm.helpdesk.report,state:0 #: selection:crm.helpdesk.report,state:0
msgid "Cancelled" msgid "Cancelled"
msgstr "" msgstr "Geannuleerd"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,partner_address_id:0 #: field:crm.helpdesk,partner_address_id:0
msgid "Partner Contact" msgid "Partner Contact"
msgstr "" msgstr "Contactpersoon relatie"
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.ui.menu,name:crm_helpdesk.menu_report_crm_helpdesks_tree #: model:ir.ui.menu,name:crm_helpdesk.menu_report_crm_helpdesks_tree
msgid "Helpdesk Analysis" msgid "Helpdesk Analysis"
msgstr "" msgstr "Helpdesk Analyse"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,ref:0 #: field:crm.helpdesk,ref:0
msgid "Reference" msgid "Reference"
msgstr "" msgstr "Verwijzing"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,date_action_next:0 #: field:crm.helpdesk,date_action_next:0
msgid "Next Action" msgid "Next Action"
msgstr "" msgstr "Volgende actie"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Helpdesk Supports" msgid "Helpdesk Supports"
msgstr "" msgstr "Helpdesk ondersteuning"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Extra Info" msgid "Extra Info"
msgstr "" msgstr "Extra info"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -133,30 +133,30 @@ msgstr ""
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,partner_id:0 #: field:crm.helpdesk.report,partner_id:0
msgid "Partner" msgid "Partner"
msgstr "" msgstr "Relatie"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,date_closed:0 #: field:crm.helpdesk,date_closed:0
#: selection:crm.helpdesk,state:0 #: selection:crm.helpdesk,state:0
#: selection:crm.helpdesk.report,state:0 #: selection:crm.helpdesk.report,state:0
msgid "Closed" msgid "Closed"
msgstr "" msgstr "Gesloten"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Estimates" msgid "Estimates"
msgstr "" msgstr "Schattingen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,section_id:0 #: field:crm.helpdesk.report,section_id:0
msgid "Section" msgid "Section"
msgstr "" msgstr "Afdeling"
#. module: crm_helpdesk #. module: crm_helpdesk
#: constraint:ir.ui.view:0 #: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!" msgid "Invalid XML for View Architecture!"
msgstr "" msgstr "Ongeldige XML voor weergave opbouw!"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -164,60 +164,60 @@ msgstr ""
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,priority:0 #: field:crm.helpdesk.report,priority:0
msgid "Priority" msgid "Priority"
msgstr "" msgstr "Prioriteit"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Send New Email" msgid "Send New Email"
msgstr "" msgstr "Verstuur nieuwe email"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Won" msgid "Won"
msgstr "" msgstr "Gewonnen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Reply" msgid "Reply"
msgstr "" msgstr "Beantwoorden"
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.model,name:crm_helpdesk.model_crm_helpdesk_report #: model:ir.model,name:crm_helpdesk.model_crm_helpdesk_report
msgid "Helpdesk report after Sales Services" msgid "Helpdesk report after Sales Services"
msgstr "" msgstr "Helpdesk overzicht Nazorg"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,email_from:0 #: field:crm.helpdesk,email_from:0
msgid "Email" msgid "Email"
msgstr "" msgstr "Email"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,canal_id:0 #: field:crm.helpdesk,canal_id:0
msgid "Channel" msgid "Channel"
msgstr "" msgstr "Kanaal"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,priority:0 #: selection:crm.helpdesk,priority:0
#: selection:crm.helpdesk.report,priority:0 #: selection:crm.helpdesk.report,priority:0
msgid "Lowest" msgid "Lowest"
msgstr "" msgstr "Laagste"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,create_date:0 #: field:crm.helpdesk,create_date:0
msgid "Creation Date" msgid "Creation Date"
msgstr "" msgstr "Aanmaakdatum"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Reset to Draft" msgid "Reset to Draft"
msgstr "" msgstr "Terugzetten naar Concept"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
#: selection:crm.helpdesk,state:0 #: selection:crm.helpdesk,state:0
#: selection:crm.helpdesk.report,state:0 #: selection:crm.helpdesk.report,state:0
msgid "Pending" msgid "Pending"
msgstr "" msgstr "Wacht"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -225,37 +225,37 @@ msgstr ""
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,date_deadline:0 #: field:crm.helpdesk.report,date_deadline:0
msgid "Deadline" msgid "Deadline"
msgstr "" msgstr "Uiterste datum"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "July" msgid "July"
msgstr "" msgstr "July"
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.actions.act_window,name:crm_helpdesk.crm_helpdesk_categ_action #: model:ir.actions.act_window,name:crm_helpdesk.crm_helpdesk_categ_action
msgid "Helpdesk Categories" msgid "Helpdesk Categories"
msgstr "" msgstr "Helpdesk categorieën"
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.ui.menu,name:crm_helpdesk.menu_crm_case_helpdesk-act #: model:ir.ui.menu,name:crm_helpdesk.menu_crm_case_helpdesk-act
msgid "Categories" msgid "Categories"
msgstr "" msgstr "Categorieën"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "History Information" msgid "History Information"
msgstr "" msgstr "Historie informatie"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Dates" msgid "Dates"
msgstr "" msgstr "Data"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "#Helpdesk" msgid "#Helpdesk"
msgstr "" msgstr "#Helpdesk"
#. module: crm_helpdesk #. module: crm_helpdesk
#: help:crm.helpdesk,email_cc:0 #: help:crm.helpdesk,email_cc:0
@ -264,187 +264,190 @@ msgid ""
"outbound emails for this record before being sent. Separate multiple email " "outbound emails for this record before being sent. Separate multiple email "
"addresses with a comma" "addresses with a comma"
msgstr "" msgstr ""
"Deze email addressen worden toegevoegd aan het CC veld van alle inkomende en "
"uitgaande emails van dit record voordat het wordt verstuurd. Meerdere namen "
"scheidt u met een komma (,)."
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "September" msgid "September"
msgstr "" msgstr "September"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "December" msgid "December"
msgstr "" msgstr "December"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,month:0 #: field:crm.helpdesk.report,month:0
msgid "Month" msgid "Month"
msgstr "" msgstr "Maand"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Escalate" msgid "Escalate"
msgstr "" msgstr "Escaleren"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,write_date:0 #: field:crm.helpdesk,write_date:0
msgid "Update Date" msgid "Update Date"
msgstr "" msgstr "Wijzigingsdatum"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Query" msgid "Query"
msgstr "" msgstr "Aanvraag"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,ref2:0 #: field:crm.helpdesk,ref2:0
msgid "Reference 2" msgid "Reference 2"
msgstr "" msgstr "Referentie 2"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,categ_id:0 #: field:crm.helpdesk,categ_id:0
msgid "Category" msgid "Category"
msgstr "" msgstr "Categorie"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Helpdesk Support" msgid "Helpdesk Support"
msgstr "" msgstr "Helpdesk ondersteuning"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,planned_cost:0 #: field:crm.helpdesk,planned_cost:0
msgid "Planned Costs" msgid "Planned Costs"
msgstr "" msgstr "Verwachte kosten"
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.module.module,description:crm_helpdesk.module_meta_information #: model:ir.module.module,description:crm_helpdesk.module_meta_information
msgid "Helpdesk Management" msgid "Helpdesk Management"
msgstr "" msgstr "Helpdesk management"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Search Helpdesk" msgid "Search Helpdesk"
msgstr "" msgstr "Zoek helpdesk"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,state:0 #: selection:crm.helpdesk,state:0
#: selection:crm.helpdesk.report,state:0 #: selection:crm.helpdesk.report,state:0
msgid "Draft" msgid "Draft"
msgstr "" msgstr "Concept"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,priority:0 #: selection:crm.helpdesk,priority:0
#: selection:crm.helpdesk.report,priority:0 #: selection:crm.helpdesk.report,priority:0
msgid "Low" msgid "Low"
msgstr "" msgstr "Laag"
#. module: crm_helpdesk #. module: crm_helpdesk
#: constraint:ir.ui.menu:0 #: constraint:ir.ui.menu:0
msgid "Error ! You can not create recursive Menu." msgid "Error ! You can not create recursive Menu."
msgstr "" msgstr "Fout ! U kunt geen recursief menu maken."
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "7 Days" msgid "7 Days"
msgstr "" msgstr "7 Dagen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "August" msgid "August"
msgstr "" msgstr "Augustus"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,priority:0 #: selection:crm.helpdesk,priority:0
#: selection:crm.helpdesk.report,priority:0 #: selection:crm.helpdesk.report,priority:0
msgid "Normal" msgid "Normal"
msgstr "" msgstr "Normaal"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Global CC" msgid "Global CC"
msgstr "" msgstr "Globale CC"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "June" msgid "June"
msgstr "" msgstr "Juni"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,planned_revenue:0 #: field:crm.helpdesk,planned_revenue:0
msgid "Planned Revenue" msgid "Planned Revenue"
msgstr "" msgstr "Verwachte omzet"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,user_id:0 #: field:crm.helpdesk.report,user_id:0
msgid "User" msgid "User"
msgstr "" msgstr "Gebruiker"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,active:0 #: field:crm.helpdesk,active:0
msgid "Active" msgid "Active"
msgstr "" msgstr "Actief"
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.module.module,shortdesc:crm_helpdesk.module_meta_information #: model:ir.module.module,shortdesc:crm_helpdesk.module_meta_information
msgid "CRM Helpdesk" msgid "CRM Helpdesk"
msgstr "" msgstr "CRM Helpdesk"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Extended Filters..." msgid "Extended Filters..."
msgstr "" msgstr "Uitgebreide filters..."
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.actions.act_window,name:crm_helpdesk.crm_case_helpdesk_act111 #: model:ir.actions.act_window,name:crm_helpdesk.crm_case_helpdesk_act111
msgid "Helpdesk Requests" msgid "Helpdesk Requests"
msgstr "" msgstr "Helpdesk aanvragen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Search" msgid "Search"
msgstr "" msgstr "Zoeken"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "October" msgid "October"
msgstr "" msgstr "Oktober"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "January" msgid "January"
msgstr "" msgstr "Januari"
#. module: crm_helpdesk #. module: crm_helpdesk
#: help:crm.helpdesk,email_from:0 #: help:crm.helpdesk,email_from:0
msgid "These people will receive email." msgid "These people will receive email."
msgstr "" msgstr "Deze personen ontvangen email."
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
#: field:crm.helpdesk,date:0 #: field:crm.helpdesk,date:0
msgid "Date" msgid "Date"
msgstr "" msgstr "Datum"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "November" msgid "November"
msgstr "" msgstr "November"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "History" msgid "History"
msgstr "" msgstr "Historie"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Attachments" msgid "Attachments"
msgstr "" msgstr "Bijlagen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Misc" msgid "Misc"
msgstr "" msgstr "Overig"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -452,17 +455,17 @@ msgstr ""
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,state:0 #: field:crm.helpdesk.report,state:0
msgid "State" msgid "State"
msgstr "" msgstr "Status"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "General" msgid "General"
msgstr "" msgstr "Algemeen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Send Reminder" msgid "Send Reminder"
msgstr "" msgstr "Verstuur herinnering"
#. module: crm_helpdesk #. module: crm_helpdesk
#: help:crm.helpdesk,section_id:0 #: help:crm.helpdesk,section_id:0
@ -470,49 +473,52 @@ msgid ""
"Sales team to which Case belongs to. Define " "Sales team to which Case belongs to. Define "
"Responsible user and Email account for mail gateway." "Responsible user and Email account for mail gateway."
msgstr "" msgstr ""
"Verkoopteam waaraan aanvraag is toegewezen. Definieer Verantwoordelijke "
"gebruiker en Email account voor mail gateway."
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Done" msgid "Done"
msgstr "" msgstr "Klaar"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Communication" msgid "Communication"
msgstr "" msgstr "Communicatie"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr "Annuleren"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Close" msgid "Close"
msgstr "" msgstr "Sluiten"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
#: selection:crm.helpdesk,state:0 #: selection:crm.helpdesk,state:0
#: selection:crm.helpdesk.report,state:0 #: selection:crm.helpdesk.report,state:0
msgid "Open" msgid "Open"
msgstr "" msgstr "Open"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Helpdesk Support Tree" msgid "Helpdesk Support Tree"
msgstr "" msgstr "Helpdesk aanvragen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Categorization" msgid "Categorization"
msgstr "" msgstr "Classificatie"
#. module: crm_helpdesk #. module: crm_helpdesk
#: constraint:ir.model:0 #: constraint:ir.model:0
msgid "" msgid ""
"The Object name must start with x_ and not contain any special character !" "The Object name must start with x_ and not contain any special character !"
msgstr "" msgstr ""
"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten!"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
@ -520,38 +526,38 @@ msgstr ""
#: model:ir.model,name:crm_helpdesk.model_crm_helpdesk #: model:ir.model,name:crm_helpdesk.model_crm_helpdesk
#: model:ir.ui.menu,name:crm_helpdesk.menu_config_helpdesk #: model:ir.ui.menu,name:crm_helpdesk.menu_config_helpdesk
msgid "Helpdesk" msgid "Helpdesk"
msgstr "" msgstr "Helpdesk"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
#: field:crm.helpdesk,user_id:0 #: field:crm.helpdesk,user_id:0
msgid "Responsible" msgid "Responsible"
msgstr "" msgstr "Verantwoordelijke"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Current" msgid "Current"
msgstr "" msgstr "Actueel"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Details" msgid "Details"
msgstr "" msgstr "Details"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,description:0 #: field:crm.helpdesk,description:0
msgid "Description" msgid "Description"
msgstr "" msgstr "Omschrijving"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "May" msgid "May"
msgstr "" msgstr "Mei"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,probability:0 #: field:crm.helpdesk,probability:0
msgid "Probability (%)" msgid "Probability (%)"
msgstr "" msgstr "Waarschijnlijkheid (%)"
#. module: crm_helpdesk #. module: crm_helpdesk
#: help:crm.helpdesk,canal_id:0 #: help:crm.helpdesk,canal_id:0
@ -559,11 +565,13 @@ msgid ""
"The channels represent the different communication modes available with the " "The channels represent the different communication modes available with the "
"customer." "customer."
msgstr "" msgstr ""
"De kanalen geven de verschillende beschikbare communicatievormen met de "
"klant weer."
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "This Month" msgid "This Month"
msgstr "" msgstr "Deze maand"
#. module: crm_helpdesk #. module: crm_helpdesk
#: help:crm.helpdesk,state:0 #: help:crm.helpdesk,state:0
@ -576,76 +584,84 @@ msgid ""
" \n" " \n"
"If the case needs to be reviewed then the state is set to 'Pending'." "If the case needs to be reviewed then the state is set to 'Pending'."
msgstr "" msgstr ""
"De status wordt op 'Concept' gezet als de aanvraag wordt gemaakt. "
" \n"
"Als de aanvraag in behandeling is, wordt de status op 'Open' gezet. "
" \n"
"Als de aanvraag klaar is, gaat de status naar 'Gereed'. "
" \n"
"Als de aanvraag moet worden onderzocht, wordt de status op 'Behandeling' "
"gezet."
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "February" msgid "February"
msgstr "" msgstr "Februari"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,name:0 #: field:crm.helpdesk,name:0
msgid "Name" msgid "Name"
msgstr "" msgstr "Naam"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Lost" msgid "Lost"
msgstr "" msgstr "Verloren"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Communication history" msgid "Communication history"
msgstr "" msgstr "Communicatiegeschiedenis"
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.ui.menu,name:crm_helpdesk.menu_help_support_main #: model:ir.ui.menu,name:crm_helpdesk.menu_help_support_main
msgid "Helpdesk and Support" msgid "Helpdesk and Support"
msgstr "" msgstr "Helpdesk en ondersteuning"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0 #: selection:crm.helpdesk.report,month:0
msgid "April" msgid "April"
msgstr "" msgstr "April"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "References" msgid "References"
msgstr "" msgstr "Verwijzingen"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,id:0 #: field:crm.helpdesk,id:0
msgid "ID" msgid "ID"
msgstr "" msgstr "ID"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,priority:0 #: selection:crm.helpdesk,priority:0
#: selection:crm.helpdesk.report,priority:0 #: selection:crm.helpdesk.report,priority:0
msgid "High" msgid "High"
msgstr "" msgstr "Hoog"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
#: field:crm.helpdesk,section_id:0 #: field:crm.helpdesk,section_id:0
msgid "Sales Team" msgid "Sales Team"
msgstr "" msgstr "Verkoopteam"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk.report,create_date:0 #: field:crm.helpdesk.report,create_date:0
msgid "Create Date" msgid "Create Date"
msgstr "" msgstr "Aanmaakdatum"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,date_action_last:0 #: field:crm.helpdesk,date_action_last:0
msgid "Last Action" msgid "Last Action"
msgstr "" msgstr "Laatste actie"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,name:0 #: field:crm.helpdesk.report,name:0
msgid "Year" msgid "Year"
msgstr "" msgstr "Jaar"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,duration:0 #: field:crm.helpdesk,duration:0
msgid "Duration" msgid "Duration"
msgstr "" msgstr "Duur"

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-20 05:24+0000\n" "POT-Creation-Date: 2010-08-20 05:24+0000\n"
"PO-Revision-Date: 2010-10-10 10:48+0000\n" "PO-Revision-Date: 2010-10-11 07:17+0000\n"
"Last-Translator: Ferdinand @ ChriCar <Unknown>\n" "Last-Translator: Ferdinand-chricar <Unknown>\n"
"Language-Team: German <de@li.org>\n" "Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-11 04:45+0000\n" "X-Launchpad-Export-Date: 2010-10-12 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n" "X-Generator: Launchpad (build Unknown)\n"
#. module: decimal_precision #. module: decimal_precision

View File

@ -175,22 +175,6 @@
</field> </field>
</record> </record>
<record id="view_picking_withcarrier_delivery_form" model="ir.ui.view">
<field name="name">delivery.stock.picking_withcarrier.delivery.form.view</field>
<field name="type">form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_delivery_form"/>
<field name="arch" type="xml">
<field name="address_id" position="after">
<field name="carrier_id"/>
<field name="carrier_tracking_ref" groups="base.group_extended"/>
<field name="number_of_packages" groups="base.group_extended"/>
<field name="weight"/>
<field name="weight_net"/>
</field>
</field>
</record>
<record id="action_picking_tree4" model="ir.actions.act_window"> <record id="action_picking_tree4" model="ir.actions.act_window">
<field name="name">Picking to be invoiced</field> <field name="name">Picking to be invoiced</field>
<field name="res_model">stock.picking</field> <field name="res_model">stock.picking</field>
@ -242,19 +226,6 @@
</field> </field>
</record> </record>
<record id="view_picking_withcarrier_delivery_move_form" model="ir.ui.view">
<field name="name">delivery.stock.picking_withcarrier.delivery.move.form.view</field>
<field name="type">form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_delivery_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after">
<field name="weight"/>
<field name="weight_net"/>
</xpath>
</field>
</record>
<record id="view_move_withweight_form" model="ir.ui.view"> <record id="view_move_withweight_form" model="ir.ui.view">
<field name="name">stock.move.form.weight</field> <field name="name">stock.move.form.weight</field>
<field name="type">form</field> <field name="type">form</field>
@ -287,7 +258,7 @@
<field name="inherit_id" ref="sale.view_order_form"/> <field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Sales Order']/group[1]/button[@name='button_dummy']" position="after"> <xpath expr="/form/notebook/page[@string='Sales Order']/group[1]/button[@name='button_dummy']" position="after">
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':id}"/> <button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':active_id}"/>
</xpath> </xpath>
</field> </field>
</record> </record>

View File

@ -12,7 +12,6 @@
invoice_state: none invoice_state: none
move_lines: move_lines:
- company_id: base.main_company - company_id: base.main_company
date_planned: '2010-05-11 15:18:57'
location_dest_id: stock.stock_location_customers location_dest_id: stock.stock_location_customers
location_id: stock.stock_location_stock location_id: stock.stock_location_stock
name: HP CD writers name: HP CD writers

View File

@ -4,27 +4,27 @@
<!-- Delivery Sale Order --> <!-- Delivery Sale Order -->
<record id="view_make_delivery_wizard" model="ir.ui.view"> <record id="view_make_delivery_wizard" model="ir.ui.view">
<field name="name">Delivery Costs</field> <field name="name">Delivery Costs</field>
<field name="model">delivery.sale.order</field> <field name="model">delivery.sale.order</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Create Deliveries"> <form string="Create Deliveries">
<separator colspan="4" string="Delivery Method" /> <separator colspan="4" string="Delivery Method" />
<field name="carrier_id" widget="selection"/> <field name="carrier_id" widget="selection"/>
<newline/> <newline/>
<separator colspan="4"/> <separator colspan="4"/>
<group col="2" colspan="4"> <group col="2" colspan="4">
<button icon='gtk-cancel' special="cancel" <button icon='gtk-cancel' special="cancel"
string="_Cancel" /> string="_Cancel" />
<button name="delivery_set" string="_Apply" <button name="delivery_set" string="_Apply"
colspan="1" type="object" icon="gtk-apply" /> colspan="1" type="object" icon="gtk-apply" />
</group> </group>
</form> </form>
</field> </field>
</record> </record>
<record id="action_delivery_cost" model="ir.actions.act_window"> <record id="action_delivery_cost" model="ir.actions.act_window">
<field name="name">Delivery Costs</field> <field name="name">Delivery Costs</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">delivery.sale.order</field> <field name="res_model">delivery.sale.order</field>
@ -34,5 +34,5 @@
<field name="target">new</field> <field name="target">new</field>
</record> </record>
</data> </data>
</openerp> </openerp>

View File

@ -88,10 +88,10 @@ class event_event(osv.osv):
#send reminder that will confirm the event for all the people that were already confirmed #send reminder that will confirm the event for all the people that were already confirmed
reg_ids = register_pool.search(cr, uid, [ reg_ids = register_pool.search(cr, uid, [
('event_id', '=', event.id), ('event_id', '=', event.id),
('state', 'not in', ['draft', 'cancel'])]) ('state', 'not in', ['draft', 'cancel'])], context=context)
register_pool.mail_user_confirm(cr, uid, reg_ids) register_pool.mail_user_confirm(cr, uid, reg_ids)
return self.write(cr, uid, ids, {'state': 'confirm'}) return self.write(cr, uid, ids, {'state': 'confirm'}, context=context)
def button_confirm(self, cr, uid, ids, context=None): def button_confirm(self, cr, uid, ids, context=None):
"""This Function Confirm Event. """This Function Confirm Event.
@ -114,7 +114,7 @@ class event_event(osv.osv):
unconfirmed_ids.append(event.id) unconfirmed_ids.append(event.id)
if unconfirmed_ids: if unconfirmed_ids:
view_id = data_pool._get_id(cr, uid, 'event', 'view_event_confirm') view_id = data_pool._get_id(cr, uid, 'event', 'view_event_confirm')
view_data = data_pool.browse(cr, uid, view_id) view_data = data_pool.browse(cr, uid, view_id, context=context)
view_id = view_data.res_id view_id = view_data.res_id
context['event_ids'] = unconfirmed_ids context['event_ids'] = unconfirmed_ids
return { return {
@ -141,7 +141,7 @@ class event_event(osv.osv):
""" """
register_pool = self.pool.get('event.registration') register_pool = self.pool.get('event.registration')
res = {} res = {}
for event in self.browse(cr, uid, ids, context): for event in self.browse(cr, uid, ids, context=context):
res[event.id] = {} res[event.id] = {}
for field in fields: for field in fields:
res[event.id][field] = False res[event.id][field] = False
@ -153,12 +153,17 @@ class event_event(osv.osv):
reg_ids = register_pool.search(cr, uid, [ reg_ids = register_pool.search(cr, uid, [
('event_id', '=', event.id), ('event_id', '=', event.id),
('state', 'in', state)]) ('state', 'in', state)], context=context)
number = 0.0
if reg_ids:
cr.execute('SELECT SUM(nb_register) FROM event_registration WHERE id IN %s', (tuple(reg_ids),))
number = cr.fetchone()
if 'register_current' in fields: if 'register_current' in fields:
res[event.id]['register_current'] = len(reg_ids) res[event.id]['register_current'] = number and number[0] or 0.0
if 'register_prospect' in fields: if 'register_prospect' in fields:
res[event.id]['register_prospect'] = len(reg_ids) res[event.id]['register_prospect'] = number and number[0] or 0.0
return res return res
@ -189,8 +194,8 @@ class event_event(osv.osv):
register_values['description'] = vals['mail_confirm'] register_values['description'] = vals['mail_confirm']
if register_values: if register_values:
reg_ids = register_pool.search(cr, uid, [('event_id', '=', event.id)]) reg_ids = register_pool.search(cr, uid, [('event_id', '=', event.id)], context=context)
register_pool.write(cr, uid, reg_ids, register_values) register_pool.write(cr, uid, reg_ids, register_values, context=context)
return res return res
_columns = { _columns = {
@ -226,15 +231,14 @@ class event_event(osv.osv):
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True, states={'draft': [('readonly', False)]}, help="Pricelist version for current event."), 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True, states={'draft': [('readonly', False)]}, help="Pricelist version for current event."),
'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify for each registration a specific amount if you want to", digits_compute=dp.get_precision('Sale Price')), 'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify for each registration a specific amount if you want to", digits_compute=dp.get_precision('Sale Price')),
'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who are giving speech on event."), 'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who are giving speech on event."),
'speaker_ids':fields.many2many('res.partner', 'event_speaker_rel', 'speaker_id', 'partner_id', 'Other Speakers', readonly=False, states={'done': [('readonly', True)]}), 'speaker_ids': fields.many2many('res.partner', 'event_speaker_rel', 'speaker_id', 'partner_id', 'Other Speakers', readonly=False, states={'done': [('readonly', True)]}),
'address_id': fields.many2one('res.partner.address','Location Address', readonly=False, states={'done': [('readonly', True)]}), 'address_id': fields.many2one('res.partner.address','Location Address', readonly=False, states={'done': [('readonly', True)]}),
'speaker_confirmed': fields.boolean('Speaker Confirmed', readonly=False, states={'done': [('readonly', True)]}), 'speaker_confirmed': fields.boolean('Speaker Confirmed', readonly=False, states={'done': [('readonly', True)]}),
'country_id': fields.related('address_id', 'country_id', 'country_id': fields.related('address_id', 'country_id',
type='many2one', relation='res.country', string='Country', readonly=False, states={'done': [('readonly', True)]}), type='many2one', relation='res.country', string='Country', readonly=False, states={'done': [('readonly', True)]}),
'language': fields.char('Language',size=64, readonly=False, states={'done': [('readonly', True)]}), 'language': fields.char('Language',size=64, readonly=False, states={'done': [('readonly', True)]}),
'note': fields.text('Description', readonly=False, states={'done': [('readonly', True)]}), 'note': fields.text('Description', readonly=False, states={'done': [('readonly', True)]}),
'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True, readonly=False, states={'done': [('readonly', True)]}), 'company_id': fields.many2one('res.company', 'Company', required=False, change_default=True, readonly=False, states={'done': [('readonly', True)]}),
} }
_defaults = { _defaults = {
@ -250,7 +254,7 @@ class event_event(osv.osv):
level = 100 level = 100
while len(ids): while len(ids):
cr.execute('select distinct parent_id from event_event where id IN %s', (tuple(ids),)) cr.execute('SELECT DISTINCT parent_id FROM event_event WHERE id IN %s', (tuple(ids),))
ids = filter(None, map(lambda x: x[0], cr.fetchall())) ids = filter(None, map(lambda x: x[0], cr.fetchall()))
if not level: if not level:
return False return False
@ -359,7 +363,7 @@ class event_registration(osv.osv):
'comment': "", 'comment': "",
'date_invoice': context.get('date_inv', False) 'date_invoice': context.get('date_inv', False)
}) })
inv_id = inv_pool.create(cr, uid, val_invoice['value']) inv_id = inv_pool.create(cr, uid, val_invoice['value'], context=context)
inv_pool.button_compute(cr, uid, [inv_id]) inv_pool.button_compute(cr, uid, [inv_id])
self.history(cr, uid, [reg], _('Invoiced')) self.history(cr, uid, [reg], _('Invoiced'))
return inv_id return inv_id
@ -460,12 +464,12 @@ class event_registration(osv.osv):
for registration in self.browse(cr, uid, ids, context=context): for registration in self.browse(cr, uid, ids, context=context):
total_confirmed = registration.event_id.register_current + registration.nb_register total_confirmed = registration.event_id.register_current + registration.nb_register
if total_confirmed <= registration.event_id.register_max or registration.event_id.register_max == 0: if total_confirmed <= registration.event_id.register_max or registration.event_id.register_max == 0:
self.do_open(cr, uid, [registration.id], context) self.do_open(cr, uid, [registration.id], context=context)
else: else:
unconfirmed_ids.append(registration.id) unconfirmed_ids.append(registration.id)
if unconfirmed_ids: if unconfirmed_ids:
view_id = data_pool._get_id(cr, uid, 'event', 'view_event_confirm_registration') view_id = data_pool._get_id(cr, uid, 'event', 'view_event_confirm_registration')
view_data = data_pool.browse(cr, uid, view_id) view_data = data_pool.browse(cr, uid, view_id, context=context)
view_id = view_data.res_id view_id = view_data.res_id
context['registration_ids'] = unconfirmed_ids context['registration_ids'] = unconfirmed_ids
return { return {
@ -493,10 +497,10 @@ class event_registration(osv.osv):
if registration.tobe_invoiced and not registration.invoice_id: if registration.tobe_invoiced and not registration.invoice_id:
unclosed_ids.append(registration.id) unclosed_ids.append(registration.id)
else: else:
self.do_close(cr, uid, [registration.id]) self.do_close(cr, uid, [registration.id], context=context)
if unclosed_ids: if unclosed_ids:
view_id = data_pool._get_id(cr, uid, 'event', 'view_event_make_invoice') view_id = data_pool._get_id(cr, uid, 'event', 'view_event_make_invoice')
view_data = data_pool.browse(cr, uid, view_id) view_data = data_pool.browse(cr, uid, view_id, context=context)
view_id = view_data.res_id view_id = view_data.res_id
context['active_ids'] = unclosed_ids context['active_ids'] = unclosed_ids
return { return {
@ -552,10 +556,10 @@ class event_registration(osv.osv):
body = regestration.event_id.mail_confirm body = regestration.event_id.mail_confirm
if subject or body: if subject or body:
tools.email_send(src, email_to, subject, body, email_cc = email_cc, openobject_id = regestration.id) tools.email_send(src, email_to, subject, body, email_cc = email_cc, openobject_id = regestration.id)
self.history(cr, uid, [regestration], subject, history=True, \ self.history(cr, uid, [regestration], subject, history = True, \
email=email_to, details=body, \ email = email_to, details = body, \
subject=subject, email_from=src, \ subject = subject, email_from = src, \
email_cc=', '.join(email_cc)) email_cc = ', '.join(email_cc))
return True return True
@ -612,12 +616,17 @@ class event_registration(osv.osv):
res_obj = self.pool.get('res.partner') res_obj = self.pool.get('res.partner')
data_event = event_obj.browse(cr, uid, event_id) data_event = event_obj.browse(cr, uid, event_id)
res = {'value': {'unit_price': False, 'event_product': False, 'user_id': False, res = {'value': {'unit_price': False,
'date': data_event.date_begin, 'date_deadline': data_event.date_end, 'description': data_event.note, 'name': data_event.name, 'event_product': False,
'section_id': data_event.section_id and data_event.section_id.id or False, 'user_id': False,
'date': data_event.date_begin,
'date_deadline': data_event.date_end,
'description': data_event.note,
'name': data_event.name,
'section_id': data_event.section_id and data_event.section_id.id or False,
}} }}
if data_event.user_id.id: if data_event.user_id.id:
res['value'].update({'user_id':data_event.user_id.id}) res['value'].update({'user_id': data_event.user_id.id})
if data_event.product_id: if data_event.product_id:
pricelist_id = data_event.pricelist_id and data_event.pricelist_id.id or False pricelist_id = data_event.pricelist_id and data_event.pricelist_id.id or False
if partner_invoice_id: if partner_invoice_id:
@ -645,7 +654,7 @@ class event_registration(osv.osv):
data['contact_id'], data['partner_invoice_id'], data['email_from'] = (False, False, False) data['contact_id'], data['partner_invoice_id'], data['email_from'] = (False, False, False)
if not part: if not part:
return {'value': data} return {'value': data}
data['partner_invoice_id']=part data['partner_invoice_id'] = part
# this calls onchange_partner_invoice_id # this calls onchange_partner_invoice_id
d = self.onchange_partner_invoice_id(cr, uid, ids, event_id, part) d = self.onchange_partner_invoice_id(cr, uid, ids, event_id, part)
# this updates the dictionary # this updates the dictionary
@ -670,8 +679,8 @@ class event_registration(osv.osv):
@param event_id: Event ID @param event_id: Event ID
@param partner_invoice_id: Partner Invoice ID @param partner_invoice_id: Partner Invoice ID
""" """
data={} data = {}
context={} context = {}
event_obj = self.pool.get('event.event') event_obj = self.pool.get('event.event')
prod_obj = self.pool.get('product.product') prod_obj = self.pool.get('product.product')
res_obj = self.pool.get('res.partner') res_obj = self.pool.get('res.partner')
@ -679,7 +688,7 @@ class event_registration(osv.osv):
data['unit_price']=False data['unit_price']=False
if not event_id: if not event_id:
return {'value': data} return {'value': data}
data_event = event_obj.browse(cr, uid, event_id) data_event = event_obj.browse(cr, uid, event_id, context=context)
if data_event.product_id: if data_event.product_id:
data['event_product'] = data_event.product_id.name data['event_product'] = data_event.product_id.name
pricelist_id = data_event.pricelist_id and data_event.pricelist_id.id or False pricelist_id = data_event.pricelist_id and data_event.pricelist_id.id or False

View File

@ -86,8 +86,8 @@
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="mail_auto_registr">True</field> <field name="mail_auto_registr">True</field>
<field name="mail_auto_confirm">True</field> <field name="mail_auto_confirm">True</field>
<field name="mail_registr">Thanks for registrering. We will keep you informed of the modalities.</field> <field name="mail_registr">Thanks for registration. We will keep you informed of the modalities.</field>
<field name="mail_confirm">Thanks for registrering. The conference will begin at 2 PM and will be given by Mister Pinckaers.</field> <field name="mail_confirm">Thanks for registration. The conference will begin at 2 PM and will be given by Mr. Pinckaers.</field>
</record> </record>
<function model="event.event" name="button_confirm" eval="[ref('event_2')]"/> <function model="event.event" name="button_confirm" eval="[ref('event_2')]"/>
<function model="event.event" name="button_done" eval="[ref('event_2')]"/> <function model="event.event" name="button_done" eval="[ref('event_2')]"/>

View File

@ -76,10 +76,10 @@
<field name="note" colspan="4" nolabel="1"/> <field name="note" colspan="4" nolabel="1"/>
<field name="state" select="1"/> <field name="state" select="1"/>
<group col="4" colspan="2"> <group col="4" colspan="2">
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/> <button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
<button string="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/> <button string="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
<button string="Set To Draft" name="button_draft" states="confirm,cancel,done" type="object" icon="gtk-convert"/> <button string="Set To Draft" name="button_draft" states="cancel" type="object" icon="gtk-convert"/>
</group> </group>
</page> </page>
<page string="Speakers"> <page string="Speakers">
@ -319,8 +319,8 @@
<field name="event_id" on_change="onchange_event(event_id, partner_invoice_id)" domain="[('state','in',('draft','confirm'))]"/> <field name="event_id" on_change="onchange_event(event_id, partner_invoice_id)" domain="[('state','in',('draft','confirm'))]"/>
<field name="create_date" string="Registration Date"/> <field name="create_date" string="Registration Date"/>
<field name="name"/> <field name="name"/>
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id,event_id)" /> <field name="partner_id" attrs="{'readonly':[('state','!=', 'draft')]}" required="1" on_change="onchange_partner_id(partner_id,event_id)" />
<field name="user_id"/> <field name="user_id" attrs="{'readonly':[('state','!=', 'draft')]}" />
<field name="tobe_invoiced"/> <field name="tobe_invoiced"/>
</group> </group>
<notebook colspan="4"> <notebook colspan="4">

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# #
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details. # GNU Affero General Public License for more details.
# #
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
@ -23,7 +23,7 @@ from osv import fields, osv
import tools import tools
class report_event_registration(osv.osv): class report_event_registration(osv.osv):
_name = "report.event.registration" _name = "report.event.registration"
_description = "Events on registrations and Events on type" _description = "Events on registrations and Events on type"
_auto = False _auto = False
@ -31,19 +31,19 @@ class report_event_registration(osv.osv):
_columns = { _columns = {
'date': fields.date('Date', readonly=True), 'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True), 'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), 'month': fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True), 'day': fields.char('Day', size=128, readonly=True),
'event_id': fields.many2one('event.event', 'Event Related', required=True), 'event_id': fields.many2one('event.event', 'Event Related', required=True),
'draft_state': fields.integer(' # No of draft Registration.', size=20), 'draft_state': fields.integer(' # No of draft Registration.', size=20),
'confirm_state': fields.integer(' # No of Confirm Registration', size=20), 'confirm_state': fields.integer(' # No of Confirm Registration', size=20),
'register_max': fields.integer('Maximum Registrations'), 'register_max': fields.integer('Maximum Registrations'),
'nbevent': fields.integer('Number Of Events'), 'nbevent': fields.integer('Number Of Events'),
'type': fields.many2one('event.type', 'Event Type'), 'type': fields.many2one('event.type', 'Event Type'),
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, required=True), 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, required=True),
'user_id':fields.many2one('res.users', 'Responsible', readonly=True), 'user_id': fields.many2one('res.users', 'Responsible', readonly=True),
'speaker_id':fields.many2one('res.partner', 'Speaker', readonly=True), 'speaker_id': fields.many2one('res.partner', 'Speaker', readonly=True),
} }
_order = 'date desc' _order = 'date desc'
def init(self, cr): def init(self, cr):
@ -53,32 +53,32 @@ class report_event_registration(osv.osv):
""" """
tools.drop_view_if_exists(cr, 'report_event_registration') tools.drop_view_if_exists(cr, 'report_event_registration')
cr.execute(""" cr.execute("""
create or replace view report_event_registration as ( CREATE OR REPLACE view report_event_registration AS (
select SELECT
e.id as id, e.id AS id,
c.event_id as event_id, c.event_id AS event_id,
e.date_begin as date, e.date_begin AS date,
e.user_id as user_id, e.user_id AS user_id,
e.main_speaker_id as speaker_id, e.main_speaker_id AS speaker_id,
to_char(e.date_begin, 'YYYY') as year, to_char(e.date_begin, 'YYYY') AS year,
to_char(e.date_begin, 'MM') as month, to_char(e.date_begin, 'MM') AS month,
to_char(e.date_begin, 'YYYY-MM-DD') as day, to_char(e.date_begin, 'YYYY-MM-DD') AS day,
count(t.id) as nbevent, count(t.id) AS nbevent,
t.id as type, t.id AS type,
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.event_id=e.id and t.id=e.type and state in ('draft')) as draft_state, (SELECT SUM(c.nb_register) FROM event_registration c WHERE c.event_id=e.id AND t.id=e.type AND state IN ('draft')) AS draft_state,
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.event_id=e.id and t.id=e.type and state in ('open')) as confirm_state, (SELECT SUM(c.nb_register) FROM event_registration c WHERE c.event_id=e.id AND t.id=e.type AND state IN ('open')) AS confirm_state,
e.register_max as register_max, e.register_max AS register_max,
e.state as state e.state AS state
from FROM
event_event e event_event e
inner join INNER JOIN
event_registration c on (e.id=c.event_id) event_registration c ON (e.id=c.event_id)
inner join INNER JOIN
event_type t on (e.type=t.id) event_type t ON (e.type=t.id)
group by GROUP BY
to_char(e.date_begin, 'YYYY'), to_char(e.date_begin, 'YYYY'),
to_char(e.date_begin, 'MM'), to_char(e.date_begin, 'MM'),
t.id, e.id, e.date_begin,e.main_speaker_id, t.id, e.id, e.date_begin, e.main_speaker_id,
e.register_max, e.type, e.state, c.event_id, e.user_id, e.register_max, e.type, e.state, c.event_id, e.user_id,
to_char(e.date_begin, 'YYYY-MM-DD') to_char(e.date_begin, 'YYYY-MM-DD')
)""") )""")

View File

@ -40,6 +40,8 @@ class event_confirm_registration(osv.osv_memory):
""" """
This function gets default values This function gets default values
""" """
if context is None:
context = {}
registration_pool = self.pool.get('event.registration') registration_pool = self.pool.get('event.registration')
registration_ids = context.get('registration_ids', []) registration_ids = context.get('registration_ids', [])
res = super(event_confirm_registration, self).default_get(cr, uid, fields, context=context) res = super(event_confirm_registration, self).default_get(cr, uid, fields, context=context)
@ -56,7 +58,9 @@ class event_confirm_registration(osv.osv_memory):
res.update({'msg': msg}) res.update({'msg': msg})
return res return res
def confirm(self, cr, uid, ids, context): def confirm(self, cr, uid, ids, context=None):
if context is None:
context = {}
registration_pool = self.pool.get('event.registration') registration_pool = self.pool.get('event.registration')
registration_ids = context.get('registration_ids', []) registration_ids = context.get('registration_ids', [])
registration_pool.do_open(cr, uid, registration_ids, context=context) registration_pool.do_open(cr, uid, registration_ids, context=context)

View File

@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
from osv import fields, osv from osv import fields, osv
from tools.translate import _ from tools.translate import _
@ -29,7 +30,7 @@ class event_make_invoice(osv.osv_memory):
_description = "Event Make Invoice" _description = "Event Make Invoice"
_columns = { _columns = {
'grouped': fields.boolean('Group the invoices'), 'grouped': fields.boolean('Group the invoices'),
'invoice_date':fields.date('Invoice Date'), 'invoice_date': fields.date('Invoice Date'),
} }
def view_init(self, cr, uid, fields, context=None): def view_init(self, cr, uid, fields, context=None):
@ -61,7 +62,7 @@ class event_make_invoice(osv.osv_memory):
_("Registration doesn't have any partner to invoice.")) _("Registration doesn't have any partner to invoice."))
def default_get(self, cr, uid, fields_list, context=None): def default_get(self, cr, uid, fields_list, context=None):
return super(event_make_invoice, self).default_get(cr, uid, fields_list, context) return super(event_make_invoice, self).default_get(cr, uid, fields_list, context=context)
def make_invoice(self, cr, uid, ids, context=None): def make_invoice(self, cr, uid, ids, context=None):
reg_obj = self.pool.get('event.registration') reg_obj = self.pool.get('event.registration')
@ -70,7 +71,7 @@ class event_make_invoice(osv.osv_memory):
if context is None: if context is None:
context = {} context = {}
for data in self.browse(cr, uid, ids): for data in self.browse(cr, uid, ids, context=context):
res = reg_obj.action_invoice_create(cr, uid, context.get(('active_ids'),[]), data.grouped, date_inv = data.invoice_date) res = reg_obj.action_invoice_create(cr, uid, context.get(('active_ids'),[]), data.grouped, date_inv = data.invoice_date)
form_id = mod_obj._get_id(cr, uid, 'account', 'invoice_form') form_id = mod_obj._get_id(cr, uid, 'account', 'invoice_form')

View File

@ -19,7 +19,6 @@
# #
############################################################################## ##############################################################################
import wizard
import netsvc import netsvc
import tools import tools
from osv import fields, osv from osv import fields, osv
@ -53,7 +52,6 @@ class partner_event_registration(osv.osv_memory):
value = {} value = {}
res_obj = self.pool.get('res.partner') res_obj = self.pool.get('res.partner')
job_obj = self.pool.get('res.partner.job') job_obj = self.pool.get('res.partner.job')
event_obj = self.pool.get('event.event')
reg_obj = self.pool.get('event.registration') reg_obj = self.pool.get('event.registration')
mod_obj = self.pool.get('ir.model.data') mod_obj = self.pool.get('ir.model.data')
@ -62,9 +60,9 @@ class partner_event_registration(osv.osv_memory):
contact_id = False contact_id = False
email = False email = False
if addr.has_key('default'): if addr.has_key('default'):
job_ids = job_obj.search(cr, uid, [('address_id', '=', addr['default'])]) job_ids = job_obj.search(cr, uid, [('address_id', '=', addr['default'])], context=context)
if job_ids: if job_ids:
contact = job_obj.browse(cr, uid, job_ids[0]) contact = job_obj.browse(cr, uid, job_ids[0], context=context)
if contact: if contact:
contact_id = contact.contact_id.id contact_id = contact.contact_id.id
email = contact.email email = contact.email
@ -72,14 +70,13 @@ class partner_event_registration(osv.osv_memory):
result = mod_obj._get_id(cr, uid, 'event', 'view_registration_search') result = mod_obj._get_id(cr, uid, 'event', 'view_registration_search')
res = mod_obj.read(cr, uid, result, ['res_id']) res = mod_obj.read(cr, uid, result, ['res_id'])
data_obj = self.pool.get('ir.model.data')
# Select the view # Select the view
id2 = data_obj._get_id(cr, uid, 'event', 'view_event_registration_form') id2 = mod_obj._get_id(cr, uid, 'event', 'view_event_registration_form')
id3 = data_obj._get_id(cr, uid, 'event', 'view_event_registration_tree') id3 = mod_obj._get_id(cr, uid, 'event', 'view_event_registration_tree')
if id2: if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id id2 = mod_obj.browse(cr, uid, id2, context=context).res_id
if id3: if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id id3 = mod_obj.browse(cr, uid, id3, context=context).res_id
for current in self.browse(cr, uid, ids, context=context): for current in self.browse(cr, uid, ids, context=context):
for partner in res_obj.browse(cr, uid, record_ids, context=context): for partner in res_obj.browse(cr, uid, record_ids, context=context):
@ -105,7 +102,7 @@ class partner_event_registration(osv.osv_memory):
'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')], 'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
'search_view_id': res['res_id'] 'search_view_id': res['res_id']
} }
return value return value
def name_get(self, cr, uid, ids, context=None): def name_get(self, cr, uid, ids, context=None):
@ -118,7 +115,7 @@ class partner_event_registration(osv.osv_memory):
res = [] res = []
if not ids: if not ids:
return res return res
reads = self.read(cr, uid, ids, ['event_type', 'event_id'], context) reads = self.read(cr, uid, ids, ['event_type', 'event_id'], context=context)
for record in reads: for record in reads:
event_id = record['event_id'][1] event_id = record['event_id'][1]
if record['event_type']: if record['event_type']:
@ -135,13 +132,13 @@ class partner_event_registration(osv.osv_memory):
context = {} context = {}
partner_id = context.get('active_id', False) partner_id = context.get('active_id', False)
if event_id: if event_id:
event = event_obj.browse(cr, uid, event_id) event = event_obj.browse(cr, uid, event_id, context=context)
pricelist_id = event.pricelist_id and event.pricelist_id.id or False pricelist_id = event.pricelist_id and event.pricelist_id.id or False
if partner_id: if partner_id:
partner = partner_obj.browse(cr, uid, partner_id, context=context) partner = partner_obj.browse(cr, uid, partner_id, context=context)
pricelist_id = pricelist_id or partner.property_product_pricelist.id pricelist_id = pricelist_id or partner.property_product_pricelist.id
unit_price = product_obj._product_price(cr, uid, [event.product_id.id], False, False, {'pricelist': pricelist_id})[event.product_id.id] unit_price = product_obj._product_price(cr, uid, [event.product_id.id], False, False, {'pricelist': pricelist_id})[event.product_id.id]
res['value'] = { res['value'] = {
'event_type': event.type and event.type.id or False, 'event_type': event.type and event.type.id or False,
'start_date': event.date_begin, 'start_date': event.date_begin,

View File

@ -7,7 +7,7 @@
name="Human Resources" name="Human Resources"
parent="base.dashboard"/> parent="base.dashboard"/>
<!-- This board view will be complete by other hr_* modules--> <!-- This board view will be complete by other hr_* modules-->
<record id="board_hr_form" model="ir.ui.view"> <record id="board_hr_form" model="ir.ui.view">
<field name="name">board.hr.form</field> <field name="name">board.hr.form</field>
<field name="model">board.board</field> <field name="model">board.board</field>

View File

@ -97,7 +97,7 @@ class hr_job(osv.osv):
'requirements': fields.text('Requirements'), 'requirements': fields.text('Requirements'),
'department_id': fields.many2one('hr.department', 'Department'), 'department_id': fields.many2one('hr.department', 'Department'),
'company_id': fields.many2one('res.company', 'Company'), 'company_id': fields.many2one('res.company', 'Company'),
'state': fields.selection([('open', 'Open'),('old', 'Old'),('recruit', 'In Recruitement')], 'State', readonly=True, required=True), 'state': fields.selection([('open', 'In Position'),('old', 'Old'),('recruit', 'In Recruitement')], 'State', readonly=True, required=True),
} }
_defaults = { _defaults = {
'expected_employees': 1, 'expected_employees': 1,

View File

@ -340,10 +340,10 @@
</page> </page>
</notebook> </notebook>
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="state"/> <field name="state"/>
<button name="job_recruitement" string="In Recruitement" states="open" type="object" icon="gtk-go-forward"/> <button name="job_recruitement" string="In Recruitement" states="open" type="object" icon="gtk-go-forward"/>
<button name="job_open" string="Open" states="old,recruit" type="object" icon="terp-camera_test"/> <button name="job_open" string="In Position" states="old,recruit" type="object" icon="terp-camera_test"/>
<button name="job_old" string="Old" states="open,recruit" type="object" icon="gtk-cancel"/> <button name="job_old" string="Mark as Old" states="open,recruit" type="object" icon="gtk-cancel"/>
</group> </group>
</form> </form>
</field> </field>

View File

@ -48,10 +48,6 @@ class hr_installer(osv.osv_memory):
'hr_payroll_account': fields.boolean('Payroll Accounting', 'hr_payroll_account': fields.boolean('Payroll Accounting',
help="Generic Payroll system Integrated with Accountings."), help="Generic Payroll system Integrated with Accountings."),
} }
_defaults = {
'hr_holidays': True,
'hr_expense': True,
}
hr_installer() hr_installer()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -52,11 +52,11 @@
<search string="Hr Attendance Search"> <search string="Hr Attendance Search">
<filter icon="terp-stock_align_left_24" string="My Attendances" domain="[('employee_id.user_id.id', '=', uid)]" /> <filter icon="terp-stock_align_left_24" string="My Attendances" domain="[('employee_id.user_id.id', '=', uid)]" />
<separator orientation="vertical"/> <separator orientation="vertical"/>
<filter icon="terp-go-today" string="Today" domain="[('name::date','=',current_date)]" /> <filter icon="terp-go-today" string="Today" name="today" domain="[('name::date','=',current_date)]" />
<separator orientation="vertical"/> <separator orientation="vertical"/>
<field name="employee_id" /> <field name="employee_id"/>
<field name="name" /> <field name="name"/>
<field name="action" /> <field name="action"/>
<newline/> <newline/>
<group expand="0" string="Group By..."> <group expand="0" string="Group By...">
<filter name="employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/> <filter name="employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
@ -72,7 +72,7 @@
<field name="res_model">hr.attendance</field> <field name="res_model">hr.attendance</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="context">{"search_default_employee":1}</field> <field name="context">{"search_default_today":1}</field>
<field name="search_view_id" ref="view_hr_attendance_filter" /> <field name="search_view_id" ref="view_hr_attendance_filter" />
<field name="help">Time Tracking functionality aims to manage employee's attendances on the basis of the actions (Sign in/Sign out) performed by them. You can also link this to an attendance machine using OpenERP's webservices features.</field> <field name="help">Time Tracking functionality aims to manage employee's attendances on the basis of the actions (Sign in/Sign out) performed by them. You can also link this to an attendance machine using OpenERP's webservices features.</field>
</record> </record>
@ -81,7 +81,7 @@
<menuitem id="menu_hr_attendance" name="Attendances" parent="hr.menu_hr_root" sequence="4"/> <menuitem id="menu_hr_attendance" name="Attendances" parent="hr.menu_hr_root" sequence="4"/>
<menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_attendance" sequence="3"/> <menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_attendance" sequence="20"/>
<record id="edit_attendance_reason" model="ir.ui.view"> <record id="edit_attendance_reason" model="ir.ui.view">
<field name="name">hr.action.reason.form</field> <field name="name">hr.action.reason.form</field>
@ -116,7 +116,9 @@
<field name="view_id" ref="view_attendance_reason"/> <field name="view_id" ref="view_attendance_reason"/>
</record> </record>
<menuitem sequence="2" id="hr.menu_open_view_attendance_reason_new_config" parent="hr.menu_hr_configuration" name="Attendances" /> <menuitem
sequence="2" id="hr.menu_open_view_attendance_reason_new_config" parent="hr.menu_hr_configuration" name="Attendances"
groups="base.group_extended"/>
<menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_new_config"/> <menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_new_config"/>
<record id="hr_attendance_employee" model="ir.ui.view"> <record id="hr_attendance_employee" model="ir.ui.view">

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