in Pos if user need to update quntity show wizard or popup ask user for user name and password
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
if you need to call wizard from a js file you can use do_action()
Example:
your_custom_js_function: function(){
this.do_action({
name: _t('Wizard Name'),
type: 'ir.actions.act_window',
res_model: 'wizard.model',
context:{'default_partner_id':2)},
target: 'new',
views: [[false, 'form']],
});
}
i need to call this popup in my custome addons js file?
out side pos module
Hi,
You can create your own customized popup to accept the credentials.
odoo.define('point_of_sale.CreateUserPassPopup', function(require){
'use strict';
const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup');
const Registries = require('point_of_sale.Registries');
const { _lt } = require('@web/core/l10n/translation');
class CreateSaleOrderPopup extends AbstractAwaitablePopup {
}
//Creates a new popup
CreateUserPassPopup.template = 'CreateUserPassPopup';
CreateUserPassPopup.defaultProps = {
confirmText: _lt('Confirm'),
title: _lt('Enter your username and password'),
body: '', //Here you can customize your body to accept username and password
};
Registries.Component.add(CreateUserPassPopup);
return CreateUserPassPopup;
});
After the completion of creation of the popup you can call it at the desired instance.
this.showPopup('CreateUserPassPopup',{
title : this.env._t("Your Title"),
body : this.env._t("Your Body")})
Regards
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
1
ธ.ค. 22
|
4270 | ||
|
1
เม.ย. 22
|
2322 | ||
How to extend class with Owl JS in V15?
แก้ไขแล้ว
|
|
1
ม.ค. 24
|
7990 | |
|
1
มิ.ย. 24
|
5398 | ||
|
1
ก.พ. 24
|
2864 |