Skip to content

Commit e48a96c

Browse files
committed
[ADD] pos_order_salesperson: added Salesperson button in ControlButtons.
added Salesperson button in ControlButtons of ProductScreen. added salesperson_list Component to display list of all salespersons. added salesperson_line Component to load every salesperson data. added pos_order inheritance to add salesperson_id field to pos.order model. added pos_session inheritance to load hr.employee in session.
1 parent b68a192 commit e48a96c

File tree

17 files changed

+269
-129
lines changed

17 files changed

+269
-129
lines changed

.gitignore

Lines changed: 0 additions & 129 deletions
This file was deleted.

pos_order_salesperson/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "Point of Sale Salesperson",
3+
"description": """
4+
Point of Sale Salesperson Module to add Salesperson in pos order, form and billing in session.
5+
""",
6+
"version": "1.0",
7+
"depends": ["pos_hr"],
8+
"author": "danal",
9+
"category": "Category",
10+
"license": "LGPL-3",
11+
"data": [
12+
"views/pos_order_view.xml",
13+
],
14+
"assets": {
15+
"point_of_sale._assets_pos": [
16+
"pos_order_salesperson/static/src/**/*"
17+
]
18+
},
19+
}
207 Bytes
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# -*- coding: utf-8 -*-
2+
from . import pos_order
3+
from . import pos_session
252 Bytes
Binary file not shown.
629 Bytes
Binary file not shown.
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from odoo import fields, models
2+
3+
4+
class PosOrder(models.Model):
5+
_inherit = 'pos.order'
6+
7+
salesperson_id = fields.Many2one("hr.employee", string="Salesperson")
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from odoo import api, models
2+
3+
4+
class PosSession(models.Model):
5+
_inherit = 'pos.session'
6+
7+
@api.model
8+
def _load_pos_data_models(self, config_id):
9+
data = super()._load_pos_data_models(config_id)
10+
data += ["hr.employee"]
11+
return data

0 commit comments

Comments
 (0)