diff --git a/addons/account/account.py b/addons/account/account.py index c1a30967aea..910f4b4c6ff 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1079,7 +1079,7 @@ class account_period(osv.osv): def build_ctx_periods(self, cr, uid, period_from_id, period_to_id): if period_from_id == period_to_id: - return period_from_id + return [period_from_id] period_from = self.browse(cr, uid, period_from_id) period_date_start = period_from.date_start company1_id = period_from.company_id.id diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py index 5a84dee53de..cbc5a966f79 100644 --- a/addons/account/account_bank.py +++ b/addons/account/account_bank.py @@ -55,7 +55,7 @@ class bank(osv.osv): # Find the code and parent of the bank account to create dig = 6 current_num = 1 - ids = obj_acc.search(cr, uid, [('type','=','liquidity')], context=context) + ids = obj_acc.search(cr, uid, [('type','=','liquidity'), ('company_id', '=', bank.company_id.id)], context=context) # No liquidity account exists, no template available if not ids: continue diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py index 50c5d4adbae..79cfa7236b6 100644 --- a/addons/account/wizard/account_report_common.py +++ b/addons/account/wizard/account_report_common.py @@ -123,6 +123,7 @@ class account_common_report(osv.osv_memory): _defaults = { 'fiscalyear_id': _get_fiscalyear, + 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.common.report',context=c), 'journal_ids': _get_all_journal, 'filter': 'filter_no', 'chart_account_id': _get_account, diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 249fea89e0e..50ebd96a3c2 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -24,6 +24,7 @@ from tools.translate import _ from datetime import datetime from datetime import timedelta from tools.safe_eval import safe_eval +from tools import ustr import pooler import re import time @@ -369,8 +370,8 @@ the rule to mark CC(mail to any other person defined in actions)."), reg_name = action.regex_name result_name = True if reg_name: - ptrn = re.compile(str(reg_name)) - _result = ptrn.search(str(obj.name)) + ptrn = re.compile(ustr(reg_name)) + _result = ptrn.search(ustr(obj.name)) if not _result: result_name = False regex_n = not reg_name or result_name diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 814b9587753..1545c6c920c 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1618,20 +1618,13 @@ class ir_attachment(osv.osv): _inherit = 'ir.attachment' def search_count(self, cr, user, args, context=None): - """ - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param user: the current user’s ID for security checks, - @param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...]. - @param context: A standard dictionary for contextual values - """ - - args1 = [] - for arg in args: - args1.append(map(lambda x:str(x).split('-')[0], arg)) - return super(ir_attachment, self).search_count(cr, user, args1, context) - - + new_args = [] + for domain_item in args: + if isinstance(domain_item, (list, tuple)) and len(domain_item) == 3 and domain_item[0] == 'res_id': + new_args.append((domain_item[0], domain_item[1], base_calendar_id2real_id(domain_item[2]))) + else: + new_args.append(domain_item) + return super(ir_attachment, self).search_count(cr, user, new_args, context) def create(self, cr, uid, vals, context=None): if context: @@ -1641,21 +1634,12 @@ class ir_attachment(osv.osv): def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): - """ - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...]. - @param offset: The Number of Results to pass, - @param limit: The Number of Results to Return, - @param context: A standard dictionary for contextual values - """ - - new_args = args - for i, arg in enumerate(new_args): - if arg[0] == 'res_id': - new_args[i] = (arg[0], arg[1], base_calendar_id2real_id(arg[2])) - + new_args = [] + for domain_item in args: + if isinstance(domain_item, (list, tuple)) and len(domain_item) == 3 and domain_item[0] == 'res_id': + new_args.append((domain_item[0], domain_item[1], base_calendar_id2real_id(domain_item[2]))) + else: + new_args.append(domain_item) return super(ir_attachment, self).search(cr, uid, new_args, offset=offset, limit=limit, order=order, context=context, count=False) ir_attachment() diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 4ebb0b4796d..85aa78b0ef6 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -488,8 +488,8 @@ class crm_case(crm_base): dest = case.user_id.user_email or "" body = case.description or "" for message in case.message_ids: - if message.email_from: - body = message.description + if message.email_from and message.body_text: + body = message.body_text break if not destination: @@ -516,7 +516,7 @@ class crm_case(crm_base): [dest], subject, body, - model='crm.case', + model=self._name, reply_to=case.section_id.reply_to, res_id=case.id, attachments=attach_to_send, diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py index 3947eb58156..ec489ff4d14 100644 --- a/addons/crm/crm_action_rule.py +++ b/addons/crm/crm_action_rule.py @@ -23,6 +23,7 @@ import re import tools from tools.translate import _ +from tools import ustr from osv import fields from osv import osv @@ -59,7 +60,7 @@ class base_action_rule(osv.osv): reply_to = emailfrom if not emailfrom: raise osv.except_osv(_('Error!'), _("No E-Mail Found for your Company address!")) - return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model='base.action.rule', reply_to=reply_to, res_id=obj.id) + return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model=obj._name, reply_to=reply_to, res_id=obj.id) def do_check(self, cr, uid, action, obj, context=None): ok = super(base_action_rule, self).do_check(cr, uid, action, obj, context=context) @@ -73,9 +74,9 @@ class base_action_rule(osv.osv): regex = action.regex_history if regex: res = False - ptrn = re.compile(str(regex)) + ptrn = re.compile(ustr(regex)) for history in obj.message_ids: - _result = ptrn.search(str(history.name)) + _result = ptrn.search(ustr(history.subject)) if _result: res = True break @@ -90,7 +91,6 @@ class base_action_rule(osv.osv): return ok def do_action(self, cr, uid, action, model_obj, obj, context=None): - res = super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context) write = {} if hasattr(action, 'act_section_id') and action.act_section_id: obj.section_id = action.act_section_id diff --git a/addons/crm/wizard/mail_compose_message.py b/addons/crm/wizard/mail_compose_message.py index 512d9ece77a..b82c3083f3a 100644 --- a/addons/crm/wizard/mail_compose_message.py +++ b/addons/crm/wizard/mail_compose_message.py @@ -50,7 +50,7 @@ class mail_compose_message(osv.osv_memory): 'subject' : data.name or False, 'email_to' : data.email_from or False, 'email_from' : user.user_email or tools.config.get('email_from', False), - 'body_text' : '\n' + tools.ustr(user.signature), + 'body_text' : '\n' + tools.ustr(user.signature or ''), 'email_cc' : tools.ustr(data.email_cc or ''), 'model': model, 'res_id': res_id, diff --git a/addons/crm_partner_assign/partner_geo_assign.py b/addons/crm_partner_assign/partner_geo_assign.py index f522cc63d7a..903a3f533c1 100644 --- a/addons/crm_partner_assign/partner_geo_assign.py +++ b/addons/crm_partner_assign/partner_geo_assign.py @@ -42,7 +42,16 @@ def geo_find(addr): if not result: return None return float(result.group(2)),float(result.group(1)) - + +def geo_query_address(street=None, zip=None, city=None, state=None, country=None): + if country and ',' in country and (country.endswith(' of') or country.endswith(' of the')): + # put country qualifier in front, otherwise GMap gives wrong results, + # e.g. 'Congo, Democratic Republic of the' => 'Democratic Republic of the Congo' + country = '{1} {0}'.format(*country.split(',',1)) + return tools.ustr(', '.join(filter(None, [street, + ("%s %s" % (zip or '', city or '')).strip(), + state, + country]))) class res_partner_grade(osv.osv): _order = 'sequence' @@ -88,16 +97,16 @@ class res_partner(osv.osv): 'partner_weight': lambda *args: 0 } def geo_localize(self, cr, uid, ids, context=None): - for partner in self.browse(cr, uid, ids, context=context): + # Don't pass context to browse()! We need country names in english below + for partner in self.browse(cr, uid, ids): if not partner.address: continue contact = partner.address[0] #TOFIX: should be get latitude and longitude for default contact? - addr = ', '.join(filter(None, [ - contact.street, - "%s %s" % (contact.zip , contact.city), - contact.state_id and contact.state_id.name, - contact.country_id and contact.country_id.name])) - result = geo_find(tools.ustr(addr)) + result = geo_find(geo_query_address(street=contact.street, + zip=contact.zip, + city=contact.city, + state=contact.state_id.name, + country=contact.country_id.name)) if result: self.write(cr, uid, [partner.id], { 'partner_latitude': result[0], @@ -154,18 +163,16 @@ class crm_lead(osv.osv): self.write(cr, uid, [lead.id], {'date_assign': fields.date.context_today(self,cr,uid,context=context), 'partner_assigned_id': partner_id}, context=context) return res - def assign_geo_localize(self, cr, uid, ids, latitude=False, longitude=False, context=None): - for lead in self.browse(cr, uid, ids, context=context): + # Don't pass context to browse()! We need country name in english below + for lead in self.browse(cr, uid, ids): if not lead.country_id: continue - addr = ', '.join(filter(None, [ - lead.street, - "%s %s" % (lead.zip, lead.city), - lead.state_id and lead.state_id.name or '', - lead.country_id and lead.country_id.name or '' - ])) - result = geo_find(tools.ustr(addr)) + result = geo_find(geo_query_address(street=lead.street, + zip=lead.zip, + city=lead.city, + state=lead.state_id.name, + country=lead.country_id.name)) if not latitude and result: latitude = result[0] if not longitude and result: @@ -175,7 +182,7 @@ class crm_lead(osv.osv): 'partner_longitude': longitude }, context=context) return True - + def search_geo_partner(self, cr, uid, ids, context=None): res_partner = self.pool.get('res.partner') res_partner_ids = {} @@ -204,6 +211,14 @@ class crm_lead(osv.osv): ('country', '=', lead.country_id.id), ], context=context) + # 3. third way: in the same country, extra large area + if not partner_ids: + partner_ids = res_partner.search(cr, uid, [ + ('partner_weight','>', 0), + ('partner_latitude','>', latitude - 8), ('partner_latitude','<', latitude + 8), + ('partner_longitude','>', longitude - 8), ('partner_longitude','<', longitude + 8), + ('country', '=', lead.country_id.id), + ], context=context) # 5. fifth way: anywhere in same country if not partner_ids: diff --git a/addons/edi/static/src/css/edi.css b/addons/edi/static/src/css/edi.css index 478985ee585..1601151ae1f 100644 --- a/addons/edi/static/src/css/edi.css +++ b/addons/edi/static/src/css/edi.css @@ -146,6 +146,14 @@ table.oe_edi_data, .oe_edi_doc_title { font-style: italic; font-size: 95%; padding-left: 10px; + + /* prevent wide notes from disrupting layout due to
 styling */
