From 601ee8e03074c3676c752e400bc34c3019b83c68 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 24 Jun 2013 10:50:49 +0200 Subject: [PATCH 1/9] [REF] ir_property: changed 'value_reference' and 'res_id' fields into char instead of reference fields because the code was fuzzy, the performances very bad (at least since 'view_load' attribute has been removed), and because there were no reason to have them as references (even from an useability point of view) bzr revid: qdp-launchpad@openerp.com-20130624085049-elmhvzkufntlzbf8 --- openerp/addons/base/res/ir_property.py | 29 +++++++------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/openerp/addons/base/res/ir_property.py b/openerp/addons/base/res/ir_property.py index f4e53ba3293..7f50c1248ae 100644 --- a/openerp/addons/base/res/ir_property.py +++ b/openerp/addons/base/res/ir_property.py @@ -22,7 +22,7 @@ import time from openerp.osv import osv, fields -from openerp.osv.orm import browse_record +from openerp.osv.orm import browse_record, browse_null from openerp.tools.misc import attrgetter # ------------------------------------------------------------------------- @@ -32,27 +32,10 @@ from openerp.tools.misc import attrgetter class ir_property(osv.osv): _name = 'ir.property' - def _models_field_get(self, cr, uid, field_key, field_value, context=None): - get = attrgetter(field_key, field_value) - obj = self.pool.get('ir.model.fields') - ids = obj.search(cr, uid, [], context=context) - res = set() - for o in obj.browse(cr, uid, ids, context=context): - res.add(get(o)) - return list(res) - - def _models_get(self, cr, uid, context=None): - return self._models_field_get(cr, uid, 'model', 'model_id.name', context) - - def _models_get2(self, cr, uid, context=None): - return self._models_field_get(cr, uid, 'relation', 'relation', context) - - _columns = { 'name': fields.char('Name', size=128, select=1), - 'res_id': fields.reference('Resource', selection=_models_get, size=128, - help="If not set, acts as a default value for new resources", select=1), + 'res_id': fields.char('Resource', size=128, help="If not set, acts as a default value for new resources", select=1), 'company_id': fields.many2one('res.company', 'Company', select=1), 'fields_id': fields.many2one('ir.model.fields', 'Field', ondelete='cascade', required=True, select=1), @@ -60,7 +43,7 @@ class ir_property(osv.osv): 'value_integer' : fields.integer('Value'), 'value_text' : fields.text('Value'), # will contain (char, text) 'value_binary' : fields.binary('Value'), - 'value_reference': fields.reference('Value', selection=_models_get2, size=128), + 'value_reference': fields.char('Value', size=128), 'value_datetime' : fields.datetime('Value'), 'type' : fields.selection([('char', 'Char'), @@ -128,7 +111,6 @@ class ir_property(osv.osv): values[field] = value return values - def write(self, cr, uid, ids, values, context=None): return super(ir_property, self).write(cr, uid, ids, self._update_values(cr, uid, ids, values), context=context) @@ -147,7 +129,10 @@ class ir_property(osv.osv): elif record.type == 'binary': return record.value_binary elif record.type == 'many2one': - return record.value_reference + if not record.value_reference: + return browse_null() + model, resource_id = record.value_reference.split(',') + return self.pool.get(model).browse(cr, uid, int(resource_id), context=context) elif record.type == 'datetime': return record.value_datetime elif record.type == 'date': From c54bc51eb7de6f6a866cd7181587f6775f2fd9b3 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 24 Jun 2013 10:53:11 +0200 Subject: [PATCH 2/9] [IMP] ir_property fields: added the possibility to use 'selection' field type as properties bzr revid: qdp-launchpad@openerp.com-20130624085311-ujeahocdp0d2royg --- openerp/addons/base/res/ir_property.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openerp/addons/base/res/ir_property.py b/openerp/addons/base/res/ir_property.py index 7f50c1248ae..8d9f9dc876a 100644 --- a/openerp/addons/base/res/ir_property.py +++ b/openerp/addons/base/res/ir_property.py @@ -55,6 +55,7 @@ class ir_property(osv.osv): ('many2one', 'Many2One'), ('date', 'Date'), ('datetime', 'DateTime'), + ('selection', 'Selection'), ], 'Type', required=True, @@ -89,6 +90,7 @@ class ir_property(osv.osv): 'many2one': 'value_reference', 'date' : 'value_datetime', 'datetime' : 'value_datetime', + 'selection': 'value_text', } field = type2field.get(type_) if not field: @@ -118,7 +120,7 @@ class ir_property(osv.osv): return super(ir_property, self).create(cr, uid, self._update_values(cr, uid, None, values), context=context) def get_by_record(self, cr, uid, record, context=None): - if record.type in ('char', 'text'): + if record.type in ('char', 'text', 'selection'): return record.value_text elif record.type == 'float': return record.value_float From bcac5bd834a90f4859e77fad6abaa0ac2dba7633 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 24 Jun 2013 10:57:31 +0200 Subject: [PATCH 3/9] [FIX] ir_property: fixes in property fields related to multi company use cases bzr revid: qdp-launchpad@openerp.com-20130624085731-fthhdpdm4ldi3220 --- openerp/addons/base/res/ir_property.py | 3 ++- openerp/osv/fields.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openerp/addons/base/res/ir_property.py b/openerp/addons/base/res/ir_property.py index 8d9f9dc876a..2a751361ddc 100644 --- a/openerp/addons/base/res/ir_property.py +++ b/openerp/addons/base/res/ir_property.py @@ -147,7 +147,8 @@ class ir_property(osv.osv): domain = self._get_domain(cr, uid, name, model, context=context) if domain is not None: domain = [('res_id', '=', res_id)] + domain - nid = self.search(cr, uid, domain, context=context) + #make the search with company_id asc to make sure that properties specific to a company are given first + nid = self.search(cr, uid, domain, limit=1, order='company_id asc', context=context) if not nid: return False record = self.browse(cr, uid, nid[0], context=context) return self.get_by_record(cr, uid, record, context=context) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 0ff78c69204..568a52f2bf4 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -1382,8 +1382,10 @@ class property(function): def _get_by_id(self, obj, cr, uid, prop_name, ids, context=None): prop = obj.pool.get('ir.property') vids = [obj._name + ',' + str(oid) for oid in ids] - - domain = [('fields_id.model', '=', obj._name), ('fields_id.name', 'in', prop_name)] + def_id = self._field_get(cr, uid, obj._name, prop_name[0]) + company = obj.pool.get('res.company') + cid = company._company_default_get(cr, uid, obj._name, def_id, context=context) + domain = [('fields_id.model', '=', obj._name), ('fields_id.name', 'in', prop_name), ('company_id', '=', cid)] #domain = prop._get_domain(cr, uid, prop_name, obj._name, context) if vids: domain = [('res_id', 'in', vids)] + domain From 7e8e2ca75f0cf1dfa827355b2f2ac0134f7e65b0 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 24 Jun 2013 11:03:29 +0200 Subject: [PATCH 4/9] [FIX] account_anglo_saxon: fixed the computation of price difference inc costing method != 'standard' + added yaml test for the same feature bzr revid: qdp-launchpad@openerp.com-20130624090329-o423720dp3oc4aez --- addons/account_anglo_saxon/__openerp__.py | 2 +- addons/account_anglo_saxon/invoice.py | 30 +- .../account_anglo_saxon/test/anglo_saxon.yml | 8 +- .../test/anglo_saxon_avg_fifo.yml | 304 ++++++++++++++++++ addons/purchase/purchase.py | 12 +- 5 files changed, 338 insertions(+), 18 deletions(-) create mode 100644 addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml diff --git a/addons/account_anglo_saxon/__openerp__.py b/addons/account_anglo_saxon/__openerp__.py index 7ac4bdbd71e..4fc15bba4f5 100644 --- a/addons/account_anglo_saxon/__openerp__.py +++ b/addons/account_anglo_saxon/__openerp__.py @@ -44,7 +44,7 @@ account.""", 'category': 'Accounting & Finance', 'demo': [], 'data': ['product_view.xml'], - 'test': ['test/anglo_saxon.yml'], + 'test': ['test/anglo_saxon.yml', 'test/anglo_saxon_avg_fifo.yml'], 'auto_install': False, 'installable': True, } diff --git a/addons/account_anglo_saxon/invoice.py b/addons/account_anglo_saxon/invoice.py index f27d9b3ae72..8b31a48b92b 100644 --- a/addons/account_anglo_saxon/invoice.py +++ b/addons/account_anglo_saxon/invoice.py @@ -117,21 +117,27 @@ class account_invoice_line(osv.osv): for line in res: if a == line['account_id'] and i_line.product_id.id == line['product_id']: uom = i_line.product_id.uos_id or i_line.product_id.uom_id - standard_price = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id) - if standard_price != i_line.price_unit and line['price_unit'] == i_line.price_unit and acc: - price_diff = i_line.price_unit - standard_price - line.update({'price':standard_price * line['quantity']}) + valuation_price_unit = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id) + if i_line.product_id.cost_method != 'standard' and i_line.purchase_line_id: + #for average/fifo/lifo costing method, fetch real cost price from incomming moves + stock_move_obj = self.pool.get('stock.move') + valuation_stock_move = stock_move_obj.search(cr, uid, [('purchase_line_id', '=', i_line.purchase_line_id.id)], limit=1, context=context) + if valuation_stock_move: + valuation_price_unit = stock_move_obj.browse(cr, uid, valuation_stock_move[0], context=context).price_unit + if valuation_price_unit != i_line.price_unit and line['price_unit'] == i_line.price_unit and acc: + price_diff = i_line.price_unit - valuation_price_unit + line.update({'price': valuation_price_unit * line['quantity']}) diff_res.append({ - 'type':'src', + 'type': 'src', 'name': i_line.name[:64], - 'price_unit':price_diff, - 'quantity':line['quantity'], + 'price_unit': price_diff, + 'quantity': line['quantity'], 'price': price_diff * line['quantity'], - 'account_id':acc, - 'product_id':line['product_id'], - 'uos_id':line['uos_id'], - 'account_analytic_id':line['account_analytic_id'], - 'taxes':line.get('taxes',[]), + 'account_id': acc, + 'product_id': line['product_id'], + 'uos_id': line['uos_id'], + 'account_analytic_id': line['account_analytic_id'], + 'taxes': line.get('taxes', []), }) res += diff_res return res diff --git a/addons/account_anglo_saxon/test/anglo_saxon.yml b/addons/account_anglo_saxon/test/anglo_saxon.yml index 9e46aa52b12..6e9ebc0068e 100644 --- a/addons/account_anglo_saxon/test/anglo_saxon.yml +++ b/addons/account_anglo_saxon/test/anglo_saxon.yml @@ -109,7 +109,7 @@ - !record {model: purchase.order, id: purchase_order_001}: partner_id: base.res_partner_3 - location_id: stock.stock_location_3 + location_id: stock.stock_location_stock pricelist_id: 1 order_line: - product_id: product.product_product_3 @@ -128,12 +128,12 @@ partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]}) self.do_partial(cr, uid, [partial_id]) - - I check the Stock Interim account (Received) is credit successfully. + I check the Stock Interim account (Received) is credited successfully. - !assert {model: account.account, id : account_anglo_stock_input, string : Stock Interim account (Received) is not credited successfully.}: - credit == 9 - - I check the Stock valuation account is debit sucessfully. + I check the Stock valuation account is debited sucessfully. - !assert {model: account.account, id : account_anglo_stock_valuation, string : Stock valuation account is not debited successfully.}: - debit == 9 @@ -192,7 +192,7 @@ invoice_state: 2binvoiced move_lines: - company_id: base.main_company - location_id: stock.stock_location_3 + location_id: stock.stock_location_stock product_id: product.product_product_3 product_qty: 1.0 product_uom: product.product_uom_unit diff --git a/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml b/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml new file mode 100644 index 00000000000..f7d52f4f5a8 --- /dev/null +++ b/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml @@ -0,0 +1,304 @@ +- + In order to test anglo_saxon Configure Different Accounts. +- + !record {model: account.account, id: account_anglo_stock_valuation_fifo}: + code: X3000f + name: Stock Valuation Account- (test) + parent_id: account.cas + type: other + user_type: account.data_account_type_asset +- + Configure Stock Interim account (Received). +- + !record {model: account.account, id: account_anglo_stock_input_fifo}: + code: X2800f + name: Stock Interim account (Received) + parent_id: account.cos + type: other + user_type: account.data_account_type_expense +- + Configure Stock Interim account (Delivered). +- + !record {model: account.account, id: account_anglo_stock_output_fifo}: + code: X2801f + name: Stock Interim account (Delivered) + parent_id: account.rev + type: other + user_type: account.data_account_type_income +- + Configure Price difference creditor Account. +- + !record {model: account.account, id: account_anglo_price_difference_fifo}: + code: X7095f + name: Price difference creditor Account + parent_id: account.cos + type: other + user_type: account.data_account_type_expense +- + Configure Cash Bank Account. +- + !record {model: account.account, id: account_anglo_cash_fifo}: + code: X5000f + name: Cash/Bank Account + parent_id: account.cash + type: other + user_type: account.data_account_type_asset +- + Configure Creditor Account Payable. +- + !record {model: account.account, id: account_anglo_payable_fifo}: + code: X440001f + name: Creditor Account Payable + parent_id: account.a_pay + type: other + user_type: account.data_account_type_payable +- + Configure Debtor Account Receivable. +- + !record {model: account.account, id: account_anglo_receivable_fifo}: + code: X400001f + name: Debtor Account Receivable + parent_id: account.a_recv + type: other + user_type: account.data_account_type_receivable +- + Configure Cost of Good sale Account. +- + !record {model: account.account, id: account_anglo_cogs_fifo}: + code: X7000f + name: Cost of goods sale account + parent_id: account.o_expense + type: other + user_type: account.data_account_type_expense +- + Configure Income Account. +- + !record {model: account.account, id: account_anglo_income_fifo}: + code: X8000f + name: Income Account + parent_id: account.o_income + type: other + user_type: account.data_account_type_income +- + I configure the account receivable of supplier +- + !record {model: res.partner, id: base.res_partner_3}: + property_account_payable: account_anglo_payable_fifo + property_account_receivable: account_anglo_receivable_fifo +- + I configure the account receivable of Customer. +- + !record {model: res.partner, id: base.res_partner_13}: + property_account_payable: account_anglo_payable_fifo + property_account_receivable: account_anglo_receivable_fifo +- + I configure the product category with stock valuation account. +- + !record {model: product.category, id: product.product_category_4}: + property_stock_valuation_account_id: account_anglo_stock_valuation_fifo +- + I create a product with required accounts, and cost method average (but same applies for fifo) +- + !record {model: product.product, id: product_fifo_anglo_saxon}: + name: 'FIFO product for anglo saxon tests' + list_price: 20.00 + standard_price: 0 + categ_id: product.product_category_4 + valuation: 'real_time' + property_account_income: account_anglo_income_fifo + property_account_expense: account_anglo_cogs_fifo + property_account_creditor_price_difference: account_anglo_price_difference_fifo + property_stock_account_input: account_anglo_stock_input_fifo + property_stock_account_output: account_anglo_stock_output_fifo + cost_method: 'average' +- + I create a draft Purchase Order. +- + !record {model: purchase.order, id: purchase_order_001_fifo}: + partner_id: base.res_partner_3 + location_id: stock.stock_location_stock + pricelist_id: 1 + order_line: + - product_id: product_fifo_anglo_saxon + product_qty: 1 + price_unit: 9 + date_planned: '2013-08-31' + taxes_id: [] +- + I confirm the purchase order. +- + !workflow {model: purchase.order, ref: purchase_order_001_fifo, action: purchase_confirm} +- + Reception is ready for process so now done the reception. +- + !python {model: stock.partial.picking}: | + pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001_fifo")).picking_ids + partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]}) + self.do_partial(cr, uid, [partial_id]) +- + I check the Stock Interim account (Received) is credit successfully. +- + !assert {model: account.account, id : account_anglo_stock_input_fifo, string : Stock Interim account (Received) is not credited successfully.}: + - credit == 9 +- + I check the Stock valuation account is debit sucessfully. +- + !assert {model: account.account, id : account_anglo_stock_valuation_fifo, string : Stock valuation account is not debited successfully.}: + - debit == 9 +- + I Validate Invoice of Purchase Order after having changed the price to 10. +- + !python {model: purchase.order}: | + invoice_ids = [x.id for x in self.browse(cr, uid, ref("purchase_order_001_fifo")).invoice_ids] + line_ids = self.pool.get('account.invoice.line').search(cr, uid, [('invoice_id', 'in', invoice_ids)]) + self.pool.get('account.invoice.line').write(cr, uid, line_ids, {'price_unit': 10}) + self.pool.get('account.invoice').signal_invoice_open(cr, uid, invoice_ids) +- + I check the Stock Interim account (Received) is debited sucessfully when Invoice validated. +- + !assert {model: account.account, id : account_anglo_stock_input_fifo, string : Stock Interim account (Received) is not debited successfully.}: + - debit == 9 +- + I check the Price difference creditor Account is debited sucessfully when Invoice validated. +- + !assert {model: account.account, id : account_anglo_price_difference_fifo, string : Price difference creditor Account is not debited successfully.}: + - debit == 1 +- + I check Payable(creditor) Account is Credited sucessfully when Invoice validated. +- + !assert {model: account.account, id : account_anglo_payable_fifo, string : Payable(creditor) Account is not Credited successfully.}: + - credit == 10 +- + I pay the invoice. +- + !python {model: purchase.order}: | + invoice_ids = self.browse(cr, uid, ref("purchase_order_001_fifo")).invoice_ids + order = self.browse(cr, uid, ref("purchase_order_001_fifo")) + journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', order.company_id.id)], limit=1) + for invoice in invoice_ids: + invoice.pay_and_reconcile(invoice.amount_total, ref('account_anglo_cash_fifo'), ref('account.period_8'), journal_ids[0], ref('account_anglo_cash_fifo'), ref('account.period_8'), journal_ids[0], name='test') +- + I check Payable(Creditors) Account is Debited sucessfully after invoice paid. +- + !assert {model: account.account, id : account_anglo_payable_fifo, string : Payable(Creditors) Account is not Debited successfully.}: + - debit == 10 +- + I check Bank/Cash account is credited sucessfully after invoice paid. +- + !assert {model: account.account, id : account_anglo_cash_fifo, string: Bank/Cash account is not credited successfully.}: + - credit == 10 +- + I create an Outgoing Picking order +- + !record {model: stock.picking, id: stock_picking_out001_fifo}: + partner_id: base.res_partner_13 + invoice_state: 2binvoiced + move_lines: + - company_id: base.main_company + location_id: stock.stock_location_stock + product_id: product_fifo_anglo_saxon + product_qty: 1.0 + location_dest_id: stock.stock_location_customers + move_type: direct + type: out +- + I need to check the availability of the product, So I make my picking order for processing later. +- + !python {model: stock.picking}: | + self.draft_force_assign(cr, uid, [ref("stock_picking_out001_fifo")], {"lang": "en_US", "search_default_available": + 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner", + "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"), + }) +- + I check the product availability, Product is available in the stock and ready to be sent. +- + !python {model: stock.picking}: | + self.action_assign(cr, uid, [ref("stock_picking_out001_fifo")], {"lang": "en_US", "search_default_available": + 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner", + "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"), + }) +- + I process the delivery. +- + !python {model: stock.partial.picking}: | + partial_id = self.create(cr, uid, {}, context={'active_model':'stock.picking','active_ids':[ref('stock_picking_out001_fifo')]}) + self.do_partial(cr, uid, [partial_id]) +- + I check Stock Interim account (Delivery) is debited successfully. +- + !assert {model: account.account, id : account_anglo_stock_output_fifo, string : Stock Interim account (Delivery) is not debited successfully.}: + - debit == 9 +- + I check the Stock valuation account is credited sucessfully. +- + !assert {model: account.account, id : account_anglo_stock_valuation_fifo, string : Stock valuation account is not credited successfully.}: + - credit == 9 +- + As the Invoice state of the picking order is To be invoiced. I create invoice for my outgoing picking order. +- + !python {model: stock.invoice.onshipping}: | + wiz_id = self.create(cr, uid, {'invoice_date': '2013-03-04', 'journal_id': ref('account.sales_journal')}, + {'active_ids': [ref("stock_picking_out001_fifo")], "active_model": "stock.picking"}) + self.create_invoice(cr, uid, [wiz_id], {"lang": "en_US", + "search_default_available": 1, "tz": False, "active_model": "stock.picking", + "contact_display": "partner", "active_ids": [ref("stock_picking_out001_fifo")], "active_id": ref("stock_picking_out001_fifo")}) +- + I check that the customer invoice is created successfully. +- + !python {model: account.invoice}: | + partner_id = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001_fifo')).partner_id.id + inv_ids = self.search(cr, uid, [('type','=','out_invoice'),('partner_id','=',partner_id)]) + assert inv_ids, 'No Invoice is generated!' +- + I open the Invoice. +- + !python {model: stock.picking}: | + move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001_fifo')).name + account_invoice = self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)]) + account_invoice_line = self.pool.get('account.invoice.line').search(cr, uid, [('invoice_id', 'in', account_invoice)]) + self.pool.get('account.invoice.line').write(cr, uid, account_invoice_line, {'invoice_line_tax_id': [(6, 0, [])]}) + self.pool.get('account.invoice').button_reset_taxes(cr, uid, account_invoice) + self.pool.get('account.invoice').signal_invoice_open(cr, uid, account_invoice) +- + I check Income Account is Credited sucessfully when Invoice validated. +- + !assert {model: account.account, id : account_anglo_income_fifo, string : Income Account is not Credited successfully.}: + - credit == 20 +- + I check Cost of goods sold account for debit. +- + !assert {model: account.account, id : account_anglo_cogs_fifo, string : Cost of goods sale is not Debited successfully.}: + - debit == 9 +- + I check Stock Interim account (Delivery) +- + !assert {model: account.account, id : account_anglo_stock_output_fifo, string : Stock Interim account (Delivery) is not credited successfully.}: + - credit == 9 +- + I check Receivable(Debtor) Account for debit. +- + !assert {model: account.account, id : account_anglo_receivable_fifo, string : Receivable(Debtors) Account is not Debited successfully.}: + - debit == 20 +- + I pay the invoice. +- + !python {model: account.invoice}: | + move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001_fifo')).name + account_invoice= self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)]) + journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash')], limit=1) + pay = self.pay_and_reconcile(cr, uid, account_invoice, + 20.0, ref('account_anglo_cash_fifo'), ref('account.period_8'), + journal_ids[0], ref('account_anglo_cash_fifo'), + ref('account.period_8'), journal_ids[0], + name='Payment for test customer invoice') + assert (pay == True), "Incorrect Payment." +- + I check Receivable(Debtor) Account for credit. +- + !assert {model: account.account, id : account_anglo_receivable_fifo, string : Receivable(Debtors) Account is not Credited successfully.}: + - credit == 20 +- + I check Bank/Cash account is debited sucessfully after invoice paid. +- + !assert {model: account.account, id : account_anglo_cash_fifo, string: Bank/Cash account is not successfully credited.}: + - debit == 20 diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 0ad39fca4f8..aad9d3b1459 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -485,6 +485,7 @@ class purchase_order(osv.osv): 'uos_id': order_line.product_uom.id or False, 'invoice_line_tax_id': [(6, 0, [x.id for x in order_line.taxes_id])], 'account_analytic_id': order_line.account_analytic_id.id or False, + 'purchase_line_id': order_line.id, } def action_cancel_draft(self, cr, uid, ids, context=None): @@ -633,6 +634,7 @@ class purchase_order(osv.osv): } def _prepare_order_line_move(self, cr, uid, order, order_line, picking_id, context=None): + ''' prepare the stock move data from the PO line ''' return { 'name': order_line.name or '', 'product_id': order_line.product_id.id, @@ -869,7 +871,7 @@ class purchase_order_line(osv.osv): 'invoice_lines': fields.many2many('account.invoice.line', 'purchase_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True), 'invoiced': fields.boolean('Invoiced', readonly=True), 'partner_id': fields.related('order_id','partner_id',string='Partner',readonly=True,type="many2one", relation="res.partner", store=True), - 'date_order': fields.related('order_id','date_order',string='Order Date',readonly=True,type="date") + 'date_order': fields.related('order_id','date_order',string='Order Date',readonly=True,type="date"), } _defaults = { @@ -1246,5 +1248,13 @@ class account_invoice(osv.Model): purchase_order_obj.message_post(cr, uid, po_ids, body=_("Invoice paid"), context=context) return res +class account_invoice_line(osv.Model): + """ Override account_invoice_line to add the link to the purchase order line it is related to""" + _inherit = 'account.invoice.line' + _columns = { + 'purchase_line_id': fields.many2one('purchase.order.line', + 'Purchase Order Line', ondelete='set null', select=True, + readonly=True), + } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From d856e8361b592b2761ba92022cf9f5a865f952e9 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 24 Jun 2013 11:05:15 +0200 Subject: [PATCH 5/9] [REF] *: change linked to server revision 4907. Removed deprecated 'view_load' attribute + removed duplicated first argument of property fields which is replaced with 'relation' argument in case where it is really needed (relational fields): indeed this first argument was totally useless for property of float type (for example). bzr revid: qdp-launchpad@openerp.com-20130624090515-12aeo4k5sz87veqb --- addons/account/partner.py | 10 ------ addons/account/product.py | 8 ----- addons/account_anglo_saxon/product.py | 12 -------- addons/delivery/partner.py | 2 -- addons/product/partner.py | 2 -- addons/product/product.py | 2 +- addons/purchase/partner.py | 2 -- addons/report_webkit/ir_report.py | 4 +-- addons/sale_journal/sale_journal.py | 2 -- addons/stock/partner.py | 4 --- addons/stock/product.py | 44 +++++++++++++-------------- 11 files changed, 24 insertions(+), 68 deletions(-) diff --git a/addons/account/partner.py b/addons/account/partner.py index f582da6b765..a7df31b2f32 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -189,44 +189,34 @@ class res_partner(osv.osv): 'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."), 'debit_limit': fields.float('Payable Limit'), 'property_account_payable': fields.property( - 'account.account', type='many2one', relation='account.account', string="Account Payable", - view_load=True, domain="[('type', '=', 'payable')]", help="This account will be used instead of the default one as the payable account for the current partner", required=True), 'property_account_receivable': fields.property( - 'account.account', type='many2one', relation='account.account', string="Account Receivable", - view_load=True, domain="[('type', '=', 'receivable')]", help="This account will be used instead of the default one as the receivable account for the current partner", required=True), 'property_account_position': fields.property( - 'account.fiscal.position', type='many2one', relation='account.fiscal.position', string="Fiscal Position", - view_load=True, help="The fiscal position will determine taxes and accounts used for the partner.", ), 'property_payment_term': fields.property( - 'account.payment.term', type='many2one', relation='account.payment.term', string ='Customer Payment Term', - view_load=True, help="This payment term will be used instead of the default one for sale orders and customer invoices"), 'property_supplier_payment_term': fields.property( - 'account.payment.term', type='many2one', relation='account.payment.term', string ='Supplier Payment Term', - view_load=True, help="This payment term will be used instead of the default one for purchase orders and supplier invoices"), 'ref_companies': fields.one2many('res.company', 'partner_id', 'Companies that refers to partner'), diff --git a/addons/account/product.py b/addons/account/product.py index 3df3ad9bd17..b7bffee43a9 100644 --- a/addons/account/product.py +++ b/addons/account/product.py @@ -25,18 +25,14 @@ class product_category(osv.osv): _inherit = "product.category" _columns = { 'property_account_income_categ': fields.property( - 'account.account', type='many2one', relation='account.account', string="Income Account", - view_load=True, help="This account will be used for invoices to value sales."), 'property_account_expense_categ': fields.property( - 'account.account', type='many2one', relation='account.account', string="Expense Account", - view_load=True, help="This account will be used for invoices to value expenses."), } @@ -54,18 +50,14 @@ class product_template(osv.osv): 'product_supplier_taxes_rel', 'prod_id', 'tax_id', 'Supplier Taxes', domain=[('parent_id', '=', False),('type_tax_use','in',['purchase','all'])]), 'property_account_income': fields.property( - 'account.account', type='many2one', relation='account.account', string="Income Account", - view_load=True, help="This account will be used for invoices instead of the default one to value sales for the current product."), 'property_account_expense': fields.property( - 'account.account', type='many2one', relation='account.account', string="Expense Account", - view_load=True, help="This account will be used for invoices instead of the default one to value expenses for the current product."), } diff --git a/addons/account_anglo_saxon/product.py b/addons/account_anglo_saxon/product.py index b52d9ed3bbd..1c9e8ee3673 100644 --- a/addons/account_anglo_saxon/product.py +++ b/addons/account_anglo_saxon/product.py @@ -24,27 +24,21 @@ class product_category(osv.osv): _inherit = "product.category" _columns = { 'property_account_creditor_price_difference_categ': fields.property( - 'account.account', type='many2one', relation='account.account', string="Price Difference Account", - view_load=True, help="This account will be used to value price difference between purchase price and cost price."), #Redefine fields to change help text for anglo saxon methodology. 'property_account_income_categ': fields.property( - 'account.account', type='many2one', relation='account.account', string="Income Account", - view_load=True, help="This account will be used to value outgoing stock using sale price."), 'property_account_expense_categ': fields.property( - 'account.account', type='many2one', relation='account.account', string="Expense Account", - view_load=True, help="This account will be used to value outgoing stock using cost price."), } @@ -53,27 +47,21 @@ class product_template(osv.osv): _inherit = "product.template" _columns = { 'property_account_creditor_price_difference': fields.property( - 'account.account', type='many2one', relation='account.account', string="Price Difference Account", - view_load=True, help="This account will be used to value price difference between purchase price and cost price."), #Redefine fields to change help text for anglo saxon methodology. 'property_account_income': fields.property( - 'account.account', type='many2one', relation='account.account', string="Income Account", - view_load=True, help="This account will be used to value outgoing stock using sale price."), 'property_account_expense': fields.property( - 'account.account', type='many2one', relation='account.account', string="Expense Account", - view_load=True, help="This account will be used to value outgoing stock using cost price."), } diff --git a/addons/delivery/partner.py b/addons/delivery/partner.py index 477315dfc9b..226b5e493ab 100644 --- a/addons/delivery/partner.py +++ b/addons/delivery/partner.py @@ -25,11 +25,9 @@ class res_partner(osv.osv): _inherit = 'res.partner' _columns = { 'property_delivery_carrier': fields.property( - 'delivery.carrier', type='many2one', relation='delivery.carrier', string="Delivery Method", - view_load=True, help="This delivery method will be used when invoicing from picking."), } diff --git a/addons/product/partner.py b/addons/product/partner.py index fbfee76d0b2..d6b615ed88a 100644 --- a/addons/product/partner.py +++ b/addons/product/partner.py @@ -27,12 +27,10 @@ class res_partner(osv.osv): _inherit = 'res.partner' _columns = { 'property_product_pricelist': fields.property( - 'product.pricelist', type='many2one', relation='product.pricelist', domain=[('type','=','sale')], string="Sale Pricelist", - view_load=True, help="This pricelist will be used, instead of the default one, for sales to the current partner"), } diff --git a/addons/product/product.py b/addons/product/product.py index 656812bebbb..6e1128985aa 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -321,7 +321,7 @@ class product_template(osv.osv): 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True, help="Default Unit of Measure used for all stock operation."), 'uom_po_id': fields.many2one('product.uom', 'Purchase Unit of Measure', required=True, help="Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."), 'uos_id' : fields.many2one('product.uom', 'Unit of Sale', - help='Sepcify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure.'), + help='Specify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure.'), 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'), help='Coefficient to convert default Unit of Measure to Unit of Sale\n' ' uos = uom * coeff'), diff --git a/addons/purchase/partner.py b/addons/purchase/partner.py index 5e5af0815e3..52c5d798eeb 100644 --- a/addons/purchase/partner.py +++ b/addons/purchase/partner.py @@ -48,12 +48,10 @@ class res_partner(osv.osv): _columns = { 'property_product_pricelist_purchase': fields.property( - 'product.pricelist', type='many2one', relation='product.pricelist', domain=[('type','=','purchase')], string="Purchase Pricelist", - view_load=True, help="This pricelist will be used, instead of the default one, for purchases from the current partner"), 'purchase_order_count': fields.function(_purchase_order_count, string='# of Purchase Order', type='integer'), 'purchase_order_ids': fields.one2many('purchase.order','partner_id','Purchase Order') diff --git a/addons/report_webkit/ir_report.py b/addons/report_webkit/ir_report.py index cea2b4e8329..5a914cfbcf0 100644 --- a/addons/report_webkit/ir_report.py +++ b/addons/report_webkit/ir_report.py @@ -37,10 +37,10 @@ from webkit_report import WebKitParser class ir_actions_report_xml(orm.Model): _inherit = 'ir.actions.report.xml' _columns = { - 'webkit_header': fields.property('ir.header_webkit', + 'webkit_header': fields.property( type='many2one', relation='ir.header_webkit', string='Webkit Header', help="The header linked to the report", - view_load=True, required=True), + required=True), 'webkit_debug': fields.boolean('Webkit debug', help="Enable the webkit engine debugger"), 'report_webkit_data': fields.text('Webkit Template', diff --git a/addons/sale_journal/sale_journal.py b/addons/sale_journal/sale_journal.py index 9e10c826898..73fd5b672f1 100644 --- a/addons/sale_journal/sale_journal.py +++ b/addons/sale_journal/sale_journal.py @@ -43,11 +43,9 @@ class res_partner(osv.osv): _inherit = 'res.partner' _columns = { 'property_invoice_type': fields.property( - 'sale_journal.invoice.type', type = 'many2one', relation = 'sale_journal.invoice.type', string = "Invoicing Type", - view_load = True, group_name = "Accounting Properties", help = "This invoicing type will be used, by default, to invoice the current partner."), } diff --git a/addons/stock/partner.py b/addons/stock/partner.py index b8bad4faf95..3aaf1c663e5 100644 --- a/addons/stock/partner.py +++ b/addons/stock/partner.py @@ -25,19 +25,15 @@ class res_partner(osv.osv): _inherit = 'res.partner' _columns = { 'property_stock_customer': fields.property( - 'stock.location', type='many2one', relation='stock.location', string="Customer Location", - view_load=True, help="This stock location will be used, instead of the default one, as the destination location for goods you send to this partner"), 'property_stock_supplier': fields.property( - 'stock.location', type='many2one', relation='stock.location', string="Supplier Location", - view_load=True, help="This stock location will be used, instead of the default one, as the source location for goods you receive from the current partner"), } diff --git a/addons/stock/product.py b/addons/stock/product.py index f31c2b21ef1..20fc660be0f 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -477,37 +477,33 @@ class product_template(osv.osv): _inherit = 'product.template' _columns = { 'property_stock_procurement': fields.property( - 'stock.location', type='many2one', relation='stock.location', string="Procurement Location", - view_load=True, domain=[('usage','like','procurement')], help="This stock location will be used, instead of the default one, as the source location for stock moves generated by procurements."), 'property_stock_production': fields.property( - 'stock.location', type='many2one', relation='stock.location', string="Production Location", - view_load=True, domain=[('usage','like','production')], help="This stock location will be used, instead of the default one, as the source location for stock moves generated by manufacturing orders."), 'property_stock_inventory': fields.property( - 'stock.location', type='many2one', relation='stock.location', string="Inventory Location", - view_load=True, domain=[('usage','like','inventory')], help="This stock location will be used, instead of the default one, as the source location for stock moves generated when you do an inventory."), - 'property_stock_account_input': fields.property('account.account', - type='many2one', relation='account.account', - string='Stock Input Account', view_load=True, + 'property_stock_account_input': fields.property( + type='many2one', + relation='account.account', + string='Stock Input Account', help="When doing real-time inventory valuation, counterpart journal items for all incoming stock moves will be posted in this account, unless " "there is a specific valuation account set on the source location. When not set on the product, the one from the product category is used."), - 'property_stock_account_output': fields.property('account.account', - type='many2one', relation='account.account', - string='Stock Output Account', view_load=True, + 'property_stock_account_output': fields.property( + type='many2one', + relation='account.account', + string='Stock Output Account', help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless " "there is a specific valuation account set on the destination location. When not set on the product, the one from the product category is used."), 'sale_delay': fields.float('Customer Lead Time', help="The average delay in days between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."), @@ -524,27 +520,29 @@ class product_category(osv.osv): _inherit = 'product.category' _columns = { - 'property_stock_journal': fields.property('account.journal', - relation='account.journal', type='many2one', - string='Stock Journal', view_load=True, + 'property_stock_journal': fields.property( + relation='account.journal', + type='many2one', + string='Stock Journal', help="When doing real-time inventory valuation, this is the Accounting Journal in which entries will be automatically posted when stock moves are processed."), - 'property_stock_account_input_categ': fields.property('account.account', - type='many2one', relation='account.account', - string='Stock Input Account', view_load=True, + 'property_stock_account_input_categ': fields.property( + type='many2one', + relation='account.account', + string='Stock Input Account', help="When doing real-time inventory valuation, counterpart journal items for all incoming stock moves will be posted in this account, unless " "there is a specific valuation account set on the source location. This is the default value for all products in this category. It " "can also directly be set on each product"), - 'property_stock_account_output_categ': fields.property('account.account', - type='many2one', relation='account.account', - string='Stock Output Account', view_load=True, + 'property_stock_account_output_categ': fields.property( + type='many2one', + relation='account.account', + string='Stock Output Account', help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless " "there is a specific valuation account set on the destination location. This is the default value for all products in this category. It " "can also directly be set on each product"), - 'property_stock_valuation_account_id': fields.property('account.account', + 'property_stock_valuation_account_id': fields.property( type='many2one', relation='account.account', string="Stock Valuation Account", - view_load=True, help="When real-time inventory valuation is enabled on a product, this account will hold the current value of the products.",), } From ea03ed65b60a352b41932b5a12001c3aef3d776f Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 24 Jun 2013 11:07:41 +0200 Subject: [PATCH 6/9] [FIX] purchase, accont_anglo_saxon: fixed the creation of invoice from PO lines so that it reuse the _prepare_inv_line() method. This code factorization is needed in order to work with account_anglo_saxon module (before the anglo saxon accounting mode was ignored if the PO's invoicing method was 'generate invoices from PO lines') bzr revid: qdp-launchpad@openerp.com-20130624090741-eyy2r22yuti0gqit --- addons/account_anglo_saxon/purchase.py | 9 ++-- addons/purchase/purchase.py | 28 ++++++------ .../purchase/wizard/purchase_line_invoice.py | 44 +++++-------------- 3 files changed, 30 insertions(+), 51 deletions(-) diff --git a/addons/account_anglo_saxon/purchase.py b/addons/account_anglo_saxon/purchase.py index c10a2a97d80..fc36dab41c2 100644 --- a/addons/account_anglo_saxon/purchase.py +++ b/addons/account_anglo_saxon/purchase.py @@ -26,16 +26,15 @@ class purchase_order(osv.osv): _inherit = "purchase.order" _description = "Purchase Order" - def _prepare_inv_line(self, cr, uid, account_id, order_line, context=None): - line = super(purchase_order, self)._prepare_inv_line(cr, uid, account_id, order_line, context=context) + def _choose_account_from_po_line(self, cr, uid, order_line, context=None): + account_id = super(purchase_order, self)._choose_account_from_po_line(cr, uid, order_line, context=context) if order_line.product_id and not order_line.product_id.type == 'service': acc_id = order_line.product_id.property_stock_account_input and order_line.product_id.property_stock_account_input.id if not acc_id: acc_id = order_line.product_id.categ_id.property_stock_account_input_categ and order_line.product_id.categ_id.property_stock_account_input_categ.id if acc_id: fpos = order_line.order_id.fiscal_position or False - new_account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, acc_id) - line.update({'account_id': new_account_id}) - return line + account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, acc_id) + return account_id # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index aad9d3b1459..707012fc063 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -468,6 +468,20 @@ class purchase_order(osv.osv): self.write(cr, uid, [id], {'state' : 'confirmed', 'validator' : uid}) return True + def _choose_account_from_po_line(self, cr, uid, po_line, context=None): + fiscal_obj = self.pool.get('account.fiscal.position') + property_obj = self.pool.get('ir.property') + if po_line.product_id: + acc_id = po_line.product_id.property_account_expense.id + if not acc_id: + acc_id = po_line.product_id.categ_id.property_account_expense_categ.id + if not acc_id: + raise osv.except_osv(_('Error!'), _('Define expense account for this company: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,)) + else: + acc_id = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category').id + fpos = po_line.order_id.fiscal_position or False + return fiscal_obj.map_account(cr, uid, fpos, acc_id) + def _prepare_inv_line(self, cr, uid, account_id, order_line, context=None): """Collects require data from purchase order line that is used to create invoice line for that purchase order line @@ -509,8 +523,6 @@ class purchase_order(osv.osv): journal_obj = self.pool.get('account.journal') inv_obj = self.pool.get('account.invoice') inv_line_obj = self.pool.get('account.invoice.line') - fiscal_obj = self.pool.get('account.fiscal.position') - property_obj = self.pool.get('ir.property') for order in self.browse(cr, uid, ids, context=context): pay_acc_id = order.partner_id.property_account_payable.id @@ -522,17 +534,7 @@ class purchase_order(osv.osv): # generate invoice line correspond to PO line and link that to created invoice (inv_id) and PO line inv_lines = [] for po_line in order.order_line: - if po_line.product_id: - acc_id = po_line.product_id.property_account_expense.id - if not acc_id: - acc_id = po_line.product_id.categ_id.property_account_expense_categ.id - if not acc_id: - raise osv.except_osv(_('Error!'), _('Define expense account for this company: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,)) - else: - acc_id = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category').id - fpos = order.fiscal_position or False - acc_id = fiscal_obj.map_account(cr, uid, fpos, acc_id) - + acc_id = self._choose_account_from_po_line(cr, uid, po_line, context=context) inv_line_data = self._prepare_inv_line(cr, uid, acc_id, po_line, context=context) inv_line_id = inv_line_obj.create(cr, uid, inv_line_data, context=context) inv_lines.append(inv_line_id) diff --git a/addons/purchase/wizard/purchase_line_invoice.py b/addons/purchase/wizard/purchase_line_invoice.py index b8ee4b69a32..33df515164b 100644 --- a/addons/purchase/wizard/purchase_line_invoice.py +++ b/addons/purchase/wizard/purchase_line_invoice.py @@ -48,12 +48,11 @@ class purchase_line_invoice(osv.osv_memory): if record_ids: res = False invoices = {} - invoice_obj=self.pool.get('account.invoice') - purchase_line_obj=self.pool.get('purchase.order.line') - property_obj=self.pool.get('ir.property') - account_fiscal_obj=self.pool.get('account.fiscal.position') - invoice_line_obj=self.pool.get('account.invoice.line') - account_jrnl_obj=self.pool.get('account.journal') + invoice_obj = self.pool.get('account.invoice') + purchase_obj = self.pool.get('purchase.order') + purchase_line_obj = self.pool.get('purchase.order.line') + invoice_line_obj = self.pool.get('account.invoice.line') + account_jrnl_obj = self.pool.get('account.journal') def multiple_order_invoice_notes(orders): notes = "" @@ -93,35 +92,14 @@ class purchase_line_invoice(osv.osv_memory): order.write({'invoice_ids': [(4, inv_id)]}) return inv_id - for line in purchase_line_obj.browse(cr,uid,record_ids): - if (not line.invoiced) and (line.state not in ('draft','cancel')): + for line in purchase_line_obj.browse(cr, uid, record_ids, context=context): + if (not line.invoiced) and (line.state not in ('draft', 'cancel')): if not line.partner_id.id in invoices: invoices[line.partner_id.id] = [] - if line.product_id: - a = line.product_id.property_account_expense.id - if not a: - a = line.product_id.categ_id.property_account_expense_categ.id - if not a: - raise osv.except_osv(_('Error!'), - _('Define expense account for this product: "%s" (id:%d).') % \ - (line.product_id.name, line.product_id.id,)) - else: - a = property_obj.get(cr, uid, - 'property_account_expense_categ', 'product.category', - context=context).id - fpos = line.order_id.fiscal_position or False - a = account_fiscal_obj.map_account(cr, uid, fpos, a) - inv_id = invoice_line_obj.create(cr, uid, { - 'name': line.name, - 'origin': line.order_id.name, - 'account_id': a, - 'price_unit': line.price_unit, - 'quantity': line.product_qty, - 'uos_id': line.product_uom.id, - 'product_id': line.product_id.id or False, - 'invoice_line_tax_id': [(6, 0, [x.id for x in line.taxes_id])], - 'account_analytic_id': line.account_analytic_id and line.account_analytic_id.id or False, - }) + acc_id = purchase_obj._choose_account_from_po_line(cr, uid, line, context=context) + inv_line_data = purchase_obj._prepare_inv_line(cr, uid, acc_id, line, context=context) + inv_line_data.update({'origin': line.order_id.name}) + inv_id = invoice_line_obj.create(cr, uid, inv_line_data, context=context) purchase_line_obj.write(cr, uid, [line.id], {'invoiced': True, 'invoice_lines': [(4, inv_id)]}) invoices[line.partner_id.id].append((line,inv_id)) From 0b6b7d643dcd9e3f9edc9dccc16b702cfbca1bcf Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 24 Jun 2013 11:52:55 +0200 Subject: [PATCH 7/9] [FIX] auth_oauth: authentication problem with the new server-side web framework bzr revid: nicolas.vanhoren@openerp.com-20130624095255-uj6702oq6601eql5 --- addons/auth_oauth/controllers/main.py | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index 62eb2e812cc..35a06871696 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -7,7 +7,8 @@ from werkzeug.exceptions import BadRequest import openerp from openerp import SUPERUSER_ID -import openerp.addons.web.http as oeweb +import openerp.addons.web.http as http +from openerp.addons.web.http import request from openerp.addons.web.controllers.main import db_monodb, set_cookie_and_redirect, login_and_redirect from openerp.modules.registry import RegistryManager @@ -18,7 +19,7 @@ _logger = logging.getLogger(__name__) #---------------------------------------------------------- def fragment_to_query_string(func): @functools.wraps(func) - def wrapper(self, req, **kw): + def wrapper(self, **kw): if not kw: return """""" - return func(self, req, **kw) + return func(self, **kw) return wrapper #---------------------------------------------------------- # Controller #---------------------------------------------------------- -class OAuthController(oeweb.Controller): - _cp_path = '/auth_oauth' +class OAuthController(http.Controller): - @oeweb.jsonrequest - def list_providers(self, req, dbname): + @http.route('/auth_oauth/list_providers', type='json', auth='none') + def list_providers(self, dbname): try: registry = RegistryManager.get(dbname) with registry.cursor() as cr: @@ -51,9 +51,9 @@ class OAuthController(oeweb.Controller): l = [] return l - @oeweb.httprequest + @http.route('/auth_oauth/signin', type='http', auth='none') @fragment_to_query_string - def signin(self, req, **kw): + def signin(self, **kw): state = simplejson.loads(kw['state']) dbname = state['d'] provider = state['p'] @@ -71,7 +71,7 @@ class OAuthController(oeweb.Controller): url = '/#action=%s' % action elif menu: url = '/#menu_id=%s' % menu - return login_and_redirect(req, *credentials, redirect_url=url) + return login_and_redirect(*credentials, redirect_url=url) except AttributeError: # auth_signup is not installed _logger.error("auth_signup not installed on database %s: oauth sign up cancelled." % (dbname,)) @@ -88,14 +88,14 @@ class OAuthController(oeweb.Controller): _logger.exception("OAuth2: %s" % str(e)) url = "/#action=login&oauth_error=2" - return set_cookie_and_redirect(req, url) + return set_cookie_and_redirect(url) - @oeweb.httprequest - def oea(self, req, **kw): + @http.route('/auth_oauth/oea', type='http', auth='none') + def oea(self, **kw): """login user via OpenERP Account provider""" dbname = kw.pop('db', None) if not dbname: - dbname = db_monodb(req) + dbname = db_monodb() if not dbname: return BadRequest() @@ -105,7 +105,7 @@ class OAuthController(oeweb.Controller): try: model, provider_id = IMD.get_object_reference(cr, SUPERUSER_ID, 'auth_oauth', 'provider_openerp') except ValueError: - return set_cookie_and_redirect(req, '/?db=%s' % dbname) + return set_cookie_and_redirect('/?db=%s' % dbname) assert model == 'auth.oauth.provider' state = { @@ -115,6 +115,6 @@ class OAuthController(oeweb.Controller): } kw['state'] = simplejson.dumps(state) - return self.signin(req, **kw) + return self.signin(**kw) # vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4: From f93d10957d70b083149054e98dde432469b918e9 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 24 Jun 2013 17:56:34 +0200 Subject: [PATCH 8/9] [FIX] bad handling of werkzeug's exceptions bzr revid: nicolas.vanhoren@openerp.com-20130624155634-d5b5998jv01fa1wh --- addons/web/http.py | 59 ++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/addons/web/http.py b/addons/web/http.py index 7105b4a74c1..0c2bb1e3744 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -946,43 +946,46 @@ class Root(object): Call the object directly. """ - httprequest = werkzeug.wrappers.Request(environ) - httprequest.parameter_storage_class = werkzeug.datastructures.ImmutableDict - httprequest.app = self + try: + httprequest = werkzeug.wrappers.Request(environ) + httprequest.parameter_storage_class = werkzeug.datastructures.ImmutableDict + httprequest.app = self - sid = httprequest.cookies.get('sid') - if not sid: - sid = httprequest.args.get('sid') + sid = httprequest.cookies.get('sid') + if not sid: + sid = httprequest.args.get('sid') - session_gc(self.session_store) + session_gc(self.session_store) - with session_context(httprequest, self.session_store, self.session_lock, sid) as session: - request = self._build_request(httprequest) - db = request.db + with session_context(httprequest, self.session_store, self.session_lock, sid) as session: + request = self._build_request(httprequest) + db = request.db - if db: - updated = openerp.modules.registry.RegistryManager.check_registry_signaling(db) - if updated: - with self.db_routers_lock: - del self.db_routers[db] + if db: + updated = openerp.modules.registry.RegistryManager.check_registry_signaling(db) + if updated: + with self.db_routers_lock: + del self.db_routers[db] - with set_request(request): - self.find_handler() - result = request.dispatch() + with set_request(request): + self.find_handler() + result = request.dispatch() - if db: - openerp.modules.registry.RegistryManager.signal_caches_change(db) + if db: + openerp.modules.registry.RegistryManager.signal_caches_change(db) - if isinstance(result, basestring): - headers=[('Content-Type', 'text/html; charset=utf-8'), ('Content-Length', len(result))] - response = werkzeug.wrappers.Response(result, headers=headers) - else: - response = result + if isinstance(result, basestring): + headers=[('Content-Type', 'text/html; charset=utf-8'), ('Content-Length', len(result))] + response = werkzeug.wrappers.Response(result, headers=headers) + else: + response = result - if hasattr(response, 'set_cookie'): - response.set_cookie('sid', session.sid) + if hasattr(response, 'set_cookie'): + response.set_cookie('sid', session.sid) - return response(environ, start_response) + return response(environ, start_response) + except werkzeug.exceptions.HTTPException, e: + return e(environ, start_response) def _build_request(self, httprequest): if httprequest.args.get('jsonp'): From 9102c2c5122eeb8ff730eaf89f367dfc472418a2 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Tue, 25 Jun 2013 05:14:42 +0000 Subject: [PATCH 9/9] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20130625051442-1chu4wdtgur1nub1 --- addons/l10n_in_hr_payroll/i18n/zh_CN.po | 1013 +++++++++++++++++++++++ addons/portal_anonymous/i18n/en_AU.po | 2 +- 2 files changed, 1014 insertions(+), 1 deletion(-) create mode 100644 addons/l10n_in_hr_payroll/i18n/zh_CN.po diff --git a/addons/l10n_in_hr_payroll/i18n/zh_CN.po b/addons/l10n_in_hr_payroll/i18n/zh_CN.po new file mode 100644 index 00000000000..8ee2c7f2028 --- /dev/null +++ b/addons/l10n_in_hr_payroll/i18n/zh_CN.po @@ -0,0 +1,1013 @@ +# Chinese (Simplified) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-11-24 02:53+0000\n" +"PO-Revision-Date: 2013-06-24 10:15+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Chinese (Simplified) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-06-25 05:14+0000\n" +"X-Generator: Launchpad (build 16677)\n" + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +msgid "E-mail Address" +msgstr "E-mail地址" + +#. module: l10n_in_hr_payroll +#: field:payment.advice.report,employee_bank_no:0 +msgid "Employee Bank Account" +msgstr "员工银行帐号" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +msgid "Payment Advices which are in draft state" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +msgid "Title" +msgstr "职位" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "Payment Advice from" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.model,name:l10n_in_hr_payroll.model_yearly_salary_detail +msgid "Hr Salary Employee By Category Report" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +msgid "Payslips which are paid" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +#: view:payment.advice.report:0 +#: view:payslip.report:0 +msgid "Group By..." +msgstr "分组于..." + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +msgid "Allowances with Basic:" +msgstr "基本补贴:" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +msgid "Payslips which are in done state" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +msgid "Department" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +msgid "Deductions:" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "A/C no." +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.contract,driver_salay:0 +msgid "Driver Salary" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.act_window,name:l10n_in_hr_payroll.action_yearly_salary_detail +#: model:ir.actions.report.xml,name:l10n_in_hr_payroll.yearly_salary +#: model:ir.ui.menu,name:l10n_in_hr_payroll.menu_yearly_salary_detail +msgid "Yearly Salary by Employee" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.act_window,name:l10n_in_hr_payroll.act_hr_emp_payslip_list +msgid "Payslips" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "March" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +#: field:hr.payroll.advice,company_id:0 +#: field:hr.payroll.advice.line,company_id:0 +#: view:payment.advice.report:0 +#: field:payment.advice.report,company_id:0 +#: view:payslip.report:0 +#: field:payslip.report,company_id:0 +msgid "Company" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "The Manager" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +msgid "Letter Details" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +msgid "Set to Draft" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "to" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "Total :" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payslip.run,available_advice:0 +msgid "Made Payment Advice?" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +msgid "Advices which are paid using NEFT transfer" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:payslip.report,nbr:0 +msgid "# Payslip lines" +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:hr.contract,tds:0 +msgid "Amount for Tax Deduction at Source" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.model,name:l10n_in_hr_payroll.model_hr_payslip +msgid "Pay Slip" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +#: field:payment.advice.report,day:0 +#: view:payslip.report:0 +#: field:payslip.report,day:0 +msgid "Day" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +msgid "Month of Payment Advices" +msgstr "" + +#. module: l10n_in_hr_payroll +#: constraint:hr.payslip:0 +msgid "Payslip 'Date From' must be before 'Date To'." +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice,batch_id:0 +msgid "Batch" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +msgid "Code" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +msgid "Other Information" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:hr.payroll.advice,state:0 +#: selection:payment.advice.report,state:0 +msgid "Cancelled" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.act_window,help:l10n_in_hr_payroll.action_payslip_report_all +msgid "This report performs analysis on Payslip" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "For" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +msgid "Details by Salary Rule Category:" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice,number:0 +#: report:paylip.details.in:0 +msgid "Reference" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.contract,medical_insurance:0 +msgid "Medical Insurance" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +msgid "Identification No" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +#: field:payslip.report,struct_id:0 +msgid "Structure" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "form period" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:hr.payroll.advice,state:0 +#: selection:payment.advice.report,state:0 +msgid "Confirmed" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +#: report:salary.employee.bymonth:0 +msgid "From" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice.line,bysal:0 +#: field:payment.advice.report,bysal:0 +#: report:payroll.advice:0 +msgid "By Salary" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +#: view:payment.advice.report:0 +msgid "Confirm" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice,chaque_nos:0 +#: field:payment.advice.report,cheque_nos:0 +msgid "Cheque Numbers" +msgstr "" + +#. module: l10n_in_hr_payroll +#: constraint:res.company:0 +msgid "Error! You can not create recursive companies." +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.act_window,name:l10n_in_hr_payroll.action_salary_employee_month +#: model:ir.actions.report.xml,name:l10n_in_hr_payroll.hr_salary_employee_bymonth +#: model:ir.ui.menu,name:l10n_in_hr_payroll.menu_salary_employee_month +msgid "Yearly Salary by Head" +msgstr "" + +#. module: l10n_in_hr_payroll +#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:134 +#, python-format +msgid "You can not confirm Payment advice without advice lines." +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "Yours Sincerely" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +msgid "# Payslip Lines" +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:hr.contract,medical_insurance:0 +msgid "Deduction towards company provided medical insurance" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.model,name:l10n_in_hr_payroll.model_hr_payroll_advice_line +msgid "Bank Advice Lines" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +msgid "Day of Payslip" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +msgid "Email" +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:hr.payslip.run,available_advice:0 +msgid "" +"If this box is checked which means that Payment Advice exists for current " +"batch" +msgstr "" + +#. module: l10n_in_hr_payroll +#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:108 +#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:134 +#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:190 +#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:207 +#, python-format +msgid "Error !" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:payslip.report,paid:0 +msgid "Made Payment Order ? " +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.salary.employee.month:0 +#: view:yearly.salary.detail:0 +msgid "Print" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payslip.report,state:0 +msgid "Rejected" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +msgid "Year of Payslip" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.model,name:l10n_in_hr_payroll.model_hr_payslip_run +msgid "Payslip Batches" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice.line,debit_credit:0 +#: report:payroll.advice:0 +msgid "C/D" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:salary.employee.bymonth:0 +msgid "Yearly Salary Details" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.report.xml,name:l10n_in_hr_payroll.payroll_advice +msgid "Print Advice" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice,line_ids:0 +msgid "Employee Salary" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "July" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:res.company:0 +msgid "Configuration" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +msgid "Payslip Line" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.act_window,name:l10n_in_hr_payroll.action_view_hr_bank_advice_tree +#: model:ir.ui.menu,name:l10n_in_hr_payroll.hr_menu_payment_advice +msgid "Payment Advices" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.act_window,name:l10n_in_hr_payroll.action_payment_advice_report_all +#: model:ir.ui.menu,name:l10n_in_hr_payroll.menu_reporting_payment_advice +#: view:payment.advice.report:0 +msgid "Advices Analysis" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.salary.employee.month:0 +msgid "" +"This wizard will print report which displays employees break-up of Net Head " +"for a specified dates." +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice.line,ifsc:0 +msgid "IFSC" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +#: field:payslip.report,date_to:0 +msgid "Date To" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.contract,tds:0 +msgid "TDS" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +msgid "Confirm Advices" +msgstr "" + +#. module: l10n_in_hr_payroll +#: constraint:hr.contract:0 +msgid "Error! Contract start-date must be less than contract end-date." +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:res.company,dearness_allowance:0 +msgid "Dearness Allowance" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "August" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.contract:0 +msgid "Deduction" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "SI. No." +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +msgid "Payment Advices which are in confirm state" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "December" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +msgid "Confirm Sheet" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +#: field:payment.advice.report,month:0 +#: view:payslip.report:0 +#: field:payslip.report,month:0 +msgid "Month" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +msgid "Employee Code" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.salary.employee.month:0 +#: view:yearly.salary.detail:0 +msgid "or" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.model,name:l10n_in_hr_payroll.model_hr_salary_employee_month +msgid "Hr Salary Employee By Month Report" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.salary.employee.month,category_id:0 +#: view:payslip.report:0 +#: field:payslip.report,category_id:0 +msgid "Category" +msgstr "" + +#. module: l10n_in_hr_payroll +#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:190 +#, python-format +msgid "" +"Payment advice already exists for %s, 'Set to Draft' to create a new advice." +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payslip.run:0 +msgid "To Advice" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +msgid "Note" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +msgid "Salary Rule Category" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +#: selection:hr.payroll.advice,state:0 +#: view:payment.advice.report:0 +#: selection:payment.advice.report,state:0 +#: view:payslip.report:0 +#: selection:payslip.report,state:0 +msgid "Draft" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +#: field:payslip.report,date_from:0 +msgid "Date From" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +msgid "Employee Name" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.model,name:l10n_in_hr_payroll.model_payment_advice_report +msgid "Payment Advice Analysis" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +#: field:hr.payroll.advice,state:0 +#: view:payment.advice.report:0 +#: field:payment.advice.report,state:0 +#: view:payslip.report:0 +#: field:payslip.report,state:0 +msgid "Status" +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:res.company,dearness_allowance:0 +msgid "Check this box if your company provide Dearness Allowance to employee" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice.line,ifsc_code:0 +#: field:payment.advice.report,ifsc_code:0 +#: report:payroll.advice:0 +msgid "IFSC Code" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "June" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +msgid "Paid" +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:hr.contract,voluntary_provident_fund:0 +msgid "" +"VPF is a safe option wherein you can contribute more than the PF ceiling of " +"12% that has been mandated by the government and VPF computed as " +"percentage(%)" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +#: field:payment.advice.report,nbr:0 +msgid "# Payment Lines" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.report.xml,name:l10n_in_hr_payroll.payslip_details_report +msgid "PaySlip Details" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +msgid "Payment Lines" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice,date:0 +#: field:payment.advice.report,date:0 +msgid "Date" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "November" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +#: view:payslip.report:0 +msgid "Extended Filters..." +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.act_window,help:l10n_in_hr_payroll.action_payment_advice_report_all +msgid "This report performs analysis on Payment Advices" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "October" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +#: report:salary.detail.byyear:0 +msgid "Designation" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +msgid "Month of Payslip" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "January" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:yearly.salary.detail:0 +msgid "Pay Head Employee Breakup" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.model,name:l10n_in_hr_payroll.model_res_company +msgid "Companies" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +#: report:payroll.advice:0 +msgid "Authorized Signature" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.model,name:l10n_in_hr_payroll.model_hr_contract +msgid "Contract" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.contract,supplementary_allowance:0 +msgid "Supplementary Allowance" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice.line:0 +msgid "Advice Lines" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "To," +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:hr.contract,driver_salay:0 +msgid "Check this box if you provide allowance for driver" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +msgid "Payslips which are in draft state" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +#: field:hr.payroll.advice.line,advice_id:0 +#: field:hr.payslip,advice_id:0 +#: model:ir.model,name:l10n_in_hr_payroll.model_hr_payroll_advice +msgid "Bank Advice" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +msgid "Other No." +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +msgid "Draft Advices" +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:hr.payroll.advice,neft:0 +msgid "Check this box if your company use online transfer for salary" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:payment.advice.report,number:0 +#: field:payslip.report,number:0 +msgid "Number" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "September" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payslip.report:0 +#: selection:payslip.report,state:0 +msgid "Done" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +#: view:hr.salary.employee.month:0 +#: view:yearly.salary.detail:0 +msgid "Cancel" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +msgid "Day of Payment Advices" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +msgid "Search Payment advice" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:yearly.salary.detail:0 +msgid "" +"This wizard will print report which display a pay head employee breakup for " +"a specified dates." +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +msgid "Pay Slip Details" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +msgid "Total Salary" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice.line,employee_id:0 +#: view:payment.advice.report:0 +#: field:payment.advice.report,employee_id:0 +#: view:payslip.report:0 +#: field:payslip.report,employee_id:0 +msgid "Employee" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +msgid "Compute Advice" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "Dear Sir/Madam," +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice,note:0 +msgid "Description" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "May" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:res.company:0 +msgid "Payroll" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +msgid "NEFT" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +#: report:salary.detail.byyear:0 +msgid "Address" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +#: field:hr.payroll.advice,bank_id:0 +#: view:payment.advice.report:0 +#: field:payment.advice.report,bank_id:0 +#: report:payroll.advice:0 +#: report:salary.detail.byyear:0 +msgid "Bank" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.salary.employee.month,end_date:0 +#: field:yearly.salary.detail,date_to:0 +msgid "End Date" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "February" +msgstr "" + +#. module: l10n_in_hr_payroll +#: sql_constraint:res.company:0 +msgid "The company name must be unique !" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payroll.advice:0 +#: field:hr.payroll.advice,name:0 +#: report:paylip.details.in:0 +#: field:payment.advice.report,name:0 +#: field:payslip.report,name:0 +#: report:salary.employee.bymonth:0 +msgid "Name" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.salary.employee.month:0 +#: field:hr.salary.employee.month,employee_ids:0 +#: view:yearly.salary.detail:0 +#: field:yearly.salary.detail,employee_ids:0 +msgid "Employees" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +msgid "Bank Account" +msgstr "" + +#. module: l10n_in_hr_payroll +#: model:ir.actions.act_window,name:l10n_in_hr_payroll.action_payslip_report_all +#: model:ir.model,name:l10n_in_hr_payroll.model_payslip_report +#: model:ir.ui.menu,name:l10n_in_hr_payroll.menu_reporting_payslip +#: view:payslip.report:0 +msgid "Payslip Analysis" +msgstr "" + +#. module: l10n_in_hr_payroll +#: selection:payment.advice.report,month:0 +#: selection:payslip.report,month:0 +msgid "April" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:payroll.advice:0 +msgid "Name of the Employe" +msgstr "" + +#. module: l10n_in_hr_payroll +#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:108 +#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:207 +#, python-format +msgid "Please define bank account for the %s employee" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.salary.employee.month,start_date:0 +#: field:yearly.salary.detail,date_from:0 +msgid "Start Date" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.contract:0 +msgid "Allowance" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.contract,voluntary_provident_fund:0 +msgid "Voluntary Provident Fund (%)" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.contract,house_rent_allowance_metro_nonmetro:0 +msgid "House Rent Allowance (%)" +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:hr.payroll.advice,bank_id:0 +msgid "Select the Bank from which the salary is going to be paid" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.salary.employee.month:0 +msgid "Employee Pay Head Breakup" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:salary.detail.byyear:0 +msgid "Phone No." +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +msgid "Credit" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice.line,name:0 +#: report:payroll.advice:0 +msgid "Bank Account No." +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:hr.payroll.advice,date:0 +msgid "Advice Date is used to search Payslips" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payslip.run:0 +msgid "Payslip Batches ready to be Adviced" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:hr.payslip.run:0 +msgid "Create Advice" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +#: field:payment.advice.report,year:0 +#: view:payslip.report:0 +#: field:payslip.report,year:0 +msgid "Year" +msgstr "" + +#. module: l10n_in_hr_payroll +#: field:hr.payroll.advice,neft:0 +#: field:payment.advice.report,neft:0 +msgid "NEFT Transaction" +msgstr "" + +#. module: l10n_in_hr_payroll +#: report:paylip.details.in:0 +#: field:payslip.report,total:0 +#: report:salary.detail.byyear:0 +#: report:salary.employee.bymonth:0 +msgid "Total" +msgstr "" + +#. module: l10n_in_hr_payroll +#: help:hr.contract,house_rent_allowance_metro_nonmetro:0 +msgid "" +"HRA is an allowance given by the employer to the employee for taking care of " +"his rental or accommodation expenses for metro city it is 50 % and for non " +"metro 40%.HRA computed as percentage(%)" +msgstr "" + +#. module: l10n_in_hr_payroll +#: view:payment.advice.report:0 +msgid "Year of Payment Advices" +msgstr "" diff --git a/addons/portal_anonymous/i18n/en_AU.po b/addons/portal_anonymous/i18n/en_AU.po index f5b491b2574..feb30ee1137 100644 --- a/addons/portal_anonymous/i18n/en_AU.po +++ b/addons/portal_anonymous/i18n/en_AU.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-06-24 04:43+0000\n" +"X-Launchpad-Export-Date: 2013-06-25 05:14+0000\n" "X-Generator: Launchpad (build 16677)\n" #. module: portal_anonymous