Commit Graph
6154 Commits
Author SHA1 Message Date
david eec9c4aac5 [IMP] purchase: add names to columns and divs for better inheritance
Closes odoo/odoo#37814

closes odoo/odoo#43751

X-original-commit: 47f2534ddbdc717644673d6f68576ca027b0374a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-22 12:21:36 +00:00
wan d8c5cc1335 [IMP] account: add a readonly group
Task 2092079
Accounting firms that want to give access to their customers avoiding
mistakes and risks will love this profile that can't do anything
wrong... Maybe as well as companies auditors..?

closes odoo/odoo#39860

Related: odoo/enterprise#6576
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-01-22 11:23:16 +00:00
David Beguin 307f51ab85 [IMP] web: split _content_image with get response sub method
This commit splits the _content_image method to allow to call the
get response part individually.

This is needed because _content_image call binary_content using current user
access. But in some cases, we need to render a binary content even if the user
does not have access to the target model (typically for public users).

The binary_content is gotten in sudo mode where needed and the result can be
given to the _content_image_get_response.

This will avoid code duplication where the sudo use case is met.

Usage :
This commit prepare the redesign of survey. This _content_image_get_response
method will be called to grant access of background image even for public
users. Other modules will use this new method like elearning (website_slides)
to display karma ranking, etc.

Task ID: '2150291'
PR #43237
2020-01-17 10:25:20 +00:00
mreficent 59a96739e0 [FIX] purchase: not setting context is not empty context
Previous versions of this action had a context. It was removed at
odoo/odoo@2d3e6d7383 Set explicitly an empty context to
force the removal when upgrading the module. Fine tunning of
odoo/odoo@9346563009

closes odoo/odoo#43319

X-original-commit: 63a5a795a57af0da3b7459e0acd83a247861eaf3
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-15 08:48:39 +00:00
Arnold Moyaux 476780ced5 [IMP] purchase: rename 'order date' to 'order by'
Task: 1849912
2020-01-09 12:17:39 +00:00
Jason Van Malder b6714ee01d [FIX] purchase: prevent changes when a line has an invoice
Issue from rim:

    In runbot 12.3
    - Go to Purchase
    - Create a PO with one product line: qty 1 / unit price 1000
    - Validate the PO and create the Invoice
        => DON'T VALIDATE THE INVOICE YET
    - Go back to the PO, change the unit price to 2000
    - Go back to the invoice, validate it
    ==> the PO is marked as "fully invoiced" because the qty "1 unit"
        is counted as "invoiced"

    => we should not be able to change the price of a line that has
        already been invoiced, even in draft

Cause

    It seems that in all the PO's invoices state, we can edit a PO line.
    No restriction?

Solution

    Set the line price column to read only when they have a linked
    invoice.

OPW-2161477

closes odoo/odoo#42797

X-original-commit: b31c04040a2d7fe83741dec2d3a622487b7e46c3
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
2020-01-06 16:23:02 +00:00
Yenthe666 7876af3ad0 [IMP] *: set name on page elements
page is an element that is often used for xpath

closes odoo/odoo#41718

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 15:10:24 +00:00
Martin Trigaux b5db1c61ee [I18N] *: export saas-13.1 source terms
Without demo data, for the odoo-master transifex project

closes odoo/odoo#41935

X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 12:49:55 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
laa 9cfb6c05a4 [FIX] Portal : missing url args
on the portal:
- in Timesheets, when search something, the text of the search must remain displayed
- in Tasks, when search something, the text of the search must remain displayed
- in Purchase Orders, "Sort By" and "Filter By" selectors shouldn't change when going to next page
- in Timesheets, the "Group By" selector shouldn't change when going to next page

closes odoo/odoo#40278

Related: odoo/enterprise#6787
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 15:39:03 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Yenthe666 78ae3da902 [IMP] *: set name element on main containers in configuration views
This will improve the extendibility of view inheritance

closes odoo/odoo#41398

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-09 10:38:59 +00:00
svs-odoo 621a93b7b7 [MOV] *: _prepare_purchase_order_line
Move the method `_prepare_purchase_order_line` from 'stock.rule' to
'purchase.order.line'. The purpose is to reuse it in approvals_purchase.

task-2040710

closes odoo/odoo#41046

Related: odoo/enterprise#6702
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-02 14:18:39 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Victor Feyens c32e9a4788 [ADD] (*_)_product_matrix: test tours
closes odoo/odoo#40971

X-original-commit: d729460f5fc72aa70e0a024e1dff281299eed0e3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-27 15:49:57 +00:00
Victor Feyens 600d0707ae [IMP] *: use get_fiscal_position and not property_account_position_id.
And adapt to get_fiscal_position changes

closes odoo/odoo#40336

Related: odoo/enterprise#6840
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-11-20 14:42:07 +00:00
Victor Feyens c8e6362e60 [FIX] purchase: section and notes
Do not update the date_planned of section/note purchase lines when
writing on the order date_planned.  Otherwise the SQL constraint
ensuring display lines have no other data blocks the changes.

Fixes #40741

closes odoo/odoo#40747

X-original-commit: f3ebab6eb52e3dc8be1f030aecfff348a22f7e09
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-23 15:30:34 +00:00
Yannick Tivisse 26e32dac34 [IMP] portal: Partial revert of #37312
Purpose
=======

This fix makes no sense because it exposes some private data to
portal users. Fortunately it was only introduced in the master branch.

closes odoo/odoo#40710

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-22 14:45:22 +00:00
Victor Feyens 57b999d40a [FIX] sale,account,purchase_requisition: multi-company
Use correct company to get fiscal positions and properties

Ensure company used to fetch fiscal positions is always the correct one
when coming from a company restricted model (company_id required, or
related.required).

NB: if the company_id isn't defined, with_company doesn't change the
environment.

purchase: get_fiscal_position doesn't consider company_id ctxt key

others: properties were accessed with potentially the wrong company.
2019-11-18 12:25:05 +00:00
Victor Feyens 9215e73fa2 [IMP] * : replace with_context(force_company=c) by with_company(c) 2019-11-18 12:25:05 +00:00
Yannick Tivisse f44fbdb833 [IMP] account: Clean common tests classes 2019-11-12 11:34:36 +00:00
Odoo's Mergebot cfc65bd1b7 [MERGE] various: Make the test suite demo data independant
Purpose
=======

This is the first huge step to improve the test suite in several ways:

- Make them demo data independent, allowing to modify the demo data without having to adapt the tests depending on it. It also allows to have a beautiful + convenient demo dataset to make a demonstration, and to configure complex data in the tests to manage the corner cases.
- Improve the test performances by converting them into SavepointCase. Each test will be rollbacked to it's initial state, after the setUpClass call. That way the different data are not re-created at each test for nothing.
- Introduce several test classes in base/tests/common.py to launch a TransactionCase, HttpCase or SavepointCase test with an available demo user, portal user or a large set of partners.
- This is the first step to tend to a rolling release process, allowing to execute the tests (or a subset of the tests) on a migrated base, for example.

closes odoo/odoo#39868

Taskid: 2075739
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-07 08:37:12 +01:00
Yannick Tivisse 89cbc25a34 [FIX] purchase: Allow internal users to see their own orders 2019-11-05 16:18:10 +01:00
Yannick Tivisse d58ab7fbae [IMP] purchase: Adapt tests to work with/without demo data 2019-11-05 16:18:10 +01:00
Xavier MorelandPrakash Prajapati ab6d0c3851 [FIX] hr, purchase: update import templates
* the employees file apparently never worked as the marital status was
  updated before template files were added (respectively
  0eb58775c9 and
  b60de0db41)
* the purchase template was never updated to reflect the Big Demo Data Changes
  (58fc4e4409).

Fixes #39074

Employees file update split off of task 2059779.

closes odoo/odoo#39823

X-original-commit: 80a2f6877378a87638c04061ceaf69965c1707c0
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
2019-11-05 18:37:00 +00:00
Goffin Simon 3ba8231733 [FIX] purchase: Purchase report wrong qty_to_be_billed
Steps to reproduce the bug:
- Let's consider product P with purchase_method = 'purchase'
- Create a purchase order PO and puchase 20 units of P to a vendor
- Confirm PO and create a vendor bill VB the 20 units of P
- Validate VB
- The invoiced quantity on PO is 20
- Go to the Purchase report and analyse the qty_to_be_billed

Bug:

The qty_to_be_billed was still equal to 20 instead of 0

opw:2091264

closes odoo/odoo#39493

X-original-commit: b00febedef7826f593bb07c7896595ecce8cae32
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-10-29 10:08:49 +00:00
Victor Feyens 7720bb21ed [FIX] purchase: sections and notes.
https://github.com/odoo/odoo/pull/34737 didn't go in enough depth to
ensure sections and notes don't break purchase flows.

closes odoo/odoo#39474

X-original-commit: 1e8ea4f5628878dbc667c27d4e76ab42d3f140ea
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-28 18:04:23 +00:00
Victor Feyens 9639283a81 [FIX] sale,account,purchase_requisition: multi-company
Use correct company to get fiscal positions and properties

Ensure company used to fetch fiscal positions is always the correct one
when coming from a company restricted model (company_id required, or
related.required).

purchase: get_fiscal_position doesn't consider company_id ctxt key

others: properties were accessed with potentially the wrong company.
2019-10-24 17:12:16 +00:00
Goffin Simon 566cfe3e4d [FIX] purchase: Impossible to duplicate a PO
Steps to reproduce the bug:
- Create a RFQ
- Add a line with a product
- Add a line with a note and save
- Duplicate the RFQ

Bug:

A traceback was raised because the function _select_seller was called on a line
with no product.

opw:2085977

closes odoo/odoo#38921

X-original-commit: 4ffc517d6011c2443f78ba27a608d4ec3815e737
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-10-17 08:05:53 +00:00
Hetal Dhanak ca3e898481 [IMP] purchase, purchase_requisition: supplier.info tree view
* use an editable tree to edit the supplier info
* keep the original forms because they're used in the "vendor pricelist"
menuitem
* updated tour
* change the position of requisition_id

Task-2029380

closes odoo/odoo#35972

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-16 09:44:51 +00:00
fw-bot 2ce0dcb65d [FIX] purchase: vendor price not converted to default UoM
-Define "g" as the default UoM for a product.
-Make a purchase order with that product.
-Select the "kg" UoM in the order line and a price of 50.
-Check the Purchase tab of the product.

Before this commit:

the UoM of the price created is the default UoM for the product, "g".
This is because it's a related field.
However, the price wasn't converted to the default UoM, it's still 50.

After this commit:

the price is converted to the default UoM, it's 0.05 per "g".

closes odoo/odoo#38688

Opw: 2076722
X-original-commit: 341b568773b28b2bbce02f3532215e9664b318ec
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-14 09:13:27 +00:00
Pedro M. Baeza 54116b1327 [IMP] purchase: Take into account purchase order date for sequence
**Steps to reproduce**

* Define "Purchase Order" sequence for using date ranges checking "Use subsequences per date_range".
* Change sequence prefix to "PO/%(year)s/".
* Create a purchase order with order date in 2020 (a different year than current one).

**Current behavior**

Got a purchase order with 2019 (current year) number.

**Expected behavior**

Got a purchase order with 2020 number.

closes odoo/odoo#38468

X-original-commit: ce423e6adb6659a1d5885bad158c59b882cb4565
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-11 09:14:28 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Andrea Grazioso (agr-odoo) 1ac5ba040e [FIX] account,mrp,payment,purchase,purchase_stock,sale,sale_stock: studio crash on new view
Install stock and purchase. Make a RFQ for just one product, coonfirm
and receive in one transfer. Click on the delivery (should be only 1).
The picking will display. Open studio, select view, activate list view.

Javascript traceback will popup. Moreover the view of the stock
module will be altered in a faulty way (can be recovered from "Window
Actions", looking for the stock.picking action with external id
"stock.action_picking_tree_all" and removing the last added tree from
"View Mode").

