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

multiple bom with same partner #1095

Closed
budisentosa opened this issue Sep 18, 2023 · 1 comment
Closed

multiple bom with same partner #1095

budisentosa opened this issue Sep 18, 2023 · 1 comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@budisentosa
Copy link

Module

mrp_subcontracting (odoo 14)

Describe the bug

A clear and concise description of what the bug is.
i create for the same product with multiple BOM
on that multiple BOM , there is same partner
when i create PO to that partner , we can not select which BOM that will be used

i need this because , first BOM , and second BOM is different step
first BOM = from raw material
second BOM = from half processed material

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. create product
  2. create first BOM with that product (subcontrating to res_partner 1)
  3. create second BOM with that same product (subcontracting to res_partner 1)
  4. create PO with res_partner 1, we can not select which BOM that i want

Expected behavior

we can select which bom that i use
Additional context

file :
addons>mrp_subcontracting>models>mrp_bom.py:16

def _bom_subcontract_find(self, product_tmpl=None, product=None, picking_type=None, company_id=False, bom_type='subcontract', subcontractor=False):
    domain = self._bom_find_domain(product_tmpl=product_tmpl, product=product, picking_type=picking_type, company_id=company_id, bom_type=bom_type)
    if subcontractor:
        domain = AND([domain, [('subcontractor_ids', 'parent_of', subcontractor.ids)]])
        return self.search(domain, order='sequence, product_id', limit=1)
    else:
        return self.env['mrp.bom']

there is LIMIT = 1
to get the first BOM

Copy link

There hasn't been any activity on this issue in the past 6 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 issue 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 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant