Skip to content
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

Open
wants to merge 18 commits into
base: 16.0
Choose a base branch
from

Conversation

tewtawat
Copy link

Standard Migration

@oca-clabot
Copy link

Hey @tewtawat, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: https://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@rousseldenis
Copy link
Sponsor Contributor

rousseldenis commented Oct 10, 2022

@tewtawat Thanks for this. Could you just add in the description the dependency PR link in order to easy review? Thanks

@tewtawat
Copy link
Author

@rousseldenis okay but there're no dependency pr for this module. what should i have to do

@rousseldenis
Copy link
Sponsor Contributor

@rousseldenis okay but there're no dependency pr for this module. what should i have to do

Ok, sorry. 😅

@rousseldenis
Copy link
Sponsor Contributor

/ocabot migration product_supplierinfo_barcode

Copy link
Sponsor Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Copy link

@marylla marylla left a 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.

much-sparenberg

This comment was marked as duplicate.

Copy link

@marylla marylla left a 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>

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:

<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.

@rousseldenis
Copy link
Sponsor Contributor

/ocabot rebase

@OCA-git-bot
Copy link
Contributor

@rousseldenis The rebase process failed, because command git push --force trinityroots tmp-pr-446:16.0-mig-product_supplierinfo_barcode failed with output:

remote: Permission to trinityroots/stock-logistics-barcode.git denied to OCA-git-bot.
fatal: unable to access 'https://github.com/trinityroots/stock-logistics-barcode/': The requested URL returned error: 403

Copy link

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 12, 2023
@hildickethan-S73
Copy link
Member

@tewtawat could you rebase the branch? to fix any conflict before merge as it seems like the bot had issues doing that

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 19, 2023
Copy link

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 24, 2024
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Member

@pedrobaeza pedrobaeza left a 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",
Copy link
Member

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)",
Copy link
Member

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

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet