Browse Source

Merge pull request #2 from OCA/8.0

update 8.0
pull/247/head
César Andrés 10 years ago
parent
commit
9481b41298
  1. BIN
      base_contact/static/description/icon.png
  2. BIN
      base_continent/static/description/icon.png
  3. BIN
      base_partner_merge/static/description/icon.png
  4. BIN
      base_partner_sequence/static/description/icon.png
  5. BIN
      partner_address_street3/static/description/icon.png
  6. BIN
      partner_auto_salesman/static/description/icon.png
  7. BIN
      partner_contact_address_detailed/static/description/icon.png
  8. BIN
      partner_contact_birthdate/static/description/icon.png
  9. BIN
      partner_contact_in_several_companies/static/description/icon.png
  10. BIN
      partner_contact_nationality/static/description/icon.png
  11. BIN
      partner_contact_personal_information_page/static/description/icon.png
  12. 173
      partner_external_maps/i18n/sl.po
  13. BIN
      partner_external_maps/static/description/icon.png
  14. 5
      partner_firstname/README.rst
  15. 27
      partner_firstname/models.py
  16. BIN
      partner_firstname/static/description/icon.png
  17. BIN
      partner_helper/static/description/icon.png
  18. 7
      partner_relations/model/res_partner_relation_all.py
  19. 0
      partner_relations/static/description/icon.png
  20. BIN
      passport/static/description/icon.png
  21. BIN
      portal_partner_merge/static/description/icon.png
  22. BIN
      res_partner_affiliate/static/description/icon.png

BIN
base_contact/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
base_continent/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
base_partner_merge/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
base_partner_sequence/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
partner_address_street3/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
partner_auto_salesman/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
partner_contact_address_detailed/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
partner_contact_birthdate/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
partner_contact_in_several_companies/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
partner_contact_nationality/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
partner_contact_personal_information_page/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

173
partner_external_maps/i18n/sl.po

