-
-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] pos_access_right: Migration to 16.0
- Loading branch information
Showing
9 changed files
with
72 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from . import pos_config | ||
from . import pos_session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from odoo import models | ||
|
||
|
||
class PosSession(models.Model): | ||
_inherit = "pos.session" | ||
|
||
def _get_pos_ui_hr_employee(self, params): | ||
employees = super()._get_pos_ui_hr_employee(params) | ||
for employee in employees: | ||
user = self.env["res.users"].browse(employee["user_id"]) | ||
if user: | ||
groups = user.groups_id | ||
config = self.config_id | ||
employee["hasGroupPayment"] = ( | ||
True if config.group_payment_id in groups else False | ||
) | ||
|
||
employee["hasGroupDiscount"] = ( | ||
True if config.group_discount_id in groups else False | ||
) | ||
|
||
employee["hasGroupNegativeQty"] = ( | ||
True if config.group_negative_qty_id in groups else False | ||
) | ||
|
||
employee["hasGroupPriceControl"] = ( | ||
True if config.group_change_unit_price_id in groups else False | ||
) | ||
|
||
employee["hasGroupMultiOrder"] = ( | ||
True if config.group_multi_order_id in groups else False | ||
) | ||
|
||
employee["hasGroupDeleteOrder"] = ( | ||
True if config.group_delete_order_id in groups else False | ||
) | ||
|
||
return employees |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
* Sylvain LE GAL <https://twitter.com/legalsylvain> | ||
* Ammmar Officewala <https://twitter.com/AmmarOfficewala> | ||
* Helly kapatel <[email protected]> | ||
* Jumeldi <[email protected], PT Solusi Aglis Indonesia> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.