You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.5 KiB

  1. # Copyright 2015 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
  2. # Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
  3. # Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. from odoo import fields, models
  6. class MapWebsite(models.Model):
  7. _name = "map.website"
  8. _description = "Map Website"
  9. _order = "sequence, id"
  10. name = fields.Char(string="Map Website Name", required=True)
  11. address_url = fields.Char(
  12. string="URL that uses the address",
  13. help="In this URL, {ADDRESS} will be replaced by the address.",
  14. )
  15. lat_lon_url = fields.Char(
  16. string="URL that uses latitude and longitude",
  17. help="In this URL, {LATITUDE} and {LONGITUDE} will be replaced by "
  18. "the latitude and longitude (requires the module 'base_geolocalize')",
  19. )
  20. route_address_url = fields.Char(
  21. string="Route URL that uses the addresses",
  22. help="In this URL, {START_ADDRESS} and {DEST_ADDRESS} will be "
  23. "replaced by the start and destination addresses.",
  24. )
  25. route_lat_lon_url = fields.Char(
  26. string="Route URL that uses latitude and longitude",
  27. help="In this URL, {START_LATITUDE}, {START_LONGITUDE}, "
  28. "{DEST_LATITUDE} and {DEST_LONGITUDE} will be replaced by the "
  29. "latitude and longitude of the start and destination adresses "
  30. "(requires the module 'base_geolocalize').",
  31. )
  32. active = fields.Boolean(default=True)
  33. sequence = fields.Integer(default=10)