@ -0,0 +1,173 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_external_maps
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-06-19 19:55+0000\n"
"PO-Revision-Date: 2015-08-14 08:12+0200\n"
"Last-Translator: Matjaz Mozetic <m.mozetic@matmoz.si>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: sl\n"
"X-Generator: Poedit 1.8.4\n"
#. module: partner_external_maps
#: code:addons/partner_external_maps/partner_external_maps.py:116
#, python-format
msgid "Address missing on partner '%s'."
msgstr "Pri partnerju '%s' manjka naslov."
#. module: partner_external_maps
#: field:map.website,create_uid:0
msgid "Created by"
msgstr "Ustvaril"
#. module: partner_external_maps
#: field:map.website,create_date:0
msgid "Created on"
msgstr "Ustvaril"
#. module: partner_external_maps
#: field:map.website,id:0
msgid "ID"
msgstr "ID"
#. module: partner_external_maps
#: help:map.website,address_url:0
msgid "In this URL, {ADDRESS} will be replaced by the address."
msgstr "V tej URL povezavi bo {ADDRESS} zamenjan z naslovom."
#. module: partner_external_maps
#: help:map.website,lat_lon_url:0
msgid "In this URL, {LATITUDE} and {LONGITUDE} will be replaced by the latitude and longitude (requires the module 'base_geolocalize')"
msgstr "V tej URL povezavi bosta {LATITUDE} in {LONGITUDE} zamenjani z geografsko širino in dolžino (potreben je modul 'base_geolocalize')"
#. module: partner_external_maps
#: help:map.website,route_address_url:0
msgid "In this URL, {START_ADDRESS} and {DEST_ADDRESS} will be replaced by the start and destination addresses."
msgstr "V tej URL povezavi bosta {START_ADDRESS} in {DEST_ADDRESS} zamenjana z začetnim in ciljnim naslovom."
#. module: partner_external_maps
#: help:map.website,route_lat_lon_url:0
msgid "In this URL, {START_LATITUDE}, {START_LONGITUDE}, {DEST_LATITUDE} and {DEST_LONGITUDE} will be replaced by the latitude and longitude of the start and destination adresses (requires the module 'base_geolocalize')."
msgstr "V tej URL povezavi bodo {START_LATITUDE}, {START_LONGITUDE}, {DEST_LATITUDE} in {DEST_LONGITUDE} zamenjani z geografsko širino in dolžino začetnega in ciljnega naslova (potreben je modul 'base_geolocalize')."
#. module: partner_external_maps
#: field:map.website,write_uid:0
msgid "Last Updated by"
msgstr "Zadnji posodobil"
#. module: partner_external_maps
#: field:map.website,write_date:0
msgid "Last Updated on"
msgstr "Zadnjič posodobljeno"
#. module: partner_external_maps
#: view:res.partner:partner_external_maps.view_partner_form
msgid "Map"
msgstr "Zemljevid"
#. module: partner_external_maps
#: model:ir.model,name:partner_external_maps.model_map_website
#: view:map.website:partner_external_maps.map_website_form
#: field:res.users,context_map_website_id:0
msgid "Map Website"
msgstr "Spletna stran zemljevida"
#. module: partner_external_maps
#: field:map.website,name:0
msgid "Map Website Name"
msgstr "Naziv spletne strani zemljevida"
#. module: partner_external_maps
#: model:ir.actions.act_window,name:partner_external_maps.map_website_action
#: model:ir.ui.menu,name:partner_external_maps.map_website_menu
#: view:map.website:partner_external_maps.map_website_tree
msgid "Map Websites"
msgstr "Spletne strani zemljevidov"
#. module: partner_external_maps
#: help:res.users,context_route_map_website_id:0
msgid "Map provided used when you click on the car icon on the partner form to display an itinerary."
msgstr "Zemljevid uporabljen ob kliku na ikono avtomobila v partnerjevem obrazcu za prikaz itinerarja."
#. module: partner_external_maps
#: code:addons/partner_external_maps/partner_external_maps.py:134
#, python-format
msgid "Missing map provider: you should set it in your preferences."
msgstr "Manjkajoč ponudnik zemljevida: nastavite ga v nastavitvah."
#. module: partner_external_maps
#: code:addons/partner_external_maps/partner_external_maps.py:148
#, python-format
msgid "Missing parameter 'URL that uses the address' for map website '%s'."
msgstr "Manjkajoč parameter 'URL ki uporablja naslov' za spletno stran zemljevida '%s'."
#. module: partner_external_maps
#: code:addons/partner_external_maps/partner_external_maps.py:187
#, python-format
msgid "Missing route URL that uses the addresses for the map website '%s'"
msgstr "Manjkajoč URL proge, ki uporablja naslove za spletno stran zemljevida '%s'"
#. module: partner_external_maps
#: code:addons/partner_external_maps/partner_external_maps.py:163
#, python-format
msgid "Missing route map website: you should set it in your preferences."
msgstr "Manjkajoča spletna stran proge: nastavite jo v svojih nastavitvah."
#. module: partner_external_maps
#: code:addons/partner_external_maps/partner_external_maps.py:168
#, python-format
msgid "Missing start address for route map: you should set it in your preferences."
msgstr "Manjkajoč začetni naslov za progo: nastavite ga v svojih nastavitvah."
#. module: partner_external_maps
#: model:ir.model,name:partner_external_maps.model_res_partner
msgid "Partner"
msgstr "Partner"
#. module: partner_external_maps
#: view:res.partner:partner_external_maps.view_partner_form
msgid "Route Map"
msgstr "Zemljevid proge"
#. module: partner_external_maps
#: field:res.users,context_route_map_website_id:0
msgid "Route Map Website"
msgstr "Spletna stran zemljevida proge"
#. module: partner_external_maps
#: field:map.website,route_lat_lon_url:0
msgid "Route URL that uses latitude and longitude"
msgstr "URL proge, ki uporablja geografsko širino in dolžino."
#. module: partner_external_maps
#: field:map.website,route_address_url:0
msgid "Route URL that uses the addresses"
msgstr "URL proge, ki uporablja naslove"
#. module: partner_external_maps
#: field:res.users,context_route_start_partner_id:0
msgid "Start Address for Route Map"
msgstr "Začetni naslov za zemljevid proge"
#. module: partner_external_maps
#: field:map.website,lat_lon_url:0
msgid "URL that uses latitude and longitude"
msgstr "URL, ki uporablja geografsko širino in dolžino"
#. module: partner_external_maps
#: field:map.website,address_url:0
msgid "URL that uses the address"
msgstr "URL, ki uporablja naslov"
#. module: partner_external_maps
#: model:ir.model,name:partner_external_maps.model_res_users
msgid "Users"
msgstr "Uporabniki"

BIN
partner_external_maps/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

5
partner_firstname/README.rst

