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.

78 lines
2.4 KiB

  1. # -*- coding: utf-8 -*-
  2. ##############################################################################
  3. #
  4. # OpenERP, Open Source Management Solution
  5. # This module copyright (C) 2014 Therp BV (<http://therp.nl>).
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Affero General Public License as
  9. # published by the Free Software Foundation, either version 3 of the
  10. # License, or (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Affero General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Affero General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. #
  20. ##############################################################################
  21. {
  22. "name": "More pythonic relativedelta",
  23. "version": "1.0",
  24. "author": "Therp BV,Odoo Community Association (OCA)",
  25. "license": "AGPL-3",
  26. "complexity": "normal",
  27. "description": """
  28. Introduction
  29. ============
  30. This addon provides a reimplementation of OpenERP's pyjs relativedelta class
  31. using Moment.js (http://momentjs.com).
  32. On top of what you can do with the original, you can use
  33. - datetime objects
  34. - relativedelta(hour=0-23, hours=0-23)
  35. - relativedelta(minute=0-59, minutes=0-59)
  36. - relativedelta(seconds=0-59, seconds=0-59)
  37. - relativedelta(weekday=0) [MO] ... weekday=6 [SU]
  38. - there's no MO(+n) syntax, but that can be simulated by
  39. relativedelta(weeks=+(n-1), days=1, weekday=0), this week's monday would
  40. be relativedelta(weeks=-1, days=1, weekday=0) etc.
  41. - all of them together in a predictable manner as detailed in
  42. https://labix.org/python-dateutil#head-72c4689ec5608067d118b9143cef6bdffb6dad4e
  43. Usage
  44. =====
  45. Simply depend on web_relativedelta and enjoy most of python's relativedelta
  46. functionality
  47. """,
  48. "category": "Dependency",
  49. "depends": [
  50. 'web',
  51. 'web_lib_moment',
  52. ],
  53. "data": [
  54. ],
  55. "js": [
  56. 'static/src/js/web_relativedelta.js'
  57. ],
  58. "css": [
  59. ],
  60. "qweb": [
  61. ],
  62. "test": [
  63. 'static/test/web_relativedelta.js',
  64. ],
  65. "auto_install": False,
  66. "installable": True,
  67. "application": False,
  68. "external_dependencies": {
  69. 'python': [],
  70. },
  71. }