The test needs to set `product_id` field in order to check user's
access. However, the field is not visible without enabling product
variants, which makes the test fail in an environment with no demo data.
This commit fixes the issue by adding the MRP manager to the
'product.group_product_variant' group.
The issue was introduced in #162107 .
Related build error:
https://runbot.odoo.com/web#id=61998&cids=1&menu_id=405&action=573&model=runbot.build.error&view_type=formclosesodoo/odoo#162873
X-original-commit: 00b317b114cd139a4ea03a1e660e1b549f829130
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Pawel Fertyk (pafe) <pafe@odoo.com>
Currently, recalculating `analytic_distribution` requires access to
`account.analytic.distribution.model`. This breaks BoM creation for
non-accounting users (e.g. MRP managers). This commit fixes the issue by
using `sudo()._get_distribution`.
closesodoo/odoo#162184
X-original-commit: 3872e9365e4d8cc100a6022e934292f6f6802162
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Pawel Fertyk (pafe) <pafe@odoo.com>
After `_check_combo_inclusion` was added, it broke product creation for
users without sales rights (e.g. stock managers). This commit fixes
the issue by using `sudo().search`.
closesodoo/odoo#161313
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
A subcontracting BoM sometimes shows negative values in Overview, if
components are available in subcontractor's location.
closesodoo/odoo#144702
Task: 3607854
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Original requirement:
On the return slip, the 2 barcodes are too close to each other.
So, it's too easy to scan the wrong barcode. We should add a bit
more space between the 2 barcodes (For the demo, I had to take
another document for managing the scanning)
closesodoo/odoo#142916
Signed-off-by: Steve Van Essche <svs@odoo.com>
Also, "Short Name" for duplicated warehouses was set to "COPY", because
of the 5 char limit which doesn't allow appending " (copy)" to the
original value.
closesodoo/odoo#122511
Task: 3290154
Related: odoo/upgrade#5138
Related: odoo/enterprise#42541
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Rationale: if our users want to do a pick-pack-ship manually, they were
unable to duplicate pickings by just changing the operation type.
Task: 3290154
Related task: 3010731
Part-of: odoo/odoo#122511
Some clients use the same barcode for products in different companies,
with different configuration. It is inconvenient for those users to have
to ensure the uniqueness of barcodes across all companies.
This commit will allow products to have duplicated barcodes, as long as
they are assigned to different companies. Products without a company are
treated as belonging to all companies. Product variants require unique barcodes.
The validation needs to be triggered both on barcode and company_id, so
product template (where company_id is stored) was also adjusted.
NOTE: when a barcode is duplicated in 2 companies, an attempt to remove
both the company and the barcode from a product will result in an
error, despite the fact that a product without a company and a barcode
would have a correct configuration. This happens because the barcode
uniqueness check is performed before changing the barcode, but after
changing the company. A workaround for this problem is to remove the
barcode first, save the product, and remove the company.
Task: 3290154
Related task: 3270732
Related: odoo/enterprise#42541
Part-of: odoo/odoo#122511
List of transfers shown in the Batch Transfer form was using a simplified
view, without proper coloring etc. That list was removed, so now the
default list of transfers is used and the view is more consistent.
The change is applied both in the Batch Transfers form (in the "Transfers" tab),
and in the popup visible after clicking "Add a line" button.
Task: 3290154
Related: odoo/upgrade#5138
Part-of: odoo/odoo#122511
The reason is to make it consistent with other places where we display locations,
where lot/serial number is placed next to the source location. Initial requirement
was to move lot/serial number in between "From" and "To", but PO decided to move
it before "From", as it should be more convenient for users.
Task: 3290154
Part-of: odoo/odoo#122511
Product's display_name can be too long and might not fit in small
labels. A decision was made to split it into default_code and actual
product name, and display both in separate lines.
Unfortunately, the logic of joining those 2 strings is embedded in the
model, so it had to be duplicated in the label.
Task: 3290154
Part-of: odoo/odoo#122511
This is a missing test for #126066 .
closesodoo/odoo#126667
Task: 3370869
X-original-commit: 1b4a0d871662670ec2a360379913d1e30feec40c
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Pawel Fertyk (pafe) <pafe@odoo.com>
Currently we skip the lot_id assignment if move.quantity_done is set,
which causes issues when using "Mass Produce" option.
closesodoo/odoo#126191
Task: 3370869
X-original-commit: 72f316a4c0ad1d443aa84051858fa6d8885b464e
Signed-off-by: Tiffany Chang <tic@odoo.com>