Skip to content

Conversation

@danal-odoo
Copy link

@danal-odoo danal-odoo commented Dec 2, 2025

Before, POS orders were linked to the user logged into
the session or the active cashier.
There was no functionality to assign a specific salesperson to the
transaction.

This limitation made it difficult to calculate commissions or audit
sales performance by employee, particularly in scenarios where the
person operating the register is different from the person who
advised the customer.

This adds the ability to select a specific salesperson directly
from the Point of Sale interface. This selection is stored on the
order and is visible in the backend views.

Technical details:

  • Model (pos.order): Added salesperson_id field to store the
    selected employee on the order record.
  • Session (pos_session): Inherited to load hr.employee data into
    the frontend context upon initialization.
  • UI Components:
    • Added SalespersonList and SalespersonLine to display
      available employees in a selection modal.
    • Added a 'Salesperson' button to the ControlButtons area of
      the ProductScreen.
  • Views: Added salesperson_id to the pos.order form and list
    views to ensure the data is visible in the backend.

task-4680845

@robodoo
Copy link

robodoo commented Dec 2, 2025

Pull request status dashboard

@danal-odoo danal-odoo changed the title [ADD] pos_order_salesperson: created pos_order_salesperson module. [ADD] pos_order_salesperson: created pos_order_salesperson module Dec 2, 2025
@danal-odoo danal-odoo force-pushed the 19.0-pos_order_salesperson-danal branch from 9402236 to 3063b1b Compare December 3, 2025 05:34
Copy link

@bit-odoo bit-odoo left a comment

Choose a reason for hiding this comment

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

Hello,
I have made some comments.

Can you please write your commit and pr message, header according to this guideline https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html

Copy link

Choose a reason for hiding this comment

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

unneccary diff.



class PosOrder(models.Model):
_inherit = ["pos.order"]
Copy link

Choose a reason for hiding this comment

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

Suggested change
_inherit = ["pos.order"]
_inherit = 'pos.order'


class PosOrder(models.Model):
_inherit = ["pos.order"]
_name = 'pos.order'
Copy link

Choose a reason for hiding this comment

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

Suggested change
_name = 'pos.order'



class PosSession(models.Model):
_inherit = "pos.session"
Copy link

Choose a reason for hiding this comment

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

Suggested change
_inherit = "pos.session"
_inherit = 'pos.session'

@@ -0,0 +1,46 @@
import { _t } from "@web/core/l10n/translation";
Copy link

Choose a reason for hiding this comment

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

You haven't used it.

Copy link

Choose a reason for hiding this comment

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

missing copyright statement.

"data": [
"views/pos_order_view.xml",
],
"assets": {"point_of_sale._assets_pos": ["pos_order_salesperson/static/src/**/*"]},
Copy link

Choose a reason for hiding this comment

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

Suggested change
"assets": {"point_of_sale._assets_pos": ["pos_order_salesperson/static/src/**/*"]},
"assets": {
"point_of_sale._assets_pos": [
"pos_order_salesperson/static/src/**/*"
]
},

@danal-odoo danal-odoo force-pushed the 19.0-pos_order_salesperson-danal branch from 3063b1b to e48a96c Compare December 4, 2025 06:34
Copy link

@bit-odoo bit-odoo left a comment

Choose a reason for hiding this comment

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

Hello,
Before pushing anything check your diff properly.

Copy link

Choose a reason for hiding this comment

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

unneccary file.

Copy link

Choose a reason for hiding this comment

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

unneccary file.

Copy link

Choose a reason for hiding this comment

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

unneccary file.

Copy link

Choose a reason for hiding this comment

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

unneccary file.

@danal-odoo danal-odoo force-pushed the 19.0-pos_order_salesperson-danal branch 3 times, most recently from 3d4bec1 to a2b2742 Compare December 4, 2025 07:25
@danal-odoo danal-odoo changed the title [ADD] pos_order_salesperson: created pos_order_salesperson module [ADD] pos_order_salesperson: add salesperson selection in POS Dec 4, 2025
@bit-odoo
Copy link

bit-odoo commented Dec 4, 2025

Hello, Do not push your code in a rush. First check that you have adapted all changes, then you can push your.
As a reviewer can get notifications continuously.
image

@danal-odoo
Copy link
Author

danal-odoo commented Dec 4, 2025

i have resolved all suggested mistakes in code and pushed.

@bit-odoo
Copy link

bit-odoo commented Dec 4, 2025

Can you please mention the task ID in the commit and pr message?
And still, your commit message is not good.

Before, POS orders were linked to the user logged into
the session or the active cashier.
There was no functionality to assign a specific salesperson to the
transaction.

This limitation made it difficult to calculate commissions or audit
sales performance by employee, particularly in scenarios where the
person operating the register is different from the person who
advised the customer.

This adds the ability to select a specific salesperson directly
from the Point of Sale interface. This selection is stored on the
order and is visible in the backend views.

Technical details:
- Model (`pos.order`): Added `salesperson_id` field to store the
  selected employee on the order record.
- Session (`pos_session`): Inherited to load `hr.employee` data into
  the frontend context upon initialization.
- UI Components:
  - Added `SalespersonList` and `SalespersonLine` to display
    available employees in a selection modal.
  - Added a 'Salesperson' button to the `ControlButtons` area of
    the `ProductScreen`.
- Views: Added `salesperson_id` to the `pos.order` form and list
  views to ensure the data is visible in the backend.

task-4680845
@danal-odoo danal-odoo force-pushed the 19.0-pos_order_salesperson-danal branch from a2b2742 to 288e2e0 Compare December 5, 2025 05:12
@danal-odoo
Copy link
Author

danal-odoo commented Dec 5, 2025

i have updated commit and pr message as per odoo guidelines

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