diff --git a/addons/l10n_it/data/account.account.template.csv b/addons/l10n_it/data/account.account.template.csv index b06a3fe8574..b2127d4c858 100644 --- a/addons/l10n_it/data/account.account.template.csv +++ b/addons/l10n_it/data/account.account.template.csv @@ -1,14 +1,14 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 0,0,Azienda,,account.data_account_type_view,view,FALSE -1,1,ATTIVO ,0,account.data_account_type_view,view,TRUE -11,11,IMMOBILIZZAZIONI IMMATERIALI ,1,account.data_account_type_view,view,TRUE +1,1,ATTIVO ,0,account.account_type_asset_view1,view,TRUE +11,11,IMMOBILIZZAZIONI IMMATERIALI ,1,account.account_type_asset_view1,view,TRUE 1101,1101,costi di impianto ,11,account.data_account_type_asset,other,TRUE 1106,1106,software ,11,account.data_account_type_asset,other,TRUE 1108,1108,avviamento ,11,account.data_account_type_asset,other,TRUE 1111,1111,fondo ammortamento costi di impianto ,11,account.data_account_type_asset,other,TRUE 1116,1116,fondo ammortamento software ,11,account.data_account_type_asset,other,TRUE 1118,1118,fondo ammortamento avviamento ,11,account.data_account_type_asset,other,TRUE -12,12,IMMOBILIZZAZIONI MATERIALI ,1,account.data_account_type_view,view,TRUE +12,12,IMMOBILIZZAZIONI MATERIALI ,1,account.account_type_asset_view1,view,TRUE 1201,1201,fabbricati ,12,account.data_account_type_asset,other,TRUE 1202,1202,impianti e macchinari ,12,account.data_account_type_asset,other,TRUE 1204,1204,attrezzature commerciali ,12,account.data_account_type_asset,other,TRUE @@ -24,13 +24,13 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 1217,1217,fondo ammortamento automezzi ,12,account.data_account_type_asset,other,TRUE 1218,1218,fondo ammortamento imballaggi durevoli ,12,account.data_account_type_asset,other,TRUE 1220,1220,fornitori immobilizzazioni c/acconti ,12,account.data_account_type_asset,other,TRUE -13,13,IMMOBILIZZAZIONI FINANZIARIE ,1,account.data_account_type_view,view,TRUE +13,13,IMMOBILIZZAZIONI FINANZIARIE ,1,account.account_type_asset_view1,view,TRUE 1301,1301,mutui attivi ,13,account.data_account_type_asset,other,TRUE -14,14,RIMANENZE ,1,account.data_account_type_view,view,TRUE +14,14,RIMANENZE ,1,account.account_type_asset_view1,view,TRUE 1401,1401,materie di consumo ,14,account.data_account_type_asset,other,TRUE 1404,1404,merci ,14,account.data_account_type_asset,other,TRUE 1410,1410,fornitori c/acconti ,14,account.data_account_type_asset,other,TRUE -15,15,CREDITI COMMERCIALI ,1,account.data_account_type_view,view,TRUE +15,15,CREDITI COMMERCIALI ,1,account.account_type_asset_view1,view,TRUE 1501,1501,crediti v/clienti ,15,account.data_account_type_receivable,receivable,TRUE 1502,1502,crediti commerciali diversi ,15,account.data_account_type_asset,other,TRUE 1503,1503,clienti c/spese anticipate ,15,account.data_account_type_receivable,receivable,TRUE @@ -43,7 +43,7 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 1531,1531,crediti da liquidare ,15,account.data_account_type_asset,other,TRUE 1540,1540,fondo svalutazione crediti ,15,account.data_account_type_asset,other,TRUE 1541,1541,fondo rischi su crediti ,15,account.data_account_type_asset,other,TRUE -16,16,CREDITI DIVERSI ,1,account.data_account_type_view,view,TRUE +16,16,CREDITI DIVERSI ,1,account.account_type_asset_view1,view,TRUE 1601,1601,IVA n/credito ,16,account.data_account_type_asset,other,TRUE 1602,1602,IVA c/acconto ,16,account.data_account_type_asset,other,TRUE 1605,1605,crediti per IVA ,16,account.data_account_type_asset,other,TRUE @@ -54,30 +54,30 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 1620,1620,personale c/acconti ,16,account.data_account_type_asset,other,TRUE 1630,1630,crediti v/istituti previdenziali ,16,account.data_account_type_asset,other,TRUE 1640,1640,debitori diversi ,16,account.data_account_type_receivable,receivable,TRUE -18,18,DISPONIBILITÀ LIQUIDE ,1,account.data_account_type_view,view,TRUE +18,18,DISPONIBILITÀ LIQUIDE ,1,account.account_type_asset_view1,view,TRUE 1801,1801,banche c/c ,18,account.data_account_type_bank,liquidity,TRUE 1810,1810,c/c postali ,18,account.data_account_type_bank,liquidity,TRUE 1820,1820,denaro in cassa ,18,account.data_account_type_cash,liquidity,TRUE 1821,1821,assegni ,18,account.data_account_type_cash,liquidity,TRUE 1822,1822,valori bollati ,18,account.data_account_type_cash,liquidity,TRUE -19,19,RATEI E RISCONTI ATTIVI ,1,account.data_account_type_view,view,TRUE +19,19,RATEI E RISCONTI ATTIVI ,1,account.account_type_asset_view1,view,TRUE 1901,1901,ratei attivi ,19,account.data_account_type_asset,other,TRUE 1902,1902,risconti attivi ,19,account.data_account_type_asset,other,TRUE -2,2,PASSIVO ,0,account.data_account_type_view,view,TRUE -20,20,PATRIMONIO NETTO ,2,account.data_account_type_view,view,TRUE +2,2,PASSIVO ,0,account.account_type_liability_view1,view,TRUE +20,20,PATRIMONIO NETTO ,2,account.account_type_liability_view1,view,TRUE 2101,2101,patrimonio netto ,20,account.data_account_type_liability,other,TRUE 2102,2102,utile d'esercizio ,20,account.data_account_type_liability,other,TRUE 2103,2103,perdita d'esercizio ,20,account.data_account_type_liability,other,TRUE 2104,2104,prelevamenti extra gestione ,20,account.data_account_type_liability,other,TRUE 2105,2105,titolare c/ritenute subite ,20,account.data_account_type_liability,other,TRUE -22,22,FONDI PER RISCHI E ONERI ,2,account.data_account_type_view,view,TRUE +22,22,FONDI PER RISCHI E ONERI ,2,account.account_type_liability_view1,view,TRUE 2201,2201,fondo per imposte ,22,account.data_account_type_liability,other,TRUE 2204,2204,fondo responsabilità civile ,22,account.data_account_type_liability,other,TRUE 2205,2205,fondo spese future ,22,account.data_account_type_liability,other,TRUE 2211,2211,fondo manutenzioni programmate ,22,account.data_account_type_liability,other,TRUE -23,23,TRATTAMENTO FINE RAPPORTO DI LAVORO ,2,account.data_account_type_view,view,TRUE +23,23,TRATTAMENTO FINE RAPPORTO DI LAVORO ,2,account.account_type_liability_view1,view,TRUE 2301,2301,debiti per TFRL ,23,account.data_account_type_liability,other,TRUE -24,24,DEBITI FINANZIARI ,2,account.data_account_type_view,view,TRUE +24,24,DEBITI FINANZIARI ,2,account.account_type_liability_view1,view,TRUE 2410,2410,mutui passivi ,24,account.data_account_type_liability,other,TRUE 2411,2411,banche c/sovvenzioni ,24,account.data_account_type_liability,other,TRUE 2420,2420,banche c/c passivi ,24,account.data_account_type_liability,other,TRUE @@ -85,13 +85,13 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 2422,2422,banche c/cambiali all'incasso ,24,account.data_account_type_liability,other,TRUE 2423,2423,banche c/anticipi su fatture ,24,account.data_account_type_liability,other,TRUE 2440,2440,debiti v/altri finanziatori ,24,account.data_account_type_liability,other,TRUE -25,25,DEBITI COMMERCIALI ,2,account.data_account_type_view,view,TRUE +25,25,DEBITI COMMERCIALI ,2,account.account_type_liability_view1,view,TRUE 2501,2501,debiti v/fornitori ,25,account.data_account_type_payable,payable,TRUE 2503,2503,cambiali passive ,25,account.data_account_type_liability,other,TRUE 2520,2520,fatture da ricevere ,25,account.data_account_type_liability,other,TRUE 2521,2521,debiti da liquidare ,25,account.data_account_type_liability,other,TRUE 2530,2530,clienti c/acconti ,25,account.data_account_type_payable,payable,TRUE -26,26,DEBITI DIVERSI ,2,account.data_account_type_view,view,TRUE +26,26,DEBITI DIVERSI ,2,account.account_type_liability_view1,view,TRUE 2601,2601,IVA n/debito ,26,account.data_account_type_liability,other,TRUE 2602,2602,debiti per ritenute da versare ,26,account.data_account_type_payable,payable,TRUE 2605,2605,erario c/IVA ,26,account.data_account_type_payable,payable,TRUE @@ -102,10 +102,10 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 2622,2622,clienti c/cessione ,26,account.data_account_type_liability,other,TRUE 2630,2630,debiti v/istituti previdenziali ,26,account.data_account_type_liability,other,TRUE 2640,2640,creditori diversi ,26,account.data_account_type_payable,payable,TRUE -27,27,RATEI E RISCONTI PASSIVI ,2,account.data_account_type_view,view,TRUE +27,27,RATEI E RISCONTI PASSIVI ,2,account.account_type_liability_view1,view,TRUE 2701,2701,ratei passivi ,27,account.data_account_type_liability,other,TRUE 2702,2702,risconti passivi ,27,account.data_account_type_liability,other,TRUE -28,28,CONTI TRANSITORI E DIVERSI ,2,account.data_account_type_view,view,TRUE +28,28,CONTI TRANSITORI E DIVERSI ,2,account.account_type_liability_view1,view,TRUE 2801,2801,bilancio di apertura ,28,account.data_account_type_liability,other,TRUE 2802,2802,bilancio di chiusura ,28,account.data_account_type_liability,other,TRUE 2810,2810,IVA c/liquidazioni ,28,account.data_account_type_liability,other,TRUE @@ -113,7 +113,7 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 2820,2820,banca ... c/c ,28,account.data_account_type_liability,other,TRUE 2821,2821,banca ... c/c ,28,account.data_account_type_liability,other,TRUE 2822,2822,banca ... c/c ,28,account.data_account_type_liability,other,TRUE -29,29,CONTI DEI SISTEMI SUPPLEMENTARI ,2,account.data_account_type_view,view,TRUE +29,29,CONTI DEI SISTEMI SUPPLEMENTARI ,2,account.account_type_liability_view1,view,TRUE 2901,2901,beni di terzi ,29,account.data_account_type_liability,other,TRUE 2902,2902,depositanti beni ,29,account.data_account_type_liability,other,TRUE 2911,2911,merci da ricevere ,29,account.data_account_type_liability,other,TRUE @@ -128,22 +128,22 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 2927,2927,creditori per fideiussioni ,29,account.data_account_type_liability,other,TRUE 2931,2931,rischi per avalli ,29,account.data_account_type_liability,other,TRUE 2932,2932,creditori per avalli ,29,account.data_account_type_liability,other,TRUE -3,3,VALORE DELLA PRODUZIONE ,0,account.data_account_type_view,view,TRUE -31,31,VENDITE E PRESTAZIONI ,3,account.data_account_type_view,view,TRUE +3,3,VALORE DELLA PRODUZIONE ,0,account.account_type_income_view1,view,TRUE +31,31,VENDITE E PRESTAZIONI ,3,account.account_type_income_view1,view,TRUE 3101,3101,merci c/vendite ,31,account.data_account_type_income,other,TRUE 3103,3103,rimborsi spese di vendita ,31,account.data_account_type_income,other,TRUE 3110,3110,resi su vendite ,31,account.data_account_type_income,other,TRUE 3111,3111,ribassi e abbuoni passivi ,31,account.data_account_type_income,other,TRUE 3112,3112,premi su vendite ,31,account.data_account_type_income,other,TRUE -32,32,RICAVI E PROVENTI DIVERSI ,3,account.data_account_type_view,view,TRUE +32,32,RICAVI E PROVENTI DIVERSI ,3,account.account_type_income_view1,view,TRUE 3201,3201,fitti attivi ,32,account.data_account_type_income,other,TRUE 3202,3202,proventi vari ,32,account.data_account_type_income,other,TRUE 3210,3210,arrotondamenti attivi ,32,account.data_account_type_income,other,TRUE 3220,3220,plusvalenze ordinarie diverse ,32,account.data_account_type_income,other,TRUE 3230,3230,sopravvenienze attive ordinarie diverse ,32,account.data_account_type_income,other,TRUE 3240,3240,insussistenze attive ordinarie diverse ,32,account.data_account_type_income,other,TRUE -4,4,COSTI DELLA PRODUZIONE ,0,account.data_account_type_view,view,TRUE -41,41,COSTO DEL VENDUTO ,4,account.data_account_type_view,view,TRUE +4,4,COSTI DELLA PRODUZIONE ,0,account.account_type_expense_view1,view,TRUE +41,41,COSTO DEL VENDUTO ,4,account.account_type_expense_view1,view,TRUE 4101,4101,merci c/acquisti ,41,account.data_account_type_expense,other,TRUE 4102,4102,materie di consumo c/acquisti ,41,account.data_account_type_expense,other,TRUE 4105,4105,merci c/apporti ,41,account.data_account_type_expense,other,TRUE @@ -154,7 +154,7 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 4122,4122,materie di consumo c/esistenze iniziali ,41,account.data_account_type_expense,other,TRUE 4131,4131,merci c/rimanenze finali ,41,account.data_account_type_expense,other,TRUE 4132,4132,materie di consumo c/rimanenze finali ,41,account.data_account_type_expense,other,TRUE -42,42,COSTI PER SERVIZI ,4,account.data_account_type_view,view,TRUE +42,42,COSTI PER SERVIZI ,4,account.account_type_expense_view1,view,TRUE 4201,4201,costi di trasporto ,42,account.data_account_type_expense,other,TRUE 4202,4202,costi per energia ,42,account.data_account_type_expense,other,TRUE 4203,4203,costi di pubblicità ,42,account.data_account_type_expense,other,TRUE @@ -168,19 +168,19 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 4211,4211,costi di manutenzione e riparazione ,42,account.data_account_type_expense,other,TRUE 4212,4212,provvigioni passive ,42,account.data_account_type_expense,other,TRUE 4213,4213,spese di incasso ,42,account.data_account_type_expense,other,TRUE -43,43,COSTI PER GODIMENTO BENI DI TERZI ,4,account.data_account_type_view,view,TRUE +43,43,COSTI PER GODIMENTO BENI DI TERZI ,4,account.account_type_expense_view1,view,TRUE 4301,4301,fitti passivi ,43,account.data_account_type_expense,other,TRUE 4302,4302,canoni di leasing ,43,account.data_account_type_expense,other,TRUE -44,44,COSTI PER IL PERSONALE ,4,account.data_account_type_view,view,TRUE +44,44,COSTI PER IL PERSONALE ,4,account.account_type_expense_view1,view,TRUE 4401,4401,salari e stipendi ,44,account.data_account_type_expense,other,TRUE 4402,4402,oneri sociali ,44,account.data_account_type_expense,other,TRUE 4403,4403,TFRL ,44,account.data_account_type_expense,other,TRUE 4404,4404,altri costi per il personale ,44,account.data_account_type_expense,other,TRUE -45,45,AMMORTAMENTI IMMOBILIZZAZIONI IMMATERIALI ,4,account.data_account_type_view,view,TRUE +45,45,AMMORTAMENTI IMMOBILIZZAZIONI IMMATERIALI ,4,account.account_type_expense_view1,view,TRUE 4501,4501,ammortamento costi di impianto ,45,account.data_account_type_expense,other,TRUE 4506,4506,ammortamento software ,45,account.data_account_type_expense,other,TRUE 4508,4508,ammortamento avviamento ,45,account.data_account_type_expense,other,TRUE -46,46,AMMORTAMENTI IMMOBILIZZAZIONI MATERIALI ,4,account.data_account_type_view,view,TRUE +46,46,AMMORTAMENTI IMMOBILIZZAZIONI MATERIALI ,4,account.account_type_expense_view1,view,TRUE 4601,4601,ammortamento fabbricati ,46,account.data_account_type_expense,other,TRUE 4602,4602,ammortamento impianti e macchinari ,46,account.data_account_type_expense,other,TRUE 4604,4604,ammortamento attrezzature commerciali ,46,account.data_account_type_expense,other,TRUE @@ -188,17 +188,17 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 4606,4606,ammortamento arredamento ,46,account.data_account_type_expense,other,TRUE 4607,4607,ammortamento automezzi ,46,account.data_account_type_expense,other,TRUE 4608,4608,ammortamento imballaggi durevoli ,46,account.data_account_type_expense,other,TRUE -47,47,SVALUTAZIONI ,4,account.data_account_type_view,view,TRUE +47,47,SVALUTAZIONI ,4,account.account_type_expense_view1,view,TRUE 4701,4701,svalutazioni immobilizzazioni immateriali ,47,account.data_account_type_expense,other,TRUE 4702,4702,svalutazioni immobilizzazioni materiali ,47,account.data_account_type_expense,other,TRUE 4706,4706,svalutazione crediti ,47,account.data_account_type_expense,other,TRUE -48,48,ACCANTONAMENTI ,4,account.data_account_type_view,view,TRUE -481,481,ACCANTONAMENTI PER RISCHI ,48,account.data_account_type_view,view,TRUE +48,48,ACCANTONAMENTI ,4,account.account_type_expense_view1,view,TRUE +481,481,ACCANTONAMENTI PER RISCHI ,48,account.account_type_expense_view1,view,TRUE 4814,4814,accantonamento per responsabilità civile ,481,account.data_account_type_expense,other,TRUE -482,482,ALTRI ACCANTONAMENTI ,48,account.data_account_type_view,view,TRUE +482,482,ALTRI ACCANTONAMENTI ,48,account.account_type_expense_view1,view,TRUE 4821,4821,accantonamento per spese future ,482,account.data_account_type_expense,other,TRUE 4823,4823,accantonamento per manutenzioni programmate ,482,account.data_account_type_expense,other,TRUE -49,49,ONERI DIVERSI ,4,account.data_account_type_view,view,TRUE +49,49,ONERI DIVERSI ,4,account.account_type_expense_view1,view,TRUE 4901,4901,oneri fiscali diversi ,49,account.data_account_type_expense,other,TRUE 4903,4903,oneri vari ,49,account.data_account_type_expense,other,TRUE 4905,4905,perdite su crediti ,49,account.data_account_type_expense,other,TRUE @@ -206,30 +206,30 @@ id,code,name,parent_id:id,user_type:id,type,reconcile 4920,4920,minusvalenze ordinarie diverse ,49,account.data_account_type_expense,other,TRUE 4930,4930,sopravvenienze passive ordinarie diverse ,49,account.data_account_type_expense,other,TRUE 4940,4940,insussistenze passive ordinarie diverse ,49,account.data_account_type_expense,other,TRUE -5,5,PROVENTI E ONERI FINANZIARI ,0,account.data_account_type_view,view,TRUE -51,51,PROVENTI FINANZIARI ,5,account.data_account_type_view,view,TRUE +5,5,PROVENTI E ONERI FINANZIARI ,0,account.account_type_income_view1,view,TRUE +51,51,PROVENTI FINANZIARI ,5,account.account_type_income_view1,view,TRUE 5110,5110,interessi attivi v/clienti ,51,account.data_account_type_income,other,TRUE 5115,5115,interessi attivi bancari ,51,account.data_account_type_income,other,TRUE 5116,5116,interessi attivi postali ,51,account.data_account_type_income,other,TRUE 5140,5140,proventi finanziari diversi ,51,account.data_account_type_income,other,TRUE -52,52,ONERI FINANZIARI ,5,account.data_account_type_view,view,TRUE +52,52,ONERI FINANZIARI ,5,account.account_type_expense_view1,view,TRUE 5201,5201,interessi passivi v/fornitori ,52,account.data_account_type_expense,other,TRUE 5202,5202,interessi passivi bancari ,52,account.data_account_type_expense,other,TRUE 5203,5203,sconti passivi bancari ,52,account.data_account_type_expense,other,TRUE 5210,5210,interessi passivi su mutui ,52,account.data_account_type_expense,other,TRUE 5240,5240,oneri finanziari diversi ,52,account.data_account_type_expense,other,TRUE -7,7,PROVENTI E ONERI STRAORDINARI ,0,account.data_account_type_view,view,TRUE -71,71,PROVENTI STRAORDINARI ,7,account.data_account_type_view,view,TRUE +7,7,PROVENTI E ONERI STRAORDINARI ,0,account.account_type_income_view1,view,TRUE +71,71,PROVENTI STRAORDINARI ,7,account.account_type_income_view1,view,TRUE 7101,7101,plusvalenze straordinarie ,71,account.data_account_type_income,other,TRUE 7102,7102,sopravvenienze attive straordinarie ,71,account.data_account_type_income,other,TRUE 7103,7103,insussistenze attive straordinarie ,71,account.data_account_type_income,other,TRUE -72,72,ONERI STRAORDINARI ,7,account.data_account_type_view,view,TRUE +72,72,ONERI STRAORDINARI ,7,account.account_type_expense_view1,view,TRUE 7201,7201,minusvalenze straordinarie ,72,account.data_account_type_expense,other,TRUE 7202,7202,sopravvenienze passive straordinarie ,72,account.data_account_type_expense,other,TRUE 7203,7203,insussistenze passive straordinarie ,72,account.data_account_type_expense,other,TRUE 7204,7204,imposte esercizi precedenti ,72,account.data_account_type_expense,other,TRUE -8,8,IMPOSTE DELL'ESERCIZIO ,0,account.data_account_type_view,view,TRUE +8,8,IMPOSTE DELL'ESERCIZIO ,0,account.account_type_expense_view1,view,TRUE 8101,8101,imposte dell'esercizio ,8,account.data_account_type_expense,other,TRUE -9,9,CONTI DI RISULTATO ,0,account.data_account_type_view,view,TRUE +9,9,CONTI DI RISULTATO ,0,account.account_type_expense_view1,view,TRUE 9101,9101,conto di risultato economico ,9,account.data_account_type_expense,other,TRUE 9102,9102,stato patrimoniale,9,account.data_account_type_expense,other,TRUE diff --git a/addons/point_of_sale/report/pos_order_report_view.xml b/addons/point_of_sale/report/pos_order_report_view.xml index 21eaafb28c6..950a258144a 100644 --- a/addons/point_of_sale/report/pos_order_report_view.xml +++ b/addons/point_of_sale/report/pos_order_report_view.xml @@ -39,8 +39,8 @@ - - + + diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml index 7e36d48d7ac..3604dfdbca3 100644 --- a/addons/sale/report/sale_report_view.xml +++ b/addons/sale/report/sale_report_view.xml @@ -60,14 +60,14 @@ - + - + diff --git a/addons/stock/stock.py b/addons/stock/stock.py index e7090617adc..90d7b136d50 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2628,12 +2628,15 @@ class stock_move(osv.osv): 'product_uos_qty': uos_qty, 'procure_method': 'make_to_stock', 'restrict_lot_id': restrict_lot_id, - 'restrict_partner_id': restrict_partner_id, 'split_from': move.id, 'procurement_id': move.procurement_id.id, 'move_dest_id': move.move_dest_id.id, 'origin_returned_move_id': move.origin_returned_move_id.id, } + + if restrict_partner_id: + defaults['restrict_partner_id'] = restrict_partner_id + if context.get('source_location_id'): defaults['location_id'] = context['source_location_id'] new_move = self.copy(cr, uid, move.id, defaults, context=context) diff --git a/addons/stock_landed_costs/stock_landed_costs.py b/addons/stock_landed_costs/stock_landed_costs.py index 9a925745d53..f722bd72800 100644 --- a/addons/stock_landed_costs/stock_landed_costs.py +++ b/addons/stock_landed_costs/stock_landed_costs.py @@ -202,13 +202,13 @@ class stock_landed_cost(osv.osv): if not cost.valuation_adjustment_lines or not self._check_sum(cr, uid, cost, context=context): raise UserError(_('You cannot validate a landed cost which has no valid valuation lines.')) move_id = self._create_account_move(cr, uid, cost, context=context) - quant_dict = {} for line in cost.valuation_adjustment_lines: if not line.move_id: continue per_unit = line.final_cost / line.quantity diff = per_unit - line.former_cost_per_unit quants = [quant for quant in line.move_id.quant_ids] + quant_dict = {} for quant in quants: if quant.id not in quant_dict: quant_dict[quant.id] = quant.cost + diff diff --git a/addons/stock_landed_costs/stock_landed_costs_view.xml b/addons/stock_landed_costs/stock_landed_costs_view.xml index f4bf4664f75..876076f43c7 100644 --- a/addons/stock_landed_costs/stock_landed_costs_view.xml +++ b/addons/stock_landed_costs/stock_landed_costs_view.xml @@ -189,7 +189,7 @@ - + diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 47851d40c25..5764d0d708d 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -33,7 +33,6 @@ import openerp import openerp.modules.registry from openerp.addons.base.ir.ir_qweb import AssetsBundle, QWebTemplateNotFound from openerp.modules import get_module_resource -from openerp.service import model as service_model from openerp.tools import topological_sort from openerp.tools.translate import _ from openerp.tools import ustr @@ -954,10 +953,7 @@ class DataSet(http.Controller): if method.startswith('_'): raise AccessError(_("Underscore prefixed methods cannot be remotely called")) - @service_model.check - def checked_call(__dbname, *args, **kwargs): - return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) - return checked_call(request.db, *args, **kwargs) + return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) @http.route('/web/dataset/call', type='json', auth="user") def call(self, model, method, args, domain_id=None, context_id=None): diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index c5cd6a87ab5..c00cedc620b 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -902,7 +902,7 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({ unlink: function(ids, callback, error_callback) { var self = this; _.each(ids, function(id) { - if (! _.detect(self.to_create, function(x) { return x.id === id; })) { + if (! _.detect(self.to_create, function(x) { return x.id === id; }) && _.detect(self.cache, function(x) { return x.id === id; })) { self.to_delete.push({id: id}); } }); diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py index ace3bbb9f2b..847aaf3ae91 100644 --- a/addons/website_quote/controllers/main.py +++ b/addons/website_quote/controllers/main.py @@ -100,6 +100,8 @@ class sale_quote(http.Controller): return request.website.render('website.404') if order.require_payment: return request.website.render('website.404') + if order.state != 'sent': + return False attachments=sign and [('signature.png', sign.decode('base64'))] or [] order_obj.action_button_confirm(request.cr, SUPERUSER_ID, [order_id], context=request.context) message = _('Order signed by %s') % (signer,) @@ -112,6 +114,8 @@ class sale_quote(http.Controller): order = order_obj.browse(request.cr, SUPERUSER_ID, order_id) if token != order.access_token: return request.website.render('website.404') + if order.state != 'sent': + return werkzeug.utils.redirect("/quote/%s/%s?message=4" % (order_id, token)) request.registry.get('sale.order').action_cancel(request.cr, SUPERUSER_ID, [order_id]) message = post.get('decline_message') if message: diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js index 89dd5acbc4a..e1d7a00ea3e 100644 --- a/addons/website_quote/static/src/js/website_quotation.js +++ b/addons/website_quote/static/src/js/website_quotation.js @@ -59,6 +59,7 @@ submitForm: function(ev){ // extract data var self = this; + var $confirm_btn = self.$el.find('button[type="submit"]'); var href = self.$el.find('form').attr("action"); var action = href.match(/quote\/([a-z]+)/); var order_id = href.match(/quote\/[a-z]+\/([0-9]+)/); @@ -78,6 +79,8 @@ if (is_empty || ! signer_name){ return false; } + $confirm_btn.prepend(' '); + $confirm_btn.attr('disabled', true); openerp.jsonRpc("/quote/"+action[1], 'call', { 'order_id': parseInt(order_id[1]), 'token': token, @@ -85,7 +88,8 @@ 'sign': signature?JSON.stringify(signature[1]):false, }).then(function (data) { self.$el.modal('hide'); - window.location.href = '/quote/'+order_id[1]+'/'+token+'?message=3'; + var message_id = (data) ? 3 : 4; + window.location.href = '/quote/'+order_id[1]+'/'+token+'?message='+message_id; }); return false; } diff --git a/addons/website_quote/views/website_quotation.xml b/addons/website_quote/views/website_quotation.xml index 85ba2a73034..6a31af2cb74 100644 --- a/addons/website_quote/views/website_quotation.xml +++ b/addons/website_quote/views/website_quotation.xml @@ -271,6 +271,14 @@ Your transaction is waiting confirmation. +
+ + This order has already been + cancelled + validated + ! You can contact us for + any question. +