From 7e43c5e13529c34224b510b4114e3943f89da902 Mon Sep 17 00:00:00 2001 From: Tejas Tank Date: Wed, 18 Apr 2012 11:59:43 +0530 Subject: [PATCH 001/341] q bzr revid: tta@openerp.com-20120418062943-rtvpby15skwqmywx --- addons/base_contact/i18n/cs.po | 501 -------------------------- addons/base_contact/i18n/ja.po | 264 -------------- addons/fetchmail_crm_claim/i18n/ja.po | 34 ++ 3 files changed, 34 insertions(+), 765 deletions(-) delete mode 100644 addons/base_contact/i18n/cs.po delete mode 100644 addons/base_contact/i18n/ja.po create mode 100644 addons/fetchmail_crm_claim/i18n/ja.po diff --git a/addons/base_contact/i18n/cs.po b/addons/base_contact/i18n/cs.po deleted file mode 100644 index e48443f7681..00000000000 --- a/addons/base_contact/i18n/cs.po +++ /dev/null @@ -1,501 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * base_contact -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2012-02-08 00:36+0000\n" -"PO-Revision-Date: 2012-04-15 15:01+0000\n" -"Last-Translator: Jiří Hajda \n" -"Language-Team: Czech \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-04-16 04:40+0000\n" -"X-Generator: Launchpad (build 15099)\n" -"X-Poedit-Language: Czech\n" - -#. module: base_contact -#: field:res.partner.location,city:0 -msgid "City" -msgstr "Město" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "First/Lastname" -msgstr "Křestní jméno/Příjmení" - -#. module: base_contact -#: model:ir.actions.act_window,name:base_contact.action_partner_contact_form -#: model:ir.ui.menu,name:base_contact.menu_partner_contact_form -#: model:ir.ui.menu,name:base_contact.menu_purchases_partner_contact_form -#: model:process.node,name:base_contact.process_node_contacts0 -#: field:res.partner.location,job_ids:0 -msgid "Contacts" -msgstr "Kontakty" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Professional Info" -msgstr "Povolání" - -#. module: base_contact -#: field:res.partner.contact,first_name:0 -msgid "First Name" -msgstr "Křestní jméno" - -#. module: base_contact -#: field:res.partner.address,location_id:0 -msgid "Location" -msgstr "Umístění" - -#. module: base_contact -#: model:process.transition,name:base_contact.process_transition_partnertoaddress0 -msgid "Partner to address" -msgstr "Partner na adresu" - -#. module: base_contact -#: help:res.partner.contact,active:0 -msgid "" -"If the active field is set to False, it will allow you to " -"hide the partner contact without removing it." -msgstr "" -"Pokud je aktivní pole nastaveno na Nepravda, umožní vám to " -"skrýt kontakt partnera bez jeho odstranění." - -#. module: base_contact -#: field:res.partner.contact,website:0 -msgid "Website" -msgstr "Webová stránka" - -#. module: base_contact -#: field:res.partner.location,zip:0 -msgid "Zip" -msgstr "PSČ" - -#. module: base_contact -#: field:res.partner.location,state_id:0 -msgid "Fed. State" -msgstr "Fed. stát" - -#. module: base_contact -#: field:res.partner.location,company_id:0 -msgid "Company" -msgstr "Společnost" - -#. module: base_contact -#: field:res.partner.contact,title:0 -msgid "Title" -msgstr "Název" - -#. module: base_contact -#: field:res.partner.location,partner_id:0 -msgid "Main Partner" -msgstr "Hlavní partner" - -#. module: base_contact -#: model:process.process,name:base_contact.process_process_basecontactprocess0 -msgid "Base Contact" -msgstr "Základní kontakt" - -#. module: base_contact -#: field:res.partner.contact,email:0 -msgid "E-Mail" -msgstr "E-mail" - -#. module: base_contact -#: field:res.partner.contact,active:0 -msgid "Active" -msgstr "Aktivní" - -#. module: base_contact -#: field:res.partner.contact,country_id:0 -msgid "Nationality" -msgstr "Národnost" - -#. module: base_contact -#: view:res.partner:0 -#: view:res.partner.address:0 -msgid "Postal Address" -msgstr "Poštovní adresa" - -#. module: base_contact -#: field:res.partner.contact,function:0 -msgid "Main Function" -msgstr "Hlavní funkce" - -#. module: base_contact -#: model:process.transition,note:base_contact.process_transition_partnertoaddress0 -msgid "Define partners and their addresses." -msgstr "Určuje partnery a jejich adresy." - -#. module: base_contact -#: field:res.partner.contact,name:0 -msgid "Name" -msgstr "Jméno" - -#. module: base_contact -#: field:res.partner.contact,lang_id:0 -msgid "Language" -msgstr "Jazyk" - -#. module: base_contact -#: field:res.partner.contact,mobile:0 -msgid "Mobile" -msgstr "Mobil" - -#. module: base_contact -#: field:res.partner.location,country_id:0 -msgid "Country" -msgstr "Země" - -#. module: base_contact -#: view:res.partner.contact:0 -#: field:res.partner.contact,comment:0 -msgid "Notes" -msgstr "Poznámky" - -#. module: base_contact -#: model:process.node,note:base_contact.process_node_contacts0 -msgid "People you work with." -msgstr "Lidé, s kterými pracujete." - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Extra Information" -msgstr "Speciální informace" - -#. module: base_contact -#: view:res.partner.contact:0 -#: field:res.partner.contact,job_ids:0 -msgid "Functions and Addresses" -msgstr "Funkce a adresy" - -#. module: base_contact -#: model:ir.model,name:base_contact.model_res_partner_contact -#: field:res.partner.address,contact_id:0 -msgid "Contact" -msgstr "Kontakt" - -#. module: base_contact -#: model:ir.model,name:base_contact.model_res_partner_location -msgid "res.partner.location" -msgstr "res.partner.location" - -#. module: base_contact -#: model:process.node,note:base_contact.process_node_partners0 -msgid "Companies you work with." -msgstr "Společnosti, se kterými pracujete." - -#. module: base_contact -#: field:res.partner.contact,partner_id:0 -msgid "Main Employer" -msgstr "Hlavní zaměstnavatel" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Partner Contact" -msgstr "Kontakt partnera" - -#. module: base_contact -#: model:process.node,name:base_contact.process_node_addresses0 -msgid "Addresses" -msgstr "Adresy" - -#. module: base_contact -#: model:process.node,note:base_contact.process_node_addresses0 -msgid "Working and private addresses." -msgstr "Pracovní a soukromé adresy." - -#. module: base_contact -#: field:res.partner.contact,last_name:0 -msgid "Last Name" -msgstr "Příjmení" - -#. module: base_contact -#: view:res.partner.contact:0 -#: field:res.partner.contact,photo:0 -msgid "Photo" -msgstr "Fotka" - -#. module: base_contact -#: view:res.partner.location:0 -msgid "Locations" -msgstr "Umístění" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "General" -msgstr "Obecný" - -#. module: base_contact -#: field:res.partner.location,street:0 -msgid "Street" -msgstr "Ulice" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Partner" -msgstr "Partner" - -#. module: base_contact -#: model:process.node,name:base_contact.process_node_partners0 -msgid "Partners" -msgstr "Partneři" - -#. module: base_contact -#: model:ir.model,name:base_contact.model_res_partner_address -msgid "Partner Addresses" -msgstr "Adresy partnerů" - -#. module: base_contact -#: field:res.partner.location,street2:0 -msgid "Street2" -msgstr "Ulice 2" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Personal Information" -msgstr "Osobní informace" - -#. module: base_contact -#: field:res.partner.contact,birthdate:0 -msgid "Birth Date" -msgstr "Datum narození" - -#~ msgid "Categories" -#~ msgstr "Kategorie" - -#~ msgid "Current" -#~ msgstr "Stávající" - -#~ msgid "Fax" -#~ msgstr "Fax" - -#~ msgid "Address" -#~ msgstr "Adresa" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "Invalidní XML pro zobrazení architektury!" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "Jméno objektu musí začínat znakem x_ a nesmí obsahovat žádný speciální znak!" - -#~ msgid "Invalid model name in the action definition." -#~ msgstr "Špatný název modelu v definici akce" - -#~ msgid "Contact Functions" -#~ msgstr "Kontaktní funkce" - -#~ msgid "Phone" -#~ msgstr "Telefon" - -#~ msgid "Function" -#~ msgstr "Funkce" - -#~ msgid "# of Contacts" -#~ msgstr "# z kontaktů" - -#~ msgid "title" -#~ msgstr "nadpis" - -#~ msgid "Start date of job(Joining Date)" -#~ msgstr "Datum zahájení práce (datum připojení)" - -#~ msgid "Select the Option for Addresses Migration" -#~ msgstr "Vyberte volbu pro přesun adres" - -#~ msgid "Function of this contact with this partner" -#~ msgstr "Funkce tohoto kontaktu s tímto partnerem" - -#~ msgid "Status of Address" -#~ msgstr "Stav adresy" - -#~ msgid "" -#~ "You may enter Address first,Partner will be linked " -#~ "automatically if any." -#~ msgstr "" -#~ "Můžete zadat nejdříve adresu. Pokud je nějaký partner, " -#~ "bude napojen automaticky." - -#~ msgid "Job FAX no." -#~ msgstr "Číslo FAXu do práce" - -#~ msgid "Define functions and address." -#~ msgstr "Určit funkce a adresu." - -#~ msgid "Last date of job" -#~ msgstr "Poslední datum práce" - -#~ msgid "Migrate" -#~ msgstr "Přesunout" - -#~ msgid "Jobs at a same partner address." -#~ msgstr "Pracovní pozice u stejné adresy partnera." - -#~ msgid "State" -#~ msgstr "Stav" - -#~ msgid "" -#~ "\n" -#~ " This module allows you to manage your contacts entirely.\n" -#~ "\n" -#~ " It lets you define\n" -#~ " *contacts unrelated to a partner,\n" -#~ " *contacts working at several addresses (possibly for different " -#~ "partners),\n" -#~ " *contacts with possibly different functions for each of its job's " -#~ "addresses\n" -#~ "\n" -#~ " It also adds new menu items located in\n" -#~ " Partners \\ Contacts\n" -#~ " Partners \\ Functions\n" -#~ "\n" -#~ " Pay attention that this module converts the existing addresses into " -#~ "\"addresses + contacts\". It means that some fields of the addresses will be " -#~ "missing (like the contact name), since these are supposed to be defined in " -#~ "an other object.\n" -#~ " " -#~ msgstr "" -#~ "\n" -#~ " Tento modul umožňuje úplně spravovat vaše kontakty.\n" -#~ "\n" -#~ " Nechá vás určit\n" -#~ " *kontakty nevztažené k partnerovi,\n" -#~ " *kontakty pracující na několika adresách (případně i pro různé " -#~ "partnery),\n" -#~ " *kontakty s možnými různými funkcemi pro každou jeho pracovní " -#~ "adresu\n" -#~ "\n" -#~ " Také přidává nové položky nabídky umístěné v\n" -#~ " Partneři \\ Kontakty\n" -#~ " Partneři \\ Funkce\n" -#~ "\n" -#~ " Berte na vědomí, že tento modul převádí existující adresy na \"adresy + " -#~ "kontakty\". To znamená, že některé pole adres budou chybět (jako jméno " -#~ "kontaktu), protože ty jsou definovány v jiném objektu.\n" -#~ " " - -#~ msgid "Date Stop" -#~ msgstr "Datum zastavení" - -#~ msgid "Contact's Jobs" -#~ msgstr "Pozice kontaktu" - -#~ msgid "" -#~ "Order of importance of this job title in the list of job " -#~ "title of the linked partner" -#~ msgstr "" -#~ "Pořadí důležitosti této pracovní pozice v seznamu titulů " -#~ "pozic napojeného partnera" - -#~ msgid "Extension" -#~ msgstr "Rozšíření" - -#~ msgid "Internal/External extension phone number" -#~ msgstr "Vnitřní/vnější telefoní číslo klapky" - -#~ msgid "Job Phone no." -#~ msgstr "Telefoní číslo do práce." - -#~ msgid "Job E-Mail" -#~ msgstr "Pracovní E-Mail" - -#~ msgid "Partner Seq." -#~ msgstr "Poř. parnera" - -#~ msgid "Function to address" -#~ msgstr "Funkce na adresu" - -#~ msgid "Configuration Progress" -#~ msgstr "Průběh nastavení" - -#~ msgid "Communication" -#~ msgstr "Komunikace" - -#~ msgid "Image" -#~ msgstr "Obrázek" - -#~ msgid "Past" -#~ msgstr "Minulý" - -#~ msgid "Address's Migration to Contacts" -#~ msgstr "Stěhování adresy na kontakty" - -#~ msgid "Contact Seq." -#~ msgstr "Poř. kontaktu" - -#~ msgid "Search Contact" -#~ msgstr "Hledat kontakt" - -#~ msgid "" -#~ "Due to changes in Address and Partner's relation, some of the details from " -#~ "address are needed to be migrated into contact information." -#~ msgstr "" -#~ "Kvůli změnám v adrese a vztahu partnera, některé podrobnosti adresy jsou " -#~ "potřebné, aby byly přesunuty do informací účtu." - -#~ msgid "Address which is linked to the Partner" -#~ msgstr "Adresa, která je napojena na partnera" - -#~ msgid "Partner Function" -#~ msgstr "Funkce partnera" - -#~ msgid "Additional phone field" -#~ msgstr "Doplňující pole telefonu" - -#~ msgid "Otherwise these details will not be visible from address/contact." -#~ msgstr "Jinak tyto podrobnosti nebudou viditelné z adresy/kontaktu." - -#~ msgid "Configure" -#~ msgstr "Nastavit" - -#~ msgid "base.contact.installer" -#~ msgstr "base.contact.installer" - -#~ msgid "Do you want to migrate your Address data in Contact Data?" -#~ msgstr "Chcete stěhovat vaše data adresy v datech kontaktu?" - -#~ msgid "Seq." -#~ msgstr "Poř." - -#~ msgid "If you select this, all addresses will be migrated." -#~ msgstr "Pokud toto vyberete, všechny adresy budou přesunuty." - -#~ msgid "Contact Partner Function" -#~ msgstr "Kontakt funkce partnera" - -#~ msgid "Other" -#~ msgstr "Jiné" - -#~ msgid "Main Job" -#~ msgstr "Hlavní práce" - -#~ msgid "Defines contacts and functions." -#~ msgstr "Určuje kontakty a funkce." - -#~ msgid "Contact to function" -#~ msgstr "Kontakt na funkci" - -#~ msgid "Open Jobs" -#~ msgstr "Otevřené pozice" - -#~ msgid "You can migrate Partner's current addresses to the contact." -#~ msgstr "Můžete stěhovat partnerovu aktuální adresu do kontaktu." - -#~ msgid "Address Migration" -#~ msgstr "Stěhování adresy" - -#~ msgid "Date Start" -#~ msgstr "Počáteční datum" - -#~ msgid "" -#~ "Order of importance of this address in the list of " -#~ "addresses of the linked contact" -#~ msgstr "" -#~ "Pořadí podle důležitosti této adresy v seznamu adres napojeného " -#~ "kontaktu" diff --git a/addons/base_contact/i18n/ja.po b/addons/base_contact/i18n/ja.po deleted file mode 100644 index 89af47fb6ac..00000000000 --- a/addons/base_contact/i18n/ja.po +++ /dev/null @@ -1,264 +0,0 @@ -# Japanese translation for openobject-addons -# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR , 2012. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2012-02-08 00:36+0000\n" -"PO-Revision-Date: 2012-04-14 00:01+0000\n" -"Last-Translator: Tomomi Mengelberg \n" -"Language-Team: Japanese \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-04-15 04:42+0000\n" -"X-Generator: Launchpad (build 15070)\n" - -#. module: base_contact -#: field:res.partner.location,city:0 -msgid "City" -msgstr "市区町村" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "First/Lastname" -msgstr "名/姓" - -#. module: base_contact -#: model:ir.actions.act_window,name:base_contact.action_partner_contact_form -#: model:ir.ui.menu,name:base_contact.menu_partner_contact_form -#: model:ir.ui.menu,name:base_contact.menu_purchases_partner_contact_form -#: model:process.node,name:base_contact.process_node_contacts0 -#: field:res.partner.location,job_ids:0 -msgid "Contacts" -msgstr "連絡先" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Professional Info" -msgstr "" - -#. module: base_contact -#: field:res.partner.contact,first_name:0 -msgid "First Name" -msgstr "姓" - -#. module: base_contact -#: field:res.partner.address,location_id:0 -msgid "Location" -msgstr "場所" - -#. module: base_contact -#: model:process.transition,name:base_contact.process_transition_partnertoaddress0 -msgid "Partner to address" -msgstr "" - -#. module: base_contact -#: help:res.partner.contact,active:0 -msgid "" -"If the active field is set to False, it will allow you to " -"hide the partner contact without removing it." -msgstr "" - -#. module: base_contact -#: field:res.partner.contact,website:0 -msgid "Website" -msgstr "ウェブサイト" - -#. module: base_contact -#: field:res.partner.location,zip:0 -msgid "Zip" -msgstr "郵便番号" - -#. module: base_contact -#: field:res.partner.location,state_id:0 -msgid "Fed. State" -msgstr "" - -#. module: base_contact -#: field:res.partner.location,company_id:0 -msgid "Company" -msgstr "会社" - -#. module: base_contact -#: field:res.partner.contact,title:0 -msgid "Title" -msgstr "役職" - -#. module: base_contact -#: field:res.partner.location,partner_id:0 -msgid "Main Partner" -msgstr "主なパートナ" - -#. module: base_contact -#: model:process.process,name:base_contact.process_process_basecontactprocess0 -msgid "Base Contact" -msgstr "" - -#. module: base_contact -#: field:res.partner.contact,email:0 -msgid "E-Mail" -msgstr "メール" - -#. module: base_contact -#: field:res.partner.contact,active:0 -msgid "Active" -msgstr "有効" - -#. module: base_contact -#: field:res.partner.contact,country_id:0 -msgid "Nationality" -msgstr "国籍" - -#. module: base_contact -#: view:res.partner:0 -#: view:res.partner.address:0 -msgid "Postal Address" -msgstr "住所" - -#. module: base_contact -#: field:res.partner.contact,function:0 -msgid "Main Function" -msgstr "主な役割" - -#. module: base_contact -#: model:process.transition,note:base_contact.process_transition_partnertoaddress0 -msgid "Define partners and their addresses." -msgstr "" - -#. module: base_contact -#: field:res.partner.contact,name:0 -msgid "Name" -msgstr "名前" - -#. module: base_contact -#: field:res.partner.contact,lang_id:0 -msgid "Language" -msgstr "言語" - -#. module: base_contact -#: field:res.partner.contact,mobile:0 -msgid "Mobile" -msgstr "携帯電話" - -#. module: base_contact -#: field:res.partner.location,country_id:0 -msgid "Country" -msgstr "国名" - -#. module: base_contact -#: view:res.partner.contact:0 -#: field:res.partner.contact,comment:0 -msgid "Notes" -msgstr "備考" - -#. module: base_contact -#: model:process.node,note:base_contact.process_node_contacts0 -msgid "People you work with." -msgstr "同僚" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Extra Information" -msgstr "その他の情報" - -#. module: base_contact -#: view:res.partner.contact:0 -#: field:res.partner.contact,job_ids:0 -msgid "Functions and Addresses" -msgstr "" - -#. module: base_contact -#: model:ir.model,name:base_contact.model_res_partner_contact -#: field:res.partner.address,contact_id:0 -msgid "Contact" -msgstr "連絡先" - -#. module: base_contact -#: model:ir.model,name:base_contact.model_res_partner_location -msgid "res.partner.location" -msgstr "" - -#. module: base_contact -#: model:process.node,note:base_contact.process_node_partners0 -msgid "Companies you work with." -msgstr "同僚" - -#. module: base_contact -#: field:res.partner.contact,partner_id:0 -msgid "Main Employer" -msgstr "" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Partner Contact" -msgstr "パートナー連絡先" - -#. module: base_contact -#: model:process.node,name:base_contact.process_node_addresses0 -msgid "Addresses" -msgstr "住所" - -#. module: base_contact -#: model:process.node,note:base_contact.process_node_addresses0 -msgid "Working and private addresses." -msgstr "勤め先住所と自宅住所" - -#. module: base_contact -#: field:res.partner.contact,last_name:0 -msgid "Last Name" -msgstr "姓" - -#. module: base_contact -#: view:res.partner.contact:0 -#: field:res.partner.contact,photo:0 -msgid "Photo" -msgstr "写真" - -#. module: base_contact -#: view:res.partner.location:0 -msgid "Locations" -msgstr "場所" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "General" -msgstr "" - -#. module: base_contact -#: field:res.partner.location,street:0 -msgid "Street" -msgstr "番地" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Partner" -msgstr "パートナ" - -#. module: base_contact -#: model:process.node,name:base_contact.process_node_partners0 -msgid "Partners" -msgstr "取引先" - -#. module: base_contact -#: model:ir.model,name:base_contact.model_res_partner_address -msgid "Partner Addresses" -msgstr "パートナの住所" - -#. module: base_contact -#: field:res.partner.location,street2:0 -msgid "Street2" -msgstr "番地" - -#. module: base_contact -#: view:res.partner.contact:0 -msgid "Personal Information" -msgstr "個人情報" - -#. module: base_contact -#: field:res.partner.contact,birthdate:0 -msgid "Birth Date" -msgstr "生年月日" diff --git a/addons/fetchmail_crm_claim/i18n/ja.po b/addons/fetchmail_crm_claim/i18n/ja.po new file mode 100644 index 00000000000..a1f6db4a764 --- /dev/null +++ b/addons/fetchmail_crm_claim/i18n/ja.po @@ -0,0 +1,34 @@ +# Japanese translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-02-08 00:36+0000\n" +"PO-Revision-Date: 2012-04-08 05:43+0000\n" +"Last-Translator: Masaki Yamaya \n" +"Language-Team: Japanese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-04-09 04:56+0000\n" +"X-Generator: Launchpad (build 15060)\n" + +#. module: fetchmail_crm_claim +#: model:ir.actions.act_window,help:fetchmail_crm_claim.action_create_crm_claims_from_email_account +msgid "" +"You can connect your email account with claims in OpenERP. A new email sent " +"to this account (example: support@mycompany.com) will automatically create a " +"claim for the followup in OpenERP. The whole communication by email will be " +"attached to the claim automatically to keep track of the history." +msgstr "" +"あなたのEメールアカウントをOpenERPのクレームに関連づけることはできません。このアカウントに送られた新しいEメールはOpenERPのフォローアップの" +"ためのクレームを自動的に作成します。Eメールによる全てのコミュニケーションは、履歴を記録するために、自動的にクレームに関連づけられます。" + +#. module: fetchmail_crm_claim +#: model:ir.actions.act_window,name:fetchmail_crm_claim.action_create_crm_claims_from_email_account +msgid "Create Claims from Email Account" +msgstr "Eメールアカウントからクレームを作成" From 2c780efd12a47d440e7b9a4ecae7da0cf9565390 Mon Sep 17 00:00:00 2001 From: Tejas Tank Date: Thu, 19 Apr 2012 18:59:16 +0530 Subject: [PATCH 002/341] Web Etherpad Integration bzr revid: tta@openerp.com-20120419132916-yzrdnz2y8gus2wlw --- addons/web_etherpad/__init__.py | 2 + addons/web_etherpad/__openerp__.py | 16 +++ addons/web_etherpad/res_company.py | 15 +++ addons/web_etherpad/res_company.xml | 16 +++ .../static/src/js/web_etherpad.js | 125 ++++++++++++++++++ .../web_etherpad/static/src/xml/etherpad.xml | 21 +++ 6 files changed, 195 insertions(+) create mode 100644 addons/web_etherpad/__init__.py create mode 100755 addons/web_etherpad/__openerp__.py create mode 100644 addons/web_etherpad/res_company.py create mode 100644 addons/web_etherpad/res_company.xml create mode 100755 addons/web_etherpad/static/src/js/web_etherpad.js create mode 100755 addons/web_etherpad/static/src/xml/etherpad.xml diff --git a/addons/web_etherpad/__init__.py b/addons/web_etherpad/__init__.py new file mode 100644 index 00000000000..df35bc32106 --- /dev/null +++ b/addons/web_etherpad/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +import res_company diff --git a/addons/web_etherpad/__openerp__.py b/addons/web_etherpad/__openerp__.py new file mode 100755 index 00000000000..829081e8c65 --- /dev/null +++ b/addons/web_etherpad/__openerp__.py @@ -0,0 +1,16 @@ +{ + "name": "web_etherpad", + "category" : "Hidden", + "description":'Openerp web Etherpad Widget', + "version": "2.0", + 'author': 'OpenERP SA', + 'website': 'http://openerp.com', + 'data': [ + 'res_company.xml' + ], + "depends": ['base','web'], + 'qweb' : ['static/src/xml/etherpad.xml'], + "css": [], + "js": ['static/src/js/web_etherpad.js'], + "auto_install": False, +} diff --git a/addons/web_etherpad/res_company.py b/addons/web_etherpad/res_company.py new file mode 100644 index 00000000000..0c1dc7c4929 --- /dev/null +++ b/addons/web_etherpad/res_company.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +from osv import fields, osv + +class company_pad(osv.osv): + _inherit = 'res.company' + _columns = { + 'pad_url_template': fields.char('Pad URL Template', size=128, required=True, + help="Template used to generate pad URL."), + } + _defaults = { + 'pad_url_template': 'http://ietherpad.com/%(db)s-%(model)s-%(id)d-%(salt)s-%(name)s' + } + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/web_etherpad/res_company.xml b/addons/web_etherpad/res_company.xml new file mode 100644 index 00000000000..20b6f52d853 --- /dev/null +++ b/addons/web_etherpad/res_company.xml @@ -0,0 +1,16 @@ + + + + res.company.form.pad + res.company + form + + + + + + + + + + diff --git a/addons/web_etherpad/static/src/js/web_etherpad.js b/addons/web_etherpad/static/src/js/web_etherpad.js new file mode 100755 index 00000000000..d19fb2b9512 --- /dev/null +++ b/addons/web_etherpad/static/src/js/web_etherpad.js @@ -0,0 +1,125 @@ +openerp.web_etherpad = function (instance) { + + instance.web.form.FieldEtherpad = instance.web.form.AbstractField.extend(_.extend({}, instance.web.form.ReinitializeFieldMixin, { + template: 'FieldEtherpad', + initialize_content: function() { + this.$textarea = undefined; + if (!this.get("effective_readonly")) { + this.$textarea = this.$element.find('textarea'); + //this.$textarea.hide(); + this.$textarea.change(_.bind(function() { + this.set({'value': instance.web.parse_value(this.$textarea.val(), this)}); + }, this)); + this.resized = false; + } + }, + set_value: function(value_) { + var self = this ; + var company_id = (self.view.datarecord.hasOwnProperty('id')) ?self.view.datarecord.company_id[0]: self.view.datarecord.company_id ; + /* getting etherpad url and set pad to field. */ + self.rpc('/web/dataset/get',{ + 'model':'res.company', + 'ids':[company_id], + 'fields':['pad_url_template'], + 'context':{} + },function(companies){ + var pad_template = companies[0].pad_url_template.replace('-%(salt)s-%(name)s','').replace(/\s/g,''); + + var patt_url = (_.str.sprintf(pad_template.replace('-%(id)d',''), { + db : self.session.db, + model : self.view.model, + })).replace(/\s/g,'') ; + //alert("match or not >?"+value_.search(patt_url)); + if(value_ == false) + self.add_pad(self,pad_template,value_); + else if(value_.search(patt_url) != 0) + self.add_pad(self,pad_template,value_); + else + self.show_pad_value(self,value_); + }); + }, + show_pad_value: function(self,value_) + { + self._inhibit_on_change = true; + self.set({'value': value_ }); + self._inhibit_on_change = false; + self.invalid = false; + self.update_dom(); + self.render_value(); + }, + add_pad: function(self,pad_template,value_){ + var url = (_.str.sprintf(pad_template, { + db : self.session.db, + model : self.view.model, + id : Math.round(new Date().getTime()/100.0), + })).replace(/\s/g,''); + var show_value = instance.web.format_value(value_, this, ''); + self.show_pad_value(self,url + '\n'+ show_value); + this.dirty = true; + }, + render_value: function() { + var show_value = instance.web.format_value(this.get('value'), this, ''); + if (!this.get("effective_readonly")) { + this.$textarea.val(show_value); + this.$element.find('div').html(''); + if (!this.resized && this.view.options.resize_textareas) { + this.do_resize(this.view.options.resize_textareas); + this.resized = true; + } + } else { + this.$element.text(show_value); + if(this.get('value') != false) + { + var self = this; + $.get(show_value.split('\n')[0]+'/export/html', function(data) { + console.log(data); + self.$element.html(data); + }); + } + } + }, + validate: function() { + this.invalid = false; + if (!this.get("effective_readonly")) { + try { + var value_ = instance.web.parse_value(this.$textarea.val(), this, ''); + this.invalid = this.get("required") && value_ === ''; + } catch(e) { + this.invalid = true; + } + } + }, + focus: function($element) { + this._super($element || this.$textarea); + }, + do_resize: function(max_height) { + max_height = parseInt(max_height, 10); + var $input = this.$textarea, + $div = $('
').width($input.width()), + new_height; + $div.text($input.val()); + _.each('font-family,font-size,white-space'.split(','), function(style) { + $div.css(style, $input.css(style)); + }); + $div.appendTo($('body')); + new_height = $div.height(); + if (new_height < 90) { + new_height = 90; + } + if (!isNaN(max_height) && new_height > max_height) { + new_height = max_height; + } + $div.remove(); + $input.height(new_height); + }, + reset: function() { + this.resized = false; + } + })); + + instance.web.form.widgets = instance.web.form.widgets.extend({ + 'etherpad': 'instance.web.form.FieldEtherpad', + }); + + +} diff --git a/addons/web_etherpad/static/src/xml/etherpad.xml b/addons/web_etherpad/static/src/xml/etherpad.xml new file mode 100755 index 00000000000..64c2e2dc6a0 --- /dev/null +++ b/addons/web_etherpad/static/src/xml/etherpad.xml @@ -0,0 +1,21 @@ + + + + + + + +
+ +
+
+
+
+ +
From 4cb57e25230fb289d4e61dd2acb31953ebe7e2a2 Mon Sep 17 00:00:00 2001 From: Tejas Tank Date: Thu, 19 Apr 2012 19:05:22 +0530 Subject: [PATCH 003/341] Not show textarea bzr revid: tta@openerp.com-20120419133522-lk286h44c2y06j6g --- addons/web_etherpad/static/src/js/web_etherpad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_etherpad/static/src/js/web_etherpad.js b/addons/web_etherpad/static/src/js/web_etherpad.js index d19fb2b9512..28afe60133d 100755 --- a/addons/web_etherpad/static/src/js/web_etherpad.js +++ b/addons/web_etherpad/static/src/js/web_etherpad.js @@ -6,7 +6,7 @@ openerp.web_etherpad = function (instance) { this.$textarea = undefined; if (!this.get("effective_readonly")) { this.$textarea = this.$element.find('textarea'); - //this.$textarea.hide(); + this.$textarea.hide(); this.$textarea.change(_.bind(function() { this.set({'value': instance.web.parse_value(this.$textarea.val(), this)}); }, this)); From 4a9e3512c58627b42fc82f4f2283e2ba0064637f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 19 Apr 2012 17:26:44 +0200 Subject: [PATCH 004/341] [ADD] mail: added mail.subscription.hide model. This will holds the hiden notification subtypes. bzr revid: tde@openerp.com-20120419152644-u3t5y18s0w7r5ton --- addons/mail/mail_subscription.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/addons/mail/mail_subscription.py b/addons/mail/mail_subscription.py index fc82af879a9..2b6a8dd5342 100644 --- a/addons/mail/mail_subscription.py +++ b/addons/mail/mail_subscription.py @@ -44,6 +44,25 @@ class mail_subscription(osv.osv): ondelete='cascade', required=True, select=1), } +class mail_subscription_hide(osv.osv): + """ + mail_subscription_hide holds the data to store the hiden notifications + on the Wall. Hide choices are related to a subscription, not a model + or a user. + :param: subscription_id: the related subscription + :param: subtype: the message subtype hiden + """ + _name = 'mail.subscription.hide' + _rec_name = 'id' + _order = 'id desc' + _description = 'Hidden subscription' + _columns = { + 'subscription_id': fields.many2one('mail.subscription', string='Subscription', + ondelete='cascade', required=True, select=1), + 'subtype': fields.char('Message subtype', size=64, + required=True, help='Message subtype is a string that depends on the related model.'), + } + class mail_notification(osv.osv): """ mail_notification is a relational table modeling messages pushed to users. From 491e8ad9f6192278ee386d6a721f8c810009d581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 19 Apr 2012 17:38:25 +0200 Subject: [PATCH 005/341] [ADD] mail.subscription.hide: added views and menu entry. bzr revid: tde@openerp.com-20120419153825-xodlfiotdgdmco30 --- addons/mail/mail_subscription_view.xml | 36 +++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/addons/mail/mail_subscription_view.xml b/addons/mail/mail_subscription_view.xml index 52b72127b78..827c23b25d2 100644 --- a/addons/mail/mail_subscription_view.xml +++ b/addons/mail/mail_subscription_view.xml @@ -20,6 +20,23 @@ + + + + mail.subscription.hide.tree + mail.subscription.hide + tree + 10 + + + + + + + + @@ -45,6 +62,13 @@ tree,form + + Hidden subscriptions + mail.subscription.hide + form + tree,form + + Pushed notif mail.notification @@ -52,11 +76,15 @@ tree,form - - + + + - - + + From ae0dbd21455e8a6ef2d358b8999fba49674fd497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 19 Apr 2012 17:53:39 +0200 Subject: [PATCH 006/341] [ADD] mail.group: added a 'models' field, to link groups to models. Purpose: group will be able to aggregate messages, and users following the group will receive notifications. Example: being able to follow all leads. bzr revid: tde@openerp.com-20120419155339-etlzmi5jo5d8iwgf --- addons/mail/mail_group.py | 2 ++ addons/mail/mail_group_view.xml | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index 0a8677d7862..83d0705c4e0 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -119,6 +119,8 @@ class mail_group(osv.osv): ondelete='set null', required=True, select=1, help="Responsible of the group that has all rights on the record."), 'public': fields.boolean('Public', help='This group is visible by non members. Invisible groups can add members through the invite button.'), + 'models': fields.many2many('ir.model', rel='mail_group_models_rel', id1='mail_group_id', id2='model_id', + string='Linked models', help='Linked models'), 'photo_big': fields.binary('Full-size photo', help='Field holding the full-sized PIL-supported and base64 encoded version of the group image. The photo field is used as an interface for this field.'), 'photo': fields.function(_get_photo, fnct_inv=_set_photo, string='Photo', type="binary", store = { diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml index ea0dede377d..d911b4a7deb 100644 --- a/addons/mail/mail_group_view.xml +++ b/addons/mail/mail_group_view.xml @@ -58,6 +58,11 @@ + + + + + From caba5db34bb9d6a4f91127c063293aae3be13780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 19 Apr 2012 18:20:50 +0200 Subject: [PATCH 007/341] [ADD] mail.message: added a message_subtype field, that will contain more precise data about the type of content. Example: create, cancel, ... Purpose: being able to filter (hide) a given content type. bzr revid: tde@openerp.com-20120419162050-6uq495s94i4etnbp --- addons/mail/mail_message.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 5d5d599be0e..9228861b139 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -206,6 +206,12 @@ class mail_message(osv.osv): ('comment', 'Comment'), ('notification', 'System notification'), ], 'Type', help="Message type: e-mail for e-mail message, notification for system message, comment for other messages such as user replies"), + 'message_subtype': fields.selection([ + ('email', 'e-mail'), + ('comment', 'Comment'), + ('create', 'Create'), + ('cancel', 'Cancel'), + ], 'Type', help="Message subtype, such as create or cancel. May be overriden by addons."), 'partner_id': fields.many2one('res.partner', 'Related partner'), 'user_id': fields.many2one('res.users', 'Related user', readonly=1), 'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments'), @@ -224,6 +230,7 @@ class mail_message(osv.osv): _defaults = { 'type': 'email', + 'message_subtype': 'email', 'state': 'received', } From 7a4ca1338c43b63c4d7976519ffe7a374d922fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 20 Apr 2012 10:42:41 +0200 Subject: [PATCH 008/341] [ADD] Chatter widget: added links to hide a thread or a subtype. Only links, not functional currently, because logic is not implemented. bzr revid: tde@openerp.com-20120420084241-02l4tfifzxjd88go --- addons/mail/static/src/css/mail.css | 31 ++++++++++++++++++++++++++++ addons/mail/static/src/js/mail.js | 32 +++++++++++++++++++++++++++++ addons/mail/static/src/xml/mail.xml | 6 ++++++ 3 files changed, 69 insertions(+) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 7f0cc6f222c..5bae0d5e73b 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -167,6 +167,7 @@ } .openerp .oe_mail_msg_notification, .openerp .oe_mail_msg_comment, .openerp .oe_mail_msg_email { + position: relative; padding: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -229,6 +230,36 @@ color: #4E43E7; } +.openerp img.oe_mail_msg_menu_icon { + float: right; + cursor: pointer; +} + +.openerp ul.oe_mail_msg_menu { +/* + display: none; +*/ + display: block; + position: absolute; + top: 1em; + right: 1em; + overflow-x: hidden; + z-index: 900; + background: white; + padding: 4px; + border: 1px solid #AFAFB6; + width: 150px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -o-border-radius: 3px; + -ms-border-radius: 3px; + border-radius: 3px; + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); +} + /* ------------------------------ */ /* Styling (should be openerp) */ /* ------------------------------ */ diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index d99674f98a7..160a1dc33fd 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -174,6 +174,34 @@ openerp.mail = function(session) { } return false; }); + // event: click on 'hide notification' in wheel_menu + this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_hide_thread', 'click', function (event) { + console.log('hiding notification'); + if (! confirm(_t("Do you really want to hide this thread ?"))) { return false; } + var msg_id = event.srcElement.dataset.id; + if (! msg_id) return false; + console.log(msg_id); + //var call_defer = self.ds.call('message_remove_pushed_notifications', [[self.params.res_id], [parseInt(msg_id)], true]); + $(event.srcElement).parents('li.oe_mail_thread_msg').eq(0).hide(); + if (self.params.thread_level > 0) { + $(event.srcElement).parents('ul.oe_mail_thread').eq(0).hide(); + } + return false; + }); + // event: click on 'hide this type' in wheel_menu + this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_hide_type', 'click', function (event) { + console.log('hiding type'); + if (! confirm(_t("Do you really want to hide this thread ?"))) { return false; } + var msg_id = event.srcElement.dataset.id; + if (! msg_id) return false; + console.log(msg_id); + //var call_defer = self.ds.call('message_remove_pushed_notifications', [[self.params.res_id], [parseInt(msg_id)], true]); + $(event.srcElement).parents('li.oe_mail_thread_msg').eq(0).hide(); + if (self.params.thread_level > 0) { + $(event.srcElement).parents('ul.oe_mail_thread').eq(0).hide(); + } + return false; + }); // event: click on an internal link this.$element.find('div.oe_mail_thread_display').delegate('a.intlink', 'click', function (event) { // lazy implementation: fetch data and try to redirect @@ -193,6 +221,10 @@ openerp.mail = function(session) { } else self.do_action({ type: 'ir.actions.act_window', res_model: res_model, res_id: parseInt(res_id), views: [[false, 'form']]}); }); + // event: click on the wheel menu in messages + this.$element.find('div.oe_mail_thread_display').delegate('img.oe_mail_msg_menu_icon', 'click', function (event) { + self.$element.find('ul.oe_mail_msg_menu').toggle(); + }); }, destroy: function () { diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index f034b04311d..7fe1d39a661 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -58,6 +58,12 @@
  • + menu +
    From 318ef517ab037bafba43c2e5d85301f0f88432c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 20 Apr 2012 11:36:45 +0200 Subject: [PATCH 009/341] [REF] mail.message.common model: renamed subtype to content_subtype. Purpose: make a distinction between content and message model. Type and subtype will be used to distinguish messages, content_subtype to distinguish the content itself. bzr revid: tde@openerp.com-20120420093645-tt78zzrmq2nxomvb --- addons/base_calendar/base_calendar.py | 2 +- addons/crm/wizard/mail_compose_message.py | 2 +- addons/email_template/email_template.py | 4 +- addons/mail/mail_message.py | 78 ++++++++++++---------- addons/mail/mail_message_view.xml | 4 +- addons/mail/mail_thread.py | 22 +++--- addons/mail/wizard/mail_compose_message.py | 12 ++-- 7 files changed, 65 insertions(+), 59 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 4dffd8bcbf8..09033bffa84 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -515,7 +515,7 @@ property or property parameter."), sub, body, attachments=attach and {'invitation.ics': attach} or None, - subtype='html', + content_subtype='html', reply_to=email_from, context=context ) diff --git a/addons/crm/wizard/mail_compose_message.py b/addons/crm/wizard/mail_compose_message.py index b82c3083f3a..11d340b2f76 100644 --- a/addons/crm/wizard/mail_compose_message.py +++ b/addons/crm/wizard/mail_compose_message.py @@ -54,7 +54,7 @@ class mail_compose_message(osv.osv_memory): 'email_cc' : tools.ustr(data.email_cc or ''), 'model': model, 'res_id': res_id, - 'subtype': 'plain', + 'content_subtype': 'plain', }) if hasattr(data, 'section_id'): result.update({'reply_to' : data.section_id and data.section_id.reply_to or False}) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index 86f136ca5b9..31bf9a76441 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -310,7 +310,7 @@ class email_template(osv.osv): 'attachment_ids': False, 'message_id': False, 'state': 'outgoing', - 'subtype': 'plain', + 'content_subtype': 'plain', } if not template_id: return values @@ -326,7 +326,7 @@ class email_template(osv.osv): or False if values['body_html']: - values.update(subtype='html') + values.update(content_subtype='html') if template.user_signature: signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 9228861b139..1595fbae077 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -63,18 +63,21 @@ def to_email(text): if not text: return [] return re.findall(r'([^ ,<@]+@[^> ,]+)', text) -class mail_message_common(osv.osv_memory): +class mail_message_common(osv.TransientModel): """Common abstract class for holding the main attributes of a message object. It could be reused as parent model for any database model or wizard screen that needs to hold a kind of - message""" + message. + All internal logic should be in a database-based model. For example, + a wizard for writing emails should inherit from this class and not + from mail.message.""" def get_body(self, cr, uid, ids, name, arg, context=None): if context is None: context = {} result = dict.fromkeys(ids, '') for message in self.browse(cr, uid, ids, context=context): - if message.subtype == 'html': + if message.content_subtype == 'html': result[message.id] = message.body_html else: result[message.id] = message.body_text @@ -85,7 +88,7 @@ class mail_message_common(osv.osv_memory): - obj: mail.message object - name: 'body' - args: [('body', 'ilike', 'blah')]""" - return ['|', '&', ('subtype', '=', 'html'), ('body_html', args[0][1], args[0][2]), ('body_text', args[0][1], args[0][2])] + return ['|', '&', ('content_subtype', '=', 'html'), ('body_html', args[0][1], args[0][2]), ('body_text', args[0][1], args[0][2])] def get_record_name(self, cr, uid, ids, name, arg, context=None): if context is None: @@ -115,19 +118,20 @@ class mail_message_common(osv.osv_memory): help="Full message headers, e.g. SMTP session headers (usually available on inbound messages only)"), 'message_id': fields.char('Message-Id', size=256, help='Message unique identifier', select=1, readonly=1), 'references': fields.text('References', help='Message references, such as identifiers of previous messages', readonly=1), - 'subtype': fields.char('Message type', size=32, help="Type of message, usually 'html' or 'plain', used to " - "select plaintext or rich text contents accordingly", readonly=1), + 'content_subtype': fields.char('Message content subtype', size=32, + help="Type of message, usually 'html' or 'plain', used to " + "select plain-text or rich-text contents accordingly", readonly=1), 'body_text': fields.text('Text contents', help="Plain-text version of the message"), 'body_html': fields.text('Rich-text contents', help="Rich-text/HTML version of the message"), 'body': fields.function(get_body, fnct_search = search_body, string='Message content', type='text', - help="Content of the message. This content equals the body_text field for plain-test messages, and body_html for rich-text/HTML messages. This allows having one field if we want to access the content matching the message subtype."), + help="Content of the message. This content equals the body_text field for plain-test messages, and body_html for rich-text/HTML messages. This allows having one field if we want to access the content matching the message content_subtype."), 'parent_id': fields.many2one('mail.message', 'Parent message', help="Parent message, used for displaying as threads with hierarchy", select=True, ondelete='set null',), 'child_ids': fields.one2many('mail.message', 'parent_id', 'Child messages'), } _defaults = { - 'subtype': 'plain', + 'content_subtype': 'plain', 'date': (lambda *a: fields.datetime.now()), } @@ -206,12 +210,12 @@ class mail_message(osv.osv): ('comment', 'Comment'), ('notification', 'System notification'), ], 'Type', help="Message type: e-mail for e-mail message, notification for system message, comment for other messages such as user replies"), - 'message_subtype': fields.selection([ + 'message_tmptype': fields.selection([ ('email', 'e-mail'), ('comment', 'Comment'), ('create', 'Create'), ('cancel', 'Cancel'), - ], 'Type', help="Message subtype, such as create or cancel. May be overriden by addons."), + ], 'Type', help="Message temptype, such as create or cancel. May be overriden by addons."), 'partner_id': fields.many2one('res.partner', 'Related partner'), 'user_id': fields.many2one('res.users', 'Related user', readonly=1), 'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments'), @@ -230,7 +234,7 @@ class mail_message(osv.osv): _defaults = { 'type': 'email', - 'message_subtype': 'email', + 'message_tmptype': 'email', 'state': 'received', } @@ -250,18 +254,18 @@ class mail_message(osv.osv): default.update(message_id=False,original=False,headers=False) return super(mail_message,self).copy(cr, uid, id, default=default, context=context) - def schedule_with_attach(self, cr, uid, email_from, email_to, subject, body, model=False, email_cc=None, - email_bcc=None, reply_to=False, attachments=None, message_id=False, references=False, - res_id=False, subtype='plain', headers=None, mail_server_id=False, auto_delete=False, - context=None): + def schedule_with_attach(self, cr, uid, email_from, email_to, subject, body, model=False, + email_cc=None, email_bcc=None, reply_to=False, attachments=None, + message_id=False, references=False, res_id=False, content_subtype='plain', + headers=None, mail_server_id=False, auto_delete=False, context=None): """Schedule sending a new email message, to be sent the next time the mail scheduler runs, or the next time :meth:`process_email_queue` is called explicitly. :param string email_from: sender email address :param list email_to: list of recipient addresses (to be joined with commas) :param string subject: email subject (no pre-encoding/quoting necessary) - :param string body: email body, according to the ``subtype`` (by default, plaintext). - If html subtype is used, the message will be automatically converted + :param string body: email body, according to the ``content_subtype`` + (by default, plaintext). If html content_subtype is used, the message will be automatically converted to plaintext and wrapped in multipart/alternative. :param list email_cc: optional list of string values for CC header (to be joined with commas) :param list email_bcc: optional list of string values for BCC header (to be joined with commas) @@ -272,9 +276,9 @@ class mail_message(osv.osv): be used to generate a tracking id, used to match any response related to the same document) :param string reply_to: optional value of Reply-To header - :param string subtype: optional mime subtype for the text body (usually 'plain' or 'html'), - must match the format of the ``body`` parameter. Default is 'plain', - making the content part of the mail "text/plain". + :param string content_subtype: optional mime content_subtype for the text body (usually 'plain' or 'html'), + must match the format of the ``body`` parameter. Default is 'plain', + making the content part of the mail "text/plain". :param dict attachments: map of filename to filecontents, where filecontents is a string containing the bytes of the attachment :param dict headers: optional map of headers to set on the outgoing mail (may override the @@ -299,8 +303,8 @@ class mail_message(osv.osv): 'model': model, 'res_id': res_id, 'type': 'email', - 'body_text': body if subtype != 'html' else False, - 'body_html': body if subtype == 'html' else False, + 'body_text': body if content_subtype != 'html' else False, + 'body_html': body if content_subtype == 'html' else False, 'email_from': email_from, 'email_to': email_to and ','.join(email_to) or '', 'email_cc': email_cc and ','.join(email_cc) or '', @@ -308,7 +312,7 @@ class mail_message(osv.osv): 'reply_to': reply_to, 'message_id': message_id, 'references': references, - 'subtype': subtype, + 'content_subtype': content_subtype, 'headers': headers, # serialize the dict on the fly 'mail_server_id': mail_server_id, 'state': 'outgoing', @@ -388,7 +392,7 @@ class mail_message(osv.osv): 'headers' : { 'X-Mailer': mailer, #.. all X- headers... }, - 'subtype': msg_mime_subtype, + 'content_subtype': msg_mime_subtype, 'body_text': plaintext_body 'body_html': html_body, 'attachments': [('file1', 'bytes'), @@ -464,7 +468,7 @@ class mail_message(osv.osv): msg['in-reply-to'] = msg_txt.get('In-Reply-To') msg['headers'] = {} - msg['subtype'] = 'plain' + msg['content_subtype'] = 'plain' for item in msg_txt.items(): if item[0].startswith('X-'): msg['headers'].update({item[0]: item[1]}) @@ -473,7 +477,7 @@ class mail_message(osv.osv): body = msg_txt.get_payload(decode=True) if 'text/html' in msg.get('content-type', ''): msg['body_html'] = body - msg['subtype'] = 'html' + msg['content_subtype'] = 'html' if body: body = tools.html2plaintext(body) msg['body_text'] = tools.ustr(body, encoding) @@ -482,9 +486,9 @@ class mail_message(osv.osv): if msg_txt.is_multipart() or 'multipart/alternative' in msg.get('content-type', ''): body = "" if 'multipart/alternative' in msg.get('content-type', ''): - msg['subtype'] = 'alternative' + msg['content_subtype'] = 'alternative' else: - msg['subtype'] = 'mixed' + msg['content_subtype'] = 'mixed' for part in msg_txt.walk(): if part.get_content_maintype() == 'multipart': continue @@ -498,7 +502,7 @@ class mail_message(osv.osv): content = tools.ustr(content, encoding) if part.get_content_subtype() == 'html': msg['body_html'] = content - msg['subtype'] = 'html' # html version prevails + msg['content_subtype'] = 'html' # html version prevails body = tools.ustr(tools.html2plaintext(content)) body = body.replace(' ', '') elif part.get_content_subtype() == 'plain': @@ -515,7 +519,7 @@ class mail_message(osv.osv): # for backwards compatibility: msg['body'] = msg['body_text'] - msg['sub_type'] = msg['subtype'] or 'plain' + msg['sub_type'] = msg['content_subtype'] or 'plain' return msg def _postprocess_sent_message(self, cr, uid, message, context=None): @@ -561,15 +565,17 @@ class mail_message(osv.osv): for attach in message.attachment_ids: attachments.append((attach.datas_fname, base64.b64decode(attach.datas))) - body = message.body_html if message.subtype == 'html' else message.body_text + body = message.body_html if message.content_subtype == 'html' else message.body_text body_alternative = None - subtype_alternative = None - if message.subtype == 'html' and message.body_text: + content_subtype_alternative = None + if message.content_subtype == 'html' and message.body_text: # we have a plain text alternative prepared, pass it to # build_message instead of letting it build one body_alternative = message.body_text - subtype_alternative = 'plain' + content_subtype_alternative = 'plain' + # build an RFC2822 email.message.Message object adn send it + # without queuing msg = ir_mail_server.build_email( email_from=message.email_from, email_to=to_email(message.email_to), @@ -582,8 +588,8 @@ class mail_message(osv.osv): attachments=attachments, message_id=message.message_id, references = message.references, object_id=message.res_id and ('%s-%s' % (message.res_id,message.model)), - subtype=message.subtype, - subtype_alternative=subtype_alternative, + subtype=message.content_subtype, + subtype_alternative=content_subtype_alternative, headers=message.headers and ast.literal_eval(message.headers)) res = ir_mail_server.send_email(cr, uid, msg, mail_server_id=message.mail_server_id.id, diff --git a/addons/mail/mail_message_view.xml b/addons/mail/mail_message_view.xml index ecd106e05e5..1a7d511de3b 100644 --- a/addons/mail/mail_message_view.xml +++ b/addons/mail/mail_message_view.xml @@ -103,7 +103,7 @@ - + @@ -113,7 +113,7 @@ - +
    + Checklist From f19e5ff9bcc8cbee1d8e389c5a59d5e75591730a Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 18 Jul 2012 15:37:12 +0200 Subject: [PATCH 268/341] [IMP] don't collapse newlines in list cells bzr revid: xmo@openerp.com-20120718133712-0pbdahv62rf0nslc --- addons/web/static/src/css/base.css | 1 + addons/web/static/src/css/base.sass | 1 + addons/web/static/src/xml/base.xml | 5 ++--- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 97d2fcf57a7..f92d5cbf1c2 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2256,6 +2256,7 @@ } .openerp .oe_list_content > tbody > tr > td.oe_list_field_cell { padding: 3px 6px; + white-space: pre-line; } .openerp .oe_list_content > tbody > tr > td, .openerp .oe_list_content > tbody > tr > th { line-height: 18px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index c5197743acd..2ad33c8ca62 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1784,6 +1784,7 @@ $sheet-max-width: 860px border-top: 1px solid #ddd > td.oe_list_field_cell padding: 3px 6px + white-space: pre-line > td, > th line-height: 18px > button diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index a9c8e15bcd7..6d0d4a9ea7d 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -657,9 +657,8 @@ - - + t-att-data-field="column.id" + > From 9096f2c45c3c9c12486eed2dd273aeb03441cb68 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 18 Jul 2012 15:46:07 +0200 Subject: [PATCH 269/341] [ADD] reimplement o2m's cancel-on-blur when no alteration has been done by the user to the row being edited (new or not) bzr revid: xmo@openerp.com-20120718134607-bukj6c5lysmqeer3 --- addons/web/static/src/js/view_form.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 948b3a73913..92faa3d7d15 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3331,13 +3331,20 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({ /** * Handles blurring of the nested form (saves the currently edited row), * unless the flag to ignore the event is set to ``true`` + * + * Makes the internal form go away */ _on_form_blur: function () { if (this.__ignore_blur) { this.__ignore_blur = false; return; } - this.save_edition(); + // FIXME: why isn't there an API for this? + if (this.editor.form.$element.hasClass('oe_form_dirty')) { + this.save_edition(); + return; + } + this.cancel_edition(); }, keyup_ENTER: function () { // blurring caused by hitting the [Return] key, should skip the From 03dd20254e2c62b8290f9b329bde256e92fcc3cd Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 18 Jul 2012 16:01:31 +0200 Subject: [PATCH 270/341] [IMP] use 'Save' as label of the button to save an editable list row bzr revid: xmo@openerp.com-20120718140131-eop88n524hwvrguw --- addons/web/static/src/xml/base.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 6d0d4a9ea7d..94b76c170ea 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -668,7 +668,7 @@ + type="button">Save discard From e068ed26636212575245fad882ea549e3a505d91 Mon Sep 17 00:00:00 2001 From: "Rajesh Prajapati (OpenERP)" Date: Thu, 19 Jul 2012 11:08:03 +0530 Subject: [PATCH 271/341] [IMP]vat to tax : changed the label Vat as its abbreviation bzr revid: rpr@tinyerp.com-20120719053803-r4p9dhh28h2bysmm --- addons/account/account.py | 26 +++++++++---------- addons/account/account_move_line.py | 4 +-- .../data/configurable_account_chart.xml | 6 ++--- addons/account/demo/account_minimal.xml | 4 +-- .../report/account_journal_sale_purchase.rml | 6 ++--- .../account/report/account_print_invoice.rml | 2 +- .../account/report/account_print_overdue.rml | 2 +- addons/account/wizard/account_vat_view.xml | 4 +-- .../account_coda/account_coda_comm_type.xml | 2 +- .../account_coda_trans_category.xml | 2 +- .../account_coda/account_coda_trans_code.xml | 4 +-- .../report/account_followup_print.rml | 2 +- addons/l10n_th/account_data.xml | 20 +++++++------- addons/l10n_us/account_tax_template.xml | 2 +- addons/mrp_repair/report/order.rml | 4 +-- addons/point_of_sale/report/pos_lines.rml | 2 +- addons/report_intrastat/report/invoice.rml | 2 +- addons/sale/report/sale_order.rml | 4 +-- 18 files changed, 49 insertions(+), 49 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 78d0a192237..3675e89c06d 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1788,7 +1788,7 @@ class account_tax_code(osv.osv): 'line_ids': fields.one2many('account.move.line', 'tax_code_id', 'Lines'), 'company_id': fields.many2one('res.company', 'Company', required=True), 'sign': fields.float('Coefficent for parent', required=True, help='You can specify here the coefficient that will be used when consolidating the amount of this case into its parent. For example, set 1/-1 if you want to add/substract it.'), - 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any TAX related to this Tax Code to appear on invoices"), + 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any Tax related to this Tax Code to appear on invoices"), 'sequence': fields.integer('Sequence', help="Determine the display order in the report 'Accounting \ Reporting \ Generic Reporting \ Taxes \ Taxes Report'"), } @@ -1880,17 +1880,17 @@ class account_tax(osv.osv): 'python_applicable':fields.text('Python Code'), # - # Fields used for the TAX declaration + # Fields used for the Tax declaration # - 'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the TAX declaration."), - 'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the TAX declaration."), + 'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the Tax declaration."), + 'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the Tax declaration."), 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), # Same fields for refund invoices - 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the TAX declaration."), - 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the TAX declaration."), + 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the Tax declaration."), + 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the Tax declaration."), 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), 'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"), @@ -2217,7 +2217,7 @@ class account_tax(osv.osv): def compute_inv(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None): """ Compute tax values for given PRICE_UNIT, QUANTITY and a buyer/seller ADDRESS_ID. - Price Unit is a TAX included price + Price Unit is a Tax included price RETURN: [ tax ] @@ -2673,7 +2673,7 @@ class account_tax_code_template(osv.osv): 'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True), 'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Child Codes'), 'sign': fields.float('Sign For Parent', required=True), - 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any TAX related to this Tax Code to appear on invoices"), + 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any Tax related to this Tax Code to appear on invoices"), } _defaults = { @@ -2788,17 +2788,17 @@ class account_tax_template(osv.osv): 'python_applicable':fields.text('Python Code'), # - # Fields used for the TAX declaration + # Fields used for the Tax declaration # - 'base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the TAX declaration."), - 'tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the TAX declaration."), + 'base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the Tax declaration."), + 'tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the Tax declaration."), 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), # Same fields for refund invoices - 'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the TAX declaration."), - 'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the TAX declaration."), + 'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the Tax declaration."), + 'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the Tax declaration."), 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), 'include_base_amount': fields.boolean('Include in Base Amount', help="Set if the amount of tax must be included in the base amount before computing the next taxes."), diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index e9f3459ad2c..5eb56bfa645 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -327,7 +327,7 @@ class account_move_line(osv.osv): if account and ((not fields) or ('debit' in fields) or ('credit' in fields)): data['account_id'] = account.id - # Propose the price TAX excluded, the TAX will be added when confirming line + # Propose the price Tax excluded, the Tax will be added when confirming line if account.tax_ids: taxes = fiscal_pos_obj.map_tax(cr, uid, part and part.property_account_position or False, account.tax_ids) tax = tax_obj.browse(cr, uid, taxes) @@ -1347,7 +1347,7 @@ class account_move_line(osv.osv): } if data['tax_code_id']: self.create(cr, uid, data, context) - #create the TAX movement + #create the Tax movement data = { 'move_id': vals['move_id'], 'name': tools.ustr(vals['name'] or '') + ' ' + tools.ustr(tax['name'] or ''), diff --git a/addons/account/data/configurable_account_chart.xml b/addons/account/data/configurable_account_chart.xml index 345202de899..21a58fb2a6d 100644 --- a/addons/account/data/configurable_account_chart.xml +++ b/addons/account/data/configurable_account_chart.xml @@ -385,8 +385,8 @@ - - + + @@ -444,7 +444,7 @@ purchase - + diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index 3592c82d6f8..b13af6a735c 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -94,7 +94,7 @@ X11003 - Output TAX - (test) + Output Tax - (test) other @@ -152,7 +152,7 @@ X1112 - Input TAX - (test) + Input Tax - (test) other diff --git a/addons/account/report/account_journal_sale_purchase.rml b/addons/account/report/account_journal_sale_purchase.rml index 69f26ce1ff8..236879669f9 100644 --- a/addons/account/report/account_journal_sale_purchase.rml +++ b/addons/account/report/account_journal_sale_purchase.rml @@ -219,7 +219,7 @@ Account Partner Label - TAX + Tax Debit Credit @@ -271,7 +271,7 @@ Account Partner Label - TAX + Tax Debit Credit @@ -330,7 +330,7 @@ - TAX Declaration + Tax Declaration diff --git a/addons/account/report/account_print_invoice.rml b/addons/account/report/account_print_invoice.rml index 12192f8472b..4ffa7a33f9d 100644 --- a/addons/account/report/account_print_invoice.rml +++ b/addons/account/report/account_print_invoice.rml @@ -168,7 +168,7 @@ Tel. : [[ (o.partner_id.phone) or removeParentNode('para') ]] Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]] - TAX : [[ (o.partner_id.vat) or removeParentNode('para') ]] + VAT : [[ (o.partner_id.vat) or removeParentNode('para') ]] diff --git a/addons/account/report/account_print_overdue.rml b/addons/account/report/account_print_overdue.rml index 6b4253d99f9..2d4238823da 100644 --- a/addons/account/report/account_print_overdue.rml +++ b/addons/account/report/account_print_overdue.rml @@ -138,7 +138,7 @@ - TAX: [[ o.vat or removeParentNode('para') ]] + VAT: [[ o.vat or removeParentNode('para') ]] diff --git a/addons/account/wizard/account_vat_view.xml b/addons/account/wizard/account_vat_view.xml index 44dae7ec5ac..6e5dc09b816 100644 --- a/addons/account/wizard/account_vat_view.xml +++ b/addons/account/wizard/account_vat_view.xml @@ -8,7 +8,7 @@ form - 106 - Method of calculation (TAX, withholding tax on income, commission, etc.) + Method of calculation (Tax, withholding tax on income, commission, etc.) 107 diff --git a/addons/account_coda/account_coda_trans_category.xml b/addons/account_coda/account_coda_trans_category.xml index e2d46e017b4..d96282bb422 100644 --- a/addons/account_coda/account_coda_trans_category.xml +++ b/addons/account_coda/account_coda_trans_category.xml @@ -49,7 +49,7 @@ 011 - TAX + Tax 012 diff --git a/addons/account_coda/account_coda_trans_code.xml b/addons/account_coda/account_coda_trans_code.xml index 4f4e0d9f3cf..4ab9650d59a 100644 --- a/addons/account_coda/account_coda_trans_code.xml +++ b/addons/account_coda/account_coda_trans_code.xml @@ -382,7 +382,7 @@ code Reimbursement of cheque-related costs - Overall amount, TAX included + Overall amount, Tax included 99 @@ -1850,7 +1850,7 @@ code Miscellaneous fees and commissions - Costs not specified otherwise, often with a manual communication (e.g. for collecting, ordering funds). TAX excluded = type 0 TAX included = type 3 (at least 3 articles) + Costs not specified otherwise, often with a manual communication (e.g. for collecting, ordering funds). Tax excluded = type 0 Tax included = type 3 (at least 3 articles) 35 diff --git a/addons/account_followup/report/account_followup_print.rml b/addons/account_followup/report/account_followup_print.rml index 83fcfe0f24c..3d096ecf3ac 100644 --- a/addons/account_followup/report/account_followup_print.rml +++ b/addons/account_followup/report/account_followup_print.rml @@ -141,7 +141,7 @@ - TAX: [[ o.partner_id.vat or removeParentNode('para') ]] + VAT: [[ o.partner_id.vat or removeParentNode('para') ]] diff --git a/addons/l10n_th/account_data.xml b/addons/l10n_th/account_data.xml index 53af51f40d4..84ccb182792 100644 --- a/addons/l10n_th/account_data.xml +++ b/addons/l10n_th/account_data.xml @@ -125,7 +125,7 @@ 1510 - Input TAX + Input Tax other @@ -187,7 +187,7 @@ 2310 - Output TAX + Output Tax other @@ -333,7 +333,7 @@ - + Value Added Tax @@ -341,13 +341,13 @@ - Output TAX + Output Tax PP30_4 - Input TAX + Input Tax PP30_6 @@ -397,7 +397,7 @@ - + Taxes to be paid @@ -410,13 +410,13 @@ - Output TAX + Output Tax PP30_5 - Input TAX + Input Tax PP30_7 @@ -485,7 +485,7 @@ - Input TAX + Input Tax percent @@ -497,7 +497,7 @@ - Output TAX + Output Tax percent diff --git a/addons/l10n_us/account_tax_template.xml b/addons/l10n_us/account_tax_template.xml index 292872a7b6e..6e70700a9f3 100644 --- a/addons/l10n_us/account_tax_template.xml +++ b/addons/l10n_us/account_tax_template.xml @@ -27,7 +27,7 @@ purchase - + diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index 794aa13e2b9..be5737d4b85 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -169,7 +169,7 @@ Description - TAX + Tax Quantity @@ -278,7 +278,7 @@ Description - TAX + Tax Quantity diff --git a/addons/point_of_sale/report/pos_lines.rml b/addons/point_of_sale/report/pos_lines.rml index 6ec3e728653..be394ed4f16 100644 --- a/addons/point_of_sale/report/pos_lines.rml +++ b/addons/point_of_sale/report/pos_lines.rml @@ -150,7 +150,7 @@ Description - TAX + Tax Quantity diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml index e76e3a00196..c07bd06f402 100644 --- a/addons/report_intrastat/report/invoice.rml +++ b/addons/report_intrastat/report/invoice.rml @@ -148,7 +148,7 @@ Tel. : [[ (o.partner_id.phone) or removeParentNode('para') ]] Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]] - TAX : [[ (o.partner_id.vat) or removeParentNode('para') ]] + VAT : [[ (o.partner_id.vat) or removeParentNode('para') ]] diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml index 2a0b4b1955a..8fecc17e62c 100644 --- a/addons/sale/report/sale_order.rml +++ b/addons/sale/report/sale_order.rml @@ -134,7 +134,7 @@ Description - TAX + Tax Quantity @@ -236,7 +236,7 @@ Description - TAX + Tax Quantity From 06104ba553702b16878d52c5b8ab089355216a5e Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 19 Jul 2012 10:23:52 +0200 Subject: [PATCH 272/341] [FIX] shitty undoc flag so saving a form doesn't forget/miss a row being edited bzr revid: xmo@openerp.com-20120719082352-pqq02u03fo09rcwe --- addons/web/static/src/js/view_form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 92faa3d7d15..9e3db4f1b05 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3236,6 +3236,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({ if (!form.$element.is('.oe_form_dirty')) { return true; } + this.o2m._dirty_flag = true; // Otherwise validate internal form return _(form.fields).chain() From ac5dc58367d9bed5a576baaa7b803a67b5d00d07 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 19 Jul 2012 11:57:42 +0200 Subject: [PATCH 273/341] [IMP] focus the clicked field when starting a row edition by clicking on a cell bzr revid: xmo@openerp.com-20120719095742-lps9xjsrvhn5fnlh --- .../web/static/src/js/view_list_editable.js | 54 +++++++++++++------ doc/list-view.rst | 22 +++++++- 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index 052a471f0f3..56df125c98b 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -165,9 +165,11 @@ openerp.web.list_editable = function (instance) { * Set up the edition of a record of the list view "inline" * * @param {instance.web.list.Record} [record] record to edit, leave empty to create a new record + * @param {Object} [options] + * @param {String} [options.focus_field] field to focus at start of edition * @return {jQuery.Deferred} */ - start_edition: function (record) { + start_edition: function (record, options) { var self = this; var item = false; if (record) { @@ -194,14 +196,14 @@ openerp.web.list_editable = function (instance) { return self.editor.edit(item, function (field_name, field) { var cell = cells[field_name]; if (!cell || field.get('effective_readonly')) { - // Readonly fields can just remain the list's, form's - // usually don't have backgrounds &al + // Readonly fields can just remain the list's, + // form's usually don't have backgrounds &al field.set({invisible: true}); return; } self.fields_for_resize.push({field: field, cell: cell}); - }).pipe(function () { + }, options).pipe(function () { $recordRow.addClass('oe_edition'); self.resize_fields(); return record.attributes; @@ -558,7 +560,33 @@ openerp.web.list_editable = function (instance) { throw new Error("is_editing's state filter must be either `new` or" + " `edit` if provided"); }, - edit: function (record, configureField) { + _focus_setup: function (focus_field) { + var form = this.form; + + var field; + // If a field to focus was specified + if (focus_field + // Is actually in the form + && (field = form.fields[focus_field]) + // And is visible + && field.$element.is(':visible')) { + // focus it + field.focus(); + return; + } + + _(form.fields_order).detect(function (name) { + // look for first visible field in fields_order, focus it + var field = form.fields[name]; + if (!field.$element.is(':visible')) { + return false; + } + field.focus(); + // Stop as soon as a field got focused + return true; + }); + }, + edit: function (record, configureField, options) { // TODO: specify sequence of edit calls var self = this; var form = self.form; @@ -573,16 +601,7 @@ openerp.web.list_editable = function (instance) { _(form.fields).each(function (field, name) { configureField(name, field); }); - // TODO: actually focus clicked field (if editable) - _(form.fields_order).detect(function (name) { - // look for first visible field in fields_order, focus it - var field = form.fields[name]; - if (!field.$element.is(':visible')) { - return false; - } - field.focus(); - return true; - }); + self._focus_setup(options && options.focus_field); return form; }); }, @@ -627,7 +646,10 @@ openerp.web.list_editable = function (instance) { return this._super.apply(this, arguments); } var record_id = $(event.currentTarget).data('id'); - this.view.start_edition(record_id ? this.records.get(record_id) : null); + this.view.start_edition( + record_id ? this.records.get(record_id) : null, { + focus_field: $(event.target).data('field') + }); }, /** * If a row mapping to the record (@data-id matching the record's id or diff --git a/doc/list-view.rst b/doc/list-view.rst index ebb5f0ffe4d..0d67c27f963 100644 --- a/doc/list-view.rst +++ b/doc/list-view.rst @@ -131,7 +131,7 @@ Interaction Methods rejected if a pending edition could not be saved (e.g. validation failure) -.. js:function:: openerp.web.ListView.start_edition([record]) +.. js:function:: openerp.web.ListView.start_edition([record][, options]) Starts editing the provided record inline, through an overlay form view of editable fields in the record. @@ -142,7 +142,9 @@ Interaction Methods This method resolves any pending edition when invoked, before starting a new edition. + :param record: record to edit, or null to create a new record :type record: :js:class:`~openerp.web.list.Record` + :param EditOptions options: :returns: delegate to the form used for the edition .. js:function:: openerp.web.ListView.save_edition @@ -303,7 +305,7 @@ formview, delegating instead to its :type record_state: String :rtype: Boolean - .. js:function:: openerp.web.list.Editor.edit(record, configureField) + .. js:function:: openerp.web.list.Editor.edit(record, configureField[, options]) Loads the provided record into the internal form view and displays the form view. @@ -320,6 +322,7 @@ formview, delegating instead to its method do some last-minute configuration of form fields. :type configureField: Function + :param EditOptions options: :returns: jQuery delegate to the form object .. js:function:: openerp.web.list.Editor.save @@ -391,6 +394,21 @@ formview, delegating instead to its dataset (instead of appended) :rtype: Boolean + +.. js:class:: EditOptions + + Options object optionally passed into a method starting an edition + to configure its setup and behavior + + .. js:attribute:: focus_field + + Name of the field to set focus on after setting up the edition + of the record. + + If this option is not provided, or the requested field can not + be focused (invisible, readonly or not in the view), the first + visible non-readonly field is focused. + Changes from 6.1 ---------------- From 9e0be9ffd17bf4f2293ef746274527ef5d8e8ea0 Mon Sep 17 00:00:00 2001 From: "Rajesh Prajapati (OpenERP)" Date: Thu, 19 Jul 2012 16:41:15 +0530 Subject: [PATCH 274/341] [IMP]vat to tax : changed the label tax in lowercase bzr revid: rpr@tinyerp.com-20120719111115-ap37b1bo2o7w1w1k --- addons/account/account.py | 20 ++++++++++---------- addons/account/wizard/account_vat_view.xml | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index ce6cba3edff..c95dbe253ad 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1788,7 +1788,7 @@ class account_tax_code(osv.osv): 'line_ids': fields.one2many('account.move.line', 'tax_code_id', 'Lines'), 'company_id': fields.many2one('res.company', 'Company', required=True), 'sign': fields.float('Coefficent for parent', required=True, help='You can specify here the coefficient that will be used when consolidating the amount of this case into its parent. For example, set 1/-1 if you want to add/substract it.'), - 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any Tax related to this Tax Code to appear on invoices"), + 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax related to this tax Code to appear on invoices"), 'sequence': fields.integer('Sequence', help="Determine the display order in the report 'Accounting \ Reporting \ Generic Reporting \ Taxes \ Taxes Report'"), } @@ -1882,15 +1882,15 @@ class account_tax(osv.osv): # # Fields used for the Tax declaration # - 'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the Tax declaration."), - 'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the Tax declaration."), + 'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the tax declaration."), + 'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the tax declaration."), 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), # Same fields for refund invoices - 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the Tax declaration."), - 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the Tax declaration."), + 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the tax declaration."), + 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the tax declaration."), 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), 'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"), @@ -2673,7 +2673,7 @@ class account_tax_code_template(osv.osv): 'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True), 'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Child Codes'), 'sign': fields.float('Sign For Parent', required=True), - 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any Tax related to this Tax Code to appear on invoices"), + 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax related to this tax Code to appear on invoices"), } _defaults = { @@ -2790,15 +2790,15 @@ class account_tax_template(osv.osv): # # Fields used for the Tax declaration # - 'base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the Tax declaration."), - 'tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the Tax declaration."), + 'base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the tax declaration."), + 'tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the tax declaration."), 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), # Same fields for refund invoices - 'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the Tax declaration."), - 'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the Tax declaration."), + 'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the tax declaration."), + 'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the tax declaration."), 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), 'include_base_amount': fields.boolean('Include in Base Amount', help="Set if the amount of tax must be included in the base amount before computing the next taxes."), diff --git a/addons/account/wizard/account_vat_view.xml b/addons/account/wizard/account_vat_view.xml index 6e5dc09b816..e1a5ea3b140 100644 --- a/addons/account/wizard/account_vat_view.xml +++ b/addons/account/wizard/account_vat_view.xml @@ -8,7 +8,7 @@ form - Date: Thu, 19 Jul 2012 13:14:14 +0200 Subject: [PATCH 275/341] [FIX] Client must do the session_bind bzr revid: chs@openerp.com-20120719111414-ivf6lq2iymws0ytm --- addons/web/static/src/js/boot.js | 5 +--- addons/web/static/src/js/chrome.js | 47 +++++++++++++++++------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/addons/web/static/src/js/boot.js b/addons/web/static/src/js/boot.js index 9f426ee787c..c1b1b984abe 100644 --- a/addons/web/static/src/js/boot.js +++ b/addons/web/static/src/js/boot.js @@ -21,7 +21,7 @@ * * @param {Array} modules list of modules to initialize */ - init: function(modules, origin) { + init: function(modules) { // By default only web will be loaded, the rest will be by loaded // by openerp.web.Session on the first session_authenticate modules = _.union(['web'], modules || []); @@ -39,9 +39,6 @@ for(var i=0; i < modules.length; i++) { openerp[modules[i]](new_instance,new_instance[modules[i]]); } - new_instance.connection.synchronized_mode(function() { - new_instance.connection.session_bind(origin); - }); return new_instance; } }; diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 9eb8a238cec..f1163440a5e 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -857,17 +857,24 @@ instance.web.UserMenu = instance.web.Widget.extend({ }); instance.web.Client = instance.web.Widget.extend({ - init: function(parent) { + init: function(parent, origin) { if (instance.webclient) { throw new Error('Only one client per instance'); } instance.client = instance.webclient = this; this._super(parent); + this._origin = origin }, start: function() { - this.bind_events(); - this.show_common(); + var self = this; + return instance.connection.session_bind(this.origin).then(function() { + var $e = $(QWeb.render(self._template, {})); + self.$element.replaceWith($e); + self.$element = $e; + self.bind_events(); + self.show_common(); + }); }, bind_events: function() { @@ -914,7 +921,7 @@ instance.web.Client = instance.web.Widget.extend({ }); instance.web.WebClient = instance.web.Client.extend({ - template: 'WebClient', + _template: 'WebClient', init: function(parent) { this._super(parent); this._current_state = null; @@ -1081,9 +1088,9 @@ instance.web.WebClient = instance.web.Client.extend({ }); instance.web.EmbeddedClient = instance.web.Client.extend({ - template: 'EmbedClient', - init: function(parent, dbname, login, key, action_id, options) { - this._super(parent); + _template: 'EmbedClient', + init: function(parent, origin, dbname, login, key, action_id, options) { + this._super(parent, origin); this.dbname = dbname; this.login = login; @@ -1095,24 +1102,24 @@ instance.web.EmbeddedClient = instance.web.Client.extend({ var self = this; return $.when(this._super()).pipe(function() { return instance.connection.session_authenticate(self.dbname, self.login, self.key, true).pipe(function() { - return self.rpc("/web/action/load", { action_id: self.action_id }, function(result) { - var action = result.result; - action.flags = _.extend({ - //views_switcher : false, - search_view : false, - action_buttons : false, - sidebar : false - //pager : false - }, self.options, action.flags || {}); + return self.rpc("/web/action/load", { action_id: self.action_id }, function(result) { + var action = result.result; + action.flags = _.extend({ + //views_switcher : false, + search_view : false, + action_buttons : false, + sidebar : false + //pager : false + }, self.options, action.flags || {}); - self.action_manager.do_action(action); - }); + self.action_manager.do_action(action); + }); }); }); }, }); -instance.web.embed = function (dbname, login, key, action, options) { +instance.web.embed = function (origin, dbname, login, key, action, options) { $('head').append($('', { 'rel': 'stylesheet', 'type': 'text/css', @@ -1123,7 +1130,7 @@ instance.web.embed = function (dbname, login, key, action, options) { var sc = document.getElementsByTagName('script'); currentScript = sc[sc.length-1]; } - var client = new instance.web.EmbeddedClient(null, dbname, login, key, action, options); + var client = new instance.web.EmbeddedClient(null, origin, dbname, login, key, action, options); client.insertAfter(currentScript); }; From ce0b92a08b0be8c84da0c90708c44e5ab44ddc93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 19 Jul 2012 14:00:26 +0200 Subject: [PATCH 276/341] [IMP] mail.group: cleaned model. Now only have linked user groups, that automatically subscribe its users to the mail.group instead of broadcasting or anything else. Removed old fields, cleaned view. Added code for res.users and res.groups to handle user changes in groups, propagating them to the mail.group attached to the res.group. bzr revid: tde@openerp.com-20120719120026-fi5o23cnh17kapgu --- addons/mail/mail_group.py | 117 ++++++++++++-------------------- addons/mail/mail_group_view.xml | 21 +----- addons/mail/res_users.py | 38 +++++++++++ 3 files changed, 82 insertions(+), 94 deletions(-) diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index 98ee06918e8..9ed282acb0a 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -36,7 +36,7 @@ class mail_group(osv.osv): A mail_group is a collection of users sharing messages in a discussion group. Group users are users that follow the mail group, using the subscription/follow mechanism of OpenSocial. A mail group has nothing - in common wih res.users.group. + in common with res.users.group. Additional information on fields: - ``member_ids``: user member of the groups are calculated with ``message_get_subscribers`` method from mail.thread @@ -110,37 +110,33 @@ class mail_group(osv.osv): 'name': fields.char('Name', size=64, required=True), 'description': fields.text('Description'), 'responsible_id': fields.many2one('res.users', string='Responsible', - ondelete='set null', required=True, select=1, - help="Responsible of the group that has all rights on the record."), + ondelete='set null', required=True, select=1, + help="Responsible of the group that has all rights on the record."), 'public': fields.boolean('Visible by non members', help='This group is visible by non members. \ - Invisible groups can add members through the invite button.'), - 'models': fields.many2many('ir.model', rel='mail_group_ir_model_rel', - id1='mail_group_id', id2='model_id', - string='Linked models', help='Linked models'), - 'groups': fields.many2many('res.groups', rel='mail_group_res_group_rel', - id1='mail_group_id', id2='groups_id', - string='Linked groups', help='Linked groups'), - 'push_to_groups': fields.boolean('Push to groups', - help="When posting a comment on this mail_group, \ - the message is pushed to the users beloging to \ - the linked user groups."), - 'photo_big': fields.binary('Full-size photo', help='Field holding \ - the full-sized PIL-supported and base64 encoded \ - version of the group image. The photo field is \ - used as an interface for this field.'), - 'photo': fields.function(_get_photo, fnct_inv=_set_photo, string='Photo', type="binary", + Invisible groups can add members through the invite button.'), + 'group_ids': fields.many2many('res.groups', rel='mail_group_res_group_rel', + id1='mail_group_id', id2='groups_id', string='Linked groups', + help="Members of those groups will automatically added as followers. "\ + "Note that they will be able to manage their subscription manually "\ + "if necessary."), + 'photo_big': fields.binary('Full-size photo', + help='Field holding the full-sized PIL-supported and base64 encoded "\ + version of the group image. The photo field is used as an "\ + interface for this field.'), + 'photo': fields.function(_get_photo, fnct_inv=_set_photo, + string='Photo', type="binary", store = { 'mail.group': (lambda self, cr, uid, ids, c={}: ids, ['photo_big'], 10), - }, help='Field holding the automatically resized (128x128) PIL-supported and base64 encoded version of the group image.'), + }, + help='Field holding the automatically resized (128x128) PIL-supported and base64 encoded version of the group image.'), 'member_ids': fields.function(get_member_ids, fnct_search=search_member_ids, - type='many2many', relation='res.users', - string='Group members', multi='get_member_ids'), + type='many2many', relation='res.users', string='Group members', multi='get_member_ids'), 'member_count': fields.function(get_member_ids, type='integer', - string='Member count', multi='get_member_ids'), + string='Member count', multi='get_member_ids'), 'is_subscriber': fields.function(get_member_ids, type='boolean', - string='Joined', multi='get_member_ids'), + string='Joined', multi='get_member_ids'), 'last_month_msg_nbr': fields.function(get_last_month_msg_nbr, type='integer', - string='Messages count for last month'), + string='Messages count for last month'), } _defaults = { @@ -148,57 +144,30 @@ class mail_group(osv.osv): 'responsible_id': (lambda s, cr, uid, ctx: uid), 'photo': _get_default_photo, } - - def message_create_get_notification_user_ids(self, cr, uid, thread_ids, new_msg_vals, context=None): - """ Overrider OpenChatter message_create_get_notification_user_ids - method. The purpose is to add to the subscribers users that - belong to the res.groups linked to the mail.group through the - groups field. The fields push_to_groups allows to control this - feature. - """ - notif_user_ids = super(mail_group, self).message_create_get_notification_user_ids(cr, uid, thread_ids, new_msg_vals, context=context) - for thread in self.browse(cr, uid, thread_ids, context=context): - if not thread.push_to_groups or not thread.groups: - continue - for group in thread.groups: - for user in group.users: - notif_user_ids.append(user.id) - return list(set(notif_user_ids)) - - def message_load(self, cr, uid, ids, fetch_ancestors=False, ancestor_ids=None, - limit=100, offset=0, domain=None, count=False, context=None): - """ Override OpenChatter message_load method. - if models attribute is set: search all messages from that model - else: as usual - """ - all_msg_ids = [] - message_obj = self.pool.get('mail.message') - for group in self.browse(cr, uid, ids, context=context): - # call super to have default message ids - group_msg_ids = super(mail_group, self).message_load(cr, uid, ids, fetch_ancestors, ancestor_ids, limit, offset, domain, False, True, context) - group_domain = ['&', ('model', '=', self._name), ('id', 'in', group_msg_ids)] - # if no linked domain: go on - if not group.models: - search_domain = group_domain - # add message ids linked to group models - else: - model_list = [] - for model in group.models: - model_list.append(model.model) - search_domain = [('|')] + group_domain - search_domain += [('model', 'in', model_list)] - # perform the search - msg_ids = message_obj.search(cr, uid, search_domain, limit=limit, offset=offset, context=context) - if (fetch_ancestors): msg_ids = self._message_load_add_ancestor_ids(cr, uid, ids, msg_ids, ancestor_ids, context=context) - all_msg_ids += msg_ids - if count: - return len(all_msg_ids) - else: - return message_obj.read(cr, uid, all_msg_ids, context=context) - + + def create(self, cr, uid, vals, context=None): + mail_group_id = super(mail_group, self).create(cr, uid, vals, context=context) + if vals.get('group_ids'): + user_goup_ids = vals.get('group_ids')[0][2] + res_groups_obj = self.pool.get('res.groups') + user_ids = [] + for group in res_groups_obj.browse(cr, uid, user_goup_ids, context=None): + user_ids += [user.id for user in group.users] + self.message_subscribe(cr, uid, [mail_group_id], user_ids, context=context) + return mail_group_id + + def write(self, cr, uid, ids, vals, context=None): + if vals.get('group_ids'): + user_goup_ids = vals.get('group_ids')[0][2] + res_groups_obj = self.pool.get('res.groups') + user_ids = [] + for group in res_groups_obj.browse(cr, uid, user_goup_ids, context=None): + user_ids += [user.id for user in group.users] + self.message_subscribe(cr, uid, ids, user_ids, context=context) + return super(mail_group, self).write(cr, uid, ids, vals, context=context) + def action_group_join(self, cr, uid, ids, context=None): return self.message_subscribe(cr, uid, ids, context=context) def action_group_leave(self, cr, uid, ids, context=None): return self.message_unsubscribe(cr, uid, ids, context=context) - diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml index f5443fcf0d7..c755209f952 100644 --- a/addons/mail/mail_group_view.xml +++ b/addons/mail/mail_group_view.xml @@ -64,6 +64,7 @@ + @@ -71,26 +72,6 @@ -
    - - -

    Models for automatic message fetching

    - - - - - -
    - -

    User groups for message forwarding

    - - - - - -
    -
    -
    - From 707c2dd573a8505a1d1af9b31b6f8666929e3bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 20 Jul 2012 14:57:09 +0200 Subject: [PATCH 309/341] [FIX] mail.compos.message: outgoing state only for emails. Send only emails, also. bzr revid: tde@openerp.com-20120720125709-rgfiwsy8qp3z5x1f --- addons/mail/wizard/mail_compose_message.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index de3e5ca39ba..d26511464f8 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -136,6 +136,8 @@ class mail_compose_message(osv.TransientModel): 'email_from': user.user_email or tools.config.get('email_from', False), 'body_html': False, 'body_text': False, + 'subject': False, + 'dest_partner_ids': [], }) return result @@ -263,6 +265,7 @@ class mail_compose_message(osv.TransientModel): subject = mail_wiz.subject if formatting else False content_subtype = 'html' if formatting else 'plain' type = 'email' if email_mode else 'comment' + state = 'outgoing' if email_mode else False partner_ids = [partner.id for partner in mail_wiz.dest_partner_ids] references = None headers = {} @@ -298,7 +301,7 @@ class mail_compose_message(osv.TransientModel): # processed as soon as the mail scheduler runs. if mail_thread_enabled: active_model_pool.message_append(cr, uid, [active_id], rendered_subject, rendered_body_text, rendered_body_html, - type=type, content_subtype=content_subtype, state='outgoing', partner_ids=partner_ids, + type=type, content_subtype=content_subtype, state=state, partner_ids=partner_ids, email_from=email_from, email_to=email_to, email_cc=email_cc, email_bcc=email_bcc, reply_to=reply_to, references=references, attachments=attachment, headers=headers, context=context) else: @@ -310,16 +313,17 @@ class mail_compose_message(osv.TransientModel): # normal mode - no mass-mailing if mail_thread_enabled: msg_ids = active_model_pool.message_append(cr, uid, active_ids, subject, mail_wiz.body_text, mail_wiz.body_html, - type=type, content_subtype=content_subtype, state='outgoing', partner_ids=partner_ids, + type=type, content_subtype=content_subtype, state=state, partner_ids=partner_ids, email_from=mail_wiz.email_from, email_to=mail_wiz.email_to, email_cc=mail_wiz.email_cc, email_bcc=mail_wiz.email_bcc, reply_to=mail_wiz.reply_to, references=references, attachments=attachment, headers=headers, context=context) else: msg_ids = [mail_message_obj.schedule_with_attach(cr, uid, mail_wiz.email_from, to_email(mail_wiz.email_to), subject, mail_wiz.body_text, - model=mail_wiz.model, email_cc=to_email(mail_wiz.email_cc), email_bcc=to_email(mail_wiz.email_bcc), reply_to=mail_wiz.reply_to, + type=type, model=mail_wiz.model, email_cc=to_email(mail_wiz.email_cc), email_bcc=to_email(mail_wiz.email_bcc), reply_to=mail_wiz.reply_to, attachments=attachment, references=references, res_id=int(mail_wiz.res_id), partner_ids=partner_ids, content_subtype=mail_wiz.content_subtype, headers=headers, context=context)] # in normal mode, we send the email immediately, as the user expects us to (delay should be sufficiently small) - mail_message_obj.send(cr, uid, msg_ids, context=context) + if type == 'email': + mail_message_obj.send(cr, uid, msg_ids, context=context) return {'type': 'ir.actions.act_window_close'} From f6a4e4875d31d936fb15194e18b0efdd2a48b5f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 20 Jul 2012 14:57:29 +0200 Subject: [PATCH 310/341] [IMP] mail.message: added type in parameters. Default is email. bzr revid: tde@openerp.com-20120720125729-4xq31w4o0qey6erl --- addons/mail/mail_message.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 2443a5b8eca..b96b6e3791e 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -295,7 +295,7 @@ class mail_message(osv.Model): self.check(cr, uid, ids, 'unlink', context=context) return super(mail_message, self).unlink(cr, uid, ids, context) - def schedule_with_attach(self, cr, uid, email_from, email_to, subject, body, model=False, + def schedule_with_attach(self, cr, uid, email_from, email_to, subject, body, model=False, type='email', email_cc=None, email_bcc=None, reply_to=False, partner_ids=None, attachments=None, message_id=False, references=False, res_id=False, content_subtype='plain', headers=None, mail_server_id=False, auto_delete=False, context=None): @@ -352,6 +352,7 @@ class mail_message(osv.Model): 'user_id': uid, 'model': model, 'res_id': res_id, + 'type': type, 'body_text': body if content_subtype != 'html' else False, 'body_html': body if content_subtype == 'html' else False, 'email_from': email_from, From c9ff048d924f18e49e0b65cd4159305d1fe4d5a5 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Fri, 20 Jul 2012 15:01:00 +0200 Subject: [PATCH 311/341] [IMP] debug mode bzr revid: nicolas.vanhoren@openerp.com-20120720130100-olttd8ovamdtywtt --- addons/web/common/http.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/common/http.py b/addons/web/common/http.py index 87748d2e6d9..bb87d719bad 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -28,6 +28,7 @@ import werkzeug.wsgi from . import nonliterals from . import session from . import openerplib +import urlparse __all__ = ['Root', 'jsonrequest', 'httprequest', 'Controller', 'WebRequest', 'JsonRequest', 'HttpRequest'] @@ -422,7 +423,9 @@ class DisableCacheMiddleware(object): self.app = app def __call__(self, environ, start_response): def start_wrapped(status, headers): - debug = environ.get('HTTP_REFERER', '').find('debug') != -1 + referer = environ.get('HTTP_REFERER', '') + parsed = urlparse.urlparse(referer) + debug = not urlparse.parse_qs(parsed.query).has_key('debug') filtered_headers = [(k,v) for k,v in headers if not (k=='Last-Modified' or (debug and k=='Cache-Control'))] if debug: filtered_headers.append(('Cache-Control', 'no-cache')) From a8ca054cf203ea01656590ee44af8ac2b44fd200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 20 Jul 2012 15:01:27 +0200 Subject: [PATCH 312/341] [CLEAN] mail.js: removed debug data. bzr revid: tde@openerp.com-20120720130127-7kquweauwh4bv7zi --- addons/mail/static/src/css/mail.css | 8 -------- addons/mail/static/src/js/mail.js | 12 +----------- addons/mail/static/src/xml/mail.xml | 18 +----------------- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index cf2f7d43a20..03f1078e6d5 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -275,14 +275,6 @@ display: none; } -.openerp ul.oe_mail_debug { - color: #888; -} - -.openerp ul.oe_mail_debug li { - margin-right: 12px; -} - /* ------------------------------------------------------------ */ /* mail.compose.message form view & OpenERP hacks /* ------------------------------------------------------------ */ diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 3872a486565..8ce050fd144 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -319,11 +319,11 @@ openerp.mail = function(session) { reinit: function() { var self = this; if (! this.form_view) return; - // debugger var call_defer = this.ds_compose.call('default_get', [['subject', 'body_text', 'body_html', 'dest_partner_ids'], this.ds_compose.get_context()]).then( function (result) { self.form_view.on_processed_onchange({'value': result}, []); }); + return call_defer; }, /** @@ -586,12 +586,8 @@ openerp.mail = function(session) { do_customize_display: function() { if (this.display.show_post_comment) { this.$element.find('div.oe_mail_thread_action').eq(0).show(); } - if (this.session.debug) { - this.$element.find('ul.oe_mail_debug').toggleClass('oe_mail_invisible'); - } }, - /** * Bind events in the widget. Each event is slightly described * in the function. */ @@ -656,12 +652,6 @@ openerp.mail = function(session) { self.instantiate_composition_form('reply', email_mode, formatting, msg_id); event.preventDefault(); }); - // event: click on "Debug data" in msg side menu (email style) - this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_debug', 'click', function (event) { - var act_dom = $(event.srcElement).parents('div.oe_mail_msg_content').find('ul.oe_mail_debug'); - act_dom.toggleClass('oe_mail_invisible'); - event.preventDefault(); - }); }, destroy: function () { diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 5d76096fb9a..bf8d7fd1475 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -136,7 +136,6 @@
  • -->
  • Reply by email
  • Details
  • -
  • Debug data
  • @@ -147,27 +146,12 @@
    -
      -
    • document: (,)
    • -
    • id:
    • -
    • type:
    • -
    • content_subtype:
    • -
    • state:
    • -
    • parent_id:
    • -
    • email_from:
    • -
    • email_to:
    • -
    • email_cc:
    • -
    • email_bcc:
    • -
    • reply_to:
    • -
    • partner_ids:
    • -
    • message_id:
    • -
    • references:
    • -
    +