New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][9.0] ADD stock_scanner_web #47

Closed
wants to merge 1 commit into
base: 9.0
from

Conversation

Projects
None yet
6 participants
@angelmoya

angelmoya commented Oct 10, 2016

WIP create module to use stock_scanner scenarios on web interface

This is a prototype module, it could be finish without too much effort.

To test only install module, create scenario o use demo data, and create an scanner hardware. It's better documentated on stock_scanner module.

To play scenario on web go to:
http://127.0.0.1:8069/scanner_call/hard1
hard1 is code for your hardware.

At this moment the module is based on simple template and controller, to finish I think it could be better to improve controler to get easier template.

It's needed to get last stage on scenarios, if you are playing scenario and go out, when you return it would be nice be on last stage.

Other thing to think is about split original scanner_module on twice modules, one stock_scanner_base and stock_scanner_ssh.

The web don't has css, it's needed to improve template.

Finally I think it's not need to add javascript, because scenarios stages only has one field to set, then focus could be set on this input, and enter key could do the submit.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 10, 2016

Coverage Status

Coverage decreased (-1.3%) to 80.928% when pulling 2bb3a02 on angelmoya:9.0_ADD_stock_scanner_web into 6d4b59f on OCA:9.0.

coveralls commented Oct 10, 2016

Coverage Status

Coverage decreased (-1.3%) to 80.928% when pulling 2bb3a02 on angelmoya:9.0_ADD_stock_scanner_web into 6d4b59f on OCA:9.0.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 10, 2016

Coverage Status

Coverage decreased (-1.3%) to 80.928% when pulling 2bb3a02 on angelmoya:9.0_ADD_stock_scanner_web into 6d4b59f on OCA:9.0.

coveralls commented Oct 10, 2016

Coverage Status

Coverage decreased (-1.3%) to 80.928% when pulling 2bb3a02 on angelmoya:9.0_ADD_stock_scanner_web into 6d4b59f on OCA:9.0.

@sylvain-garancher

Great work.
Some comments added inline.

You should also clean/remove files from OCA template.

scanner_hardware = request.env()['scanner.hardware'].sudo()
values = {}
try:
action = int(action)

This comment has been minimized.

@sylvain-garancher

sylvain-garancher Oct 16, 2016

I don't understand why you try to cast action to integer, as it always should be a string (see in this method : https://github.com/OCA/stock-logistics-barcode/blob/9.0/stock_scanner/models/scanner_hardware.py#L218)

@sylvain-garancher

sylvain-garancher Oct 16, 2016

I don't understand why you try to cast action to integer, as it always should be a string (see in this method : https://github.com/OCA/stock-logistics-barcode/blob/9.0/stock_scanner/models/scanner_hardware.py#L218)

<t t-foreach="result[1:]" t-as="line">
<p t-esc="line"/>
</t>
<a id="btn-go" t-attf-href="/scanner_call/{{terminal_number}}/action/0" class="btn">

This comment has been minimized.

@sylvain-garancher

sylvain-garancher Oct 16, 2016

You forgot to test the value : a default value set to True should call the 'back' action, instead of 'action'.

@sylvain-garancher

sylvain-garancher Oct 16, 2016

You forgot to test the value : a default value set to True should call the 'back' action, instead of 'action'.

<form method="get"
t-att-action="'/scanner_call/%s/action' % (terminal_number)" class="search_class form-inline">
<div class="input-group">
<input type="number" name="message" class="search-query form-control"/>

This comment has been minimized.

@sylvain-garancher

sylvain-garancher Oct 16, 2016

The float step doesn't allow float values, only integers (tested on Firefox 49).

@sylvain-garancher

sylvain-garancher Oct 16, 2016

The float step doesn't allow float values, only integers (tested on Firefox 49).

@lasley lasley added this to the 9.0 milestone Nov 8, 2016

@jbeficent jbeficent referenced this pull request Nov 24, 2016

Closed

[9.0] stock_scanner_web #55

@jbeficent

This comment has been minimized.

Show comment
Hide comment
@jbeficent

jbeficent Nov 24, 2016

Member

We have continued @angelmoya work here #55. Can we close this one?

Member

jbeficent commented Nov 24, 2016

We have continued @angelmoya work here #55. Can we close this one?

@jbeficent

This comment has been minimized.

Show comment
Hide comment
@jbeficent

jbeficent Nov 24, 2016

Member

Since @angelmoya had just one commit we saw no good reason to maintain the commit history

Member

jbeficent commented Nov 24, 2016

Since @angelmoya had just one commit we saw no good reason to maintain the commit history

@pedrobaeza

This comment has been minimized.

Show comment
Hide comment
@pedrobaeza

pedrobaeza Nov 24, 2016

Contributor

You need to keep his commit and thus his attribution.

Contributor

pedrobaeza commented Nov 24, 2016

You need to keep his commit and thus his attribution.

@pedrobaeza pedrobaeza closed this Nov 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment