-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
[14.0] [IMP] sale_input_barcode: scan directly on sale.order #669
Open
SylweKra
wants to merge
2
commits into
OCA:14.0
Choose a base branch
from
SylweKra:14.0-FIX-sale_input_barcode
base: 14.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from . import product_barcode_line_mixin | ||
from . import res_config_settings | ||
from . import sale_order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
|
||
_inherit = "res.config.settings" | ||
|
||
sale_barcode_update_existing_line = fields.Boolean( | ||
string="Increase quantity instead of creating a new line", | ||
config_parameter="sale_input_barcode.sale_barcode_update_existing_line", | ||
default=False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
* PyTech SRL <[email protected]>: | ||
|
||
- Alessandro Uffreduzzi <[email protected]> | ||
- Alessio Renda | ||
|
||
|
||
* Ooops404 <[email protected]>: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,11 @@ | |
|
||
/* | ||
:Author: David Goodger ([email protected]) | ||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ | ||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ | ||
:Copyright: This stylesheet has been placed in the public domain. | ||
|
||
Default cascading style sheet for the HTML output of Docutils. | ||
Despite the name, some widely supported CSS2 features are used. | ||
|
||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to | ||
customize this style sheet. | ||
|
@@ -274,7 +275,7 @@ | |
margin-left: 2em ; | ||
margin-right: 2em } | ||
|
||
pre.code .ln { color: grey; } /* line numbers */ | ||
pre.code .ln { color: gray; } /* line numbers */ | ||
pre.code, code { background-color: #eeeeee } | ||
pre.code .comment, code .comment { color: #5C6576 } | ||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } | ||
|
@@ -300,7 +301,7 @@ | |
span.pre { | ||
white-space: pre } | ||
|
||
span.problematic { | ||
span.problematic, pre.problematic { | ||
color: red } | ||
|
||
span.section-subtitle { | ||
|
@@ -394,8 +395,19 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1> | |
<li>Press the button in the header with the QR Code icon</li> | ||
<li>Use a barcode scanner to scan a barcode.</li> | ||
</ol> | ||
<p>Alternatively, | ||
#. Navigate to a Sales Order. | ||
#. Activate “Edit Mode” | ||
#. Use a barcode scanner to scan a barcode.</p> | ||
<p>If a product is found using the barcode, | ||
a new line with that product will be added to the Sales Order.</p> | ||
<p>By default, each product scan adds a new line to the sales order. | ||
However, you can change this behavior in the sales settings. | ||
To have the system increase the quantity of an existing product line | ||
instead of creating a new one, follow these steps: | ||
#. Go to the Sales Settings section. | ||
#. Locate the option labeled “Increase quantity instead of creating a new line”. | ||
#. Check the box to activate this option and save to apply the changes.</p> | ||
</div> | ||
<div class="section" id="bug-tracker"> | ||
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1> | ||
|
@@ -416,7 +428,9 @@ <h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2> | |
<div class="section" id="maintainers"> | ||
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2> | ||
<p>This module is maintained by the OCA.</p> | ||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> | ||
<a class="reference external image-reference" href="https://odoo-community.org"> | ||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /> | ||
</a> | ||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use.</p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<odoo> | ||
<record id="view_res_config_settings_sale_input_barcode" model="ir.ui.view"> | ||
<field name="name">res.config.settings.sale.input.barcode</field> | ||
<field name="model">res.config.settings</field> | ||
<field name="inherit_id" ref="sale.res_config_settings_view_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//div[@id='no_edit_order']" position="inside"> | ||
<div class="o_setting_left_pane"> | ||
<field name="sale_barcode_update_existing_line" /> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<label for="sale_barcode_update_existing_line" /> | ||
<div class="text-muted"> | ||
Instead of creating a new sale order line it increases the quantity for each barcode scan | ||
</div> | ||
</div> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick (non-blocking): unless there are reasons to do otherwise, prefer listing the files in alphabetical order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can suggest to add isort (and black) to your environment for that.
Note this is not an OCA requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ordered the files in alphabetical order like you suggested.