This is caused by studio not detecting all the active views, thus giving
the possibility to add an already active view, because when there is just
one picking all other views are filtered out.
Changing the way the form view is retrieved in case of a single picking
fix the issue.

opw-2076241

closes odoo/odoo#38093

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-07 13:18:20 +00:00
Parth Choksi b65d94c89a [FIX] *: ux improvements in activities
*: mrp
   product
   purchase
   stock

Renamed the 'activities_exception' filter to 'Warnings' and moved it
to the bottom of the filters, isolated by separators

Task-2056425
Closes: #36027
2019-10-07 12:30:22 +00:00
Florimond Husquinet (fhu) db1bef9166 [FIX] purchase: missing variant description in portal view of purchase order
- Set Joel Willis (the portal user) as a vendor.
- Create a purchase order and add a line with a variant product, such as the
conference chair (aluminium).
- Confirm the order.
- Then switch user to the portal user.
- In the portal view, go to the purchase orders and select the purchase order.

Before this commit:

the product line does not show the variant, only the base name of the product.

After this commit:

the product line now shows the vendor specific product name and product code.
To set this name and code, go to the Purchase tab of the product, and add a
line for the vendor in the Vendors table, or modify the existing line for
the vendor.

closes odoo/odoo#38082

Opw: 2076962
X-original-commit: c2f2169ab7574c49fa6b544299aab7214b1f4698
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-07 12:31:01 +00:00
Martin Trigaux 42417956c0 [I18N] *: export 13.0 source terms
closes odoo/odoo#38028

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-07 07:55:34 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Antoine Vandevenne (anv) 849be97f5a [IMP] Product, purchase, stock : Modify placeholder of notes.
Placeholder contained some errors.

task-2052537
2019-10-01 15:11:55 +00:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
svs-odoo e394aeba62 [IMP] purchase: editable purchase order list view
Task #1938656
2019-10-01 14:24:02 +00:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
Julien Mougenot 6fea5b42d6 [IMP] *: editable readonly list views: adapt views
Since the commit allowing all list views to be editable, there are some
views in which we need to ensure that certain fields are always readonly.

Affected modules:
- account
- crm
- product
- purchase
- sale

Task 1967602
2019-09-25 07:20:36 +00:00
Christophe Simonis d67b2483e5 [MERGE] forward port branch saas-12.4 up to 9ed4872ea0
closes odoo/odoo#37372

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24 17:45:37 +00:00
wan d3ddcc613f [FIX] account: constraint on empty account
If SQL, if you do
```display_type IN ('line_section', 'line_note') OR account_id IS NOT NULL```
and `display_type` is `NULL` then you can only have `'t'` because
`SELECT NULL OR 'f';` yields `NULL`
`SELECT NULL OR 't';` yields `'t'`
The check of NULL is not blocking, hence the constraint doesn't work.

closes odoo/odoo#37075

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-20 13:59:21 +00:00
Odoo Translation Bot e41f468972 [I18N] Update translation terms from Transifex 2019-09-22 06:10:13 +02:00
Odoo Translation Bot 5f1638e42d [I18N] Update translation terms from Transifex 2019-09-15 06:21:03 +02:00
Odoo Translation Bot 974261f7e9 [I18N] Update translation terms from Transifex 2019-09-22 01:19:57 +02:00
Xavier ALT bea0a9edfe [FIX] base, *: ensure name_search() returns lazy name_get() result
To avoid slowing down search like "{relational_field}" contains "{value}"
we always need to return the lazy name_get() for each [_]name_search method

closes odoo/odoo#36735

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-11 17:11:33 +00:00
Arnaud Baes 5ac0c268b2 [FIX] purchase: wrong source document browsed.
For some reasons, when the `mail_compose_message` wizard tries to
read the name of its source document, the id and the model are
sometimes mismatched as a `purchase.requisition` or a `purchase.order`.
To avoid this we force the `active_model` and `active_id` in the context of `action_rfq_send` to be always referring to the current `puchase.order`.

closes odoo/odoo#37097

Taskid: BugsLogistics.
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-19 09:15:26 +00:00