From af18cd38cf3171576d3065c71441f1aa2ef992bc Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Tue, 13 Jul 2010 13:15:56 +0530 Subject: [PATCH 01/11] [IMP] calendar: attendee view bzr revid: hmo@tinyerp.com-20100713074556-pznr1rd7ecmz8hmg --- addons/base_calendar/base_calendar.py | 3 +-- addons/crm/crm_meeting_view.xml | 4 +++- addons/project_caldav/project_caldav_view.xml | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index cc24d131e39..320004ae11d 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -408,8 +408,7 @@ property or property parameter."), except ImportError: return res cal = vobject.iCalendar() - event = cal.add('vevent') - event.add('uid').value = 'OpenObject-%s_%s@%s' % (event_obj._name, event_obj.id, cr.dbname) + event = cal.add('vevent') event.add('created').value = ics_datetime(time.strftime('%Y-%m-%d %H:%M:%S')) event.add('dtstart').value = ics_datetime(event_obj.date) event.add('dtend').value = ics_datetime(event_obj.date_deadline) diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index 6759590d89d..a5379b33f3f 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -154,7 +154,9 @@ - + + + diff --git a/addons/project_caldav/project_caldav_view.xml b/addons/project_caldav/project_caldav_view.xml index 3055fee85bc..01133108b6d 100644 --- a/addons/project_caldav/project_caldav_view.xml +++ b/addons/project_caldav/project_caldav_view.xml @@ -17,7 +17,9 @@ - + + + From c8e3e6b5bd58a31fba0c786d16353d87ed81033d Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Tue, 13 Jul 2010 13:52:18 +0530 Subject: [PATCH 02/11] [FIX] sale: subtotal of sale order line was computed wrongly bzr revid: qdp-launchpad@tinyerp.com-20100713082218-mje659vjpyku5w8j --- addons/sale/sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index ca2b36a3245..172fe1226ef 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -785,8 +785,8 @@ class sale_order_line(osv.osv): res = {} context = context or {} for line in self.browse(cr, uid, ids, context=context): - price = line.price_unit * line.product_uom_qty * (1 - (line.discount or 0.0) / 100.0) - taxes = tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty) + price = line.price_unit * (1 - (line.discount or 0.0) / 100.0) + taxes = tax_obj.compute_all(cr, uid, line.tax_id, price, line.product_uom_qty, line.order_id.partner_invoice_id.id, line.product_id, line.order_id.partner_id) cur = line.order_id.pricelist_id.currency_id res[line.id] = cur_obj.round(cr, uid, cur, taxes['total']) return res From ba8f090d1878c869b910308d8725d45e10f97a14 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 13 Jul 2010 14:31:30 +0530 Subject: [PATCH 03/11] [IMP]: improvement in accounting module bzr revid: mga@tinyerp.com-20100713090130-nprwe7f05iv9w5q6 --- addons/account/account_cash_statement.py | 2 +- addons/account/account_move_line.py | 1 + addons/account/account_view.xml | 1 - addons/account_voucher/voucher.py | 19 ++++++++++++------- addons/account_voucher/voucher_view.xml | 2 +- .../account_voucher_payment_view.xml | 2 +- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 896b71e9f25..1a0727e626f 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -183,7 +183,7 @@ class account_cash_statement(osv.osv): ('open','Open')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"), 'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, store=True, string="Cash Transaction", help="Total cash transactions"), 'closing_date':fields.datetime("Closed On"), - 'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on Opening Balance and Transactions"), + 'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on Starting Balance and Cash Transactions"), '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'), 'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'), diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index cc74b2a9158..bf12bdc2087 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -674,6 +674,7 @@ class account_move_line(osv.osv): account_id = line['account_id']['id'] partner_id = (line['partner_id'] and line['partner_id']['id']) or False writeoff = debit - credit + # Ifdate_p in context => take this date if context.has_key('date_p') and context['date_p']: date=context['date_p'] diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index de8bc843faa..78cb6cadd7e 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2300,7 +2300,6 @@ - diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index 13df5a496fc..47ff58a3226 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -428,15 +428,17 @@ class account_voucher_line(osv.osv): 'type': lambda *a: 'cr' } - def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1): - vals = {} + def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1, currency): + currency_pool = self.pool.get('res.currency') + company = self.pool.get('res.users').browse(cr, uid, uid).company_id + + vals = { + 'account_id': False, + 'type': False , + 'amount': False + } if not partner_id: - vals.update({ - 'account_id': False, - 'type': False , - 'amount': False - }) return { 'value' : vals } @@ -466,6 +468,9 @@ class account_voucher_line(osv.osv): balance = partner.debit ttype = 'cr' + if company.currency_id != currency: + balance = currency_pool.compute(cr, uid, company.currency_id.id, currency, balance) + vals.update({ 'account_id': account_id, 'type': ttype, diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index 658b8f8429b..1a781c4cc34 100644 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -37,7 +37,7 @@ - + diff --git a/addons/account_voucher_payment/account_voucher_payment_view.xml b/addons/account_voucher_payment/account_voucher_payment_view.xml index cc11d3a064c..3f118120c8a 100755 --- a/addons/account_voucher_payment/account_voucher_payment_view.xml +++ b/addons/account_voucher_payment/account_voucher_payment_view.xml @@ -10,7 +10,7 @@ - + From da79e3a0728ce6232715dadb18e364110d5ef26c Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 13 Jul 2010 14:35:09 +0530 Subject: [PATCH 04/11] [REM]: remove TABs from the code bzr revid: mga@tinyerp.com-20100713090509-5dq4tuzl3he4gvrh --- addons/sale/wizard/sale_make_invoice.xml | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/addons/sale/wizard/sale_make_invoice.xml b/addons/sale/wizard/sale_make_invoice.xml index 177ef8d029d..b3f121b8c40 100644 --- a/addons/sale/wizard/sale_make_invoice.xml +++ b/addons/sale/wizard/sale_make_invoice.xml @@ -1,24 +1,24 @@ - + Create invoices sale.make.invoice form -
- - - - - -