[18.0][MIG] pos_access_right: Migration to 18.0#4
Conversation
19b349b to
1a24d6e
Compare
|
1, can you squash Translation commits in history
|
| getNumpadButtons() { | ||
| const buttons = super.getNumpadButtons(); | ||
| buttons.forEach((button) => { | ||
| if (button.value === 'discount') { | ||
| button.disabled = !this.hasManualDiscount; | ||
| } else if (button.value === 'price') { | ||
| button.disabled = !this.hasPriceControlRights; | ||
| } else if (button.value === '-') { | ||
| button.disabled = !this.hasMinusControlRights; | ||
| } | ||
| }); | ||
| return buttons; |
There was a problem hiding this comment.
In this, I disabled numpad buttons instead of doing it in the XML file. Reference PR#132245
1a24d6e to
27c1e7a
Compare
|
'compute readonly access group -> default editable group' |
[REF] improve description; [ADD] fr translation; [ADD] new blockage; [ADD] fr translation; [IMP] description; [FIX] [FIX] display; [FIX] remove useless feature;[FIX] bug on multi order check [REF] rename fields [FIX] add missing author [REF] improve fr translation OCA Transbot updated translations from Transifex [UPD] Update pos_access_right.pot
[DOC] update README [FIX] fix variable name [REF] the pos.config model load all fields [DOC] update website link [LINT] fix lint errors [LINT] fix lint errors [UPD] README.rst [UPD] Update pos_access_right.pot
Updated by Update PO files to match POT (msgmerge) hook in Weblate. Added translation using Weblate (Russian)
Currently translated at 50.0% (10 of 20 strings) Translation: pos-12.0/pos-12.0-pos_access_right Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_access_right/ru/
[UPD] Update pos_access_right.pot [FIX] eslint [UPD] Update pos_access_right.pot
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: pos-12.0/pos-12.0-pos_access_right Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_access_right/ [UPD] README.rst
[IMP] : black, isort, prettier
[UPD] Update pos_access_right.pot [UPD] README.rst pos_access_right 14.0.1.0.1 Translated using Weblate (French) Currently translated at 100.0% (23 of 23 strings) Translation: pos-14.0/pos-14.0-pos_access_right Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_access_right/fr/ Translated using Weblate (Catalan) Currently translated at 100.0% (23 of 23 strings) Translation: pos-14.0/pos-14.0-pos_access_right Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_access_right/ca/ [FIX] pos_access_right : remove bad css that impact all PoS
Translated using Weblate (Italian) Currently translated at 100.0% (25 of 25 strings) Translation: pos-14.0/pos-14.0-pos_access_right Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_access_right/it/
[UPD] Update pos_access_right.pot [BOT] post-merge updates
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: pos-16.0/pos-16.0-pos_access_right Translate-URL: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_access_right/ Translated using Weblate (Spanish) Currently translated at 100.0% (17 of 17 strings) Translation: pos-16.0/pos-16.0-pos_access_right Translate-URL: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_access_right/es/ Translated using Weblate (Italian) Currently translated at 100.0% (17 of 17 strings) Translation: pos-16.0/pos-16.0-pos_access_right Translate-URL: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_access_right/it/ [FIX] eslint error 'no-shadow' in all modules [BOT] post-merge updates [FIX]pos_access_right: change deleteOrder to _onDeleteOrder [BOT] post-merge updates
6c00045 to
d63fc8f
Compare
| config.group_delete_order_id = self.env.ref( | ||
| "pos_access_right.group_delete_order" | ||
| ).id | ||
| config.group_payment_id = self.env.ref("pos_access_right.group_payment").id |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
pos_access_right/models/res_users.py
Outdated
| res = super()._load_pos_data(data) | ||
| config = data["pos.config"]["data"][0] | ||
|
|
||
| user = self.search([("id", "=", self.env.uid)], limit=1) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
In Odoo Native, user is get by domain self._load_pos_data_domain(), I updated to use this method
| t-name="ActionpadWidget" | ||
| t-inherit="point_of_sale.ActionpadWidget" | ||
| t-inherit-mode="extension" | ||
| owl="1" |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| } else if (button.value === "price") { | ||
| button.disabled = !this.hasPriceControlRights; | ||
| } else if (button.value === "-") { | ||
| button.disabled = !this.hasMinusControlRights; |
There was a problem hiding this comment.
In v12.0, it also dont use the minus key when pressed, I updated to disable this key. But what about the return/refund case?
There was a problem hiding this comment.
I don't know that we have short keys for return and refund! what key are they?
There was a problem hiding this comment.
I mean, in refund progress but user not allow minus control, so they cannot input quantity to refund
There was a problem hiding this comment.
No problem, when inputting negative qty, the cashier want to refund.
So, it's the same matter.
keep your adjustment as now.
| }, | ||
| async pay() { | ||
| if (!this.user.raw.hasGroupPayment) { | ||
| this.dialog.add(AlertDialog, { |
There was a problem hiding this comment.
I cannot test this popup. when i has no payment right, the pay button is disabled. So, i cannot make the payment.
There was a problem hiding this comment.
For trick cases, you can open Inspect (F12) and go to button element, remove disable atrribute
There was a problem hiding this comment.
no, it's not what i mean. if there's no way i can test it, you could clean it.
| }, | ||
| async onDoRefund() { | ||
| if (!this.hasPaymentControlRights) { | ||
| this.dialog.add(AlertDialog, { |
There was a problem hiding this comment.
I cannot test this popup. when i has no payment right, the refund button is disabled. So, i cannot refund the order.
There was a problem hiding this comment.
For trick cases, you can open Inspect (F12) and go to button element, remove disable atrribute
| patch(PosStore.prototype, { | ||
| async onDeleteOrder(order) { | ||
| if (!this.user.raw.hasGroupDeleteOrder) { | ||
| this.dialog.add(AlertDialog, { |
There was a problem hiding this comment.
I cannot test this popup. when i has no Delete right, the button is invisibled. So, i cannot delete the order.
There was a problem hiding this comment.
For trick cases, you can open Inspect (F12) and go to button element, remove disable atrribute
| hasGroupDiscount=config["group_discount_id"] in user_groups, | ||
| hasGroupNegativeQty=config["group_negative_qty_id"] in user_groups, | ||
| hasGroupPriceControl=config["group_change_unit_price_id"] in user_groups, | ||
| hasGroupMultiOrder=config["group_multi_order_id"] in user_groups, |
There was a problem hiding this comment.
No usage of the hasGroupMultiOrder
There was a problem hiding this comment.
Removed this group. Cashier can open multi order screen
There was a problem hiding this comment.
Hide button add new order
d63fc8f to
b738347
Compare
nguyenminhchien
left a comment
There was a problem hiding this comment.
- Clean the useless code checks.
- Disable the "Plus" button if has no Multi Order group.
| ) { | ||
| this.dialog.add(AlertDialog, { | ||
| title: _t("Not Allowed"), | ||
| body: _t("You do not have permission to set negative quantity."), |
There was a problem hiding this comment.
Add French translation for them please
de1c4da to
b04cb0c
Compare
4fe709d to
e37948c
Compare
e37948c to
ddc6f9b
Compare


This module extends Odoo Point Of Sale features, restricting possibility to cashier to make some actions in the Point of Sale. This module will add the following groups to Odoo:
Point Of Sale (ie, can return products);
a product in Point Of Sale;