@ -24,6 +24,10 @@ For the same reason, after installing, previous names for contacts will stay in
the *name* field, and the first time you edit any of them you will be asked to the *name* field, and the first time you edit any of them you will be asked to
supply the *last name* and *first name* (just once per contact). supply the *last name* and *first name* (just once per contact).
You can use *_get_inverse_name* method to get lastname and firstname from a simple string
and also *_get_computed_name* to get a name form the lastname and firstname.
These methods can be overridden to change the format specified above
For further information, please visit: For further information, please visit:
* https://www.odoo.com/forum/help-1 * https://www.odoo.com/forum/help-1
@ -39,6 +43,7 @@ Contributors
* Olivier Laurent <olivier.laurent@acsone.eu> * Olivier Laurent <olivier.laurent@acsone.eu>
* Hans Henrik Gabelgaard <hhg@gabelgaard.org> * Hans Henrik Gabelgaard <hhg@gabelgaard.org>
* Jairo Llopis <j.llopis@grupoesoc.es> * Jairo Llopis <j.llopis@grupoesoc.es>
* Adrien Peiffer <adrien.peiffer@acsone.eu>
Maintainer Maintainer
---------- ----------

27
partner_firstname/models.py

@ -38,12 +38,18 @@ class ResPartner(models.Model):
required=False, required=False,
store=True) store=True)
@api.model
def _get_computed_name(self, lastname, firstname):
"""Compute the 'name' field according to splitted data.
You can override this method to change the order of lastname and
firstname the computed name"""
return u" ".join((p for p in (lastname, firstname) if p))
@api.one @api.one
@api.depends("firstname", "lastname") @api.depends("firstname", "lastname")
def _compute_name(self): def _compute_name(self):
"""Write the 'name' field according to splitted data.""" """Write the 'name' field according to splitted data."""
self.name = u" ".join((p for p in (self.lastname,
self.firstname) if p))
self.name = self._get_computed_name(self.lastname, self.firstname)
@api.one @api.one
def _inverse_name_after_cleaning_whitespace(self): def _inverse_name_after_cleaning_whitespace(self):
@ -65,28 +71,33 @@ class ResPartner(models.Model):
else: else:
self._inverse_name() self._inverse_name()
@api.one
def _inverse_name(self):
@api.model
def _get_inverse_name(self, name, is_company=False):
"""Try to revert the effect of :meth:`._compute_name`. """Try to revert the effect of :meth:`._compute_name`.
- If the partner is a company, save it in the lastname. - If the partner is a company, save it in the lastname.
- Otherwise, make a guess. - Otherwise, make a guess.
This method can be easily overriden by other submodules. This method can be easily overriden by other submodules.
You can also override this method to change the order of name's
attributes
When this method is called, :attr:`~.name` already has unified and When this method is called, :attr:`~.name` already has unified and
trimmed whitespace. trimmed whitespace.
""" """
# Company name goes to the lastname # Company name goes to the lastname
if self.is_company or not self.name:
parts = [self.name or False, False]
if is_company or not name:
parts = [name or False, False]
# Guess name splitting # Guess name splitting
else: else:
parts = self.name.split(" ", 1)
parts = name.split(" ", 1)
while len(parts) < 2: while len(parts) < 2:
parts.append(False) parts.append(False)
return parts
@api.one
def _inverse_name(self):
parts = self._get_inverse_name(self.name, self.is_company)
self.lastname, self.firstname = parts self.lastname, self.firstname = parts
@api.one @api.one

BIN
partner_firstname/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
partner_helper/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

7
partner_relations/model/res_partner_relation_all.py

@ -138,8 +138,7 @@ class ResPartnerRelationAll(models.AbstractModel):
return super(ResPartnerRelationAll, self)._auto_init( return super(ResPartnerRelationAll, self)._auto_init(
cr, context=context) cr, context=context)
@api.one
def get_underlying_object(self):
def _get_underlying_object(self):
"""Get the record on which this record is overlaid""" """Get the record on which this record is overlaid"""
return self.env[self._overlays].browse(self.id / PADDING) return self.env[self._overlays].browse(self.id / PADDING)
@ -176,7 +175,7 @@ class ResPartnerRelationAll(models.AbstractModel):
@api.one @api.one
def write(self, vals): def write(self, vals):
"""divert non-problematic writes to underlying table""" """divert non-problematic writes to underlying table"""
underlying_objs = self.get_underlying_object()
underlying_objs = self._get_underlying_object()
vals = { vals = {
key: val key: val
for key, val in vals.iteritems() for key, val in vals.iteritems()
@ -209,4 +208,4 @@ class ResPartnerRelationAll(models.AbstractModel):
@api.one @api.one
def unlink(self): def unlink(self):
"""divert non-problematic creates to underlying table""" """divert non-problematic creates to underlying table"""
return self.get_underlying_object().unlink()
return self._get_underlying_object().unlink()

0
partner_relations/static/src/img/icon.png → partner_relations/static/description/icon.png

Before

Width: 90  |  Height: 90  |  Size: 13 KiB

After

Width: 90  |  Height: 90  |  Size: 13 KiB

BIN
passport/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
portal_partner_merge/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
res_partner_affiliate/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

Loading…
Cancel
Save