diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index a380a69dc03..acccef0434d 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -153,12 +153,11 @@ for a particular financial year and for preparation of vouchers there is a modul 'test/account_period_close.yml', 'test/account_use_model.yml', 'test/account_validate_account_move.yml', - 'test/account_fiscalyear_close.yml', #'test/account_bank_statement.yml', #'test/account_cash_statement.yml', 'test/test_edi_invoice.yml', 'test/account_report.yml', - 'test/account_fiscalyear_close_state.yml', #last test, as it will definitively close the demo fiscalyear + 'test/account_fiscalyear_close.yml', #last test, as it will definitively close the demo fiscalyear ], 'installable': True, 'auto_install': False, diff --git a/addons/account/partner.py b/addons/account/partner.py index f582da6b765..79e5c465dc8 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -113,7 +113,8 @@ class res_partner(osv.osv): LEFT JOIN account_account a ON (l.account_id=a.id) WHERE a.type IN ('receivable','payable') AND l.partner_id IN %s - AND l.reconcile_id IS NULL + AND (l.reconcile_id IS NULL OR + reconcile_id in (SELECT id FROM account_move_reconcile WHERE opening_reconciliation is TRUE)) AND """ + query + """ GROUP BY l.partner_id, a.type """, diff --git a/addons/account/test/account_fiscalyear_close.yml b/addons/account/test/account_fiscalyear_close.yml index 1c3547ccefd..40d1b1a6a7b 100644 --- a/addons/account/test/account_fiscalyear_close.yml +++ b/addons/account/test/account_fiscalyear_close.yml @@ -17,7 +17,23 @@ fiscalyear_id: account_fiscalyear_fiscalyear0 name: !eval "'OP %s' %(datetime.now().year+1)" special: 1 - +- + I create a new account invoice a the partner in current fiscalyear +- + !record {model: account.invoice, id: account_invoice_current1}: + partner_id: base.res_partner_2 + invoice_line: + - partner_id: base.res_partner_2 + quantity: 1.0 + price_unit: 15.00 + name: Bying stuff +- + I validate it the invoice +- + !python {model: account.invoice}: | + import netsvc + wf_service = netsvc.LocalService("workflow") + wf_service.trg_validate(uid, 'account.invoice', ref('account.account_invoice_current1'), 'invoice_open', cr) - I made modification in journal so it can move entries - @@ -41,9 +57,30 @@ report_name: End of Fiscal Year Entry - I clicked on create Button - - !python {model: account.fiscalyear.close}: | self.data_save(cr, uid, [ref("account_fiscalyear_close_0")], {"lang": 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close")], - "tz": False, "active_id": ref("account.menu_wizard_fy_close"), }) \ No newline at end of file + "tz": False, "active_id": ref("account.menu_wizard_fy_close"), }) +- + I close the previous fiscalyear +- + !record {model: account.fiscalyear.close.state, id: account_fiscalyear_close_state_0}: + fy_id: data_fiscalyear +- + I clicked on Close States Button to close fiscalyear +- + !python {model: account.fiscalyear.close.state}: | + self.data_save(cr, uid, [ref("account_fiscalyear_close_state_0")], {"lang": 'en_US', + "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close_state")], + "tz": False, "active_id": ref("account.menu_wizard_fy_close_state"), }) +- + I check that the fiscalyear state is now "Done" +- + !assert {model: account.fiscalyear, id: data_fiscalyear, string: Fiscal Year is in Done state}: + - state == 'done' +- + I check that the past accounts are taken into account in partner credit +- + !assert {model: res.partner, id: base.res_partner_2}: + - credit == 15.0, "Total Receivable does not takes unreconciled previous moves" diff --git a/addons/account/test/account_fiscalyear_close_state.yml b/addons/account/test/account_fiscalyear_close_state.yml deleted file mode 100644 index 18c7dd570ed..00000000000 --- a/addons/account/test/account_fiscalyear_close_state.yml +++ /dev/null @@ -1,19 +0,0 @@ -- - I run the Close a Fiscalyear wizard to close the demo fiscalyear -- - !record {model: account.fiscalyear.close.state, id: account_fiscalyear_close_state_0}: - fy_id: data_fiscalyear -- - I clicked on Close States Button to close fiscalyear - -- - !python {model: account.fiscalyear.close.state}: | - self.data_save(cr, uid, [ref("account_fiscalyear_close_state_0")], {"lang": 'en_US', - "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close_state")], - "tz": False, "active_id": ref("account.menu_wizard_fy_close_state"), }) -- - I check that the fiscalyear state is now "Done" -- - !assert {model: account.fiscalyear, id: data_fiscalyear, string: Fiscal Year is in Done state}: - - state == 'done' - diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index ccd11bc0dc2..5098fdead27 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -133,6 +133,7 @@ HR - Employess Kanban hr.employee + 10 diff --git a/addons/l10n_fr/fr_fiscal_templates.xml b/addons/l10n_fr/fr_fiscal_templates.xml index a7e202d47b8..b11f8d4f0dd 100644 --- a/addons/l10n_fr/fr_fiscal_templates.xml +++ b/addons/l10n_fr/fr_fiscal_templates.xml @@ -28,38 +28,53 @@ - + - + + + + + + - - + + - + - + + + + + + - + + + + + + - + @@ -70,7 +85,18 @@ - + + + + + + + + + + + + @@ -81,18 +107,29 @@ - - + + - - + + - + - - + + - + + + + + + + + + + + + @@ -103,7 +140,18 @@ - + + + + + + + + + + + + @@ -117,31 +165,46 @@ - + - + + + + + + - - + + - + - + + + + + + - + + + + + + @@ -149,31 +212,47 @@ - + - + + + + + + - - + + - + - + + + + + + - + + + + + + + diff --git a/addons/l10n_fr/fr_pcg_taxes.xml b/addons/l10n_fr/fr_pcg_taxes.xml index 222749252c6..636b83e6c01 100644 --- a/addons/l10n_fr/fr_pcg_taxes.xml +++ b/addons/l10n_fr/fr_pcg_taxes.xml @@ -4,11 +4,11 @@ Plan de Taxes France @@ -20,24 +20,42 @@ 1.00 + + Base H.T. 20.0% + TVA collectée 20.0% (Base H.T.) + + 1.00 + Base H.T. 19.6% TVA collectée 19.6% (Base H.T.) 1.00 - + Base H.T. 8.5% TVA collectée 8.5% (Base H.T.) 1.00 + + Base H.T. 10.0% + TVA collectée 10.0% (Base H.T.) + + 1.00 + Base H.T. 7.0% TVA collectée 7.0% (Base H.T.) 1.00 + + Base H.T. 5.0% + TVA collectée 5.0% (Base H.T.) + + 1.00 + Base H.T. 5.5% TVA collectée 5.5% (Base H.T.) @@ -57,6 +75,12 @@ 1.00 + + TVA 20.0% + TVA collectée 20.0% + + 1.00 + TVA 19.6% TVA collectée 19.6% @@ -68,6 +92,12 @@ TVA collectée 8.5% 1.00 + + + TVA 10.0% + TVA collectée 10.0% + + 1.00 TVA 7.0% @@ -75,6 +105,12 @@ 1.00 + + TVA 5.0% + TVA collectée 5.0% + + 1.00 + TVA 5.5% TVA collectée 5.5% @@ -88,14 +124,18 @@ 1.00 - - Base H.T. TVA acquittée c) 1.00 + + Base H.T. 20.0% + TVA acquittée 20.0% (Base H.T.) + + 1.00 + Base H.T. 19.6% TVA acquittée 19.6% (Base H.T.) @@ -108,12 +148,24 @@ 1.00 + + Base H.T. 10.0% + TVA acquittée 10.0% (Base H.T.) + + 1.00 + Base H.T. 7.0% TVA acquittée 7.0% (Base H.T.) 1.00 + + Base H.T. 5.0% + TVA acquittée 5.0% (Base H.T.) + + 1.00 + Base H.T. 5.5% TVA acquittée 5.5% (Base H.T.) @@ -133,6 +185,12 @@ 1.00 + + TVA 20.0% + TVA acquittée 20.0% + + 1.00 + TVA 19.6% TVA acquittée 19.6% @@ -145,12 +203,24 @@ 1.00 + + TVA 10.0% + TVA acquittée 10.0% + + 1.00 + TVA 7.0% TVA acquittée 7.0% 1.00 + + TVA 5.0% + TVA acquittée 5.0% + + 1.00 + TVA 5.5% TVA acquittée 5.5% @@ -171,7 +241,13 @@ e) 1.00 - + + + Base H.T. 20.0% + TVA acquittée sur immobilisations 20.0% (Base H.T.) + + 1.00 + Base H.T. 19.6% TVA acquittée sur immobilisations 19.6% (Base H.T.) @@ -184,12 +260,24 @@ 1.00 + + Base H.T. 10.0% + TVA acquittée sur immobilisations 10.0% (Base H.T.) + + 1.00 + Base H.T. 7.0% TVA acquittée sur immobilisations 7.0% (Base H.T.) 1.00 + + Base H.T. 5.0% + TVA acquittée sur immobilisations 5.0% (Base H.T.) + + 1.00 + Base H.T. 5.5% TVA acquittée sur immobilisations 5.5% (Base H.T.) @@ -209,7 +297,13 @@ f) 1.00 - + + + TVA 20.0% + TVA acquittée sur immobilisations 20.0% + + 1.00 + TVA 19.6% TVA acquittée sur immobilisations 19.6% @@ -222,12 +316,24 @@ 1.00 + + TVA 10.0% + TVA acquittée sur immobilisations 10.0% + + 1.00 + TVA 7.0% TVA acquittée sur immobilisations 7.0% 1.00 + + TVA 5.0% + TVA acquittée sur immobilisations 5.0% + + 1.00 + TVA 5.5% TVA acquittée sur immobilisations 5.5% @@ -246,7 +352,13 @@ g) 1.00 - + + + Base H.T. 20.0% + TVA due intracommunautaire 20.0% (Base H.T.) + + 1.00 + Base H.T. 19.6% TVA due intracommunautaire 19.6% (Base H.T.) @@ -259,12 +371,24 @@ 1.00 + + Base H.T. 10.0% + TVA due intracommunautaire 10.0% (Base H.T.) + + 1.00 + Base H.T. 7.0% TVA due intracommunautaire 7.0% (Base H.T.) 1.00 + + Base H.T. 5.0% + TVA due intracommunautaire 5.0% (Base H.T.) + + 1.00 + Base H.T. 5.5% TVA due intracommunautaire 5.5% (Base H.T.) @@ -283,7 +407,13 @@ h) 1.00 - + + + TVA 20.0% + TVA due intracommunautaire 20.0% + + 1.00 + TVA 19.6% TVA due intracommunautaire 19.6% @@ -296,12 +426,24 @@ 1.00 + + TVA 10.0% + TVA due intracommunautaire 10.0% + + 1.00 + TVA 7.0% TVA due intracommunautaire 7.0% 1.00 + + TVA 5.0% + TVA due intracommunautaire 5.0% + + 1.00 + TVA 5.5% TVA due intracommunautaire 5.5% @@ -321,7 +463,13 @@ i) 1.00 - + + + Base H.T. 20.0% + TVA déductible intracommunautaire 20.0% (Base H.T.) + + 1.00 + Base H.T. 19.6% TVA déductible intracommunautaire 19.6% (Base H.T.) @@ -334,12 +482,24 @@ 1.00 + + Base H.T. 10.0% + TVA déductible intracommunautaire 10.0% (Base H.T.) + + 1.00 + Base H.T. 7.0% TVA déductible intracommunautaire 7.0% (Base H.T.) 1.00 + + Base H.T. 5.0% + TVA déductible intracommunautaire 5.0% (Base H.T.) + + 1.00 + Base H.T. 5.5% TVA déductible intracommunautaire 5.5% (Base H.T.) @@ -358,7 +518,13 @@ j) 1.00 - + + + TVA 20.0% + TVA déductible intracommunautaire 20.0% + + 1.00 + TVA 19.6% TVA déductible intracommunautaire 19.6% @@ -371,12 +537,24 @@ 1.00 + + TVA 10.0% + TVA déductible intracommunautaire 10.0% + + 1.00 + TVA 7.0% TVA déductible intracommunautaire 7.0% 1.00 + + TVA 5.0% + TVA déductible intracommunautaire 5.0% + + 1.00 + TVA 5.5% TVA déductible intracommunautaire 5.5% diff --git a/addons/l10n_fr/fr_tax.xml b/addons/l10n_fr/fr_tax.xml index 7cd3a36f54a..7c75136bdd3 100644 --- a/addons/l10n_fr/fr_tax.xml +++ b/addons/l10n_fr/fr_tax.xml @@ -9,6 +9,28 @@ + + TVA collectée (vente) 20,0% + 20.0 + + percent + + + + + + + + + + + + + + sale + + + TVA collectée (vente) 19,6% 19.6 @@ -26,7 +48,7 @@ - + sale @@ -52,7 +74,29 @@ sale - + + + TVA collectée (vente) 10,0% + 10.0 + + percent + + + + + + + + + + + + + + sale + + + TVA collectée (vente) 7,0% 7.0 @@ -63,8 +107,8 @@ - - + + @@ -75,6 +119,28 @@ + + TVA collectée (vente) 5,0% + 5.0 + + percent + + + + + + + + + + + + + + sale + + + TVA collectée (vente) 5,5% 5.5 @@ -85,8 +151,8 @@ - - + + @@ -121,6 +187,28 @@ + + TVA déductible (achat) 20,0% + ACH-20.0 + + percent + + + + + + + + + + + + + + purchase + + + TVA déductible (achat) 19,6% ACH-19.6 @@ -138,7 +226,7 @@ - + purchase @@ -164,7 +252,29 @@ purchase - + + + TVA déductible (achat) 10,0% + ACH-10.0 + + percent + + + + + + + + + + + + + + purchase + + + TVA déductible (achat) 7,0% ACH-7.0 @@ -187,6 +297,28 @@ + + TVA déductible (achat) 5,0% + ACH-5.0 + + percent + + + + + + + + + + + + + + purchase + + + TVA déductible (achat) 5,5% ACH-5.5 @@ -233,6 +365,29 @@ + + TVA déductible (achat) 20,0% TTC + ACH-20.0-TTC + + + percent + + + + + + + + + + + + + + purchase + + + TVA déductible (achat) 19,6% TTC ACH-19.6-TTC @@ -278,7 +433,30 @@ purchase - + + + TVA déductible (achat) 10,0% TTC + ACH-10.0-TTC + + + percent + + + + + + + + + + + + + + purchase + + + TVA déductible (achat) 7,0% TTC ACH-7.0-TTC @@ -302,6 +480,29 @@ + + TVA déductible (achat) 5,0% TTC + ACH-5.0-TTC + + + percent + + + + + + + + + + + + + + purchase + + + TVA déductible (achat) 5,5% TTC ACH-5.5-TTC @@ -351,6 +552,28 @@ + + TVA déd./immobilisation (achat) 20,0% + IMMO-20.0 + + percent + + + + + + + + + + + + + + purchase + + + TVA déd./immobilisation (achat) 19,6% IMMO-19.6 @@ -394,7 +617,29 @@ purchase - + + + TVA déd./immobilisation (achat) 10,0% + IMMO-10.0 + + percent + + + + + + + + + + + + + + purchase + + + TVA déd./immobilisation (achat) 7,0% IMMO-7.0 @@ -417,6 +662,28 @@ + + TVA déd./immobilisation (achat) 5,0% + IMMO-5.0 + + percent + + + + + + + + + + + + + + purchase + + + TVA déd./immobilisation (achat) 5,5% IMMO-5.5 @@ -463,6 +730,28 @@ + + TVA due s/ acq. intracommunautaire (achat) 20,0% + ACH_UE_due-20.0 + + percent + + + + + + + + + + + + + + purchase + + + TVA due s/ acq. intracommunautaire (achat) 19,6% ACH_UE_due-19.6 @@ -506,7 +795,29 @@ purchase - + + + TVA due s/ acq. intracommunautaire (achat) 10,0% + ACH_UE_due-10.0 + + percent + + + + + + + + + + + + + + purchase + + + TVA due s/ acq. intracommunautaire (achat) 7,0% ACH_UE_due-7.0 @@ -517,8 +828,8 @@ - - + + @@ -529,6 +840,28 @@ + + TVA due s/ acq. intracommunautaire (achat) 5,0% + ACH_UE_due-5.0 + + percent + + + + + + + + + + + + + + purchase + + + TVA due s/ acq. intracommunautaire (achat) 5,5% ACH_UE_due-5.5 @@ -539,8 +872,8 @@ - - + + @@ -575,6 +908,24 @@ + + TVA déd. s/ acq. intracommunautaire (achat) 20,0% + ACH_UE_ded.-20.0 + + percent + + + + + + + + + + purchase + + + TVA déd. s/ acq. intracommunautaire (achat) 19,6% ACH_UE_ded.-19.6 @@ -610,7 +961,25 @@ purchase - + + + TVA déd. s/ acq. intracommunautaire (achat) 10,0% + ACH_UE_ded.-10.0 + + percent + + + + + + + + + + purchase + + + TVA déd. s/ acq. intracommunautaire (achat) 7,0% ACH_UE_ded.-7.0 @@ -629,6 +998,24 @@ + + TVA déd. s/ acq. intracommunautaire (achat) 5,0% + ACH_UE_ded.-5.0 + + percent + + + + + + + + + + purchase + + + TVA déd. s/ acq. intracommunautaire (achat) 5,5% ACH_UE_ded.-5.5 diff --git a/addons/l10n_fr/plan_comptable_general.xml b/addons/l10n_fr/plan_comptable_general.xml index c68e0a88a4c..a029e101d07 100644 --- a/addons/l10n_fr/plan_comptable_general.xml +++ b/addons/l10n_fr/plan_comptable_general.xml @@ -3584,7 +3584,7 @@ - TVA due intracommunautaire 19,6% + TVA due intracommunautaire (Taux Normal) 445201 other @@ -3592,7 +3592,7 @@ - TVA due intracommunautaire 5,5% + TVA due intracommunautaire (Taux Intermédiaire) 445202 other @@ -3600,7 +3600,7 @@ - TVA due intracommunautaire (autre taux) + TVA due intracommunautaire (Autre taux) 445203 other @@ -3712,7 +3712,7 @@ - TVA collectée 19,6% + TVA collectée (Taux Normal) 445711 other @@ -3720,7 +3720,7 @@ - TVA collectée 5,5% + TVA collectée (Taux Intermédiaire) 445712 other @@ -3728,7 +3728,7 @@ - TVA collectée (autre taux) + TVA collectée (Autre taux) 445713 other diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index f7b082db74b..83a3305cf2e 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -517,8 +517,9 @@ class mrp_repair(osv.osv): 'location_dest_id': move.location_dest_id.id, 'tracking_id': False, 'prodlot_id': move.prodlot_id and move.prodlot_id.id or False, - 'state': 'done', + 'state': 'assigned', }) + move_obj.action_done(cr, uid, [move_id], context=context) repair_line_obj.write(cr, uid, [move.id], {'move_id': move_id, 'state': 'done'}, context=context) if repair.deliver_bool: pick_name = seq_obj.get(cr, uid, 'stock.picking.out') diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index e0ba225d92b..789322fae10 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -271,7 +271,7 @@ class pos_session(osv.osv): # open if there is no session in 'opening_control', 'opened', 'closing_control' for one user domain = [ ('state', 'not in', ('closed','closing_control')), - ('user_id', '=', uid) + ('user_id', '=', session.user_id.id) ] count = self.search_count(cr, uid, domain, context=context) if count>1: diff --git a/addons/portal_hr_employees/hr_employee_view.xml b/addons/portal_hr_employees/hr_employee_view.xml index 7b038747c60..8e8cece12c8 100644 --- a/addons/portal_hr_employees/hr_employee_view.xml +++ b/addons/portal_hr_employees/hr_employee_view.xml @@ -33,8 +33,9 @@ - HR - Employees Kanban + HR - Employees Kanban (Portal) hr.employee + 32 diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index f3c49c03900..2ce046fe454 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -127,6 +127,22 @@ class procurement_order(osv.osv): 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'procurement.order', context=c) } + def message_track(self, cr, uid, ids, tracked_fields, initial_values, context=None): + """ Overwrite message_track to avoid tracking more than once the confirm-exception loop + Add '_first_pass_done_' to the note field only the first time stuck in exception state + Will avoid getting furthur confirmed and exception change of state messages + + TODO: this hack is necessary for a stable version but should be avoided for the next release. + Instead find a more elegant way to prevent redundant messages or entirely stop tracking states on procurement orders + """ + for proc in self.browse(cr, uid, ids, context=context): + if not proc.note or '_first_pass_done_' not in proc.note or proc.state not in ('confirmed', 'exception'): + super(procurement_order, self).message_track(cr, uid, [proc.id], tracked_fields, initial_values, context=context) + if proc.state == 'exception': + cr.execute("""UPDATE procurement_order set note = CONCAT(note, %s) WHERE id = %s""", ('_first_pass_done_',proc.id)) + + return True + def unlink(self, cr, uid, ids, context=None): procurements = self.read(cr, uid, ids, ['state'], context=context) unlink_ids = [] diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index fead62f8521..bba5d6139ca 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -64,7 +64,7 @@ - + On Site Monitoring 20.5 @@ -75,8 +75,12 @@ This type of service include basic monitoring of products. This type of service include basic monitoring of products. + + + - + + On Site Assistance 25.5 @@ -86,10 +90,13 @@ This type of service include assistance for security questions, system configuration requirements, implementation or special needs. + + + - + + PC Assemble SC234 - PCSC234 450.0 300.0 @@ -101,10 +108,14 @@ Processor AMD 8-Core 512MB RAM HDD SH-1 + + + PCSC234 + - + + PC Assemble SC349 - PCSC349 500.0 750.0 @@ -117,10 +128,14 @@ Processor Core i5 2.70 Ghz 2GB RAM HDD SH-1 + + + PCSC349 + - + + PC Assemble + Custom (PC on Demand) - PC-DEM 600.0 900.0 @@ -129,10 +144,14 @@ HDD SH-1 Custom computer assembled on order based on customer's requirement. + + + PC-DEM + - + + 15” LCD Monitor - LCD15 800.0 1200.0 @@ -140,9 +159,13 @@ HDD SH-1 - + + + LCD15 + + + 17” LCD Monitor - LCD17 880.0 1350.0 @@ -150,9 +173,27 @@ HDD SH-1 - + + + LCD17 + + + USB Keyboard, QWERTY + + 10.0 + 13.0 + consu + + + + + KeyQ + + + + USB Keyboard, AZERTY 10.0 13.0 @@ -161,18 +202,12 @@ HDD SH-1 - USB Keyboard, AZERTY + KeyA - - 10.0 - 13.0 - consu - - - + + Mouse, Optical - M-Opt 12.50 14 @@ -180,9 +215,13 @@ HDD SH-1 - + + + M-Opt + + + Mouse, Laser - M-Las 14 16.50 @@ -190,9 +229,13 @@ HDD SH-1 - + + + M-Las + + + Mouse, Wireless - M-Wir 18 12.50 @@ -200,9 +243,13 @@ HDD SH-1 - + + + M-Wir + + + RAM SR5 - RAM-SR5 78.0 85.0 @@ -210,9 +257,13 @@ HDD SH-1 - + + + RAM-SR5 + + + RAM SR2 - RAM-SR2 87.0 95.0 @@ -220,9 +271,13 @@ HDD SH-1 - + + + RAM-SR2 + + + RAM SR3 - RAM-SR3 80.0 85.0 @@ -230,9 +285,13 @@ HDD SH-1 - + + + RAM-SR3 + + + Computer Case - C-Case 20.0 25.0 @@ -240,9 +299,13 @@ HDD SH-1 - + + + C-Case + + + HDD SH-1 - HDD-SH1 860.0 975.0 @@ -250,9 +313,13 @@ HDD SH-1 - + + + HDD-SH1 + + + HDD SH-2 - HDD-SH2 1020.0 1150.0 @@ -260,9 +327,13 @@ HDD SH-1 - + + + HDD-SH2 + + + HDD on Demand - HDD-DEM 1100.0 1250.0 @@ -271,9 +342,13 @@ HDD SH-1 On demand hard-disk having capacity based on requirement. - + + + HDD-DEM + + + Motherboard I9P57 - MBi9 1700.0 1950.0 @@ -281,9 +356,13 @@ HDD SH-1 - + + + MBi9 + + + Motherboard A20Z7 - MBa20 1790.0 2000.0 @@ -291,9 +370,13 @@ HDD SH-1 - + + + MBa20 + + + Processor Core i5 2.70 Ghz - CPUi5 2010.0 2100.0 @@ -301,9 +384,13 @@ HDD SH-1 - + + + CPUi5 + + + Processor AMD 8-Core - CPUa8 1910.0 1980.0 @@ -311,9 +398,13 @@ HDD SH-1 - + + + CPUa8 + + + Graphics Card - CARD 876.0 885.0 @@ -321,9 +412,13 @@ HDD SH-1 - + + + CARD + + + Laptop E5023 - LAP-E5 2870.0 2950.0 @@ -335,9 +430,13 @@ HDD SH-1 Standard-1294P Processor QWERTY keyboard - + + + LAP-E5 + + + Laptop S3450 - LAP-S3 3000.0 3245.0 @@ -349,9 +448,13 @@ QWERTY keyboard Hi-Speed 234Q Processor QWERTY keyboard - + + + LAP-S3 + + + Laptop Customized - LAP-CUS 3300.0 3645.0 @@ -360,9 +463,13 @@ QWERTY keyboard Custom Laptop based on customer's requirement. - + + + LAP-CUS + + + External Hard disk - EXT-HDD 390.0 405.0 @@ -370,10 +477,14 @@ QWERTY keyboard + + + EXT-HDD + - + + Pen drive, SP-2 - PD-SP2 90.0 100.0 @@ -381,10 +492,14 @@ QWERTY keyboard + + + PD-SP2 + - + + Pen drive, SP-4 - PD-SP4 126.0 145.0 @@ -392,9 +507,13 @@ QWERTY keyboard - + + + PD-SP4 + + + Multimedia Speakers - MM-SPK 134.0 150.0 @@ -403,9 +522,13 @@ QWERTY keyboard . - + + + MM-SPK + + + Headset standard - HEAD 57.0 62.0 @@ -414,9 +537,13 @@ QWERTY keyboard Hands free headset for laptop PC with in-line microphone and headphone plug. - + + + HEAD + + + Headset USB - HEAD-USB 60.0 65.0 @@ -425,10 +552,14 @@ QWERTY keyboard Headset for laptop PC with USB connector. + + + HEAD-USB + - + + Webcam - WCAM 38.0 45.0 @@ -436,10 +567,14 @@ QWERTY keyboard + + + WCAM + - + + Blank CD - CD 18.40 20.0 @@ -447,10 +582,14 @@ QWERTY keyboard + + + CD + - + + Blank DVD-RW - DVD 21.60 24.0 @@ -458,10 +597,14 @@ QWERTY keyboard + + + DVD + - + + Printer, All-in-one - PRINT 4258.0 4410.0 @@ -470,10 +613,14 @@ QWERTY keyboard All in one hi-speed printer with fax and scanner. + + + PRINT + - + + Ink Cartridge - INK 60.0 65.0 @@ -481,10 +628,14 @@ QWERTY keyboard + + + INK + - + + Toner Cartridge - TONER 66.0 70.0 @@ -492,10 +643,14 @@ QWERTY keyboard + + + TONER + - + + Windows 7 Professional - Win7 330.0 470.0 @@ -503,10 +658,14 @@ QWERTY keyboard + + + Win7 + - + + Windows Home Server 2011 - WServer 540.0 620.0 @@ -514,10 +673,14 @@ QWERTY keyboard + + + WServer + - + + Office Suite - OSuite 110.0 170.0 @@ -526,10 +689,14 @@ QWERTY keyboard Office Editing Software with word processing, spreadsheets, presentations, graphics, and databases... + + + OSuite + - + + Zed+ Antivirus - Zplus 235.0 280.0 @@ -537,10 +704,14 @@ QWERTY keyboard + + + Zplus + - + + GrapWorks Software - GRAPs/w 155.0 173.0 @@ -549,10 +720,14 @@ QWERTY keyboard Full featured image editing software. + + + GRAPs/w + - + + Router R430 - ROUT_430 55.0 60.0 @@ -560,10 +735,14 @@ QWERTY keyboard + + + ROUT_430 + - + + Datacard - DC 35.0 40.0 @@ -571,10 +750,14 @@ QWERTY keyboard + + + DC + - + + Switch, 24 ports - SW24 55.0 70.0 @@ -582,10 +765,14 @@ QWERTY keyboard + + + SW24 + - + + USB Adapter - ADPT 13.0 18.0 @@ -593,328 +780,333 @@ QWERTY keyboard + + + ADPT + + - + 3 1 - + 3 1 - + 3 1 - + 3 1 - + 2 5 - + 4 1 - + 2 1 - + 2 1 - + 5 1 - + 5 1 - + 5 1 - + 1 1 - + 1 1 - + 3 1 - + 3 1 - + 4 5 - + 3 1 - + 2 1 - + 3 1 - + 3 1 - + 3 1 - + 8 1 - + 8 1 - + 4 1 - + 5 1 - + 2 12 - + 2 12 - + 2 5 - + 2 12 - + 2 5 - + 2 1 - + 2 1 - + 4 1 - + 4 1 - + 5 1 - + 5 1 - + 7 1 - + 7 1 - + 4 1 - + 4 0 - + 5 0 - + 2 0 - + 4 0 - + 10 0 - + 3 0 - + 5 0 diff --git a/addons/stock/stock.py b/addons/stock/stock.py index ec33456e501..d818ca794d5 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -401,14 +401,15 @@ class stock_location(osv.osv): uom_rounding = uom_obj.browse(cr, uid, context.get('uom'), context=context).rounding locations_ids = self.search(cr, uid, [('location_id', 'child_of', ids)]) - # Fetch only the locations in which this product has ever been processed (in or out) - cr.execute("""SELECT l.id FROM stock_location l WHERE l.id in %s AND - EXISTS (SELECT 1 FROM stock_move m WHERE m.product_id = %s - AND ((state = 'done' AND m.location_dest_id = l.id) - OR (state in ('done','assigned') AND m.location_id = l.id))) - """, (tuple(locations_ids), product_id,)) - - for id in [i for (i,) in cr.fetchall()]: + if locations_ids: + # Fetch only the locations in which this product has ever been processed (in or out) + cr.execute("""SELECT l.id FROM stock_location l WHERE l.id in %s AND + EXISTS (SELECT 1 FROM stock_move m WHERE m.product_id = %s + AND ((state = 'done' AND m.location_dest_id = l.id) + OR (state in ('done','assigned') AND m.location_id = l.id))) + """, (tuple(locations_ids), product_id,)) + locations_ids = [i for (i,) in cr.fetchall()] + for id in locations_ids: if lock: try: # Must lock with a separate select query because FOR UPDATE can't be used with