vanilla 16.0

This commit is contained in:
Ernad Husremovic 2025-10-16 16:41:06 +02:00
parent 8c653da57a
commit f0ee375081
156 changed files with 10614 additions and 55980 deletions

View file

@ -19,41 +19,18 @@ pip install odoo-bringout-oca-ocb-survey
## Dependencies
This addon depends on:
- auth_signup
- http_routing
- mail
- web_tour
- gamification
## Manifest Information
- **Name**: Surveys
- **Version**: 3.5
- **Category**: Marketing/Surveys
- **License**: LGPL-3
- **Installable**: True
## Source
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `survey`.
- Repository: https://github.com/OCA/OCB
- Branch: 16.0
- Path: addons/survey
## License
This package maintains the original LGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Reports: doc/REPORTS.md
- Security: doc/SECURITY.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md
This package preserves the original LGPL-3 license.

View file

@ -1,7 +1,9 @@
[project]
name = "odoo-bringout-oca-ocb-survey"
version = "16.0.0"
description = "Surveys - Send your surveys or share them live."
description = "Surveys -
Send your surveys or share them live.
"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
@ -20,7 +22,7 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]

File diff suppressed because it is too large Load diff

View file

@ -651,7 +651,7 @@ class SurveyUserInputLine(models.Model):
elif line.answer_type == 'date':
line.display_name = fields.Date.to_string(line.value_date)
elif line.answer_type == 'datetime':
line.display_name = fields.Datetime.to_string(line.value_datetime)
line.display_name = fields.Datetime.to_string(fields.Datetime.context_timestamp(self.env.user, line.value_datetime))
elif line.answer_type == 'suggestion':
if line.matrix_row_id:
line.display_name = '%s: %s' % (

View file

@ -261,7 +261,7 @@ class TestSurveyCommon(SurveyCase):
""" Create test data: a survey with some pre-defined questions and various test users for ACL """
self.survey_manager = mail_new_test_user(
self.env, name='Gustave Doré', login='survey_manager', email='survey.manager@example.com',
groups='survey.group_survey_manager,base.group_user'
groups='survey.group_survey_manager,base.group_user', tz='Europe/Brussels',
)
self.survey_user = mail_new_test_user(

View file

@ -44,6 +44,7 @@ class TestSurveyInternals(common.TestSurveyCommon):
self.assertEqual(fourth_attempt['attempts_count'], 4)
@freeze_time("2020-02-15 18:00")
@users('survey_manager')
def test_answer_display_name(self):
""" The "display_name" field in a survey.user_input.line is a computed field that will
display the answer label for any type of question.
@ -67,7 +68,7 @@ class TestSurveyInternals(common.TestSurveyCommon):
self.assertEqual(question_answer.display_name, '2020-02-15')
elif question.question_type == 'datetime':
question_answer = self._add_answer_line(question, user_input, fields.Datetime.now())
self.assertEqual(question_answer.display_name, '2020-02-15 18:00:00')
self.assertEqual(question_answer.display_name, '2020-02-15 19:00:00')
elif question.question_type == 'simple_choice':
question_answer = self._add_answer_line(question, user_input, question.suggested_answer_ids[0].id)
self.assertEqual(question_answer.display_name, 'SChoice0')