Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][ADD] survey_answer_generation: New module #92

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from

Conversation

chienandalu
Copy link
Member

@chienandalu chienandalu commented Aug 18, 2023

cc @Tecnativa TT40984

please review @pedrobaeza @pilarvargas-tecnativa

@chienandalu chienandalu marked this pull request as draft August 18, 2023 09:22
@chienandalu chienandalu force-pushed the 15.0-add-survey_answer_generation branch from 49adce8 to f0a78a9 Compare August 25, 2023 10:22
@chienandalu chienandalu force-pushed the 15.0-add-survey_answer_generation branch from f0a78a9 to 74b6f81 Compare September 21, 2023 12:02
@chienandalu chienandalu force-pushed the 15.0-add-survey_answer_generation branch from 74b6f81 to 94fd821 Compare November 16, 2023 15:16
@chienandalu chienandalu marked this pull request as ready for review November 16, 2023 15:17
@chienandalu chienandalu force-pushed the 15.0-add-survey_answer_generation branch from 94fd821 to 3382c42 Compare November 29, 2023 10:02
@chienandalu chienandalu force-pushed the 15.0-add-survey_answer_generation branch from 3382c42 to 7fc158c Compare November 29, 2023 11:41
@pedrobaeza pedrobaeza added this to the 15.0 milestone Feb 8, 2024
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally comfortable with the module name, as it doesn't really reflect all the features. What about survey_successive_connection?

# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Survey answer generation",
"summary": "Pre-generate answers from another survey",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more than just pre-generate

Suggested change
"summary": "Pre-generate answers from another survey",
"summary": "Link and compare answers from another survey",

@pedrobaeza
Copy link
Member

Any news here?

@pilarvargas-tecnativa
Copy link

I have an error when I try to complete a survey with the Demo user.

I have done local testing and my flow has been:

  • Duplicate the survey "Feedback Form" as "Test 2".
  • In the original survey "Feedback Form" set as next survey "Test 2".
  • In answers I linked some of them to the next survey, one of them was not mandatory: "Where do yo live"?

When completing the original survey "Feedback form" to generate answers, I have left the previous question blank which is not mandatory and that is when the following error occurs:

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 698, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 368, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 364, in checked_call
    self._cr.flush()
  File "/opt/odoo/custom/src/odoo/odoo/sql_db.py", line 109, in flush
    self.transaction.flush()
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 845, in flush
    env_to_flush['base'].flush()
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 5687, in flush
    self.recompute()
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 6160, in recompute
    process(field)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 6144, in process
    field.recompute(recs)
  File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1273, in recompute
    self.compute_value(recs)
  File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1295, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 4277, in _compute_field_value
    fields.determine(field.compute, self)
  File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 88, in determine
    return needle(*args)
  File "/opt/odoo/auto/addons/survey_answer_generation/models/survey_user_input.py", line 109, in _compute_diff_with_origin
    previous_value = str(line.origin_input_line[value])
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 5931, in __getitem__
    return self._fields[key].__get__(self, self.env.registry[self._name])
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 654, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
KeyError: 'value_False'

@pedrobaeza
Copy link
Member

cc @chienandalu

@chienandalu
Copy link
Member Author

Thanks, I'll take care of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants