From f0b124d52dc24d9175dfa030b6c8608151b92479 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 11 Jun 2010 11:32:15 +0530 Subject: [PATCH 01/29] [Fix] Point_of_sale:Fix the name of rule group bzr revid: sbh@tinyerp.com-20100611060215-zdkvnoqf1t2epbof --- addons/point_of_sale/pos.py | 6 +++--- addons/point_of_sale/posrule_data.xml | 20 +++++++++++++------- addons/point_of_sale/statement_data.xml | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index 5d4df5a5f10..0ec31cb88fe 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -193,7 +193,7 @@ class pos_order(osv.osv): res[order.id]['amount_tax']) else: res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2), - tax_obj.compute(cr, uid, line.product_id.taxes_id, + tax_obj.compute_all(cr, uid, line.product_id.taxes_id, line.price_unit * \ (1-(line.discount or 0.0)/100.0), line.qty), res[order.id]['amount_tax']) @@ -789,7 +789,7 @@ class pos_order(osv.osv): tax_amount = 0 taxes = [t for t in line.product_id.taxes_id] if order.price_type=='tax_excluded': - computed_taxes = account_tax_obj.compute( + computed_taxes = account_tax_objcompute_all( cr, uid, taxes, line.price_unit, line.qty) else: computed_taxes = account_tax_obj.compute_inv( @@ -1058,7 +1058,7 @@ class pos_order_line(osv.osv): for line in self.browse(cr, uid, ids): tax_amount = 0.0 taxes = [t for t in line.product_id.taxes_id] - computed_taxes = account_tax_obj.compute(cr, uid, taxes, line.price_unit, line.qty) + computed_taxes = account_tax_objcompute_all(cr, uid, taxes, line.price_unit, line.qty) for tax in computed_taxes: tax_amount += tax['amount'] price = self.price_by_product(cr, uid, ids, line.order_id.pricelist_id.id, line.product_id.id, line.qty, line.order_id.partner_id.id) diff --git a/addons/point_of_sale/posrule_data.xml b/addons/point_of_sale/posrule_data.xml index 905e78e6e7a..be1b3d0a802 100644 --- a/addons/point_of_sale/posrule_data.xml +++ b/addons/point_of_sale/posrule_data.xml @@ -2,6 +2,12 @@ + + point + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + @@ -63,12 +69,12 @@ - - - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - + + + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + @@ -98,7 +104,7 @@ ref('procurement.menu_mrp_procurement_action3'), ref('point_of_sale.menu_point_root')])]" name="menu_access"/> - + diff --git a/addons/point_of_sale/statement_data.xml b/addons/point_of_sale/statement_data.xml index 5172e0e70d4..a1f920c5c43 100644 --- a/addons/point_of_sale/statement_data.xml +++ b/addons/point_of_sale/statement_data.xml @@ -34,7 +34,7 @@ - + From ca9b03d3211ca34dd280d5c9da78c25cad2d59e7 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 11 Jun 2010 18:16:55 +0530 Subject: [PATCH 02/29] [IMP] point_of_sale: chagned name of method and put the data file in comment bzr revid: sbh@tinyerp.com-20100611124655-n8ksbqwyk13gsr81 --- addons/point_of_sale/__openerp__.py | 6 +++--- addons/point_of_sale/pos.py | 11 ++++------- addons/point_of_sale/test/pos_test.yml | 9 +++++++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index 27707bcf0e0..b83834d0677 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -67,14 +67,14 @@ Main features : # 'pos_wizard.xml', 'pos_view.xml', 'pos_sequence.xml', - 'posrule_data.xml', + #'posrule_data.xml', 'pos_data.xml', 'pos_workflow.xml', 'statement_view.xml', 'statement_report.xml', - 'statement_data.xml', + #'statement_data.xml', ], - 'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml'], + 'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml',], 'test':['test/pos_test.yml',], 'installable': True, } diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index 0ec31cb88fe..d31706e1b0e 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -192,11 +192,10 @@ class pos_order(osv.osv): (1-(line.discount or 0.0)/100.0), line.qty), res[order.id]['amount_tax']) else: - res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2), - tax_obj.compute_all(cr, uid, line.product_id.taxes_id, + res[order.id]['amount_tax'] = tax_obj.compute_all(cr, uid, line.product_id.taxes_id, line.price_unit * \ - (1-(line.discount or 0.0)/100.0), line.qty), - res[order.id]['amount_tax']) + (1-(line.discount or 0.0)/100.0), line.qty)['total_included'] + return res @@ -1058,9 +1057,7 @@ class pos_order_line(osv.osv): for line in self.browse(cr, uid, ids): tax_amount = 0.0 taxes = [t for t in line.product_id.taxes_id] - computed_taxes = account_tax_objcompute_all(cr, uid, taxes, line.price_unit, line.qty) - for tax in computed_taxes: - tax_amount += tax['amount'] + tax_amount = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit, line.qty)['total_included'] price = self.price_by_product(cr, uid, ids, line.order_id.pricelist_id.id, line.product_id.id, line.qty, line.order_id.partner_id.id) if line.discount!=0.0: res[line.id] = line.price_unit * line.qty * (1 - (line.discount or 0.0) / 100.0) diff --git a/addons/point_of_sale/test/pos_test.yml b/addons/point_of_sale/test/pos_test.yml index a96a792c711..3019b49144d 100644 --- a/addons/point_of_sale/test/pos_test.yml +++ b/addons/point_of_sale/test/pos_test.yml @@ -119,7 +119,7 @@ I create Sales Account. - !record {model: account.account, id: account_account_sales0}: - code: S + code: Sale company_id: base.main_company currency_mode: current name: Sales @@ -473,4 +473,9 @@ self.action_confirm(cr, uid, [ref("pos_confirm_0")], {"lang": "en_US", "active_model": "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"), }) - +- + I check order state is done. +- + !python {model: pos.order}: | + order=self.browse(cr,uid,ref("pos_order_pos0")) + assert(order.state=='done'), "Order is not done" From dbf6ad6defdf70776a7e771d2b057a962eaf540c Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 11 Jun 2010 18:33:03 +0530 Subject: [PATCH 03/29] [IMP] point_of_sale: Improve the code bzr revid: sbh@tinyerp.com-20100611130303-hc0hjszkh3lecoxl --- addons/point_of_sale/pos.py | 60 ++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index d31706e1b0e..1e67f7872df 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -65,7 +65,7 @@ class pos_order(osv.osv): _order = "date_order desc" - def unlink(self, cr, uid, ids, context={}): + def unlink(self, cr, uid, ids, context=None): for rec in self.browse(cr, uid, ids, context=context): for rec_statement in rec.statement_ids: @@ -73,7 +73,7 @@ class pos_order(osv.osv): raise osv.except_osv(_('Invalid action !'), _('Cannot delete a point of sale which is closed or contains confirmed cashboxes!')) return super(pos_order, self).unlink(cr, uid, ids, context=context) - def onchange_partner_pricelist(self, cr, uid, ids, part, context={}): + def onchange_partner_pricelist(self, cr, uid, ids, part, context=None): """ Changed price list on_change of partner_id""" @@ -82,7 +82,7 @@ class pos_order(osv.osv): pricelist = self.pool.get('res.partner').browse(cr, uid, part).property_product_pricelist.id return {'value':{'pricelist_id': pricelist}} - def _amount_total(self, cr, uid, ids, field_name, arg, context): + def _amount_total(self, cr, uid, ids, field_name, arg, context=None): """ Calculates amount_tax of order line @param field_names: Names of fields. @@ -224,7 +224,7 @@ class pos_order(osv.osv): return res[0] else: return False - def copy(self, cr, uid, id, default=None, context={}): + def copy(self, cr, uid, id, default=None, context=None): if not default: default = {} @@ -333,7 +333,7 @@ class pos_order(osv.osv): else: return False - def _journal_default(self, cr, uid, context={}): + def _journal_default(self, cr, uid, context=None): """ To get default pricelist for the order" @param name: Names of fields. @@ -364,7 +364,7 @@ class pos_order(osv.osv): } - def test_order_lines(self, cr, uid, order, context={}): + def test_order_lines(self, cr, uid, order, context=None): """ Test order line is created or not for the order " @param name: Names of fields. @@ -377,7 +377,7 @@ class pos_order(osv.osv): wf_service.trg_validate(uid, 'pos.order', order.id, 'paid', cr) return True - def dummy_button(self, cr, uid, order, context={}): + def dummy_button(self, cr, uid, order, context=None): return True def test_paid(self, cr, uid, ids, context=None): @@ -457,11 +457,13 @@ class pos_order(osv.osv): # delete it in the new picking: line.unlink(context=context) - def create_picking(self, cr, uid, ids, context={}): + def create_picking(self, cr, uid, ids, context=None): """Create a picking for each order and validate it.""" picking_obj = self.pool.get('stock.picking') + property_obj=self.pool.get("ir.property") + move_obj=self.pool.get('stock.move') pick_name=self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out') orders = self.browse(cr, uid, ids, context) for order in orders: @@ -494,8 +496,8 @@ class pos_order(osv.osv): for line in order.lines: if line.product_id and line.product_id.type=='service': continue - prop_ids = self.pool.get("ir.property").search(cr, uid, [('name', '=', 'property_stock_customer')]) - val = self.pool.get("ir.property").browse(cr, uid, prop_ids[0]).value_reference + prop_ids = property_obj.search(cr, uid, [('name', '=', 'property_stock_customer')]) + val = property_obj.browse(cr, uid, prop_ids[0]).value_reference cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order.shop_id.warehouse_id.id)) res=cr.fetchone() location_id=res and res[0] or None @@ -504,7 +506,7 @@ class pos_order(osv.osv): if line.qty < 0: location_id, stock_dest_id = stock_dest_id, location_id - self.pool.get('stock.move').create(cr, uid, { + move_obj.create(cr, uid, { 'name': 'Stock move (POS %d)' % (order.id, ), 'product_uom': line.product_id.uom_id.id, 'product_uos': line.product_id.uom_id.id, @@ -582,7 +584,7 @@ class pos_order(osv.osv): @return: True """ self.write(cr, uid, ids, {'state': 'cancel'}) - self.cancel_picking(cr, uid, ids, context={}) + self.cancel_picking(cr, uid, ids, context=None) return True def add_payment(self, cr, uid, order_id, data, context=None): @@ -590,8 +592,10 @@ class pos_order(osv.osv): """Create a new payment for the order""" res_obj = self.pool.get('res.company') + statement_obj= self.pool.get('account.bank.statement') statementl_obj = self.pool.get('account.bank.statement.line') prod_obj = self.pool.get('product.product') + property_obj=self.pool.get('ir.property') flag='' curr_c=self.pool.get('res.users').browse(cr, uid, uid).company_id curr_company=curr_c.id @@ -608,7 +612,7 @@ class pos_order(osv.osv): args['date'] = data['payment_date'] if 'payment_name' in data.keys(): args['name'] = data['payment_name'] + ' ' +order.name - account_def = self.pool.get('ir.property').get(cr, uid, 'property_account_receivable', 'res.partner', context=context) + account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context) args['account_id'] = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def.id or curr_c.account_receivable.id if data.get('is_acc',False): args['is_acc']=data['is_acc'] @@ -618,7 +622,6 @@ class pos_order(osv.osv): args['partner_id'] = order.partner_id and order.partner_id.id or None args['ref'] = order.contract_number or None - statement_obj= self.pool.get('account.bank.statement') statement_id = statement_obj.search(cr,uid, [ ('journal_id', '=', data['journal']), ('company_id', '=', curr_company), @@ -664,7 +667,7 @@ class pos_order(osv.osv): return order_line_id - def refund(self, cr, uid, ids, context={}): + def refund(self, cr, uid, ids, context=None): """Create a copy of order for refund order""" @@ -691,7 +694,7 @@ class pos_order(osv.osv): }) return clone_list - def action_invoice(self, cr, uid, ids, context={}): + def action_invoice(self, cr, uid, ids, context=None): """Create a invoice of order """ @@ -988,7 +991,7 @@ class pos_order(osv.osv): if not context: context = {} if context.get('flag',False): - self.create_picking(cr, uid, ids, context={}) + self.create_picking(cr, uid, ids, context=None) self.write(cr, uid, ids, {'state': 'paid'}) else: context['flag']=True @@ -1001,7 +1004,7 @@ class pos_order(osv.osv): def action_done(self, cr, uid, ids, context=None): for order in self.browse(cr, uid, ids, context=context): if not order.journal_entry: - self.create_account_move(cr, uid, ids, context={}) + self.create_account_move(cr, uid, ids, context=None) return True def compute_state(self, cr, uid, id): @@ -1168,30 +1171,31 @@ class pos_order_line(osv.osv): 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, } - def create(self, cr, user, vals, context={}): + def create(self, cr, user, vals, context=None): if vals.get('product_id'): return super(pos_order_line, self).create(cr, user, vals, context) return False - def write(self, cr, user, ids, values, context={}): + def write(self, cr, user, ids, values, context=None): if 'product_id' in values and not values['product_id']: return False return super(pos_order_line, self).write(cr, user, ids, values, context) def _scan_product(self, cr, uid, ean, qty, order): # search pricelist_id + product_obj=self.pool.get('product.product') pricelist_id = self.pool.get('pos.order').read(cr, uid, [order], ['pricelist_id'] ) if not pricelist_id: return False new_line = True - product_id = self.pool.get('product.product').search(cr, uid, [('ean13','=', ean)]) + product_id = product_obj.search(cr, uid, [('ean13','=', ean)]) if not product_id: return False # search price product - product = self.pool.get('product.product').read(cr, uid, product_id) + product =product_obj.read(cr, uid, product_id) product_name = product[0]['name'] price = self.price_by_product(cr, uid, 0, pricelist_id[0]['pricelist_id'][0], product_id[0], 1) @@ -1231,14 +1235,14 @@ class pos_payment(osv.osv): _name = 'pos.payment' _description = 'Pos Payment' - def _journal_get(self, cr, uid, context={}): + def _journal_get(self, cr, uid, context=None): obj = self.pool.get('account.journal') ids = obj.search(cr, uid, [('type', '=', 'cash')]) res = obj.read(cr, uid, ids, ['id', 'name'], context) res = [(r['id'], r['name']) for r in res] return res - def _journal_default(self, cr, uid, context={}): + def _journal_default(self, cr, uid, context=None): journal_list = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash')]) if journal_list: return journal_list[0] @@ -1261,12 +1265,12 @@ class pos_payment(osv.osv): 'payment_date': lambda *a: time.strftime('%Y-%m-%d'), } - def create(self, cr, user, vals, context={}): + def create(self, cr, user, vals, context=None): if vals.get('journal_id') and vals.get('amount'): return super(pos_payment, self).create(cr, user, vals, context) return False - def write(self, cr, user, ids, values, context={}): + def write(self, cr, user, ids, values, context=None): if 'amount' in values and not values['amount']: return False if 'journal_id' in values and not values['journal_id']: @@ -1278,7 +1282,7 @@ pos_payment() class account_move_line(osv.osv): _inherit = 'account.move.line' - def create(self, cr, user, vals, context={}): + def create(self, cr, user, vals, context=None): pos_obj = self.pool.get('pos.order') val_name = vals.get('name', '') val_ref = vals.get('ref', '') @@ -1299,7 +1303,7 @@ class account_move(osv.osv): _inherit = 'account.move' - def create(self, cr, user, vals, context={}): + def create(self, cr, user, vals, context=None): pos_obj = self.pool.get('pos.order') val_name = vals.get('name', '') val_ref = vals.get('ref', '') From 70ec78aa34201c33778f2c503ccb1ab0e638de40 Mon Sep 17 00:00:00 2001 From: "uco (Open ERP)" Date: Thu, 19 Aug 2010 12:55:01 +0530 Subject: [PATCH 04/29] [IMP] stock: Help added for a field. bzr revid: uco@tinyerp.com-20100819072501-jjvwgy2neeu9vs4p --- addons/stock/stock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 244d9574f95..c76bc609a65 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -181,7 +181,10 @@ class stock_location(osv.osv): 'chained_journal_id': fields.many2one('stock.journal', 'Chained Journal'), 'chained_location_id': fields.many2one('stock.location', 'Chained Location If Fixed'), 'chained_location_type': fields.selection([('none', 'None'), ('customer', 'Customer'), ('fixed', 'Fixed Location')], - 'Chained Location Type', required=True), + 'Chained Location Type', required=True, + help="This field is set to determine the destination location.\n" \ + "If the field is set to 'customer', the location is given by the properties of the partner form.\n"\ + "If the field is set to 'fixed', the destination location is given by the field Location if link is fixed."), 'chained_auto_packing': fields.selection( [('auto', 'Automatic Move'), ('manual', 'Manual Operation'), ('transparent', 'Automatic No Step Added')], 'Automatic Move', From 2eaf0ee8a420b5273e173e5069355a17c874349e Mon Sep 17 00:00:00 2001 From: "uco (Open ERP)" Date: Thu, 19 Aug 2010 13:02:52 +0530 Subject: [PATCH 05/29] [FIX] mrp: Fixed problem of wrong calculation of Consumed Products in a Production Order. bzr revid: uco@tinyerp.com-20100819073252-a8djnr7vdue2m3db --- addons/mrp/mrp.py | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 0e69dd3b4e8..fd9f8335987 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -686,29 +686,42 @@ class mrp_production(osv.osv): final_product_todo = [] produced_qty = 0 + if production_mode == 'consume_produce': + produced_qty = production_qty + for produced_product in production.move_created_ids2: if (produced_product.scraped) or (produced_product.product_id.id<>production.product_id.id): continue produced_qty += produced_product.product_qty - if production_mode in ['consume','consume_produce']: consumed_products = {} + check = {} + scraped = map(lambda x:x.scraped,production.move_lines2).count(True) + for consumed_product in production.move_lines2: + consumed = consumed_product.product_qty if consumed_product.scraped: continue if not consumed_products.get(consumed_product.product_id.id, False): - consumed_products[consumed_product.product_id.id] = 0 - consumed_products[consumed_product.product_id.id] -= consumed_product.product_qty - + consumed_products[consumed_product.product_id.id] = consumed_product.product_qty + check[consumed_product.product_id.id] = 0 + for f in production.product_lines: + if f.product_id.id == consumed_product.product_id.id: + if (len(production.move_lines2) - scraped) > len(production.product_lines): + check[consumed_product.product_id.id] += consumed_product.product_qty + consumed = check[consumed_product.product_id.id] + rest_consumed = produced_qty * f.product_qty / production.product_qty - consumed + consumed_products[consumed_product.product_id.id] = rest_consumed + for raw_product in production.move_lines: for f in production.product_lines: - if f.product_id.id==raw_product.product_id.id: + if f.product_id.id == raw_product.product_id.id: consumed_qty = consumed_products.get(raw_product.product_id.id, 0) - rest_qty = production_qty * f.product_qty / production.product_qty - consumed_qty - - if rest_qty > 0: - stock_mov_obj.action_consume(cr, uid, [raw_product.id], rest_qty, production.location_src_id.id, context=context) + if consumed_qty == 0: + consumed_qty = production_qty * f.product_qty / production.product_qty + if consumed_qty > 0: + stock_mov_obj.action_consume(cr, uid, [raw_product.id], consumed_qty, production.location_src_id.id, context=context) if production_mode == 'consume_produce': # To produce remaining qty of final product From d5ad0b8ff144886a2a5b3766a297b72f59633184 Mon Sep 17 00:00:00 2001 From: "RHA (Open ERP)" <> Date: Thu, 19 Aug 2010 17:21:57 +0530 Subject: [PATCH 06/29] [CLEAN]: Removed commented codes, unnecessary spaces. bzr revid: uco@tinyerp.com-20100819115157-sfsmbnjdgpp4wl12 --- addons/account/__openerp__.py | 4 - addons/account/account.py | 29 -- addons/account/account_analytic_line.py | 3 +- addons/account/account_assert_test.xml | 20 - addons/account/account_bank_statement.py | 2 - addons/account/account_cash_statement.py | 17 - addons/account/account_invoice_view.xml | 1 - addons/account/account_invoice_workflow.xml | 46 +-- addons/account/account_menuitem.xml | 14 - addons/account/account_move_line.py | 12 +- addons/account/account_report.xml | 25 -- addons/account/account_view.xml | 136 +------ addons/account/account_wizard.xml | 93 ----- addons/account/board_account_demo.xml | 11 +- addons/account/company_view.xml | 12 +- addons/account/configurable_account_chart.xml | 26 +- addons/account/demo/account_minimal.xml | 12 - addons/account/installer.py | 1 - addons/account/invoice.py | 10 +- addons/account/partner_view.xml | 2 +- .../process/customer_invoice_process.xml | 64 ++- addons/account/project/project_report.xml | 17 - addons/account/project/project_view.xml | 57 +-- .../wizard/account_analytic_balance_report.py | 4 +- .../project/wizard/account_analytic_chart.py | 2 +- .../project/wizard/account_analytic_check.py | 4 +- ...analytic_cost_ledger_for_journal_report.py | 4 +- .../account_analytic_cost_ledger_report.py | 4 +- ...ccount_analytic_inverted_balance_report.py | 4 +- .../wizard/account_analytic_journal_report.py | 4 +- .../wizard/project_account_analytic_line.py | 2 +- .../project_account_analytic_line_view.xml | 4 +- .../report/account_aged_partner_balance.py | 6 +- addons/account/report/account_balance.py | 31 -- .../report/account_balance_landscape.py | 266 ------------- .../account/report/account_balance_sheet.py | 1 - addons/account/report/account_report.py | 1 - addons/account/report/account_report_view.xml | 7 - .../account/report/compare_account_balance.py | 265 ------------- addons/account/report/rml_parse.py | 22 -- addons/account/report/tax_report.py | 3 - addons/account/wizard/__init__.py | 1 - .../wizard/account_automatic_reconcile.py | 2 - addons/account/wizard/account_chart.py | 2 +- .../account_compare_account_balance_report.py | 4 +- .../wizard/account_fiscalyear_close.py | 4 +- .../wizard/account_fiscalyear_close_state.py | 2 +- .../wizard/account_invoice_state_view.xml | 32 +- .../wizard/account_move_bank_reconcile.py | 2 +- addons/account/wizard/account_move_journal.py | 1 - .../account_move_line_reconcile_select.py | 4 +- ...ccount_move_line_reconcile_select_view.xml | 3 - .../wizard/account_move_line_select_view.xml | 12 +- .../account_move_line_unreconcile_select.py | 4 +- ...ount_move_line_unreconcile_select_view.xml | 3 - .../wizard/account_open_closed_fiscalyear.py | 2 +- .../account_open_closed_fiscalyear_view.xml | 4 - addons/account/wizard/account_pay_invoice.py | 2 +- .../wizard/account_pay_invoice_view.xml | 3 +- addons/account/wizard/account_period_close.py | 2 +- addons/account/wizard/account_reconcile.py | 8 +- .../account_reconcile_partner_process.py | 9 - ...account_reconcile_partner_process_view.xml | 7 - .../account/wizard/account_reconcile_view.xml | 80 ---- .../wizard/account_report_account_balance.py | 2 +- .../account_report_account_balance_view.xml | 38 +- .../account_report_aged_partner_balance.py | 4 +- .../wizard/account_report_balance_sheet.py | 8 +- .../account_report_balance_sheet_view.xml | 2 - .../wizard/account_report_central_journal.py | 2 +- .../account_report_central_journal_view.xml | 1 - .../wizard/account_report_common_account.py | 4 +- .../wizard/account_report_common_journal.py | 2 +- .../wizard/account_report_common_partner.py | 4 +- .../wizard/account_report_common_view.xml | 1 - .../account_report_general_journal_view.xml | 5 +- .../wizard/account_report_partner_ledger.py | 8 +- .../wizard/account_report_print_journal.py | 4 +- .../wizard/account_report_profit_loss.py | 8 +- .../wizard/account_statement_from_invoice.py | 18 +- .../account_statement_from_invoice_view.xml | 12 +- .../wizard/account_subscription_generate.py | 4 +- addons/account/wizard/account_use_model.py | 4 +- .../account/wizard/account_use_model_view.xml | 3 - .../wizard/account_validate_account_move.py | 2 +- .../account_analytic_analysis.py | 15 +- addons/account_budget/__openerp__.py | 1 - .../account_budget/account_budget_wizard.xml | 3 - .../crossovered_budget_report.xml | 30 -- .../crossovered_budget_view.xml | 13 - .../crossovered_budget_workflow.xml | 13 - .../report/analytic_account_budget_report.py | 3 - .../report/crossovered_budget_report.py | 3 - addons/account_cancel/account_cancel_view.xml | 2 +- .../account_followup_view.xml | 2 - .../report/account_followup_report.py | 2 +- .../wizard/account_followup_print.py | 17 +- .../wizard/account_followup_print_view.xml | 1 - .../account_invoice_layout.py | 8 - addons/account_payment/account_move_line.py | 1 - .../wizard/account_payment_pay.py | 2 - addons/account_report/account.py | 35 +- addons/account_report/account_view.xml | 4 - addons/account_report/account_wizard.xml | 5 - .../report/accounting_report.py | 6 +- .../account_report/report/print_indicator.py | 52 --- addons/account_reporting/account.py | 5 +- addons/account_reporting/account_report.xml | 12 - .../report/account_report_bs.py | 30 -- .../account_tax_include.py | 2 - .../account_voucher/report/report_voucher.py | 14 +- addons/account_voucher/report/rml_parse.py | 1 - addons/account_voucher/voucher_view.xml | 96 +---- addons/account_voucher/voucher_wizard.xml | 13 - .../account_voucher_unreconcile_view.xml | 12 +- .../analytic_journal_billing_rate_view.xml | 1 - .../analytic_user_function.py | 27 +- addons/auction/__openerp__.py | 6 +- addons/auction/auction.py | 373 +++++++++--------- addons/auction/auction_demo.xml | 70 ++-- addons/auction/auction_report.xml | 60 --- addons/auction/auction_wizard.xml | 39 -- addons/auction/board_auction_demo.xml | 7 - addons/auction/board_auction_view.xml | 15 +- addons/auction/report/__init__.py | 7 +- addons/auction/report/ach_bordereau_photo.xml | 2 - addons/auction/report/buyer_form_report.py | 7 +- addons/auction/report/catalog2.py | 5 - addons/auction/report/deposit.xml | 2 - addons/auction/report/huissier.py | 9 +- addons/auction/report/report_auction.py | 25 +- addons/auction/report/report_auction_view.xml | 16 +- addons/auction/report/seller_form_report.py | 13 +- addons/auction/report/total.py | 19 - addons/auction/wizard/auction_aie_send.py | 6 +- .../wizard/auction_lots_auction_move.py | 26 +- addons/auction/wizard/auction_lots_invoice.py | 37 +- addons/auction/wizard/auction_pay_sel.py | 21 +- addons/audittrail/audittrail.py | 1 - .../audittrail/wizard/audittrail_view_log.py | 15 +- addons/base_calendar/base_calendar.py | 3 - .../process/base_contact_process.xml | 1 - .../base_module_doc_rst.py | 53 --- .../report/report_proximity_graph.py | 3 - .../wizard/wizard_tech_guide_rst.py | 13 - .../base_module_quality.py | 2 - .../pylint_test/pylint_test.py | 9 - .../structure_test/structure_test.py | 2 - .../base_report_creator.py | 62 ++- .../wizard/wiz_set_filter_fields.py | 23 +- .../wizard/tiny_sxw2rml/tiny_sxw2rml.py | 2 - addons/base_setup/__openerp__.py | 1 - addons/base_setup/base_setup_demo.xml | 6 +- addons/base_setup/base_setup_todo.xml | 1 - addons/base_setup/todo.py | 2 - addons/base_vat/base_vat.py | 11 - addons/caldav/caldav_node.py | 10 +- addons/caldav/calendar.py | 18 +- addons/crm/board_crm_demo.xml | 7 - addons/crm/crm_view.xml | 11 - .../crm/report/crm_phonecall_report_view.xml | 4 - addons/crm/report/report_businessopp.py | 1 - .../wizard/crm_merge_opportunities_view.xml | 11 - .../crm/wizard/crm_partner_to_opportunity.py | 1 - .../report/crm_claim_report_view.xml | 4 - .../report/crm_fundraising_report_view.xml | 4 - addons/crm_profiling/crm_profiling_demo.xml | 90 +---- addons/crm_profiling/crm_profiling_wizard.xml | 9 +- addons/delivery/__init__.py | 6 +- addons/document/document_directory.py | 1 - addons/document_ftp/__openerp__.py | 1 - .../document_ftp/ftpserver/abstracted_fs.py | 45 +-- addons/document_ftp/ftpserver/ftpserver.py | 31 +- addons/document_ftp/wizard/ftp_browse.py | 7 +- addons/document_ics/document_ics.py | 7 +- addons/document_webdav/dav_fs.py | 40 +- addons/document_webdav/webdav.py | 8 +- addons/document_webdav/webdav_server.py | 25 +- .../email_template_mailbox_view.xml | 5 +- .../email_template_send_wizard_view.xml | 3 +- addons/event/board_association_view.xml | 11 - addons/event/event_view.xml | 12 +- .../report/report_event_registration_view.xml | 18 +- addons/event/wizard/event_make_invoice.py | 1 - addons/fetchmail/fetchmail.py | 64 ++- addons/google_map/google_map.py | 6 +- addons/hr/hr_department.py | 2 - addons/hr/hr_view.xml | 2 - addons/hr_attendance/hr_attendance_wizard.xml | 12 - .../hr_attendance/report/attendance_errors.py | 23 +- .../wizard/hr_attendance_byweek_view.xml | 40 -- addons/hr_evaluation/hr_evaluation_demo.xml | 97 ----- addons/hr_evaluation/hr_evaluation_view.xml | 5 - addons/hr_expense/__openerp__.py | 3 +- addons/hr_expense/hr_expense.py | 1 - addons/hr_expense/hr_expense_workflow.xml | 8 - addons/hr_holidays/__openerp__.py | 3 +- addons/hr_holidays/hr_holidays.py | 14 - addons/hr_holidays/hr_holidays_view.xml | 25 +- addons/hr_holidays/hr_holidays_workflow.xml | 6 - .../report/holidays_summary_report.py | 4 - addons/hr_payroll/hr_payroll.py | 15 - addons/hr_payroll/hr_payroll_view.xml | 49 --- addons/hr_payroll/report/rml_parse.py | 7 +- .../wizard/hr_payroll_create_analytic.xml | 4 - .../hr_payroll_account/hr_payroll_account.py | 136 ------- addons/hr_recruitment/__openerp__.py | 1 - addons/hr_recruitment/hr_recruitment.py | 1 - addons/hr_recruitment/hr_recruitment_view.xml | 4 - .../wizard/hr_recruitment_phonecall.py | 4 - .../wizard/hr_recruitment_phonecall_view.xml | 10 - addons/hr_timesheet/hr_timesheet_report.xml | 24 -- addons/hr_timesheet/hr_timesheet_view.xml | 2 - addons/hr_timesheet/hr_timesheet_wizard.xml | 5 +- .../process/hr_timesheet_process.xml | 6 +- .../hr_timesheet_print_employee_view.xml | 5 - .../hr_timesheet_invoice_report.xml | 21 - .../hr_timesheet_invoice_wizard.xml | 2 - .../hr_timesheet_invoice_report_view.xml | 29 -- .../report/report_analytic_view.xml | 2 - ...heet_invoice_analytic_cost_ledger_view.xml | 10 - .../wizard/hr_timesheet_invoice_create.py | 14 - .../board_hr_timesheet_view.xml | 19 - .../hr_timesheet_sheet_demo.xml | 63 +-- .../hr_timesheet_sheet_view.xml | 37 +- addons/idea/security/idea_security.xml | 7 - addons/l10n_be/account_pcmn_belgium.xml | 3 - .../wizard/l10_be_partner_vat_listing.py | 15 - addons/l10n_ch/partner.py | 24 +- addons/l10n_ch/wizard/dta_wizard.py | 9 +- addons/l10n_ch_chart_c2c_pcg/account.xml | 11 - .../l10n_chart_uk_minimal/l10n_uk_chart.xml | 15 - 232 files changed, 698 insertions(+), 3545 deletions(-) diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index f06123487e2..3923add4fe0 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -45,7 +45,6 @@ module named account_voucher. 'init_xml': [], "depends" : ["product", "analytic", "process","board"], 'update_xml': [ - #'test/test_parent_structure.yml', 'security/account_security.xml', 'security/ir.model.access.csv', 'account_menuitem.xml', @@ -80,7 +79,6 @@ module named account_voucher. 'wizard/account_invoice_state_view.xml', 'wizard/account_report_partner_balance_view.xml', 'wizard/account_report_account_balance_view.xml', -# 'wizard/account_move_line_select_view.xml', 'wizard/account_report_aged_partner_balance_view.xml', 'wizard/account_compare_account_balance_report_view.xml', 'wizard/account_report_partner_ledger_view.xml', @@ -120,7 +118,6 @@ module named account_voucher. "wizard/account_report_balance_sheet_view.xml" ], 'demo_xml': [ - #'demo/price_accuracy00.yml', 'account_demo.xml', 'project/project_demo.xml', 'project/analytic_account_demo.xml', @@ -135,7 +132,6 @@ module named account_voucher. 'test/chart_of_account.yml', 'test/account_period_close.yml', 'test/account_fiscalyear_close_state.yml', - #'test/account_invoice_state.yml', 'test/account_use_model.yml', 'test/account_validate_account_move.yml', 'test/account_fiscalyear_close.yml', diff --git a/addons/account/account.py b/addons/account/account.py index d0e4e66cd60..1f54a9b2c52 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -693,14 +693,6 @@ class account_journal(osv.osv): 'sequence_id':seq_id }) -# if journal.type in journal_type and not journal.invoice_sequence_id: -# res_ids = date_pool.search(cr, uid, [('model','=','ir.sequence'), ('name','=',journal_seq.get(journal.type, 'sale'))]) -# inv_seq_id = date_pool.browse(cr, uid, res_ids[0]).res_id -# inv_seq_id -# res.update({ -# 'invoice_sequence_id':inv_seq_id -# }) - result = self.write(cr, uid, [journal.id], res) return result @@ -708,16 +700,6 @@ class account_journal(osv.osv): def create(self, cr, uid, vals, context={}): journal_id = super(account_journal, self).create(cr, uid, vals, context) self.create_sequence(cr, uid, [journal_id], context) - -# journal_name = self.browse(cr, uid, [journal_id])[0].code -# periods = self.pool.get('account.period') -# ids = periods.search(cr, uid, [('date_stop','>=',time.strftime('%Y-%m-%d'))]) -# for period in periods.browse(cr, uid, ids): -# self.pool.get('account.journal.period').create(cr, uid, { -# 'name': (journal_name or '')+':'+(period.code or ''), -# 'journal_id': journal_id, -# 'period_id': period.id -# }) return journal_id def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100): @@ -731,7 +713,6 @@ class account_journal(osv.osv): if name: ids = self.search(cr, user, [('code', 'ilike', name)]+ args, limit=limit, context=context) if not ids: -# ids = self.search(cr, user, [('name', operator, name)]+ args, limit=limit, context=context) ids = self.search(cr, user, [('name', 'ilike', name)]+ args, limit=limit, context=context)#fix it ilike should be replace with operator return self.name_get(cr, user, ids, context=context) @@ -1419,8 +1400,6 @@ class account_move(osv.osv): self.pool.get('account.move.line').write(cr, uid, line_ids, { 'journal_id': move.journal_id.id, 'period_id': move.period_id.id, - #'tax_code_id': False, - #'tax_amount': False, 'state': 'draft' }, context, check=False) # Create analytic lines for the valid moves @@ -1903,8 +1882,6 @@ class account_tax(osv.osv): amount = localdict['result'] elif tax.type=='balance': amount = cur_price_unit - reduce(lambda x,y: y.get('amount',0.0)+x, res, 0.0) -# data['balance'] = cur_price_unit - if tax.include_base_amount: cur_price_unit -= amount @@ -2257,12 +2234,8 @@ class account_add_tmpl_wizard(osv.osv_memory): data= self.read(cr, uid, ids) company_id = acc_obj.read(cr, uid, [data[0]['cparent_id']], ['company_id'])[0]['company_id'][0] account_template = tmpl_obj.browse(cr, uid, context['tmpl_ids']) - #tax_ids = [] - #for tax in account_template.tax_ids: - # tax_ids.append(tax_template_ref[tax.id]) vals={ 'name': account_template.name, - #'sign': account_template.sign, 'currency_id': account_template.currency_id and account_template.currency_id.id or False, 'code': account_template.code, 'type': account_template.type, @@ -2271,7 +2244,6 @@ class account_add_tmpl_wizard(osv.osv_memory): 'shortcut': account_template.shortcut, 'note': account_template.note, 'parent_id': data[0]['cparent_id'], - # 'tax_ids': [(6,0,tax_ids)], todo!! 'company_id': company_id, } new_account = acc_obj.create(cr, uid, vals) @@ -2588,7 +2560,6 @@ class wizard_multi_charts_accounts(osv.osv_memory): code_acc=str(code_acc) + (str('0'*(dig-code_main))) vals={ 'name': (obj_acc_root.id == account_template.id) and obj_multi.company_id.name or account_template.name, - #'sign': account_template.sign, 'currency_id': account_template.currency_id and account_template.currency_id.id or False, 'code': code_acc, 'type': account_template.type, diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 1792525a7f6..36fc350dfb8 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -42,7 +42,7 @@ class account_analytic_line(osv.osv): _defaults = { 'date': lambda *a: 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), - } + } _order = 'date' def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): @@ -65,7 +65,6 @@ class account_analytic_line(osv.osv): return False return True _constraints = [ -# (_check_company, 'You can not create analytic line that is not in the same company than the account line', ['account_id']) ] # Compute the cost based on the price type define into company diff --git a/addons/account/account_assert_test.xml b/addons/account/account_assert_test.xml index 585c6bda124..ba5f9840ccc 100644 --- a/addons/account/account_assert_test.xml +++ b/addons/account/account_assert_test.xml @@ -4,25 +4,5 @@ - - - diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 6ddea9645b4..e8cafd2443b 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -367,8 +367,6 @@ class account_bank_statement(osv.osv): account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context) else: account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context) - #except: - # raise osv.except_osv(_('Error !'), _('Unable to reconcile entry "%s": %.2f') % (move.name, move.amount)) if st.journal_id.entry_posted: account_move_obj.write(cr, uid, [move_id], {'state': 'posted'}) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index f08f9de2f8f..8bf75a8dd03 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -118,19 +118,6 @@ class account_cash_statement(osv.osv): res2[statement.id]=encoding_total return res2 -# def _default_journal_id(self, cr, uid, context={}): - -# """ To get default journal for the object" -# @param name: Names of fields. -# @return: journal -# """ -# company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id -# journal = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', company_id)]) -# if journal: -# return journal[0] -# else: -# return False - def _end_balance(self, cursor, user, ids, name, attr, context=None): res_currency_obj = self.pool.get('res.currency') res_users_obj = self.pool.get('res.users') @@ -374,10 +361,6 @@ class account_cash_statement(osv.osv): if not self._equal_balance(cr, uid, ids, st, context): raise osv.except_osv(_('Error !'), _('CashBox Balance is not matching with Calculated Balance !')) -# if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001): -# raise osv.except_osv(_('Error !'), -# _('The statement balance is incorrect !\n') + -# _('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end)) if (not st.journal_id.default_credit_account_id) \ or (not st.journal_id.default_debit_account_id): raise osv.except_osv(_('Configuration Error !'), diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 6effce8f488..80c245638f7 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -421,7 +421,6 @@ - Customer Invoices diff --git a/addons/account/account_invoice_workflow.xml b/addons/account/account_invoice_workflow.xml index ba8d1ba2bc8..c3749eb8cf0 100644 --- a/addons/account/account_invoice_workflow.xml +++ b/addons/account/account_invoice_workflow.xml @@ -12,19 +12,6 @@ True draft - - - - - - - - - - @@ -65,35 +52,11 @@ write({'state':'cancel'}) function - - - - - - - invoice_open - - - - - - - - - - - - @@ -106,11 +69,6 @@ write({'state':'cancel'}) invoice_cancel - - - - - @@ -126,7 +84,7 @@ write({'state':'cancel'}) invoice_cancel - + @@ -134,7 +92,7 @@ write({'state':'cancel'}) move_line_id_payment_get() test_paid() - + diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml index 74c8234860d..3cb21315350 100644 --- a/addons/account/account_menuitem.xml +++ b/addons/account/account_menuitem.xml @@ -6,13 +6,10 @@ - - - @@ -25,23 +22,12 @@ - - - - - - - - - - - diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 94dd4e8eb86..4e6c2cb5d8d 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -572,7 +572,7 @@ class account_move_line(osv.osv): if journal: jt = self.pool.get('account.journal').browse(cr, uid, journal).type #FIXME: Bank and cash journal are such a journal we can not assume a account based on this 2 journals - # Bank and cash journal can have a payment or receipt transection, and in both type partner account + # Bank and cash journal can have a payment or receipt transaction, and in both type partner account # will not be same id payment then payable, and if receipt then receivable #if jt in ('sale', 'purchase_refund', 'bank', 'cash'): if jt in ('sale', 'purchase_refund'): @@ -1155,11 +1155,6 @@ class account_move_line(osv.osv): 'journal_id': journal.analytic_journal_id.id, 'ref': vals.get('ref', False), })] - #else: - # raise osv.except_osv(_('No analytic journal !'), _('Please set an analytic journal on this financial journal !')) - - #if not 'currency_id' in vals: - # vals['currency_id'] = account.company_id.currency_id.id result = super(osv.osv, self).create(cr, uid, vals, context) # CREATE Taxes @@ -1228,11 +1223,6 @@ class account_move_line(osv.osv): self.create(cr, uid, data, context) del vals['account_tax_id'] - # No needed, related to the job - #if not is_new_move and 'date' in vals: - # if context and ('__last_update' in context): - # del context['__last_update'] - # self.pool.get('account.move').write(cr, uid, [move_id], {'date':vals['date']}, context=context) if check and ((not context.get('no_store_function')) or journal.entry_posted): tmp = self.pool.get('account.move').validate(cr, uid, [vals['move_id']], context) if journal.entry_posted and tmp: diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index 8e26ee8553b..be0569fa65f 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -47,20 +47,6 @@ name="Taxes" parent="account.menu_finance_generic_reporting" sequence="3"/> - - - - - diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index bb0e96a8380..a8f0649a99e 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -160,7 +160,6 @@ - @@ -256,7 +255,6 @@ [('parent_id','=',False)] - - - - - - - account.bank.statement.reconcile.form account.bank.statement.reconcile @@ -871,7 +862,6 @@ id="menu_action_tax_code_tree" parent="menu_finance_charts" sequence="12"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Entry Lines ir.actions.act_window @@ -1434,26 +1371,8 @@ form - - - - - - - - - - - - - - - - account.bank.statement.reconcile.form @@ -1516,20 +1435,6 @@ form,tree - - - - - - - - - - tree You can look up individual account entries by searching for useful information. To search for account entries, open a journal, then select a record line. - - + # Account Models + --> account.model.line.tree @@ -1729,26 +1632,7 @@ - - - - - - - - - - - - - - - - - - - - + Payment Terms account.payment.term @@ -1758,8 +1642,8 @@ + # Account Subscriptions + --> account.subscription.line.form @@ -1813,7 +1697,6 @@ - @@ -1883,15 +1766,6 @@ [('account_id','child_of', [active_id]),('state','<>','draft')] {'account_id':active_id} - - - - - - - - - account.move.line.tax.tree diff --git a/addons/account/account_wizard.xml b/addons/account/account_wizard.xml index d7a879cdf20..639dc2dc111 100644 --- a/addons/account/account_wizard.xml +++ b/addons/account/account_wizard.xml @@ -1,100 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/account/board_account_demo.xml b/addons/account/board_account_demo.xml index cfcebdbcdf1..93bfed6d56d 100644 --- a/addons/account/board_account_demo.xml +++ b/addons/account/board_account_demo.xml @@ -2,16 +2,9 @@ - diff --git a/addons/account/company_view.xml b/addons/account/company_view.xml index a3a1ec0080a..692c7960bbf 100644 --- a/addons/account/company_view.xml +++ b/addons/account/company_view.xml @@ -7,12 +7,12 @@ res.company form - - - - - - + + + + + + diff --git a/addons/account/configurable_account_chart.xml b/addons/account/configurable_account_chart.xml index bfef98145a6..cd0305ec9b9 100644 --- a/addons/account/configurable_account_chart.xml +++ b/addons/account/configurable_account_chart.xml @@ -175,10 +175,6 @@ - - 1103 Output VAT @@ -195,14 +191,6 @@ - - - - - - - - 111 Current Liabilities @@ -220,10 +208,6 @@ - - 1112 Input VAT @@ -268,10 +252,6 @@ - - 21 Cost of Sales @@ -304,12 +284,8 @@ - - - + diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index cfcd6d0033d..2e56faa2733 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -411,18 +411,6 @@ Product income and expense accounts, default parameters --> - - - - - - - - - - - - property_account_expense_categ diff --git a/addons/account/installer.py b/addons/account/installer.py index 4843f54187c..6671241a4d4 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -71,7 +71,6 @@ class account_installer(osv.osv_memory): 'period':lambda *a:'month', 'sale_tax':lambda *a:0.0, 'purchase_tax':lambda *a:0.0, - #'charts':'configurable', 'bank_accounts_id':_get_default_accounts } diff --git a/addons/account/invoice.py b/addons/account/invoice.py index cff1ce60141..c2fbe5f9293 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -319,7 +319,6 @@ class account_invoice(osv.osv): } _defaults = { 'type': _get_type, - #'date_invoice': lambda *a: time.strftime('%Y-%m-%d'), 'state': 'draft', 'journal_id': _get_journal, 'currency_id': _get_currency, @@ -372,9 +371,6 @@ class account_invoice(osv.osv): osv.osv.unlink(self, cr, uid, unlink_ids, context=context) return True -# def get_invoice_address(self, cr, uid, ids): -# res = self.pool.get('res.partner').address_get(cr, uid, [part], ['invoice']) -# return [{}] def onchange_partner_id(self, cr, uid, ids, type, partner_id,\ date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): invoice_addr_id = False @@ -636,7 +632,6 @@ class account_invoice(osv.osv): ait_obj.create(cr, uid, taxe) # Update the stored value (fields.function), so we write to trigger recompute self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context) -# self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context) return True def button_compute(self, cr, uid, ids, context=None, set_total=False): @@ -879,7 +874,7 @@ class account_invoice(osv.osv): line = self.group_lines(cr, uid, iml, line, inv) - journal_id = inv.journal_id.id #self._get_journal(cr, uid, {'type': inv['type']}) + journal_id = inv.journal_id.id journal = self.pool.get('account.journal').browse(cr, uid, journal_id) if journal.centralisation: raise osv.except_osv(_('UserError'), @@ -1321,9 +1316,6 @@ class account_invoice_line(osv.osv): else: app_acc_in = in_acc_cate app_acc_exp = ex_acc_cate -# else: -# app_acc_in = self.pool.get('account.account').browse(cr,uid,in_pro_id)[0] -# app_acc_exp = self.pool.get('account.account').browse(cr,uid,exp_pro_id)[0] if app_acc_in.company_id.id != company_id and app_acc_exp.company_id.id != company_id: in_res_id = account_obj.search(cr, uid, [('name','=',app_acc_in.name),('company_id','=',company_id)]) exp_res_id = account_obj.search(cr, uid, [('name','=',app_acc_exp.name),('company_id','=',company_id)]) diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index 609b8f0da5a..f3a8cca8ada 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -63,7 +63,7 @@ + --> res.partner.property.form.inherit diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml index 172de7b7b1c..1f04c8e023b 100644 --- a/addons/account/process/customer_invoice_process.xml +++ b/addons/account/process/customer_invoice_process.xml @@ -1,21 +1,21 @@ - - - + - - - + @@ -26,7 +26,7 @@ - + @@ -37,7 +37,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -70,7 +70,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -92,7 +92,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -115,20 +115,16 @@ - - - + - - - - - + @@ -137,7 +133,7 @@ - + @@ -146,7 +142,7 @@ - + @@ -156,7 +152,7 @@ - + @@ -165,7 +161,7 @@ - + @@ -174,7 +170,7 @@ - + @@ -183,7 +179,7 @@ - + @@ -192,7 +188,7 @@ - + @@ -201,17 +197,17 @@ - - - + - + diff --git a/addons/account/project/project_report.xml b/addons/account/project/project_report.xml index ae6aedeaab1..0bc8077761e 100644 --- a/addons/account/project/project_report.xml +++ b/addons/account/project/project_report.xml @@ -3,32 +3,15 @@ - - - - - - - - - - - - - - - - - diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 4bdab312ad2..2879cdede2a 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -60,11 +60,6 @@ - - - - - @@ -112,7 +107,6 @@ {"search_default_user_id":uid} - @@ -135,17 +129,8 @@ Analytic Charts of Accounts allows you to access to reports by analytic accounts (or cost accounts) . From this menu you can access to analytic balance, a report that relates the analytic accounts to the general accounts. It is useful for analyzing the profitability of projects, giving you the profitability of a project for the different operations that you used to carry out the project. - - - - - - - - account.analytic.line.form @@ -230,14 +215,8 @@ {"search_default_user_id":uid} - - - - - - - + Analytic Entries @@ -355,30 +334,6 @@ tree,form - - - - - - - - - - - - # # Reporting @@ -392,15 +347,6 @@ - - - - - - - - - # # Statistics # @@ -476,7 +422,6 @@ tree,graph - diff --git a/addons/account/project/wizard/account_analytic_balance_report.py b/addons/account/project/wizard/account_analytic_balance_report.py index b751808ffb9..2a0a8bba7a8 100644 --- a/addons/account/project/wizard/account_analytic_balance_report.py +++ b/addons/account/project/wizard/account_analytic_balance_report.py @@ -30,12 +30,12 @@ class account_analytic_balance(osv.osv_memory): 'date1': fields.date('Start of period', required=True), 'date2': fields.date('End of period', required=True), 'empty_acc': fields.boolean('Empty Accounts ? ', help='Check if you want to display Accounts with 0 balance too.'), - } + } _defaults = { 'date1':time.strftime('%Y-01-01'), 'date2':time.strftime('%Y-%m-%d') - } + } def check_report(self, cr, uid, ids, context=None): datas = {} diff --git a/addons/account/project/wizard/account_analytic_chart.py b/addons/account/project/wizard/account_analytic_chart.py index dc55d6c43e7..89155810fc0 100644 --- a/addons/account/project/wizard/account_analytic_chart.py +++ b/addons/account/project/wizard/account_analytic_chart.py @@ -27,7 +27,7 @@ class account_analytic_chart(osv.osv_memory): _columns = { 'from_date': fields.date('From'), 'to_date': fields.date('To'), - } + } def analytic_account_chart_open_window(self, cr, uid, ids, context=None): mod_obj = self.pool.get('ir.model.data') diff --git a/addons/account/project/wizard/account_analytic_check.py b/addons/account/project/wizard/account_analytic_check.py index 48c89df8fc4..53327963151 100644 --- a/addons/account/project/wizard/account_analytic_check.py +++ b/addons/account/project/wizard/account_analytic_check.py @@ -29,12 +29,12 @@ class account_analytic_check(osv.osv_memory): _columns = { 'date1': fields.date('Start of period', required=True), 'date2': fields.date('End of period', required=True), - } + } _defaults = { 'date1':time.strftime('%Y-01-01'), 'date2':time.strftime('%Y-%m-%d') - } + } def check_report(self, cr, uid, ids, context=None): datas = {} diff --git a/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report.py b/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report.py index 6074fee3f08..ad1ea42c29f 100644 --- a/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report.py +++ b/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report.py @@ -30,12 +30,12 @@ class account_analytic_cost_ledger_journal_report(osv.osv_memory): 'date1': fields.date('Start of period', required=True), 'date2': fields.date('End of period', required=True), 'journal': fields.many2many('account.analytic.journal', 'ledger_journal_rel', 'ledger_id', 'Journal_id', 'Journals'), - } + } _defaults = { 'date1':time.strftime('%Y-01-01'), 'date2':time.strftime('%Y-%m-%d') - } + } def check_report(self, cr, uid, ids, context=None): datas = {} diff --git a/addons/account/project/wizard/account_analytic_cost_ledger_report.py b/addons/account/project/wizard/account_analytic_cost_ledger_report.py index 96b480b4fb5..d228499e5bd 100644 --- a/addons/account/project/wizard/account_analytic_cost_ledger_report.py +++ b/addons/account/project/wizard/account_analytic_cost_ledger_report.py @@ -29,12 +29,12 @@ class account_analytic_cost_ledger(osv.osv_memory): _columns = { 'date1': fields.date('Start of period', required=True), 'date2': fields.date('End of period', required=True), - } + } _defaults = { 'date1':time.strftime('%Y-01-01'), 'date2':time.strftime('%Y-%m-%d') - } + } def check_report(self, cr, uid, ids, context=None): datas = {} diff --git a/addons/account/project/wizard/account_analytic_inverted_balance_report.py b/addons/account/project/wizard/account_analytic_inverted_balance_report.py index 52f7da936fe..0fac1ba8dec 100644 --- a/addons/account/project/wizard/account_analytic_inverted_balance_report.py +++ b/addons/account/project/wizard/account_analytic_inverted_balance_report.py @@ -29,12 +29,12 @@ class account_analytic_inverted_balance(osv.osv_memory): _columns = { 'date1': fields.date('Start of period', required=True), 'date2': fields.date('End of period', required=True), - } + } _defaults = { 'date1':time.strftime('%Y-01-01'), 'date2':time.strftime('%Y-%m-%d') - } + } def check_report(self, cr, uid, ids, context=None): datas = {} diff --git a/addons/account/project/wizard/account_analytic_journal_report.py b/addons/account/project/wizard/account_analytic_journal_report.py index aef6a85149d..06bec940f89 100644 --- a/addons/account/project/wizard/account_analytic_journal_report.py +++ b/addons/account/project/wizard/account_analytic_journal_report.py @@ -29,12 +29,12 @@ class account_analytic_Journal_report(osv.osv_memory): _columns = { 'date1': fields.date('Start of period', required=True), 'date2': fields.date('End of period', required=True), - } + } _defaults = { 'date1':time.strftime('%Y-01-01'), 'date2':time.strftime('%Y-%m-%d') - } + } def check_report(self, cr, uid, ids, context=None): datas = {} diff --git a/addons/account/project/wizard/project_account_analytic_line.py b/addons/account/project/wizard/project_account_analytic_line.py index dbe3df3c819..5437abe5be7 100644 --- a/addons/account/project/wizard/project_account_analytic_line.py +++ b/addons/account/project/wizard/project_account_analytic_line.py @@ -27,7 +27,7 @@ class project_account_analytic_line(osv.osv_memory): _columns = { 'from_date': fields.date('From'), 'to_date': fields.date('To'), - } + } def action_open_window(self, cr, uid, ids, context={}): mod_obj =self.pool.get('ir.model.data') diff --git a/addons/account/project/wizard/project_account_analytic_line_view.xml b/addons/account/project/wizard/project_account_analytic_line_view.xml index d564ffb5c81..926c783b444 100644 --- a/addons/account/project/wizard/project_account_analytic_line_view.xml +++ b/addons/account/project/wizard/project_account_analytic_line_view.xml @@ -28,8 +28,8 @@ project.account.analytic.line form tree,form - - new + + new diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py index a70d79cdd40..8e07f3ad56c 100644 --- a/addons/account/report/account_aged_partner_balance.py +++ b/addons/account/report/account_aged_partner_balance.py @@ -181,10 +181,6 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): ## Add for total self.total_account[(i+1)] = self.total_account[(i+1)] + (total and total[0] or 0.0) values['name'] = partner['name'] - #t = 0.0 - #for i in range(5)+['direction']: - # t+= float(values.get(str(i), 0.0) or 0.0) - #values['total'] = t if values['total']: res.append(values) @@ -217,7 +213,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header): return 'Payable Accounts' elif data['form']['result_selection'] == 'customer_supplier': return 'Receivable and Payable Accounts' - return '' + return '' report_sxw.report_sxw('report.account.aged_trial_balance', 'res.partner', 'addons/account/report/account_aged_partner_balance.rml',parser=aged_trial_report, header=False) diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py index 076369f7e10..79e2334b7dc 100644 --- a/addons/account/report/account_balance.py +++ b/addons/account/report/account_balance.py @@ -86,10 +86,6 @@ class account_balance(report_sxw.rml_parse, common_report_header): elif form['filter'] == 'filter_date': ctx['date_from'] = form['date_from'] ctx['date_to'] = form['date_to'] -# accounts = obj_account.browse(self.cr, self.uid, ids, ctx) -# def cmp_code(x, y): -# return cmp(x.code, y.code) -# accounts.sort(cmp_code) child_ids = obj_account._get_children_and_consol(self.cr, self.uid, ids, ctx) if child_ids: @@ -108,28 +104,11 @@ class account_balance(report_sxw.rml_parse, common_report_header): 'debit': account['debit'], 'credit': account['credit'], 'balance': account['balance'], - # 'leef': not bool(account['child_id']), 'parent_id':account['parent_id'], 'bal_type':'', } self.sum_debit += account['debit'] self.sum_credit += account['credit'] -# if account.child_id: -# def _check_rec(account): -# if not account.child_id: -# return bool(account.credit or account.debit) -# for c in account.child_id: -# if not _check_rec(c) or _check_rec(c): -# return True -# return False -# if not _check_rec(account) : -# continue -# if account['parent_id']: -# acc = obj_account.read(self.cr, self.uid, [ account['parent_id'][0] ] ,['name'], ctx) -# for r in result_acc: -# if r['id'] == account['parent_id'][0]: -# res['level'] = r['level'] + 1 -# break if form['display_account'] == 'bal_movement': if res['credit'] > 0 or res['debit'] > 0 or res['balance'] > 0 : result_acc.append(res) @@ -138,16 +117,6 @@ class account_balance(report_sxw.rml_parse, common_report_header): result_acc.append(res) else: result_acc.append(res) -# if account.child_id: -# acc_id = [acc.id for acc in account.child_id] -# lst_string = '' -# lst_string = '\'' + '\',\''.join(map(str,acc_id)) + '\'' -# self.cr.execute("select code,id from account_account where id IN (%s)"%(lst_string)) -# a_id = self.cr.fetchall() -# a_id.sort() -# ids2 = [x[1] for x in a_id] -# -# result_acc += self.lines(form, ids2, done, level+1) return result_acc report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header="internal") diff --git a/addons/account/report/account_balance_landscape.py b/addons/account/report/account_balance_landscape.py index 02d69ba8b19..e8b8502e331 100644 --- a/addons/account/report/account_balance_landscape.py +++ b/addons/account/report/account_balance_landscape.py @@ -24,8 +24,6 @@ import locale from report import report_sxw import rml_parse -#from addons.account.wizard import wizard_account_balance_report - parents = { 'tr':1, 'li':1, @@ -59,267 +57,6 @@ class account_balance_landscape(rml_parse.rml_parse): }) self.context = context -# def repeatIn(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]): -# self._node.data = '' -# node = self._find_parent(self._node, nodes_parent or parents) -# ns = node.nextSibling -##start -# if value==['Cash','%']: -# if show==1: -# if perc==1: -# if pattern=='none': -# value=['','Cash','%'] -# type=['lable','lable','lable'] -# width=[130,65,65] -# else: -# value=[' ','','Cash','%'] -# type=['string','lable','lable','lable'] -# width=[65,130,65,65] -# else: -# if pattern=='none': -# value=[''] -# type=['lable'] -# width=[195] -# else: -# value=[' ',''] -# type=['string','lable'] -# width=[65,195] -# else: -# if perc==1: -# if pattern=='none': -# value=['Cash','%'] -# type=['lable','lable'] -# width=[65,65] -# else: -# value=[' ','Cash','%'] -# type=['string','lable','lable'] -# width=[65,65,65] -# else: -# if pattern=='none': -# value=[''] -# type=['lable'] -# width=[65] -# else: -# value=[' ',''] -# type=['string','lable'] -# width=[65,65] -# -# -# if value==['year']: -# if show==1: -# if perc==1: -# if pattern=='none': -# width=[260] -# else: -# value=[' ','year'] -# type=['string','string'] -# width=[65,260] -# else: -# if pattern=='none': -# width=[195] -# else: -# value=[' ','year'] -# type=['string','string'] -# width=[65,195] -# else: -# if perc==1: -# if pattern=='none': -# width=[130] -# else: -# value=[' ','year'] -# type=['string','string'] -# width=[65,130] -# -# else: -# if pattern=='none': -# width=[65] -# else: -# value=[' ','year'] -# type=['string','string'] -# width=[65,65] -# -# if value==['Debit','Credit','Balance']: -# if show==1: -# if perc==1: -# if pattern=='none': -# width=[65,65,130] -# else: -# value=[' ','Debit','Credit','Balance'] -# type=['string','lable','lable','lable'] -# width=[65,65,65,130] -# else: -# if pattern=='none': -# width=[65,65,65] -# else: -# value=[' ','Debit','Credit','Balance'] -# type=['string','lable','lable','lable'] -# width=[65,65,65,65] -# -# else: -# if perc==1: -# if pattern=='none': -# value=['Balance'] -# type=['lable'] -# width=[130] -# else: -# value=[' ','Balance'] -# type=['string','lable'] -# width=[65,130] -# else: -# if pattern=='none': -# value=['Balance'] -# type=['lable'] -# width=[65] -# else: -# value=[' ','Balance'] -# type=['string','lable'] -# width=[65,65] -# -# if value==['debit','credit','balance']: -# if show==1: -# if perc==1: -# if pattern=='none': -# value=['debit','credit','balance','balance_perc'] -# type=['string','string','string','string'] -# width=[65,65,65,65] -# else: -# value=[pattern,'debit','credit','balance','balance_perc'] -# type=['string','string','string','string','string'] -# width=[65,65,65,65,65] -# else: -# if pattern=='none': -# value=['debit','credit','balance'] -# type=['string','string','string'] -# width=[65,65,65] -# else: -# value=[pattern,'debit','credit','balance'] -# type=['string','string','string','string'] -# width=[65,65,65,65] -# -# else: -# if perc==1: -# if pattern=='none': -# value=['balance','balance_perc'] -# type=['string','string'] -# width=[65,65] -# else: -# value=[pattern,'balance','balance_perc'] -# type=['string','string','string'] -# width=[65,65,65] -# else: -# if pattern=='none': -# value=['balance'] -# type=['string'] -# width=[65] -# else: -# value=[pattern,'balance'] -# type=['string','string'] -# width=[65,65] -# -# if value==['sum_debit','sum_credit','']: -# if show==1: -# if perc==1: -# if pattern=='none': -# width=[65,65,130] -# else: -# value=[' ','sum_debit','sum_credit',''] -# type=['string','string','string','lable'] -# width=[65,65,65,130] -# else: -# if pattern=='none': -# width=[65,65,65] -# else: -# value=[' ','sum_debit','sum_credit',''] -# type=['string','string','string','lable'] -# width=[65,65,65,65] -# else: -# if perc==1: -# if pattern=='none': -# value=[''] -# type=['lable'] -# width=[130] -# else: -# value=[' ',''] -# type=['string','lable'] -# width=[65,130] -# else: -# if pattern=='none': -# value=[''] -# type=['lable'] -# width=[65] -# else: -# value=[' ',''] -# type=['string','lable'] -# width=[65,65] -# -# if not lst: -# lst.append(1) -# for ns in node.childNodes : -# if ns and ns.nodeName!='#text' and ns.tagName=='blockTable' and td : -# width_str = ns._attrs['colWidths'].nodeValue -# ns.removeAttribute('colWidths') -# total_td = td * len(value) -# -# if not width: -# for v in value: -# width.append(30) -# check1=0 -# for t in range(td): -# for v in range(len(value)): -# if type[v] in ('String','STRING','string'): -# if (value[v]==" " or value[0]==pattern): -# if check1==0: -# check1=1 -# width_str +=',0.0' -# else: -# width_str +=',%d'%width[v] -# else: -# width_str +=',%d'%width[v] -# else: -# width_str +=',%d'%width[v] -# ns.setAttribute('colWidths',width_str) -# -# child_list = ns.childNodes -# -# check=0 -# for child in child_list: -# if child.nodeName=='tr': -# lc = child.childNodes[1] -# for t in range(td): -# i=0 -# for v in value: -# -# newnode = lc.cloneNode(1) -# temp2="%s['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]]"%(name) -## -# if type[i] in ('String','STRING','string'): -# if (v==" " or v==pattern) and i==0 and check==0: -# check=1 -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data="" -# else: -# if v==" ": -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data="" -# else: -# t1= "[[ %s['%s%d'] ]]"%(name,v,t) -# if v=="year" or v=="sum_debit" or v=="sum_credit": -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data = t1 -# else: -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data = t1+"[["+temp2 -## newnode.childNodes[1].lastChild.data=[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]] -# elif type[i] in ('Lable','LABLE','lable'): -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data= v -# -# child.appendChild(newnode) -# -# newnode=False -# i+=1 -# return super(account_balance_landscape,self).repeatIn(lst, name, nodes_parent=False) -#end def linesForYear(self,form): temp=0 years={} @@ -363,7 +100,6 @@ class account_balance_landscape(rml_parse.rml_parse): total_for_perc=[] -# if perc==1: self.done_total=1 self.total_for_perc=self.linesForTotal(form, ids={}, doneAccount={}, level=1) self.done_total=0 @@ -372,8 +108,6 @@ class account_balance_landscape(rml_parse.rml_parse): locale.setlocale(locale.LC_ALL, '') self.result_total["sum_credit" + str(t1)]=locale.format("%.2f", self.result_total["sum_credit" + str(t1)], grouping=True) self.result_total["sum_debit" + str(t1)]=locale.format("%.2f", self.result_total["sum_debit" + str(t1)], grouping=True) -# self.flag=1 -# self.result_total = {} for temp in range(0,len(form['fiscalyear'])): fy=self.pool.get('account.fiscalyear').name_get(self.cr, self.uid, form['fiscalyear'][temp]) diff --git a/addons/account/report/account_balance_sheet.py b/addons/account/report/account_balance_sheet.py index ab5a284e412..e76c8450573 100644 --- a/addons/account/report/account_balance_sheet.py +++ b/addons/account/report/account_balance_sheet.py @@ -91,7 +91,6 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header): ] ctx = self.context.copy() -# ctx['state'] = form['context'].get('state','filter_no') ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False) if data['form']['filter'] == 'filter_period' : diff --git a/addons/account/report/account_report.py b/addons/account/report/account_report.py index 5a62c1ea337..362d0adb414 100644 --- a/addons/account/report/account_report.py +++ b/addons/account/report/account_report.py @@ -122,7 +122,6 @@ class report_aged_receivable(osv.osv): """ This view will be used in dashboard The reason writing this code here is, we need to check date range from today to first date of fiscal year. """ -# ranges = _get_ranges(cr) # Gets the ranges for the x axis of the graph (name column values) pool_obj_fy = pooler.get_pool(cr.dbname).get('account.fiscalyear') today = time.strftime('%Y-%m-%d') fy_id = pool_obj_fy.find(cr, uid, exception=False) diff --git a/addons/account/report/account_report_view.xml b/addons/account/report/account_report_view.xml index 96b49f0247e..a0cee804992 100644 --- a/addons/account/report/account_report_view.xml +++ b/addons/account/report/account_report_view.xml @@ -47,7 +47,6 @@ form tree,graph - @@ -115,9 +114,6 @@ - - - report.account.sales.tree report.account.sales @@ -169,9 +165,7 @@ graph,tree - - report.account_type.sales.tree report.account_type.sales @@ -237,7 +231,6 @@ graph,tree - diff --git a/addons/account/report/compare_account_balance.py b/addons/account/report/compare_account_balance.py index 13fb90fdb5f..b29b2ea4648 100644 --- a/addons/account/report/compare_account_balance.py +++ b/addons/account/report/compare_account_balance.py @@ -58,268 +58,6 @@ class account_balance(report_sxw.rml_parse): }) self.context = context -# def repeatIn(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]): -# self._node.data = '' -# node = self._find_parent(self._node, nodes_parent or parents) -# ns = node.nextSibling -##start -# if value==['Cash','%']: -# if show==1: -# if perc==1: -# if pattern=='none': -# value=['','Cash','%'] -# type=['lable','lable','lable'] -# width=[130,65,65] -# else: -# value=[' ','','Cash','%'] -# type=['string','lable','lable','lable'] -# width=[65,130,65,65] -# else: -# if pattern=='none': -# value=[''] -# type=['lable'] -# width=[195] -# else: -# value=[' ',''] -# type=['string','lable'] -# width=[65,195] -# else: -# if perc==1: -# if pattern=='none': -# value=['Cash','%'] -# type=['lable','lable'] -# width=[65,65] -# else: -# value=[' ','Cash','%'] -# type=['string','lable','lable'] -# width=[65,65,65] -# else: -# if pattern=='none': -# value=[''] -# type=['lable'] -# width=[65] -# else: -# value=[' ',''] -# type=['string','lable'] -# width=[65,65] -# -# -# if value==['year']: -# if show==1: -# if perc==1: -# if pattern=='none': -# width=[260] -# else: -# value=[' ','year'] -# type=['string','string'] -# width=[65,260] -# else: -# if pattern=='none': -# width=[195] -# else: -# value=[' ','year'] -# type=['string','string'] -# width=[65,195] -# else: -# if perc==1: -# if pattern=='none': -# width=[130] -# else: -# value=[' ','year'] -# type=['string','string'] -# width=[65,130] -# -# else: -# if pattern=='none': -# width=[65] -# else: -# value=[' ','year'] -# type=['string','string'] -# width=[65,65] -# -# if value==['Debit','Credit','Balance']: -# if show==1: -# if perc==1: -# if pattern=='none': -# width=[65,65,130] -# else: -# value=[' ','Debit','Credit','Balance'] -# type=['string','lable','lable','lable'] -# width=[65,65,65,130] -# else: -# if pattern=='none': -# width=[65,65,65] -# else: -# value=[' ','Debit','Credit','Balance'] -# type=['string','lable','lable','lable'] -# width=[65,65,65,65] -# -# else: -# if perc==1: -# if pattern=='none': -# value=['Balance'] -# type=['lable'] -# width=[130] -# else: -# value=[' ','Balance'] -# type=['string','lable'] -# width=[65,130] -# else: -# if pattern=='none': -# value=['Balance'] -# type=['lable'] -# width=[65] -# else: -# value=[' ','Balance'] -# type=['string','lable'] -# width=[65,65] -# -# if value==['debit','credit','balance']: -# if show==1: -# if perc==1: -# if pattern=='none': -# value=['debit','credit','balance','balance_perc'] -# type=['string','string','string','string'] -# width=[65,65,65,65] -# else: -# value=[pattern,'debit','credit','balance','balance_perc'] -# type=['string','string','string','string','string'] -# width=[65,65,65,65,65] -# else: -# if pattern=='none': -# value=['debit','credit','balance'] -# type=['string','string','string'] -# width=[65,65,65] -# else: -# value=[pattern,'debit','credit','balance'] -# type=['string','string','string','string'] -# width=[65,65,65,65] -# -# else: -# if perc==1: -# if pattern=='none': -# value=['balance','balance_perc'] -# type=['string','string'] -# width=[65,65] -# else: -# value=[pattern,'balance','balance_perc'] -# type=['string','string','string'] -# width=[65,65,65] -# else: -# if pattern=='none': -# value=['balance'] -# type=['string'] -# width=[65] -# else: -# value=[pattern,'balance'] -# type=['string','string'] -# width=[65,65] -# -# if value==['sum_debit','sum_credit','']: -# if show==1: -# if perc==1: -# if pattern=='none': -# width=[65,65,130] -# else: -# value=[' ','sum_debit','sum_credit',''] -# type=['string','string','string','lable'] -# width=[65,65,65,130] -# else: -# if pattern=='none': -# width=[65,65,65] -# else: -# value=[' ','sum_debit','sum_credit',''] -# type=['string','string','string','lable'] -# width=[65,65,65,65] -# else: -# if perc==1: -# if pattern=='none': -# value=[''] -# type=['lable'] -# width=[130] -# else: -# value=[' ',''] -# type=['string','lable'] -# width=[65,130] -# else: -# if pattern=='none': -# value=[''] -# type=['lable'] -# width=[65] -# else: -# value=[' ',''] -# type=['string','lable'] -# width=[65,65] -# -# if not lst: -# lst.append(1) -# for ns in node.childNodes : -# if ns and ns.nodeName!='#text' and ns.tagName=='blockTable' and td : -# width_str = ns._attrs['colWidths'].nodeValue -# ns.removeAttribute('colWidths') -# total_td = td * len(value) -# -# if not width: -# for v in value: -# width.append(30) -# check1=0 -# for t in range(td): -# for v in range(len(value)): -# if type[v] in ('String','STRING','string'): -# if (value[v]==" " or value[0]==pattern): -# if check1==0: -# check1=1 -# width_str +=',0.0' -# else: -# width_str +=',%d'%width[v] -# else: -# width_str +=',%d'%width[v] -# else: -# width_str +=',%d'%width[v] -# ns.setAttribute('colWidths',width_str) -# -# child_list = ns.childNodes -# -# check=0 -# for child in child_list: -# if child.nodeName=='tr': -# lc = child.childNodes[1] -# for t in range(td): -# i=0 -# for v in value: -# -# newnode = lc.cloneNode(1) -# temp2="%s['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]]"%(name) -## -# if type[i] in ('String','STRING','string'): -# if (v==" " or v==pattern) and i==0 and check==0: -# check=1 -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data="" -# else: -# if v==" ": -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data="" -# else: -# t1= "[[ %s['%s%d'] ]]"%(name,v,t) -# if v=="year" or v=="sum_debit" or v=="sum_credit": -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data = t1 -# else: -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data = t1+"[["+temp2 -## newnode.childNodes[1].lastChild.data=[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]] -# elif type[i] in ('Lable','LABLE','lable'): -# if newnode.childNodes[1].lastChild: -# newnode.childNodes[1].lastChild.data= v -# -# child.appendChild(newnode) -# -# newnode=False -# i+=1 -# return super(account_balance,self).repeatIn(lst, name, nodes_parent=False) -#end - def linesForYear(self, form): temp=0 years={} @@ -363,7 +101,6 @@ class account_balance(report_sxw.rml_parse): total_for_perc=[] -# if perc==1: self.done_total=1 self.total_for_perc=self.linesForTotal(form, ids={}, doneAccount={}, level=1) self.done_total=0 @@ -372,8 +109,6 @@ class account_balance(report_sxw.rml_parse): locale.setlocale(locale.LC_ALL, '') self.result_total["sum_credit" + str(t1)]=locale.format("%.2f", self.result_total["sum_credit" + str(t1)], grouping=True) self.result_total["sum_debit" + str(t1)]=locale.format("%.2f", self.result_total["sum_debit" + str(t1)], grouping=True) -# self.flag=1 -# self.result_total = {} for temp in range(0,len(form['fiscalyear'])): fy=self.pool.get('account.fiscalyear').name_get(self.cr, self.uid, form['fiscalyear'][temp]) diff --git a/addons/account/report/rml_parse.py b/addons/account/report/rml_parse.py index 1b38b930b2b..9178c0fd2e8 100644 --- a/addons/account/report/rml_parse.py +++ b/addons/account/report/rml_parse.py @@ -106,7 +106,6 @@ class rml_parse(report_sxw.rml_parse): return Stringer return Stringer def explode_this(self,chaine,length): - #chaine = self.repair_string(chaine) chaine = rstrip(chaine) ast = list(chaine) i = length @@ -120,7 +119,6 @@ class rml_parse(report_sxw.rml_parse): UnicodeAst = [] _previouslyfound = False i = 0 - #print str(ast) while i < len(ast): elem = ast[i] try: @@ -160,25 +158,5 @@ class rml_parse(report_sxw.rml_parse): rml_head = rml_head.replace('',''' [[company.logo]] ''') return True - # def _add_header(self, node): - # rml_head = tools.file_open('specific_param/report/header/corporate_rml_header_ch.rml').read() - # head_dom = xml.dom.minidom.parseString(rml_head) - # #for frame in head_dom.getElementsByTagName('frame'): - # # frame.parentNode.removeChild(frame) - # node2 = head_dom.documentElement - # for tag in node2.childNodes: - # if tag.nodeType==tag.ELEMENT_NODE: - # found = self._find_node(node, tag.localName) - # # rml_frames = found.getElementsByTagName('frame') - # if found: - # if tag.hasAttribute('position') and (tag.getAttribute('position')=='inside'): - # found.appendChild(tag) - # else: - # found.parentNode.replaceChild(tag, found) - # # for frame in rml_frames: - # # tag.appendChild(frame) - # return True - - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/tax_report.py b/addons/account/report/tax_report.py index 2075b1f139b..5e5f68a3fa8 100644 --- a/addons/account/report/tax_report.py +++ b/addons/account/report/tax_report.py @@ -78,7 +78,6 @@ class tax_report(rml_parse.rml_parse): top_result.append(res_general[ind_general]) ind_general+=1 i+=1 - #array_result = self.sort_result(top_result) return top_result #return array_result @@ -133,8 +132,6 @@ class tax_report(rml_parse.rml_parse): company_id, periods_ids,)) res = self.cr.dictfetchall() - #AND line.period_id IN ('+ period_sql_list +') \ - i = 0 while i