(self, orders, draft=False)
return super(PosOrder, self_ctx).create_from_ui(orders, draft)
Provide a context with the current session id
Provide a context with the current session id
Provide a context with the current session id
def create_from_ui(self, orders, draft=False):
        """Provide a context with the current session id"""
        if not orders:
            return super().create_from_ui(orders, draft)
        # We take the uid from every order in the sync queue to discard only
        # those orders that are really unique
        # TODO: Duplicated simp. invoice ids shouldn't happen but in certain
        # circumstances it can ocurr, so we choose to save them anyway.
        submitted_uids = [o["data"]["uid"] for o in orders]
        self_ctx = self.with_context(l10n_es_pos_submitted_uids=submitted_uids)
        return super(PosOrder, self_ctx).create_from_ui(orders, draft)
def create_from_ui ( self , orders , draft = False ) : if not orders : return super ( ) . create_from_ui ( orders , draft ) # We take the uid from every order in the sync queue to discard only # those orders that are really unique # TODO: Duplicated simp. invoice ids shouldn't happen but in certain # circumstances it can ocurr, so we choose to save them anyway. submitted_uids = [ o [ "data" ] [ "uid" ] for o in orders ] self_ctx = self . with_context ( l10n_es_pos_submitted_uids = submitted_uids ) return super ( PosOrder , self_ctx ) . create_from_ui ( orders , draft )