+    white-space: pre-line;
+    width: 90%;
+}
+.oe_edi_data_row .oe_edi_inner_note {
+    /* prevent wide notes from disrupting layout due to 
 styling */
+    width: 25em;
 }
 .oe_edi_shade {
     background: #e8e8e8;
diff --git a/addons/edi/static/src/xml/edi.xml b/addons/edi/static/src/xml/edi.xml
index 1f27c49ccdd..b9b385e9a07 100644
--- a/addons/edi/static/src/xml/edi.xml
+++ b/addons/edi/static/src/xml/edi.xml
@@ -11,7 +11,7 @@
         
             
+ t-att-style="'background-size: 180px 46px; background: url('+ (doc.company_address ? '/edi/binary?db='+widget.db+'&token='+widget.token : '/web/static/src/img/logo.png')+')'"/>
diff --git a/addons/edi/static/src/xml/edi_account.xml b/addons/edi/static/src/xml/edi_account.xml index dc6fb7f9754..3ce1daebf93 100644 --- a/addons/edi/static/src/xml/edi_account.xml +++ b/addons/edi/static/src/xml/edi_account.xml @@ -39,9 +39,9 @@ Your Reference - - - + + +

diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index 6c1571c5630..acd1aed24de 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -145,7 +145,7 @@ class email_template(osv.osv): help="Optional preferred server for outgoing mails. If not set, the highest " "priority one will be used."), 'body_text': fields.text('Text contents', translate=True, help="Plaintext version of the message (placeholders may be used here)"), - 'body_html': fields.text('Rich-text contents', help="Rich-text/HTML version of the message (placeholders may be used here)"), + 'body_html': fields.text('Rich-text contents', translate=True, help="Rich-text/HTML version of the message (placeholders may be used here)"), 'message_id': fields.char('Message-Id', size=256, help="Message-ID SMTP header to use in outgoing messages based on this template. " "Please note that this overrides the 'Resource Tracking' option, " "so if you simply need to track replies to outgoing emails, enable " @@ -338,7 +338,7 @@ class email_template(osv.osv): attachments = {} # Add report as a Document if template.report_template: - report_name = template.report_name + report_name = self.render_template(cr, uid, template.report_name, template.model, res_id, context=context) report_service = 'report.' + report_xml_pool.browse(cr, uid, template.report_template.id, context).report_name # Ensure report is rendered using template's language ctx = context.copy() @@ -374,6 +374,7 @@ class email_template(osv.osv): was executed for this message only. :returns: id of the mail.message that was created """ + if context is None: context = {} mail_message = self.pool.get('mail.message') ir_attachment = self.pool.get('ir.attachment') values = self.generate_email(cr, uid, template_id, res_id, context=context) @@ -390,9 +391,10 @@ class email_template(osv.osv): 'res_model': mail_message._name, 'res_id': msg_id, } - if context.has_key('default_type'): - del context['default_type'] + context.pop('default_type', None) attachment_ids.append(ir_attachment.create(cr, uid, attachment_data, context=context)) + if attachment_ids: + mail_message.write(cr, uid, msg_id, {'attachment_ids': [(6, 0, attachment_ids)]}, context=context) if force_send: mail_message.send(cr, uid, [msg_id], context=context) return msg_id diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index 22d4d6e567d..acf7dea727a 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -50,7 +50,7 @@ hr.holidays calendar - + diff --git a/addons/l10n_it/__openerp__.py b/addons/l10n_it/__openerp__.py index edc453f8ba0..96f3b3510ff 100644 --- a/addons/l10n_it/__openerp__.py +++ b/addons/l10n_it/__openerp__.py @@ -9,7 +9,7 @@ # Domsense srl # Albatos srl # -# Copyright (C) 2011 +# Copyright (C) 2011-2012 # Associazione OpenERP Italia () # # This program is free software: you can redistribute it and/or modify @@ -44,7 +44,6 @@ Italian accounting chart and localization. 'init_xml': [ ], 'update_xml': [ - 'data/account.account.type.csv', 'data/account.account.template.csv', 'data/account.tax.code.template.csv', 'account_chart.xml', diff --git a/addons/l10n_it/data/account.account.template.csv b/addons/l10n_it/data/account.account.template.csv index 47ae1388233..b06a3fe8574 100644 --- a/addons/l10n_it/data/account.account.template.csv +++ b/addons/l10n_it/data/account.account.template.csv @@ -1,235 +1,235 @@ id,code,name,parent_id:id,user_type:id,type,reconcile -0,0,Azienda,,account_type_view,view,FALSE -1,1,ATTIVO ,0,account_type_view,view,TRUE -11,11,IMMOBILIZZAZIONI IMMATERIALI ,1,account_type_view,view,TRUE -1101,1101,costi di impianto ,11,account_type_asset,other,TRUE -1106,1106,software ,11,account_type_asset,other,TRUE -1108,1108,avviamento ,11,account_type_asset,other,TRUE -1111,1111,fondo ammortamento costi di impianto ,11,account_type_asset,other,TRUE -1116,1116,fondo ammortamento software ,11,account_type_asset,other,TRUE -1118,1118,fondo ammortamento avviamento ,11,account_type_asset,other,TRUE -12,12,IMMOBILIZZAZIONI MATERIALI ,1,account_type_view,view,TRUE -1201,1201,fabbricati ,12,account_type_asset,other,TRUE -1202,1202,impianti e macchinari ,12,account_type_asset,other,TRUE -1204,1204,attrezzature commerciali ,12,account_type_asset,other,TRUE -1205,1205,macchine d'ufficio ,12,account_type_asset,other,TRUE -1206,1206,arredamento ,12,account_type_asset,other,TRUE -1207,1207,automezzi ,12,account_type_asset,other,TRUE -1208,1208,imballaggi durevoli ,12,account_type_asset,other,TRUE -1211,1211,fondo ammortamento fabbricati ,12,account_type_asset,other,TRUE -1212,1212,fondo ammortamento impianti e macchinari ,12,account_type_asset,other,TRUE -1214,1214,fondo ammortamento attrezzature commerciali ,12,account_type_asset,other,TRUE -1215,1215,fondo ammortamento macchine d'ufficio ,12,account_type_asset,other,TRUE -1216,1216,fondo ammortamento arredamento ,12,account_type_asset,other,TRUE -1217,1217,fondo ammortamento automezzi ,12,account_type_asset,other,TRUE -1218,1218,fondo ammortamento imballaggi durevoli ,12,account_type_asset,other,TRUE -1220,1220,fornitori immobilizzazioni c/acconti ,12,account_type_asset,other,TRUE -13,13,IMMOBILIZZAZIONI FINANZIARIE ,1,account_type_view,view,TRUE -1301,1301,mutui attivi ,13,account_type_asset,other,TRUE -14,14,RIMANENZE ,1,account_type_view,view,TRUE -1401,1401,materie di consumo ,14,account_type_asset,other,TRUE -1404,1404,merci ,14,account_type_asset,other,TRUE -1410,1410,fornitori c/acconti ,14,account_type_asset,other,TRUE -15,15,CREDITI COMMERCIALI ,1,account_type_view,view,TRUE -1501,1501,crediti v/clienti ,15,account_type_receivable,receivable,TRUE -1502,1502,crediti commerciali diversi ,15,account_type_receivable,other,TRUE -1503,1503,clienti c/spese anticipate ,15,account_type_receivable,receivable,TRUE -1505,1505,cambiali attive ,15,account_type_receivable,other,TRUE -1506,1506,cambiali allo sconto ,15,account_type_receivable,other,TRUE -1507,1507,cambiali all'incasso ,15,account_type_receivable,other,TRUE -1509,1509,fatture da emettere ,15,account_type_receivable,other,TRUE -1510,1510,crediti insoluti ,15,account_type_receivable,other,TRUE -1511,1511,cambiali insolute ,15,account_type_receivable,other,TRUE -1531,1531,crediti da liquidare ,15,account_type_receivable,other,TRUE -1540,1540,fondo svalutazione crediti ,15,account_type_receivable,other,TRUE -1541,1541,fondo rischi su crediti ,15,account_type_receivable,other,TRUE -16,16,CREDITI DIVERSI ,1,account_type_view,view,TRUE -1601,1601,IVA n/credito ,16,account_type_tax,other,TRUE -1602,1602,IVA c/acconto ,16,account_type_tax,other,TRUE -1605,1605,crediti per IVA ,16,account_type_tax,other,TRUE -1607,1607,imposte c/acconto ,16,account_type_tax,other,TRUE -1608,1608,crediti per imposte ,16,account_type_tax,other,TRUE -1609,1609,crediti per ritenute subite ,16,account_type_asset,other,TRUE -1610,1610,crediti per cauzioni ,16,account_type_asset,other,TRUE -1620,1620,personale c/acconti ,16,account_type_asset,other,TRUE -1630,1630,crediti v/istituti previdenziali ,16,account_type_asset,other,TRUE -1640,1640,debitori diversi ,16,account_type_receivable,receivable,TRUE -18,18,DISPONIBILITÀ LIQUIDE ,1,account_type_view,view,TRUE -1801,1801,banche c/c ,18,account_type_bank,liquidity,TRUE -1810,1810,c/c postali ,18,account_type_cash,liquidity,TRUE -1820,1820,denaro in cassa ,18,account_type_cash,liquidity,TRUE -1821,1821,assegni ,18,account_type_cash,liquidity,TRUE -1822,1822,valori bollati ,18,account_type_cash,liquidity,TRUE -19,19,RATEI E RISCONTI ATTIVI ,1,account_type_view,view,TRUE -1901,1901,ratei attivi ,19,account_type_asset,other,TRUE -1902,1902,risconti attivi ,19,account_type_asset,other,TRUE -2,2,PASSIVO ,0,account_type_view,view,TRUE -20,20,PATRIMONIO NETTO ,2,account_type_view,view,TRUE -2101,2101,patrimonio netto ,20,account_type_asset,other,TRUE -2102,2102,utile d'esercizio ,20,account_type_asset,other,TRUE -2103,2103,perdita d'esercizio ,20,account_type_asset,other,TRUE -2104,2104,prelevamenti extra gestione ,20,account_type_asset,other,TRUE -2105,2105,titolare c/ritenute subite ,20,account_type_asset,other,TRUE -22,22,FONDI PER RISCHI E ONERI ,2,account_type_view,view,TRUE -2201,2201,fondo per imposte ,22,account_type_asset,other,TRUE -2204,2204,fondo responsabilità civile ,22,account_type_asset,other,TRUE -2205,2205,fondo spese future ,22,account_type_asset,other,TRUE -2211,2211,fondo manutenzioni programmate ,22,account_type_asset,other,TRUE -23,23,TRATTAMENTO FINE RAPPORTO DI LAVORO ,2,account_type_view,view,TRUE -2301,2301,debiti per TFRL ,23,account_type_asset,other,TRUE -24,24,DEBITI FINANZIARI ,2,account_type_view,view,TRUE -2410,2410,mutui passivi ,24,account_type_asset,other,TRUE -2411,2411,banche c/sovvenzioni ,24,account_type_asset,other,TRUE -2420,2420,banche c/c passivi ,24,account_type_asset,other,TRUE -2421,2421,banche c/RIBA all'incasso ,24,account_type_asset,other,TRUE -2422,2422,banche c/cambiali all'incasso ,24,account_type_asset,other,TRUE -2423,2423,banche c/anticipi su fatture ,24,account_type_asset,other,TRUE -2440,2440,debiti v/altri finanziatori ,24,account_type_asset,other,TRUE -25,25,DEBITI COMMERCIALI ,2,account_type_view,view,TRUE -2501,2501,debiti v/fornitori ,25,account_type_payable,payable,TRUE -2503,2503,cambiali passive ,25,account_type_asset,other,TRUE -2520,2520,fatture da ricevere ,25,account_type_asset,other,TRUE -2521,2521,debiti da liquidare ,25,account_type_asset,other,TRUE -2530,2530,clienti c/acconti ,25,account_type_payable,payable,TRUE -26,26,DEBITI DIVERSI ,2,account_type_view,view,TRUE -2601,2601,IVA n/debito ,26,account_type_tax,other,TRUE -2602,2602,debiti per ritenute da versare ,26,account_type_payable,payable,TRUE -2605,2605,erario c/IVA ,26,account_type_payable,payable,TRUE -2606,2606,debiti per imposte ,26,account_type_tax,other,TRUE -2619,2619,debiti per cauzioni ,26,account_type_asset,other,TRUE -2620,2620,personale c/retribuzioni ,26,account_type_asset,other,TRUE -2621,2621,personale c/liquidazioni ,26,account_type_asset,other,TRUE -2622,2622,clienti c/cessione ,26,account_type_asset,other,TRUE -2630,2630,debiti v/istituti previdenziali ,26,account_type_asset,other,TRUE -2640,2640,creditori diversi ,26,account_type_payable,payable,TRUE -27,27,RATEI E RISCONTI PASSIVI ,2,account_type_view,view,TRUE -2701,2701,ratei passivi ,27,account_type_asset,other,TRUE -2702,2702,risconti passivi ,27,account_type_asset,other,TRUE -28,28,CONTI TRANSITORI E DIVERSI ,2,account_type_view,view,TRUE -2801,2801,bilancio di apertura ,28,account_type_asset,other,TRUE -2802,2802,bilancio di chiusura ,28,account_type_asset,other,TRUE -2810,2810,IVA c/liquidazioni ,28,account_type_asset,other,TRUE -2811,2811,istituti previdenziali ,28,account_type_asset,other,TRUE -2820,2820,banca ... c/c ,28,account_type_asset,other,TRUE -2821,2821,banca ... c/c ,28,account_type_asset,other,TRUE -2822,2822,banca ... c/c ,28,account_type_asset,other,TRUE -29,29,CONTI DEI SISTEMI SUPPLEMENTARI ,2,account_type_view,view,TRUE -2901,2901,beni di terzi ,29,account_type_asset,other,TRUE -2902,2902,depositanti beni ,29,account_type_asset,other,TRUE -2911,2911,merci da ricevere ,29,account_type_asset,other,TRUE -2912,2912,fornitori c/impegni ,29,account_type_asset,other,TRUE -2913,2913,impegni per beni in leasing ,29,account_type_asset,other,TRUE -2914,2914,creditori c/leasing ,29,account_type_asset,other,TRUE -2916,2916,clienti c/impegni ,29,account_type_asset,other,TRUE -2917,2917,merci da consegnare ,29,account_type_asset,other,TRUE -2921,2921,rischi per effetti scontati ,29,account_type_asset,other,TRUE -2922,2922,banche c/effetti scontati ,29,account_type_asset,other,TRUE -2926,2926,rischi per fideiussioni ,29,account_type_asset,other,TRUE -2927,2927,creditori per fideiussioni ,29,account_type_asset,other,TRUE -2931,2931,rischi per avalli ,29,account_type_asset,other,TRUE -2932,2932,creditori per avalli ,29,account_type_asset,other,TRUE -3,3,VALORE DELLA PRODUZIONE ,0,account_type_view,view,TRUE -31,31,VENDITE E PRESTAZIONI ,3,account_type_view,view,TRUE -3101,3101,merci c/vendite ,31,account_type_income,other,TRUE -3103,3103,rimborsi spese di vendita ,31,account_type_income,other,TRUE -3110,3110,resi su vendite ,31,account_type_income,other,TRUE -3111,3111,ribassi e abbuoni passivi ,31,account_type_income,other,TRUE -3112,3112,premi su vendite ,31,account_type_income,other,TRUE -32,32,RICAVI E PROVENTI DIVERSI ,3,account_type_view,view,TRUE -3201,3201,fitti attivi ,32,account_type_income,other,TRUE -3202,3202,proventi vari ,32,account_type_income,other,TRUE -3210,3210,arrotondamenti attivi ,32,account_type_income,other,TRUE -3220,3220,plusvalenze ordinarie diverse ,32,account_type_income,other,TRUE -3230,3230,sopravvenienze attive ordinarie diverse ,32,account_type_income,other,TRUE -3240,3240,insussistenze attive ordinarie diverse ,32,account_type_income,other,TRUE -4,4,COSTI DELLA PRODUZIONE ,0,account_type_view,view,TRUE -41,41,COSTO DEL VENDUTO ,4,account_type_view,view,TRUE -4101,4101,merci c/acquisti ,41,account_type_expense,other,TRUE -4102,4102,materie di consumo c/acquisti ,41,account_type_expense,other,TRUE -4105,4105,merci c/apporti ,41,account_type_expense,other,TRUE -4110,4110,resi su acquisti ,41,account_type_expense,other,TRUE -4111,4111,ribassi e abbuoni attivi ,41,account_type_expense,other,TRUE -4112,4112,premi su acquisti ,41,account_type_expense,other,TRUE -4121,4121,merci c/esistenze iniziali ,41,account_type_expense,other,TRUE -4122,4122,materie di consumo c/esistenze iniziali ,41,account_type_expense,other,TRUE -4131,4131,merci c/rimanenze finali ,41,account_type_expense,other,TRUE -4132,4132,materie di consumo c/rimanenze finali ,41,account_type_expense,other,TRUE -42,42,COSTI PER SERVIZI ,4,account_type_view,view,TRUE -4201,4201,costi di trasporto ,42,account_type_expense,other,TRUE -4202,4202,costi per energia ,42,account_type_expense,other,TRUE -4203,4203,costi di pubblicità ,42,account_type_expense,other,TRUE -4204,4204,costi di consulenze ,42,account_type_expense,other,TRUE -4205,4205,costi postali ,42,account_type_expense,other,TRUE -4206,4206,costi telefonici ,42,account_type_expense,other,TRUE -4207,4207,costi di assicurazione ,42,account_type_expense,other,TRUE -4208,4208,costi di vigilanza ,42,account_type_expense,other,TRUE -4209,4209,costi per i locali ,42,account_type_expense,other,TRUE -4210,4210,costi di esercizio automezzi ,42,account_type_expense,other,TRUE -4211,4211,costi di manutenzione e riparazione ,42,account_type_expense,other,TRUE -4212,4212,provvigioni passive ,42,account_type_expense,other,TRUE -4213,4213,spese di incasso ,42,account_type_expense,other,TRUE -43,43,COSTI PER GODIMENTO BENI DI TERZI ,4,account_type_view,view,TRUE -4301,4301,fitti passivi ,43,account_type_expense,other,TRUE -4302,4302,canoni di leasing ,43,account_type_expense,other,TRUE -44,44,COSTI PER IL PERSONALE ,4,account_type_view,view,TRUE -4401,4401,salari e stipendi ,44,account_type_expense,other,TRUE -4402,4402,oneri sociali ,44,account_type_expense,other,TRUE -4403,4403,TFRL ,44,account_type_expense,other,TRUE -4404,4404,altri costi per il personale ,44,account_type_expense,other,TRUE -45,45,AMMORTAMENTI IMMOBILIZZAZIONI IMMATERIALI ,4,account_type_view,view,TRUE -4501,4501,ammortamento costi di impianto ,45,account_type_p_l,other,TRUE -4506,4506,ammortamento software ,45,account_type_p_l,other,TRUE -4508,4508,ammortamento avviamento ,45,account_type_p_l,other,TRUE -46,46,AMMORTAMENTI IMMOBILIZZAZIONI MATERIALI ,4,account_type_view,view,TRUE -4601,4601,ammortamento fabbricati ,46,account_type_p_l,other,TRUE -4602,4602,ammortamento impianti e macchinari ,46,account_type_p_l,other,TRUE -4604,4604,ammortamento attrezzature commerciali ,46,account_type_p_l,other,TRUE -4605,4605,ammortamento macchine d'ufficio ,46,account_type_p_l,other,TRUE -4606,4606,ammortamento arredamento ,46,account_type_p_l,other,TRUE -4607,4607,ammortamento automezzi ,46,account_type_p_l,other,TRUE -4608,4608,ammortamento imballaggi durevoli ,46,account_type_p_l,other,TRUE -47,47,SVALUTAZIONI ,4,account_type_view,view,TRUE -4701,4701,svalutazioni immobilizzazioni immateriali ,47,account_type_p_l,other,TRUE -4702,4702,svalutazioni immobilizzazioni materiali ,47,account_type_p_l,other,TRUE -4706,4706,svalutazione crediti ,47,account_type_p_l,other,TRUE -48,48,ACCANTONAMENTI ,4,account_type_view,view,TRUE -481,481,ACCANTONAMENTI PER RISCHI ,48,account_type_view,view,TRUE -4814,4814,accantonamento per responsabilità civile ,481,account_type_p_l,other,TRUE -482,482,ALTRI ACCANTONAMENTI ,48,account_type_view,view,TRUE -4821,4821,accantonamento per spese future ,482,account_type_p_l,other,TRUE -4823,4823,accantonamento per manutenzioni programmate ,482,account_type_p_l,other,TRUE -49,49,ONERI DIVERSI ,4,account_type_view,view,TRUE -4901,4901,oneri fiscali diversi ,49,account_type_p_l,other,TRUE -4903,4903,oneri vari ,49,account_type_p_l,other,TRUE -4905,4905,perdite su crediti ,49,account_type_p_l,other,TRUE -4910,4910,arrotondamenti passivi ,49,account_type_p_l,other,TRUE -4920,4920,minusvalenze ordinarie diverse ,49,account_type_p_l,other,TRUE -4930,4930,sopravvenienze passive ordinarie diverse ,49,account_type_p_l,other,TRUE -4940,4940,insussistenze passive ordinarie diverse ,49,account_type_p_l,other,TRUE -5,5,PROVENTI E ONERI FINANZIARI ,0,account_type_view,view,TRUE -51,51,PROVENTI FINANZIARI ,5,account_type_view,view,TRUE -5110,5110,interessi attivi v/clienti ,51,account_type_p_l,other,TRUE -5115,5115,interessi attivi bancari ,51,account_type_p_l,other,TRUE -5116,5116,interessi attivi postali ,51,account_type_p_l,other,TRUE -5140,5140,proventi finanziari diversi ,51,account_type_p_l,other,TRUE -52,52,ONERI FINANZIARI ,5,account_type_view,view,TRUE -5201,5201,interessi passivi v/fornitori ,52,account_type_p_l,other,TRUE -5202,5202,interessi passivi bancari ,52,account_type_p_l,other,TRUE -5203,5203,sconti passivi bancari ,52,account_type_p_l,other,TRUE -5210,5210,interessi passivi su mutui ,52,account_type_p_l,other,TRUE -5240,5240,oneri finanziari diversi ,52,account_type_p_l,other,TRUE -7,7,PROVENTI E ONERI STRAORDINARI ,0,account_type_view,view,TRUE -71,71,PROVENTI STRAORDINARI ,7,account_type_view,view,TRUE -7101,7101,plusvalenze straordinarie ,71,account_type_p_l,other,TRUE -7102,7102,sopravvenienze attive straordinarie ,71,account_type_p_l,other,TRUE -7103,7103,insussistenze attive straordinarie ,71,account_type_p_l,other,TRUE -72,72,ONERI STRAORDINARI ,7,account_type_view,view,TRUE -7201,7201,minusvalenze straordinarie ,72,account_type_p_l,other,TRUE -7202,7202,sopravvenienze passive straordinarie ,72,account_type_p_l,other,TRUE -7203,7203,insussistenze passive straordinarie ,72,account_type_p_l,other,TRUE -7204,7204,imposte esercizi precedenti ,72,account_type_p_l,other,TRUE -8,8,IMPOSTE DELL'ESERCIZIO ,0,account_type_view,view,TRUE -8101,8101,imposte dell'esercizio ,8,account_type_p_l,other,TRUE -9,9,CONTI DI RISULTATO ,0,account_type_view,view,TRUE -9101,9101,conto di risultato economico ,9,account_type_p_l,other,TRUE -9102,9102,stato patrimoniale,9,account_type_p_l,other,TRUE +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 +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 +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 +1205,1205,macchine d'ufficio ,12,account.data_account_type_asset,other,TRUE +1206,1206,arredamento ,12,account.data_account_type_asset,other,TRUE +1207,1207,automezzi ,12,account.data_account_type_asset,other,TRUE +1208,1208,imballaggi durevoli ,12,account.data_account_type_asset,other,TRUE +1211,1211,fondo ammortamento fabbricati ,12,account.data_account_type_asset,other,TRUE +1212,1212,fondo ammortamento impianti e macchinari ,12,account.data_account_type_asset,other,TRUE +1214,1214,fondo ammortamento attrezzature commerciali ,12,account.data_account_type_asset,other,TRUE +1215,1215,fondo ammortamento macchine d'ufficio ,12,account.data_account_type_asset,other,TRUE +1216,1216,fondo ammortamento arredamento ,12,account.data_account_type_asset,other,TRUE +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 +1301,1301,mutui attivi ,13,account.data_account_type_asset,other,TRUE +14,14,RIMANENZE ,1,account.data_account_type_view,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 +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 +1505,1505,cambiali attive ,15,account.data_account_type_asset,other,TRUE +1506,1506,cambiali allo sconto ,15,account.data_account_type_asset,other,TRUE +1507,1507,cambiali all'incasso ,15,account.data_account_type_asset,other,TRUE +1509,1509,fatture da emettere ,15,account.data_account_type_asset,other,TRUE +1510,1510,crediti insoluti ,15,account.data_account_type_asset,other,TRUE +1511,1511,cambiali insolute ,15,account.data_account_type_asset,other,TRUE +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 +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 +1607,1607,imposte c/acconto ,16,account.data_account_type_asset,other,TRUE +1608,1608,crediti per imposte ,16,account.data_account_type_asset,other,TRUE +1609,1609,crediti per ritenute subite ,16,account.data_account_type_asset,other,TRUE +1610,1610,crediti per cauzioni ,16,account.data_account_type_asset,other,TRUE +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 +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 +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 +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 +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 +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 +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 +2421,2421,banche c/RIBA all'incasso ,24,account.data_account_type_liability,other,TRUE +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 +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 +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 +2606,2606,debiti per imposte ,26,account.data_account_type_liability,other,TRUE +2619,2619,debiti per cauzioni ,26,account.data_account_type_liability,other,TRUE +2620,2620,personale c/retribuzioni ,26,account.data_account_type_liability,other,TRUE +2621,2621,personale c/liquidazioni ,26,account.data_account_type_liability,other,TRUE +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 +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 +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 +2811,2811,istituti previdenziali ,28,account.data_account_type_liability,other,TRUE +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 +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 +2912,2912,fornitori c/impegni ,29,account.data_account_type_liability,other,TRUE +2913,2913,impegni per beni in leasing ,29,account.data_account_type_liability,other,TRUE +2914,2914,creditori c/leasing ,29,account.data_account_type_liability,other,TRUE +2916,2916,clienti c/impegni ,29,account.data_account_type_liability,other,TRUE +2917,2917,merci da consegnare ,29,account.data_account_type_liability,other,TRUE +2921,2921,rischi per effetti scontati ,29,account.data_account_type_liability,other,TRUE +2922,2922,banche c/effetti scontati ,29,account.data_account_type_liability,other,TRUE +2926,2926,rischi per fideiussioni ,29,account.data_account_type_liability,other,TRUE +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 +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 +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 +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 +4110,4110,resi su acquisti ,41,account.data_account_type_expense,other,TRUE +4111,4111,ribassi e abbuoni attivi ,41,account.data_account_type_expense,other,TRUE +4112,4112,premi su acquisti ,41,account.data_account_type_expense,other,TRUE +4121,4121,merci c/esistenze iniziali ,41,account.data_account_type_expense,other,TRUE +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 +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 +4204,4204,costi di consulenze ,42,account.data_account_type_expense,other,TRUE +4205,4205,costi postali ,42,account.data_account_type_expense,other,TRUE +4206,4206,costi telefonici ,42,account.data_account_type_expense,other,TRUE +4207,4207,costi di assicurazione ,42,account.data_account_type_expense,other,TRUE +4208,4208,costi di vigilanza ,42,account.data_account_type_expense,other,TRUE +4209,4209,costi per i locali ,42,account.data_account_type_expense,other,TRUE +4210,4210,costi di esercizio automezzi ,42,account.data_account_type_expense,other,TRUE +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 +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 +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 +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 +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 +4605,4605,ammortamento macchine d'ufficio ,46,account.data_account_type_expense,other,TRUE +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 +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 +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 +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 +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 +4910,4910,arrotondamenti passivi ,49,account.data_account_type_expense,other,TRUE +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 +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 +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 +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 +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 +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 +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/l10n_it/data/account.account.type.csv b/addons/l10n_it/data/account.account.type.csv deleted file mode 100644 index 36eeebbbe89..00000000000 --- a/addons/l10n_it/data/account.account.type.csv +++ /dev/null @@ -1,11 +0,0 @@ -"id","code","name","close_method","report_type" -"account_type_receivable","receivable","Crediti","unreconciled","asset" -"account_type_payable","payable","Debiti","unreconciled","liability" -"account_type_view","view","Gerarchia","none", -"account_type_income","income","Entrate","none","income" -"account_type_expense","expense","Uscite","none","expense" -"account_type_tax","tax","Tasse","balance", -"account_type_cash","cash","Liquidità","balance","asset" -"account_type_asset","asset","Beni","balance","asset" -"account_type_bank","bank","Banca","balance","asset" -"account_type_p_l","p_l","Conto Economico","none", diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml index f695d994acd..45553c7d784 100644 --- a/addons/lunch/lunch_view.xml +++ b/addons/lunch/lunch_view.xml @@ -287,6 +287,7 @@ + diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 6726e80a15b..e4e65c67edf 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -33,6 +33,7 @@ import tools from osv import osv from osv import fields from tools.translate import _ +from openerp import SUPERUSER_ID _logger = logging.getLogger('mail') @@ -149,7 +150,9 @@ class mail_message(osv.osv): context = {} tz = context.get('tz') result = {} - for message in self.browse(cr, uid, ids, context=context): + + # Read message as UID 1 to allow viewing author even if from different company + for message in self.browse(cr, SUPERUSER_ID, ids): msg_txt = '' if message.email_from: msg_txt += _('%s wrote on %s: \n Subject: %s \n\t') % (message.email_from or '/', format_date_tz(message.date, tz), message.subject) @@ -263,7 +266,7 @@ class mail_message(osv.osv): attachment_data = { 'name': fname, 'datas_fname': fname, - 'datas': fcontent, + 'datas': fcontent and fcontent.encode('base64'), 'res_model': self._name, 'res_id': email_msg_id, } @@ -523,7 +526,9 @@ class mail_message(osv.osv): message.refresh() if message.state == 'sent' and message.auto_delete: self.pool.get('ir.attachment').unlink(cr, uid, - [x.id for x in message.attachment_ids], + [x.id for x in message.attachment_ids \ + if x.res_model == self._name and \ + x.res_id == message.id], context=context) message.unlink() except Exception: diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index e68bd70a739..af8baa314de 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -194,7 +194,7 @@ class mail_compose_message(osv.osv_memory): for mail in self.browse(cr, uid, ids, context=context): attachment = {} for attach in mail.attachment_ids: - attachment[attach.datas_fname] = attach.datas + attachment[attach.datas_fname] = attach.datas and attach.datas.decode('base64') references = None headers = {} diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml index 9ddd8093a3d..0300122e8ff 100644 --- a/addons/marketing_campaign/marketing_campaign_view.xml +++ b/addons/marketing_campaign/marketing_campaign_view.xml @@ -399,6 +399,7 @@ + diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py index 706d6fd4a7f..e35e8225469 100644 --- a/addons/portal/wizard/portal_wizard.py +++ b/addons/portal/wizard/portal_wizard.py @@ -151,6 +151,7 @@ class wizard(osv.osv_memory): 'password': random_password(), 'user_email': u.user_email, 'context_lang': u.lang, + 'share': True, 'partner_id': u.partner_id and u.partner_id.id, } for u in wiz.user_ids if u.user_email not in existing_logins ] portal_obj.write(cr, ROOT_UID, [wiz.portal_id.id], diff --git a/addons/procurement/schedulers.py b/addons/procurement/schedulers.py index a3ea80dc782..446463ecf4d 100644 --- a/addons/procurement/schedulers.py +++ b/addons/procurement/schedulers.py @@ -267,7 +267,8 @@ class procurement_order(osv.osv): if op.procurement_draft_ids: # Check draft procurement related to this order point pro_ids = [x.id for x in op.procurement_draft_ids] - procure_datas = procurement_obj.read(cr, uid, pro_ids, ['id','product_qty'], context=context, order='product_qty desc') + procure_datas = procurement_obj.read( + cr, uid, pro_ids, ['id', 'product_qty'], context=context) to_generate = qty for proc_data in procure_datas: if to_generate >= proc_data['product_qty']: diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 26abe86fe99..d2740ce4992 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -676,7 +676,7 @@ - + diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index d50501279fd..f4ea02964ee 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -94,7 +94,7 @@ - + diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml index fb522d08352..e25d5e34e3e 100644 --- a/addons/project_issue_sheet/project_issue_sheet_view.xml +++ b/addons/project_issue_sheet/project_issue_sheet_view.xml @@ -11,7 +11,7 @@ on_change_project(project_id) - diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml index 26093c0961f..e270ffe61f1 100644 --- a/addons/sale/report/sale_order.rml +++ b/addons/sale/report/sale_order.rml @@ -351,12 +351,8 @@ + [[ format(o.note or '') ]] - - - [[ format(o.note or '') ]] - - [[ format(o.payment_term and o.payment_term.note or (o.partner_id.property_payment_term and o.partner_id.property_payment_term.note or '')) ]] diff --git a/addons/sale_layout/report/report_sale_layout.rml b/addons/sale_layout/report/report_sale_layout.rml index bd142f123bd..0692497488f 100644 --- a/addons/sale_layout/report/report_sale_layout.rml +++ b/addons/sale_layout/report/report_sale_layout.rml @@ -343,12 +343,8 @@ + [[ format(o.note or '') ]] - - - [[ format(o.note or '') ]] - - [[ format((o.partner_id and o.partner_id.property_payment_term and o.partner_id.property_payment_term.note) or '') ]] @@ -359,4 +355,4 @@ - \ No newline at end of file + diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 885f7cd2077..d26ca8f0da3 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2165,7 +2165,7 @@ class stock_move(osv.osv): context = {} currency_ctx = dict(context, currency_id = move.company_id.currency_id.id) amount_unit = move.product_id.price_get('standard_price', context=currency_ctx)[move.product_id.id] - reference_amount = amount_unit * qty or 1.0 + reference_amount = amount_unit * qty return reference_amount, reference_currency_id