Commit Graph
125739 Commits
Author SHA1 Message Date
Vincent Schippefilt eebb0c6152 [FIX] web: corrected the order of icons in systray
Since the merge of JQuery 3, the building of systray icons is non
deterministic.

After this fix, the menus are loaded correctly in order.

Task-ID: 1960741

closes odoo/odoo#32382

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-05 10:13:41 +00:00
wan 6940cfddbc [IMP] account: visible but not required bank account on payment
When making a manual payment with account_sepa we want to allow people to add a bank account as it might display the European QR code for banking app, but this should stay optional.
So we made sure that the conditions making the field visible and required weren't the same.

part of task #1918423

closes odoo/odoo#32198

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-04 12:46:20 +00:00
wan 3c2e3b8c5a [REF] account: simplification of payments objects
simplification of payments objects and refactoring of the code

* registering payment(s) from the list of invoice now generate a single payment per invoice selected
* no more abstract object for payments/payment wizard as the logic is now really simple:
    - group_invoices option is now removed and we never try to group payments based on the currency/customer of whatsoever (see above),
    - the payment amount is the full residual amount of invoice and users cannot change it anymore
* partner_bank_account_id not required as soon as visible (depends on the payment method)
* refactoring to name tags and allow easier inheritance via xpath

part of task #1918423
2019-04-04 10:42:41 +00:00
William Henrotin 2190568d9e [IMP] mrp: suggest lot on workorder
On a manufactoring order, 'checking availability' will make the reservation of
the components to consume. If those components are tracked by lot or serial numbers, the
reservation will also set a available lot/sn on the move lines and workorder lines.

The reservation already works on product produce wizard lines and workorder line
(form view). We need this commit as preliminary work to being able to suggest them
on the workorders tablet view too.

In case of requesting the reservation after planning the production (applying
reservation on already created workorder lines and checks), we deleted all lines
not yet consumed. They are then recreated with the reservation.

The user can obiously still use the lot/sn he wants by changing it onto the
workorder.

Task : 1891864

closes odoo/odoo#28020

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-04 11:32:42 +00:00
William Henrotin 7556938fc7 [IMP] mrp: multiple finished product lots
This commit allows the user in charge of manufacturing products to
split his production into different lots if this production is done via
workorders. Using a lot in a workorder will adds constraint to all the
other ones. It will also prefil the final lot field and matching quantity
to produce for futur workorders.

This commit uses workorder lines (in another one2many as standard workorder_line_ids)
to register lot/serial number and produced quantity. Prefill lots and
quantities are all read from those lines

Task : 1891864
2019-04-04 11:13:41 +00:00
William Henrotin 108ee65af2 [IMP] mrp: block creating lot from workorder/produce wizard
When registering lot or serial number for a component in a workorder,
the manufacturer can create it on on the fly. We would like to give this
ability a restriction depending on the picking type.
This commit blocks the creating by default but leave the possibility to
tick a new checkbox on the manufacturing picking type to allow the
creation of lot and serial number for components inside the production process.

Task : 1891864
2019-04-04 11:12:29 +00:00
Lucas Perais (lpe) bf0bb534bf [FIX] base: Arabic generic World locale is ar_001
Before this commit, the "unitag" notation "xx_AA" was used for arabic generic locale
Since it is not an official Unicode CLDR notation, some other modules
may, and did crash (babel)

Instead, we prefer to use Unicode CLDR compliance
i.e. World regions should be "_001"

http://www.unicode.org/reports/tr35/#unicode_region_subtag
http://www.unicode.org/reports/tr35/#unicode_region_subtag_validity
BCP47: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

This commit should invalidate the commit made by #32344
which was a hack for stable versions

It should also be taken into account in migration scripts

closes odoo/odoo#32393

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-03 14:24:34 +00:00
Aurélien Warnon eec46c4774 [FIX] (website)_sale: fix p. configurator related tours
Task#1963335

Now that the product configurator has its own module, the tour
"tour_shop_custom_attribute_value" needs to be split in two parts
to handle the optional products.

The "sale_tour" also needed to be adapted to handle the fact that
the product input can also be a product_template input.

