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

[14.0] [mig] pos_order_line_note #652

Closed
wants to merge 7 commits into from

Conversation

dsolanki-initos
Copy link
Contributor

No description provided.

@dsolanki-initos dsolanki-initos mentioned this pull request May 25, 2021
16 tasks
Copy link
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

Moreover odoo already has this note field in pos_restaurant.. so is this module even required?

https://github.com/odoo/odoo/blob/bfccdf07adba35a5838a35a7bba98a1d71c67d2f/addons/pos_restaurant/models/pos_order.py#L13

Comment on lines +4 to +15
By default, once ``pos_restaurant`` is installed, a warning is done,
when a pos order is created via the ``create_from_ui`` function.

With this module, the ``note`` field is stored in database.

It will avoid incorrect warning in the odoo logs:

.. code:: shell

2020-12-22 20:33:40,567 31378 WARNING point_of_sale odoo.models: pos.order.line.create() with unknown fields: note
2020-12-22 20:33:40,578 31378 WARNING point_of_sale odoo.models: pos.order.line.create() with unknown fields: note
2020-12-22 20:33:40,585 31378 WARNING point_of_sale odoo.models: pos.order.line.create() with unknown fields: note
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
By default, once ``pos_restaurant`` is installed, a warning is done,
when a pos order is created via the ``create_from_ui`` function.
With this module, the ``note`` field is stored in database.
It will avoid incorrect warning in the odoo logs:
.. code:: shell
2020-12-22 20:33:40,567 31378 WARNING point_of_sale odoo.models: pos.order.line.create() with unknown fields: note
2020-12-22 20:33:40,578 31378 WARNING point_of_sale odoo.models: pos.order.line.create() with unknown fields: note
2020-12-22 20:33:40,585 31378 WARNING point_of_sale odoo.models: pos.order.line.create() with unknown fields: note
With this module, the ``note`` field is stored in database.

Since 13.0 (afaik) odoo strips the unknown fields sent by the pos, so you can remove these lines

https://github.com/odoo/odoo/blob/8ffd82249728b79959cfa61490730991a2b339d6/addons/point_of_sale/models/pos_order.py#L736-L739

@dsolanki-initos
Copy link
Contributor Author

Yes we already have the note field in restaurant module

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.

5 participants