Sale_pos installation on Tryton version 5

Hi guys!,
Have somebody being successful installing zikzakmedia sale_pos module on Tryton version 5?..

I’ve tried unsuccessfully with both version 5.0 and 5.4, in every case I get an AssertionError, I’ve concluded that this happens as a result of some undeclared dependencies or the most simple fact that the published versions are not compatible with Tryton version 5 so far… here the stack trace that I end up with:

Traceback (most recent call last):
  File "/usr/local/trytond/lib/python3.6/site-packages/trytond/protocols/dispatcher.py", line 186, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/usr/local/trytond/lib/python3.6/site-packages/trytond/wizard/wizard.py", line 286, in execute
    return wizard._execute(state_name)
  File "/usr/local/trytond/lib/python3.6/site-packages/trytond/wizard/wizard.py", line 317, in _execute
    result = self._execute(transition())
  File "/usr/local/trytond/lib/python3.6/site-packages/trytond/ir/module.py", line 582, in transition_upgrade
    pool.init(update=update, lang=lang)
  File "/usr/local/trytond/lib/python3.6/site-packages/trytond/pool.py", line 162, in init
    lang=lang, activatedeps=activatedeps)
  File "/usr/local/trytond/lib/python3.6/site-packages/trytond/modules/__init__.py", line 428, in load_modules
    _load_modules(update)
  File "/usr/local/trytond/lib/python3.6/site-packages/trytond/modules/__init__.py", line 393, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/usr/local/trytond/lib/python3.6/site-packages/trytond/modules/__init__.py", line 202, in load_module_graph
    classes = pool.fill(module, modules)
  File "/usr/local/trytond/lib/python3.6/site-packages/trytond/pool.py", line 224, in fill
    assert issubclass(cls, PoolBase), cls
AssertionError: <class 'trytond.modules.sale_pos.sale.SalePaymentForm'>

IIRC this module requires a custom sale_payment module, not the one which is available on tryton.org

You should report this issue to the author of the module.

Thank you Sergi!,
I followed your advice and was able to install it without any problem… (I used the sale_payment module found in the Tryton Spain bitbucket repo if that helps other in my situation)

In the other hand, I thought that the “sale screen” was part of the module… it seems that it’s not the case and I’m going to need a client… what I’ve seen so far is the Presik qt app, are you aware of other options? (I’d prefer one with web interface),

Thank you again!,

IIRC this is the cas, there is a Sale POS View on the module that it is designaed specially for a point of sale (but without offline capabilities and so on).

You can check Point of Sale (#8737) · Issues · Tryton / Tryton · GitLab that I had not yet time to finish.

1 Like

Hi Cedric,
I saw the thread and the current status of the project… It would be fantastic to have this project finalized!,
By the way… I’ll be happy to contribute with coding once the design be ready!,

You’re right!.. probably I’ve to enable some permission for it to appear (working on it!.. ),
BR,

Nevermind … actually it was already there… it was an expectations issue (when I saw the screen in list mode I thought it was a kind of report, but opening a new record it’s clear that this is the sales screen that I was looking for),

Thank you so much!,

The design is mainly fixed. You can see the few TODO left in the code.

I tried to download the repo but I got lost in the process :frowning: … I assume that the process should be the one shown here [Tryton - How to Develop] (Tryton - How to Develop) … however it seems like the repo isn’t alive:

    fflores@tlitpp-mac01:~/python_prjs$ hg clone https://hg.tryton.org/tryton-env
    abort: error: nodename nor servname provided, or not known

The other tool that I saw is the code review with the option to download the patch set… but I don’t think that this is the process, is it?

This is strange. Check that you have a recent mercurial version.

Indeed the repository for sale_point does not exist yet. So you have to download the patch and applied on a tryton-env clone. But I think I have to update the patch first to be sure it applies on recent version.

It’s working now… probably a temporary network problem,
Let me know when patch is up to date,

It is already updated to tip.

Hello everyone,
I’m also trying to install the module but I get the next Exception:

Traceback (most recent call last):
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/convert.py", line 451, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.6/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 419, in StartElement
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 333, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/convert.py", line 487, in startElement
    self.taghandler.startElement(name, attributes)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/convert.py", line 232, in startElement
    self.values[field_name] = self.mh.get_id(ref_attr)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/convert.py", line 529, in get_id
    % ".".join([module, xml_id]))
Exception: Reference to sale_payment.sale_payment_view_form not found
Traceback (most recent call last):
  File "./trytond/bin/trytond-admin", line 21, in <module>
    admin.run(options)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/admin.py", line 54, in run
    activatedeps=options.activatedeps)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/pool.py", line 160, in init
    lang=lang, activatedeps=activatedeps)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/modules/__init__.py", line 418, in load_modules
    _load_modules(update)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/modules/__init__.py", line 388, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/modules/__init__.py", line 230, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/convert.py", line 451, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.6/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 419, in StartElement
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 333, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/convert.py", line 487, in startElement
    self.taghandler.startElement(name, attributes)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/convert.py", line 232, in startElement
    self.values[field_name] = self.mh.get_id(ref_attr)
  File "/home/yoel/Development/tryton/new/full/trytond/trytond/convert.py", line 529, in get_id
    % ".".join([module, xml_id]))
Exception: Reference to sale_payment.sale_payment_view_form not found
  • Could anyone tell me if it is the same that mentions @frflores at the beginning of the topic?
  • @frflores could you share a link where did you get it?