The "shop_buy_product" had its 'add_to_cart' step changed to handle
possible optional products window.

closes odoo/odoo#32368

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-04 08:47:37 +00:00
wan 01d0523fd7 [IMP] account, account_facturex: import customer invoices in XML
Task 1942983

Accounting firms need to upload PDF of customer invoices and refunds (not only vendor bills). For that, we now allow to
* define a mail alias on sale journals
* upload customer invoices from list view
* check for `facture X` XML attachments in PDF of customer invoices

closes odoo/odoo#31655

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-04 07:30:43 +00:00
jem-odoo e24a16858d [FIX] sale_timesheet: include correct empty lines in overview
When confirming a second SO, with its project set as the project of a previous SO (so they
can share the same project, and all their task created end up in the same project), we want
to see the sales line without timesheet on the table of the project overview.
Before this commit, it only takes the empty lines of the origin sales order, not the ones from
the second. This commit fixes that by including 2nd SO's service lines in the empty lines to
display.

Task-1915660

closes odoo/odoo#32391

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-03 13:55:39 +00:00
Antoine Prieels b28d14bf08 [REM] mrp: product location on routing
product_location was confusing, not correctly working and is now
replaced by a new feature to manage subcontracting correctly.

TaskID: 1915022

closes odoo/odoo#32390

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-03 13:53:52 +00:00
Arnaud Baes dc7c4ef52a [FIX] stock: move_ids_without_package locations
Since the package level task, most time it is not move_lines which is
displayed in the form view but move_ids_without_package. We apply the
weird write override to this field too, and we'll apply the comment in
the code (change this override by a proper onchange) someday in the
future.

Task 1831382
2019-04-03 13:53:52 +00:00
Arnaud Baes 46f2628ee3 [FIX] mrp: hide order when its picking type is archived
We may want do disable a picking type. In this case, we don't want the
linked manufacturing orders to appear on the main view of the
manufacturing orders (not through the inventory dashboards but through
the "manufacturing orders" menu item).

Task 1831382
2019-04-03 13:53:52 +00:00
Simon Lejeune e1a29b83be [ADD] purchase_mrp_subcontracting
With this module we can now add the price of the subcontracting on the
subcontracted move by using the `extra_cost` field on the MO and the
unit price of the PO.

We also enhance the view of the supplier info to display a checkbox if
the linked partner is a subcontractr, for clarity sake.

Joint work with: Arnaud Baes <arb@odoo.com>

task 1831382
2019-04-03 13:53:52 +00:00
Simon Lejeune d91db5bde6 [ADD] mrp_subcontracting
In a few words, it allows to send components to a subcontractor partner
and receive a finished product. The production is managed through classical
manufacturing orders where the raw and finished location is the
subcontracting location. When creating a receipt picking for a
subcontractor partner, the location_id of the moves will be set to the
subcontracting locations by using the property_stock_customer and
property_stock_supplier of the partner. An override of _action_confirm
will create the manufacturing order.

When a subcontracted bom contains tracking, the produce wizard is
available from the picking to record which lots were produced/consumed.

