From e1c3be41e1d0e9c89f016dbf58a34126a4391c22 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 11 Sep 2012 14:44:26 +0530 Subject: [PATCH 01/20] [IMP]changed menu name bzr revid: sgo@tinyerp.com-20120911091426-alnlt4v3c3pg8q2c --- addons/account/account_menuitem.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml index 480d5ec76a6..a2fbf11963b 100644 --- a/addons/account/account_menuitem.xml +++ b/addons/account/account_menuitem.xml @@ -30,7 +30,7 @@ - + From d0bc4d9ffc8575393571dfd477bc03c272c7d1ad Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 11 Sep 2012 15:32:48 +0530 Subject: [PATCH 02/20] [IMP]show only one o2m field in payment bzr revid: sgo@tinyerp.com-20120911100248-0jda0d8mo4gsl0r0 --- addons/account_voucher/voucher_payment_receipt_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index c41ed6d5577..ddfb91528fd 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -328,7 +328,7 @@ - + Date: Tue, 11 Sep 2012 16:07:32 +0530 Subject: [PATCH 03/20] [IMP]improve breadcrumb for invoice and draft bzr revid: sgo@tinyerp.com-20120911103732-vwvs8ieiwx083qft --- addons/account/account_invoice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 42d42e7ec1b..acc53598b78 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1095,10 +1095,10 @@ class account_invoice(osv.osv): if not ids: return [] types = { - 'out_invoice': 'CI: ', - 'in_invoice': 'SI: ', - 'out_refund': 'OR: ', - 'in_refund': 'SR: ', + 'out_invoice': 'Draft Invoice', + 'in_invoice': 'Draft Invoice ', + 'out_refund': 'Draft Refund ', + 'in_refund': 'Draft Refund', } return [(r['id'], (r['number']) or types[r['type']] + (r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')] From 54eac9c8511500810e52059a499a55e595259445 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 11 Sep 2012 19:00:15 +0530 Subject: [PATCH 04/20] [IMP]on create of sale receipt add first sale account and display lable of bank name and number in customer accounting tab bzr revid: sgo@tinyerp.com-20120911133015-24z0gr1mnwzk6fwh --- addons/account/partner_view.xml | 6 ++++-- addons/account_voucher/account_voucher.py | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index d83571b314e..90ae9ea989c 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -93,8 +93,10 @@
- - + + + + diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index f75cda8cdde..86be18b6e77 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -1373,8 +1373,14 @@ class account_voucher_line(osv.osv): 'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True), 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency', readonly=True), } + + def _default_account_id(self, cr, uid, ids, context=None): + prop = self.pool.get('ir.property').get(cr, uid, 'property_account_income_categ', 'product.category', context=context) + return prop and prop.id or False + _defaults = { 'name': '', + 'account_id':_default_account_id } def onchange_reconcile(self, cr, uid, ids, reconcile, amount, amount_unreconciled, context=None): From f29d02f20a74909414269a7688507dff4571c03e Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Thu, 13 Sep 2012 12:10:30 +0530 Subject: [PATCH 05/20] [IMP] l10n_be:improved error typo. bzr revid: tpa@tinyerp.com-20120913064030-7xpjf5ss7sdyjb81 --- addons/l10n_be/wizard/l10n_be_account_vat_declaration.py | 6 +++--- addons/l10n_be/wizard/l10n_be_partner_vat_listing.py | 2 +- addons/l10n_be/wizard/l10n_be_vat_intra.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py index 5e357facd86..ab6ea82eeab 100644 --- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py +++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py @@ -45,8 +45,8 @@ class l10n_be_vat_declaration(osv.osv_memory): 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', domain=[('parent_id', '=', False)], required=True), 'msg': fields.text('File created', size=64, readonly=True), 'file_save': fields.binary('Save File'), - 'ask_restitution': fields.boolean('Ask Restitution',help='It indicates whether a restitution is to made or not?'), - 'ask_payment': fields.boolean('Ask Payment',help='It indicates whether a payment is to made or not?'), + 'ask_restitution': fields.boolean('Ask Restitution',help='It indicates whether a restitution is to make or not?'), + 'ask_payment': fields.boolean('Ask Payment',help='It indicates whether a payment is to make or not?'), 'client_nihil': fields.boolean('Last Declaration, no clients in client listing', help='Tick this case only if it concerns only the last statement on the civil or cessation of activity: ' \ 'no clients to be included in the client listing.'), 'comments': fields.text('Comments'), @@ -83,7 +83,7 @@ class l10n_be_vat_declaration(osv.osv_memory): obj_company = obj_user.browse(cr, uid, uid, context=context).company_id vat_no = obj_company.partner_id.vat if not vat_no: - raise osv.except_osv(_('Insufficient Data!'), _('No VAT Number Associated with Main Company.')) + raise osv.except_osv(_('insufficient data!'), _('no vat number associated with company.')) vat_no = vat_no.replace(' ','').upper() vat = vat_no[2:] diff --git a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py index 8cad2d01a3e..34ba10e2bc6 100644 --- a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py +++ b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py @@ -61,7 +61,7 @@ class partner_vat(osv.osv_memory): company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id period_ids = obj_period.search(cr, uid, [('date_start' ,'>=', date_start), ('date_stop','<=',date_stop), ('company_id','=',company_id)]) if not period_ids: - raise osv.except_osv(_('Insufficient Data!'), _('No data for the selected year.')) + raise osv.except_osv(_('insufficient data!'), _('no data for the selected year.')) partners = [] partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context) diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py index 47a29a8457f..8323f533c1f 100644 --- a/addons/l10n_be/wizard/l10n_be_vat_intra.py +++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py @@ -108,7 +108,7 @@ class partner_vat_intra(osv.osv_memory): # Get Company vat company_vat = data_company.partner_id.vat if not company_vat: - raise osv.except_osv(_('Insufficient Data!'),_('No VAT number associated with the company.')) + raise osv.except_osv(_('insufficient data!'),_('no vat number associated with company.')) company_vat = company_vat.replace(' ','').upper() issued_by = company_vat[:2] From 930d5ce977025d378658299359242db080829110 Mon Sep 17 00:00:00 2001 From: "ajay javiya (OpenERP)" Date: Thu, 13 Sep 2012 12:51:26 +0530 Subject: [PATCH 06/20] [IMP]: Improve view in Accounting Module bzr revid: aja@tinyerp.com-20120913072126-04gs4rqkj3pc42um --- addons/account/account_view.xml | 11 ++++--- addons/account/partner_view.xml | 57 +++++++++++++++++++-------------- 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 8c0de73ef8c..6300da84c78 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1728,8 +1728,10 @@ account.payment.term.line - - + + + + @@ -1777,12 +1779,11 @@ account.payment.term - + - - + diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index d83571b314e..d5d6cdfc085 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -7,34 +7,43 @@ account.fiscal.position
- + - - - - - - - - - - - - - - - - -
- - - - - - + + + + + + + + +
+ + + + +
+ + + + + + +
+ + + + +
+
+
+ + + +
From df8cddd9df893d89ea66e055c49c89b0af23bf2d Mon Sep 17 00:00:00 2001 From: "ajay javiya (OpenERP)" Date: Thu, 13 Sep 2012 14:56:26 +0530 Subject: [PATCH 07/20] [ADD]:Add button for close period bzr revid: aja@tinyerp.com-20120913092626-re2ox32a4dcwugcc --- addons/account/account_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 8c0de73ef8c..b1f9b7f0b40 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -102,6 +102,7 @@
+
From a931a9f298e1fb92ff362e474a4dc15cb35849d3 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Thu, 13 Sep 2012 14:58:14 +0530 Subject: [PATCH 08/20] [IMP] improved code of periodical vat declaration wizard. bzr revid: tpa@tinyerp.com-20120913092814-eoxgnv0vzydpwfp3 --- addons/l10n_be/__init__.py | 1 - addons/l10n_be/company.py | 45 ------------------- .../wizard/l10n_be_account_vat_declaration.py | 22 ++++----- 3 files changed, 12 insertions(+), 56 deletions(-) delete mode 100644 addons/l10n_be/company.py diff --git a/addons/l10n_be/__init__.py b/addons/l10n_be/__init__.py index 1b2677d295e..7bdc1f61b1f 100644 --- a/addons/l10n_be/__init__.py +++ b/addons/l10n_be/__init__.py @@ -19,7 +19,6 @@ # ############################################################################## -import company import wizard # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_be/company.py b/addons/l10n_be/company.py deleted file mode 100644 index 118696ec9f6..00000000000 --- a/addons/l10n_be/company.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from osv import osv - -class res_company(osv.osv): - _inherit = "res.company" - _description = 'Company' - - def _get_default_ad(self, addresses): - name = email = phone = city = post_code = address = country_code = "" - for ads in addresses: - if ads.type == 'default': - city = ads.city or "" - post_code = ads.zip or "" - if ads.street: - address = ads.street or "" - if ads.street2: - address += " " + ads.street2 - if ads.country_id: - country_code = ads.country_id and ads.country_id.code or "" - name = ads.name or "" - email = ads.email or "" - phone = ads.phone or "" - return name, email, phone, city, post_code, address, country_code -res_company() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py index ab6ea82eeab..5eb4215e576 100644 --- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py +++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py @@ -70,6 +70,7 @@ class l10n_be_vat_declaration(osv.osv_memory): obj_tax_code = self.pool.get('account.tax.code') obj_acc_period = self.pool.get('account.period') obj_user = self.pool.get('res.users') + obj_partner = self.pool.get('res.partner') mod_obj = self.pool.get('ir.model.data') if context is None: @@ -93,8 +94,9 @@ class l10n_be_vat_declaration(osv.osv_memory): ctx['period_id'] = data['period_id'][0] tax_info = obj_tax_code.read(cr, uid, tax_code_ids, ['code','sum_period'], context=ctx) - name = email = phone = address = post_code = city = country_code = '' - name, email, phone, city, post_code, address, country_code = self.pool.get('res.company')._get_default_ad(obj_company.partner_id) + default_address = obj_partner.address_get(cr, uid, [obj_company.partner_id.id]) + default_address_id = default_address.get("default", obj_company.partner_id.id) + address_id= obj_partner.browse(cr, uid, default_address_id, context) account_period = obj_acc_period.browse(cr, uid, data['period_id'][0], context=context) issued_by = vat_no[:2] @@ -106,21 +108,21 @@ class l10n_be_vat_declaration(osv.osv_memory): ending_month = account_period.date_stop[5:7] quarter = str(((int(starting_month) - 1) / 3) + 1) - if not email: + if not address_id.email: raise osv.except_osv(_('Insufficient Data!'),_('No email address associated with the company.')) - if not phone: + if not address_id.phone: raise osv.except_osv(_('Insufficient Data!'),_('No phone associated with the company.')) file_data = { 'issued_by': issued_by, 'vat_no': vat_no, 'only_vat': vat_no[2:], 'cmpny_name': obj_company.name, - 'address': address, - 'post_code': post_code, - 'city': city, - 'country_code': country_code, - 'email': email, - 'phone': phone.replace('.','').replace('/','').replace('(','').replace(')','').replace(' ',''), + 'address': "%s %s"%(address_id.street or "",address_id.street2 or ""), + 'post_code': address_id.zip or "", + 'city': address_id.city or "", + 'country_code': address_id.country_id and address_id.country_id.code or "", + 'email': address_id.email or "", + 'phone': address_id.phone.replace('.','').replace('/','').replace('(','').replace(')','').replace(' ',''), 'send_ref': send_ref, 'quarter': quarter, 'month': starting_month, From 2bd286e93a2842bb242aefd41f6f860dd93e2d5e Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Thu, 13 Sep 2012 15:16:11 +0530 Subject: [PATCH 09/20] [REM]account_assets:removed graph view form assets bzr revid: kbh@tinyerp.com-20120913094611-4k5itc8wlo7w68tv --- addons/account_asset/account_asset_view.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/account_asset/account_asset_view.xml b/addons/account_asset/account_asset_view.xml index bb0222d5e4f..3fab306863c 100644 --- a/addons/account_asset/account_asset_view.xml +++ b/addons/account_asset/account_asset_view.xml @@ -129,7 +129,7 @@ - + @@ -159,11 +159,6 @@ - - - - -