Ok, here is the complet solution.
I have defined two differents file : pos_as.xml and pos_cf.xml
I have declared those two files in __openerp__.py file (https://www.odoo.com/fr_FR/forum/help-1/question/could-we-define-multiple-files-in-the-qweb-section-of-the-openerp-py-91576)
In the pos_as.xml, I have declared <t t-name="PosTicket_as">
In the pos_cf.xml, I have declared <t t-name="PosTicket_cf">
I have created a new file : /pos_lapagept/static/src/js/screens_all.js
I have included this file with :
<template id="pos_lapagept.assets_backend_all" name="point_of_sale assets" inherit_id="point_of_sale.assets_backend">
<xpath expr="//script[contains(@src,'models.js')]" position="replace">
<script type="text/javascript" src="/pos_lapagept/static/src/js/models_all.js"></script>
<script type="text/javascript" src="/pos_lapagept/static/src/js/screens_all.js"></script>
</xpath>
</template>
In the file screens_all.js :
openerp.pos_lapagept = function (instance) {
var _t = instance.web._t,
_lt = instance.web._lt;
var QWeb = instance.web.qweb;
instance.point_of_sale.ReceiptScreenWidget.include({
refresh: function() {
var order = this.pos.get('selectedOrder');
var user_template = 'PosTicket';
if(instance.session.uid == 21){
user_template = 'PosTicket_as';
} else if (instance.session.uid == 53 || instance.session.uid == 55 || instance.session.uid == 56 || instance.session.uid == 57 ) {
user_template = 'PosTicket_cf';
}
$('.pos-receipt-container', this.$el).html(QWeb.render(user_template,{
widget:this,
order: order,
orderlines: order.get('orderLines').models,
paymentlines: order.get('paymentLines').models,
}));
},
});
}
THANKS TO AXEL!!!
Still need it! WOuld you have some suggestions?