-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
[16.0][MIG] product_supplierinfo_barcode #446
base: 16.0
Are you sure you want to change the base?
[16.0][MIG] product_supplierinfo_barcode #446
Conversation
Add barcode field to supplier pricelis items (supplier info), so that it can used to search product by supplier barcodes.
Currently translated at 100.0% (5 of 5 strings) Translation: stock-logistics-barcode-12.0/stock-logistics-barcode-12.0-product_supplierinfo_barcode Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-barcode-12-0/stock-logistics-barcode-12-0-product_supplierinfo_barcode/de/
Hey @tewtawat, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
@tewtawat Thanks for this. Could you just add in the description the dependency PR link in order to easy review? Thanks |
@rousseldenis okay but there're no dependency pr for this module. what should i have to do |
Ok, sorry. 😅 |
/ocabot migration product_supplierinfo_barcode |
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.
Code review
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 did a functional review.
I can only set the barcode for a supplier info in its form view when using this menu: purchase > configuration > vendor pricelists.
Unfortunately, it is not possible to add this barcode in product form view in page "purchase" because the tree view for supplier info has a "edit" option to edit it inline and not open a form view.
I think, we should add the barcode field also in supplier info tree view.
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.
Weirdly it worked now for me too. :) So everything fine now.
/> | ||
</field> | ||
</field> | ||
</record> |
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.
Why not migrate the view that adds the barcode to the supllierinfo tree in the product form?
Like in version 15:
stock-logistics-barcode/product_supplierinfo_barcode/views/product_views.xml
Lines 18 to 27 in 147a302
<record id="product_supplierinfo_tree_view2" model="ir.ui.view"> | |
<field name="name">product.supplierinfo.tree.view2.barcode</field> | |
<field name="model">product.supplierinfo</field> | |
<field name="inherit_id" ref="purchase.product_supplierinfo_tree_view2" /> | |
<field name="arch" type="xml"> | |
<field name="product_code" position="after"> | |
<field name="barcode" optional="hide" /> | |
</field> | |
</field> | |
</record> |
Tested in local environment and works correctly.
/ocabot rebase |
@rousseldenis The rebase process failed, because command
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
@tewtawat could you rebase the branch? to fix any conflict before merge as it seems like the bot had issues doing that |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
This PR has the |
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.
And check the other existing comment
"preloadable": True, | ||
"depends": [ | ||
# we need purchase to view seller_ids in product form | ||
"purchase", |
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.
Is this still applicable?
_sql_constraints = [ | ||
( | ||
"barcode_uniq", | ||
"unique(barcode)", |
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 think this constraint is too restrictive, as several suppliers may have the same barcode. It should be a combination of unique company, seller and barcode
Standard Migration