New type on the BoM: subcontract
New type on res.partner: subcontactor
New location per company (we still own the components stored at the
subcontractor so they're still valued)
New routes created to resupply the subcontracting location on order or
not (through a reordering rule).
Override of res.partner to set the property_stock_customer/supplier on
subcontactor partners.

Proper tests were added too.

Joint work with: Arnaud Baes <arb@odoo.com>

task 1831382
2019-04-03 13:52:22 +00:00
Simon Lejeune 928e3e0a0b [REF] mrp: extract _bom_find for reusability
In the subcontracting. we want an extension of the BoM lookup handling
the subcontractor_ids field we'll add. So this is a preliminary work.

task 1831382
2019-04-03 13:51:05 +00:00
Simon Lejeune 5978dcc641 [REF] stock: locations per company creations
Extract on an helper so that other modules can add a new location per
company without the creation of the default warehouse.

task 1831382
2019-04-03 13:51:05 +00:00
Simon Lejeune 028544e32e [FIX] stock: routes/rules generation
Joint work with Arnold Moyaux <arm@odoo.com>

task 1831382
2019-04-03 13:51:05 +00:00
Simon Lejeune e972d25400 [REF] mrp_account: add an extra_cost notion on the manufacturing order
This is a preliminary work to handle the price of subcontracting. We put
this field in the generic `mrp_account` module because we also want to
support adding an extra cost on a finished move without having to work
with the wokorders, on a future task.

task 1831382
2019-04-03 13:51:05 +00:00
Arnaud Baes 1019ceee6e [MOV] mrp_account
The module is moved from the enterprise repository as it
was *without* the bom cost report.

task 1831382
2019-04-03 13:51:05 +00:00
wan 7146a4b23b [IMP] account,pos: better distinction between customer payments
Task 1934667

1. That's the partner type (and not the payment type) that should define if a payment is a customer or a supplier payment :
a. When the partner type on the payment is "customer", the payment should be considered as a customer payment
(and thus be visible from the menu customer payments)
b. When the partner type on the payment is "supplier", the payment should be considered as a supplier payment
(and thus be visible from the menu supplier payments)

2. The PoS should only create customer payments (you never pay suppliers through the PoS)
The payment created should be with a partner type "Customer"
But the partner field can stay empty if the customer wasn't set on the PoS Order

3. When I change the payment type while creating a payment from scratch, it shouldn't change the partner type
Example : I'm creating a payment for a reimbursement, I'll create it from the customer payments menu (as I'm paying a customer), I'll tick the payment type "Send money"
I don't expect the partner type to change to vendor.

closes odoo/odoo#32381

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-02 14:45:04 +00:00
Christophe Monniez 3f3763148a [REL] saas-12.3 2019-04-02 21:21:32 +02:00
Xavier-Do b5c2004160 [IMP] core: avoid to check access rules on empty recordset
Checking access rules only makes sence if we have some records,
_filter_access_rules will always return a subset or current
recordset, and a subset or a empty recordset is an empty recordset.

closes odoo/odoo#32313

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-02 15:39:30 +00:00
Jinal Patel edef08eeee [IMP] stock: assign someone to picking
purpose is allow to assign picking to users
- add field responsible on the picking that allows to select a user
- Now we assign responsible to several picking at once
- add default filter 'My Transfers' and 'Unassigned Transfers'

Related task : 1938107

closes odoo/odoo#31138

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-02 14:41:19 +00:00
Vincent Schippefilt 7b884afbda [FIX] web: fix error handling of _applyChanges
After 5df4746c9a the error handling has
been changed inaccurately. This fix sets the error handling correctly.

closes odoo/odoo#32247

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-29 13:21:10 +00:00
Robot OdooAaron Bohy aab@odoo.comDavid Monjoie dmo@odoo.comMartin Geubelle mge@odoo.comRavi Gadhia rga@odoo.com
9aea7ae162 [MERGE] web,*: list view improvements
This branch brings several improvements related to the list view:

- grouped list views are now editable
- 'expand' attribute can be used to open by default the first level groups
- if there are a lot of groups, a pager is displayed (instead of having all
groups in the same page)
- when grouped on a many2one field, custom buttons (on the many2one
comodel) can be inserted in each group's header
- we can edit several records in a row in editable list views
- editable lists do not flicker anymore when switching a row to edit mode
- we can navigate through the cells in list views with the arrows (in
readonly)

Co-authored-by: Aaron Bohy aab@odoo.com
Co-authored-by: David Monjoie dmo@odoo.com
Co-authored-by: Martin Geubelle mge@odoo.com
Co-authored-by: Ravi Gadhia rga@odoo.com

Task 1915702

closes odoo/odoo#31756

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-04-02 15:46:39 +02:00
David Monjoie 8ea5a40417 [IMP] web: list: directional keys navigation in readonly
With this rev., it is now possible to navigate with arrows in list
views (except when editing, as in this case hitting the arrows moves
the cursor in the input/textarea), and to expand/collapse groups
with keyboard navigation.

Part of task 1915702
2019-04-02 11:57:00 +00:00
Aaron Bohy ca19b17fd3 [IMP] web: fetch records alongside read_group
This rev. adds params to the 'web_read_group' method, allowing to
search_read records inside each groups in a single RPC, instead of
doing a 'web_read_group' RPC followed by n 'search_read' RPCs,
where n is the number of opened groups.

Part of task 1915702
2019-04-02 11:57:00 +00:00
Aaron Bohy d0164d834b [IMP] web,account: editable list: no more position absolute
Before this rev., widgets were absolutely positioned in table
cells. This cause an undesired effect with text fields, as their
textarea overflowed and overlapped the next lines.

With this rev., wigdets are now statically positioned, and the cells
height and width don't change when switching a row to edit mode.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Aaron BohyandMartin Geubelle 9fbb4fb44f [IMP] web: editable list: table-layout: fixed
This rev. changes the layout of *editable* list views to a fixed
layout. This means that we are now responsible of the width of
each column. To do that, we associate with each field type a
factor, and the higher the factor is, the larger the column will
be (w.r.t. the others). This default value can be overriden in the
arch.

The fixed layout allows to remove the absolute positionning of
widgets inside editable lists (done in the next commit).

Part of task 1915702

Co-authored-by: Martin Geubelle <mge@odoo.com>
2019-04-02 11:55:57 +00:00
Martin Geubelle a75fa7e377 [IMP] web: allow mass update in editable lists
From an editable list view, if you select several lines then change
a field, you are now asked if you want to apply the same change on
all selected lines. If you accept, a write is directly performed
(without applying onchange, as the records are reloaded and the view
re-rendered). If you decline, the classic behavior still occurs.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Martin Geubelle 015958dc17 [IMP] web,base: put buttons in list group headers
It is now possible to put buttons in the list view group headers.
When the view is grouped by a many2one field, those buttons
appear next to the header title when the group is opened.

The buttons are specified in the views in a <groupby> tag in the
list arch, with the following structure:
    <groupby name="groupedField"> <!-- must be a many2one -->
        <button type="object" name="my_method" string="Button1"/>
    </groupby>

It is also possible to add `field`, inside the `groupby` which can
be used for modifiers. These fields thus belong on the many2one
comodel, like:
    <groupby name="partner_id">
        <field name="name"/> <!-- name of partner_id -->
        <button type="object" name="my_method" string="Button1"
		attrs="{'invisible': [('name', '=', 'Georges')]}"/>
    </groupby>

These extra fields are fetched in batch when grouping on the field.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Aaron Bohy 2be28d4d03 [IMP] web,board: enable pagination in grouped lists
With this rev., when there are a lot of groups in a grouped list
view, groups are displayed under several pages, whereas they were
all displayed in the same page before.

This is especially interesting with the new 'expand' attribute, to
ensure that we don't read records for a large number of groups.

By default, the groups limit is set to 80 (like records), and to 10
is the 'expand' attribute is set to true. This limit can be
overriden with the 'groups_limit' attribute.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Aaron Bohy 5895d23cbd [IMP] web: list: add expand attrs
When this attribute is set to true on the <tree> root node, in a
grouped list view, first level groups are automatically opened.

Part of task 1915702
2019-04-02 11:55:57 +00:00
234d92c4f0 [IMP] web: list: editable grouped list views
This rev. enables the editable feature in grouped list views.

Part of task 1915702

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2019-04-02 11:55:57 +00:00
Aaron Bohy 55676110c8 [IMP] web: list: import attrs
The 'import' attrs is valid according to the rng definition of the
list view. It is used in a few views in Odoo. However, it didn't
actually work (in most cases, it worked by chance because it is
set to "0" in addition to create="0", and create="0" already
disables the import feature).

With this ref, the 'import' attrs is taken into account and we
can now disable the import feature even if the create one is
enabled. Moreover, it is now documented.
2019-04-02 11:55:57 +00:00
Aaron Bohy 7024f8d58b [REF] base,account: list: remove deprecated attrs
The 'toolbar' attribute is not referenced in the documentation, and
it has no effect since at least v10.

The 'on_write' attribute was referenced in the documentation, but
is no longer used in Odoo and has no effect since at least v11.

The 'colors' and 'fonts' attributes are deprecated since v9, and
have no effect since v10.

The 'string' attribute is deprecated since v8 and has no effect
since v9. However, it is widely used in Odoo, so we must remove
all occurrences before removing it from the rng.
2019-04-02 11:55:57 +00:00
Jigar Vaghela a82dbe4d68 [IMP] purchase: Change purchase sub menu string from "Purchase" to "Order"
Purpose :
========
    Maintain the uniformity between the sales and purchase menus

closes odoo/odoo#31482

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-28 06:19:40 +00:00
Jigar Vaghela a018279d77 [IMP] purchase: New products menu and show Products and Product Variants in this menu.
Purpose :
========
    Maintain the uniformity between the sales and purchase menus
2019-03-28 06:12:55 +00:00
Rishabh Jadia ac45703e27 [IMP] purchase: improve the purchase order report.
The purpose of this commit is, remove "our order reference" because it is already in the title, replace purchase order confirmation by purchase order and add the purchase representative.

Task Id #1902886

closes odoo/odoo#31099

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-02-21 09:45:56 +00:00
Ankita Raval 2e1d7f8519 [ADD] stock: Add a field note on SN/LN.
-Add a field note to allow users to record detailed information about a lot/serial number.

Related Task Id : 1938650

closes odoo/odoo#31089

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-02-19 09:35:40 +00:00
wan d60e6a1ab7 [ADD] l10n_be_invoice_bba: update reference fields
Task 1920906
remove the l10n_be_structured_comm field
random/date references will not be longer used
adapt for the last changes in account

closes odoo/odoo#29858

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-02 11:11:00 +00:00
wan 46a339fc9e [ADD] account: new european invoice reference
Task 1920906
Rework of the invoice references. We can now select references based on partner or on invoice number, and the Odoo way, or the (newly implemented) european way (SEPA RF references)
The reference type informations are no longer stored on the company but on the sales journals
2019-04-02 11:11:00 +00:00
Thibault Delavallée 76c25f1c3c [FIX][ADD] website_sale_stock(_product_configurator): move option to its bridge module
Since recent changes product configurator is now located in its own module.
Some code remaining in website_sale_stock should be located in its own
bridge module.

closes odoo/odoo#32336

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-02 11:45:44 +00:00
Thibault Delavallée 02f548ce9e [FIX] stock_account: fix reference to undefined variable
post_inventory method does not return anything (in stock), and True (in
mrp). Anyway the returned result is not used anywhere and does not have
any meaning.

In stock_account call to super is done on some sub record sets and result
of super is returned. However due to code architecture it is unsure whether
super is actually called. Let us avoid any issue with res being undefined if
there is no call to super done.
2019-04-02 11:42:55 +00:00
Goffin Simon 2afd482c1a [FIX] project: adding channels members to a private project
Steps to reproduce:
- Create a channels C with user A linked to an employee E
- Create project P with privacy_visibility='followers' meaning only visible for employees that follow P
- Add the channel C as a follower of P
- Log as user A go to Project app

Bug:
The project P is not readable for A

opw:1958386

closes odoo/odoo#32324

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-02 07:10:43 +00:00
William Henrotin 600072d8d4 [IMP] delivery: rename 'Delivery Method' by 'Shipping Method'
To be consistent with sale orders

Task : 1942231

closes odoo/odoo#31339

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-02 08:33:17 +00:00
William HenrotinandHetal Dhanak b57a8051f2 [IMP] delivery: only show external carrier
Clicking on 'install more providers' should only show module of external
carrier. In the previous domain, we get delivery_barcode and
website_delivery_ups in the domain which is not intended.

Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
2019-04-02 08:33:17 +00:00
William HenrotinandHetal Dhanak 9df79f42d0 [IMP] mrp: manage actions without raw moves
If a manufacturing order doens't have any raw move, it now triggers a user error in case of action_confirm and simply change it's state in case of cancel.

Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
2019-04-02 08:33:17 +00:00
William HenrotinandHetal Dhanak ab215ca158 [IMP] stock: cancel button at the end
On the stock picking form view, we would like the cancel button is at the far right of the button bar.

Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
2019-04-02 06:46:12 +00:00