-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[ADD] pos_order_salesperson: add salesperson selection in POS #1042
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
base: 19.0
Are you sure you want to change the base?
Conversation
9402236 to
3063b1b
Compare
There was a problem hiding this 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
There was a problem hiding this comment.
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"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| _inherit = ["pos.order"] | |
| _inherit = 'pos.order' |
|
|
||
| class PosOrder(models.Model): | ||
| _inherit = ["pos.order"] | ||
| _name = 'pos.order' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| _name = 'pos.order' |
|
|
||
|
|
||
| class PosSession(models.Model): | ||
| _inherit = "pos.session" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| _inherit = "pos.session" | |
| _inherit = 'pos.session' |
| @@ -0,0 +1,46 @@ | |||
| import { _t } from "@web/core/l10n/translation"; | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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/**/*"]}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "assets": {"point_of_sale._assets_pos": ["pos_order_salesperson/static/src/**/*"]}, | |
| "assets": { | |
| "point_of_sale._assets_pos": [ | |
| "pos_order_salesperson/static/src/**/*" | |
| ] | |
| }, |
3063b1b to
e48a96c
Compare
bit-odoo
left a comment
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneccary file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneccary file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneccary file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneccary file.
3d4bec1 to
a2b2742
Compare
|
i have resolved all suggested mistakes in code and pushed. |
|
Can you please mention the task ID in the commit and pr message? |
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
a2b2742 to
288e2e0
Compare
|
i have updated commit and pr message as per odoo guidelines |


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:
pos.order): Addedsalesperson_idfield to store theselected employee on the order record.
pos_session): Inherited to loadhr.employeedata intothe frontend context upon initialization.
SalespersonListandSalespersonLineto displayavailable employees in a selection modal.
ControlButtonsarea ofthe
ProductScreen.salesperson_idto thepos.orderform and listviews to ensure the data is visible in the backend.
task-4680845