For the correct operation is necessary to use:
sale_payment_trytonspain
sale_shop_zizakmedia
sale_w_tax_zizakmedia
Remember use the same version in all the modules

2 Likes

Hello, I’d like to ask for your advise working on a POS. Hope it’s ok for you, using this threat.
Our current status: We use a simple tryton (v3.8) module as POS in a tiny bookstore. Thru german tax-laws we have to do some changes (POS need to have a “TSE”, technical security extention, since March 2021 – I know we are late …). The technical stuff concerning the TSE will be solved by us. We’ll plan to migrate to v6 working on this task.
My questions:
a) Would you recommend to use the zikzakmedia sale_pos solution?
b) What is the status of the planned trytond_pos/point-of-sale? Combined with the question how much effort (by time and/or money) is still needed to get a stable module (and has anyone of time and motivation to work on it?) – I’m not asking for a “nice” frontend.
Any advice/suggestions are very welcomed, we need to get started soon.

There is an issue tracking the work on the sale_point module.
As you can see this is still a work in progress and there is still some points to be implemented.

It will be great if you can test the current work and even better to contribute to it.

As the original author, I estimate to 2 or 3 days to finish the module.

2 Likes

Hi Guys,
It’s good to see some movement in this thread!.. I’m still enthusiastic about completing this.

The last time that we interacted in this regard I post some requests for clarifications in the issue (probably not the right place to do it)… . so I will reproduce it here:

1- TODO: “number on close”: I understand this as "obtain the next number from sequence and apply to the number field after the user clicks on the “process” button,… however currently the record is created when the process button is clicked (in the create method)… so I don’t see the point)

2- TODO: “prevent delete when numbering”: I understand this as temporary disable the delete button from interface while getting the number from sequence… however in my understanding the number is retrieved from sequence in one single transaction (it’s an atomic operation), so I don’t see the change that something else could happen while getting the number from sequence… I’m right?

3- TODO: “allow reopen”: I understand this as include a couple of new transitions (‘done’, ‘open’), (‘posted’, ‘open’) and the corresponding handling methods, is that correct?

4- TODO: “wizard to create an invoice from sale”: should this be a wizard or a process that runs on “process” or “post” clicks?… (I mean, something that happens without user interaction )

5- TODO: "packaging UOM’: is that fix the error that triggers for the fact that product brings only the id instead of the whole object? (I’m still trying to understand why the product doesn’t brings all the other attributes (only the id)… but I solved this getting the object from db like this:

@fields.depends('product')
    def on_change_with_uom(self, name=None):
        # TODO: packaging UOM
        if self.product:
            pool = Pool()
            Product = pool.get('product.product')
            product = Product.search([
                    ('id',  '=',  self.product.id)
                    ]
            )[0]
#            logger.info('product sale_uom id is %s' % str(product.sale_uom.id))
            return product.sale_uom.id

Hello Sergi, Cedric and Francesco,
thank you for your replies. I don’t have the skill to contribute on a technical base and Frederik is too busy with other tasks these days. Next week I try to check the current state of your module. Sure I would help to localise it to german.
However I would like to support/push the development on the module financially. May anyone contact me by email concerning this point? Below I will list the set of features, we need to have to be happy for everyday-use at my wifes lovely, little bookshop (cashiers-perspective) [the handling off “new product” I see on our side"]:

Important features for everyday use

=> Payments by cash, card, gift-certificate

=> Gift certificates/vouchers [Gutschrift] (//we (m-ds) may add a routine for this//)

  • click on button add voucher
  • type in desired value of voucher
  • click OK/something like that
  • voucher is added to total
  • after paying, the voucher is printed (with scan-code) after the receipt

=> Returns

  • we look up the receipt reference number on the sales list
  • we open that transaction
  • we click on the button „Return“ [Rücknahme] (we delete everything that should not be returned, if the customer bought more than one item)
  • we click „do return“ [Rücknahme durchführen]
  • the next screen shows the total that the customer gets back and the cash drawer opens
  • we only have the option to return a product for cash. Maybe it‘s possible to add an option to return a product for a gift certificate? Right now, that is not possible in one transaction. We can‘t add a voucher to a return transaction, because we can‘t combine a negative with a positive transaction.

=> Add product /// to be done by us:///

  • if we have not already sold a specific product, we get a screen to tell us that the product is not listed in the database (so far we do not work with warehouse-feature, but we will change this)
    ///to be done/develop by us: - we then click on the add articte/product on the bottom of the screen. With that click, the product is checked against the wholeseller database (our wholesaler) and added to the total///

=> Add a new (database&wholesaler-unknown) product /// to be done by us:///

  • if the article is not in the wholesaler‘s database or ours, we need to add the article by ourselves
  • on the left, there is the option Article and add new article
  • there, we have to add a title, a product group, the ISBN and the price. We also need to add the appropriate tax amount, so that the right total is created

=> cashing-up/cash check/cash review

  • save the cash amont counted (whenever?), possibility (button) to book/move the diff-amount to a defined acount

=> Gross-Prices

  • thru german “book-price-fixing” [Buchpreisbindung] all prices have to be set/listed/shown/calculated by gross-prices (although the incl. tax will be shown on the receipt)

=> /// to be done by us: TSE (technical security extention): A signature will be added to every move (printed on receipt and stored in an extra/encrypted file), forced by German tax law///