X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=pos_membership.py;h=5f623529821da2053513e9a4c52f1e4ba457852a;hb=6a43822c18fa44d5ba3427eb4f600c3ed966590a;hp=6e75dd7e9d84aaf1c32fdca21f533a2e0bb2bb5b;hpb=3ca4ee1f0a4ab145da9e668e4c87c1c6618d507b;p=burette%2Fpos_membership.git diff --git a/pos_membership.py b/pos_membership.py index 6e75dd7..5f62352 100644 --- a/pos_membership.py +++ b/pos_membership.py @@ -11,7 +11,7 @@ # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# ReMembership is distributed in the hope that it will be useful, +# POS Membership is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. @@ -39,6 +39,30 @@ STATE = [ ] +class pos_session(osv.osv): + _inherit = 'pos.session' + + def open_cb(self, cr, uid, ids, context=None): + """ + Avoid call the Point Of Sale interface and set the pos.session to 'opened' (in progress) + """ + if context is None: + context = dict() + + if isinstance(ids, (int, long)): + ids = [ids] + + this_record = self.browse(cr, uid, ids[0], context=context) + this_record._workflow_signal('open') + + context.update(active_id=this_record.id) + + return { + } +pos_session() + + + class pos_order(osv.osv): _inherit = 'pos.order'